Commit Graph

9861 Commits

Author SHA1 Message Date
Andreas Löscher
6cbe94b7e9 New PluginType SIM_CONTROL_PLUGIN for sim control
SIM_CONTROL_PLGUIN are handled like SIM_PLUGIN, with one exception.
If the simulation is started with -nogui=<simfile> than it is checked
if a controlling plugin is loaded. If not, the simulation terminates
with an error message.
2014-11-06 17:16:24 +01:00
Fredrik Österlind
0a2804fd69 Merge pull request #846 from ejoerns/pull-req/cooja-platform
Cooja platform fixes
2014-11-05 15:21:18 +01:00
Enrico Joerns
bc6b7535d0 Buttons: use non-deprecated MSPSim button api 2014-11-04 01:48:12 +01:00
Enrico Joerns
b5d119babd Buttons: Some minor cleanups
Removed imports not required anymore and made some class members final
2014-11-04 01:48:12 +01:00
Enrico Joerns
b28c593776 Buttons: Added missing @Override annotations 2014-11-04 01:48:12 +01:00
Enrico Joerns
0a63922fa2 Buttons: Move implementation of button routines to Button class
The implementation of clickButton(), pressButton(), and releaseButton()
can be shared accross the several node-dependent implementations as
they use the node-dependent doPressButton() doReleaseButton() routines.
2014-11-04 01:48:12 +01:00
Enrico Joerns
be88a4fc52 Button: Add doPressButton() and doReleaseButton() to Button class
As every Button has a node-specific implementation part, this should be
the minimal interface to the backend node emulator for pressing and
releasing a button.
2014-11-04 01:48:11 +01:00
Enrico Joerns
378ca2629d Button: None of the buttons will saves its state
Saving a buttons state in simulation file is not required as its state
is much too volatile.
2014-11-04 01:48:11 +01:00
Enrico Joerns
82d30ef2e3 SkyButton: Reduce dependency on SkyMote
Placed call to setButton() in implementation-specific functions
doPressButton() and doReleaseButton() as in ContikiButton.
2014-11-04 01:48:11 +01:00
Enrico Joerns
d99708ba08 Button: Move common interface visualization to Button class
The implementation of a simple JPanel with a JButton was only code
duplication accross the several button implementations.
2014-11-04 01:48:11 +01:00
Enrico Joerns
0d12bcffcb [cooja-platform] Fixes for slip-bridge compatibility
* Added dev/uart1.h header file to cooja platform
* Added slip arch stub
* Suppress examples putchar definition as cooja platform provides its own

Note that the uart1.h file should only be an intermediate solution.
A generic contiki-wide definition for uart handling is required as each
platform defines its own varying set of uart functions.
2014-11-04 00:14:06 +01:00
Enrico Joerns
5a4c2e0d1f [cooja-platform] Add cast to linkaddr_t to avoid warning 2014-11-04 00:09:45 +01:00
Enrico Joerns
f8445ba1bd [cooja-platform] Remove unused variable 'shortaddr'
This variable was set but never used in the code
2014-11-04 00:09:45 +01:00
Enrico Joerns
2bc1e08f19 [cooja-platform] Include eeprom.h to avoid implicit declaration warning 2014-11-04 00:09:45 +01:00
Fredrik Österlind
a50bc08adc Merge pull request #841 from gebart/build-git-tag-io-reduce
Makefile.include: Reduce I/O load (and build time) by assigning git description variable once.
2014-11-03 09:26:18 +01:00
Joakim Gebart
b3dd696ec3 Makefile.include: Assign git description variable once.
By changing RELSTR= into RELSTR:= we force Make to evaluate the Git
version string only during Makefile read, and not on every single build
command execution.

The reduction in file system I/O cut the time to build
examples/er-rest-example on my development machine by a significant
amount, see below.

Core i7 notebook with ext4 file system on an SSD (building for TARGET=mulle):
"RELSTR="  make  19.70s user 1.07s system 82% cpu 25.291 total
"RELSTR:=" make  11.81s user 1.27s system 79% cpu 16.499 total

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2014-10-29 15:17:07 +01:00
Rémy Léone
a069f8f73d Adding a scan-build command
scan-build http://clang-analyzer.llvm.org/scan-build.html is a clang
based tool designed to provide static analysis over C code files.
2014-10-21 17:22:06 +02:00
Oskar Nordquist
5e640411f5 core/net/rime/ipolite: stop ctimer and reset queuebuf pointer when canceling old send
Ipolite is used by netflood and route-discovery modules among others. If a route request is yet to be re-broadcasted and a local route discovery is started (interval == 0), the previous queuebuf used is freed but ctimer and queuebuf pointer is left unchanged. This causes corrupt route requests to be sent, invalid routing tables to be formed, memcmp() on NULL pointer on receive, and other undefined behavior.

Signed-off-by: Oskar Nordquist <oskar.nordquist@crlsweden.com>
2014-10-21 15:25:52 +02:00
Nicolas Tsiftes
6fb7dd238e Merge pull request #648 from cetic/pr-csma-fixes
High throughput fixes for csma and sixlowpan
2014-10-21 12:17:03 +02:00
Nicolas Tsiftes
10d444637e Merge pull request #825 from alignan/i2c_changes
Add function to change I2C baudrate and push relevant configuration valu...
2014-10-21 06:46:55 +02:00
Antonio Lignan
ef6c351d0c Add function to change I2C baudrate and push relevant configuration values to platform config 2014-10-20 14:23:36 +02:00
Nicolas Tsiftes
0d39ee96ad Merge pull request #820 from alignan/serialnum_as_nodeid
Use the Z1 product ID as MAC/Node ID if no value is found in XMEM
2014-10-20 11:38:11 +02:00
Nicolas Tsiftes
27cde1ff81 Merge pull request #824 from alignan/fix_warnings
Warning fixes
2014-10-20 11:16:36 +02:00
Antonio Lignan
cceb97059c Use the Z1 product ID as MAC/Node ID if no value is found in the XMEM 2014-10-20 10:36:49 +02:00
Antonio Lignan
c836fbfbd9 Fixes warnings, bad code and code style 2014-10-20 10:28:00 +02:00
kkrentz
0579e304e4 llsec: Renamed ccm to ccm_star & Renamed llsec regression test 2014-10-16 09:21:56 -07:00
Fredrik Österlind
7c55290c32 Merge pull request #810 from cmorty/pull/sky_energest
sky: Initialize energest as early as possible / make regression testing more tolerant
2014-10-16 15:11:23 +02:00
Nicolas Tsiftes
fd47acba09 Merge pull request #808 from adamdunkels/pr/ip64
Conversion functions for IPv4/IPv6 addresses (missing from the NAT64 pr)
2014-10-10 00:42:37 +02:00
Moritz 'Morty' Strübe
9236b68779 Only fail on real fails 2014-10-09 09:43:08 +02:00
Moritz 'Morty' Strübe
74b741bad2 Support running multiple random seeds in case one fails 2014-10-09 09:43:07 +02:00
Moritz 'Morty' Strübe
c0783e2841 sky: Initialize energest as early as possible
If energest is initialized too late, the radio is not accounted
until the first switch. This is a problem when the radio is always
listening.
2014-10-09 09:42:56 +02:00
Adam Dunkels
5a24a781d5 The ip64-addr module converts between IPv4 and IPv6 addresses. 2014-10-09 08:07:34 +02:00
Mariano Alvira
e803a654b4 Merge pull request #684 from SmallLars/2nd-button
Enabled 2nd button on platform econotag
2014-10-08 14:05:24 -05:00
Nicolas Tsiftes
0a88764185 Merge pull request #804 from adamdunkels/pr/ip64
NAT64 for Contiki (RFC6164, RFC6147)
2014-10-08 19:41:09 +02:00
Adam Dunkels
d891d11324 Merge pull request #557 from kkrentz/llsec-integration
Integration of Link Layer Security
2014-10-08 15:45:46 +02:00
Nicolas Tsiftes
9423f70cdf Merge pull request #802 from alignan/add_batery_capability
Added battery capability to Z1 platform
2014-10-08 14:56:28 +02:00
Fredrik Österlind
f0f7f07c8d Merge pull request #799 from ejoerns/pull-req/cooja-mspsim-radiofix
[Cooja/MSPSim] Msp802154Radio: Fix maximum power indicator
2014-10-08 12:15:32 +02:00
Antonio Lignan
5bbb0cabbc Added battery capability to Z1 platform 2014-10-08 11:53:09 +02:00
Nicolas Tsiftes
4cc1762851 Merge pull request #797 from gebart/rpl-border-router-warnings
examples/rpl-border-router: Fix two minor warnings.
2014-10-05 17:15:15 +02:00
Enrico Joerns
9d27b181c1 [cooja/mspsim] Msp802154Radio: Fix maximum power indicator
Previously getOutputPowerIndicatorMax() returned the fixed value 31.
This is valid for e.g. the mspsim CC2420 radio implementation but not for the CC2520 implementation where the maximum returned value is 9.

Thus to fix transmission range issues (for example for Wismote node) the maxium value provided by the radio implementaiton must be used.
2014-10-05 00:38:49 +02:00
Joakim Gebart
d4179a0a0c examples/rpl-border-router: Fix two minor warnings.
- Remove unused variable i in generate_routes.
 - Add cast to unsigned long for printf(..%lu..) in generate_routes.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2014-10-04 18:05:38 +02:00
Adam Dunkels
fd5e79d0db Merge pull request #796 from gebart/core-net-ip-buffer-overflow-fix
core/net/ip: Prevent (tiny) buffer overflow in resolv_found()
2014-10-02 13:52:05 +02:00
Joakim Gebart
24d15ad9a5 core/net/ip: Prevent (tiny) buffer overflow in resolv_found()
An off-by-one error in resolv_found() could make an strncat() call
overflow by the terminating null byte.

When building with Clang the following warning was shown:

../../../core/net/ip/resolv.c:1458:17: warning: the value of the
      size argument in 'strncat' is too large, might lead to a
      buffer overflow [-Wstrncat-size]
                sizeof(resolv_hostname) - strlen(resolv_hostname));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../core/net/ip/resolv.c:1458:17: note: change the argument to
      be the free space in the destination buffer minus the
      terminating null byte
                sizeof(resolv_hostname) - strlen(resolv_hostname));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                sizeof(resolv_hostname) - strlen(resolv_hostname) - 1

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2014-10-02 12:52:39 +02:00
Fredrik Österlind
718e488b78 Merge pull request #795 from ejoerns/pull-req/cooja-println-cleanup
[Cooja] Println cleanup
2014-10-02 09:25:36 +02:00
Enrico Joerns
903d0333d3 [cooja] Removed some further printlns 2014-10-02 02:11:41 +02:00
Enrico Joerns
f02266d67c [cooja] dialogs/MessageListe: User Logger instead of println 2014-10-02 02:05:39 +02:00
Enrico Joerns
927d9a3153 [cooja] dialogs/MessageList: Added @Override annotations 2014-10-02 02:05:14 +02:00
Enrico Joerns
40f54a8e26 [cooja] Radio802154: Removed obsolete comments including println hints 2014-10-02 01:53:26 +02:00
Enrico Joerns
c7abba860f [cooja] Radio802154: Added @Override annotations
Also removed some unused imports
2014-10-02 01:40:07 +02:00
Enrico Joerns
c5e034fa1a [cooja] IEEE802154Analyzer: Use logger
Replaced println and printStackTrace by logger
2014-10-02 01:37:24 +02:00