crf replace by lf
This commit is contained in:
parent
a7b230a0b7
commit
e7f270cf37
9 changed files with 2389 additions and 2390 deletions
|
@ -1 +0,0 @@
|
|||
Subproject commit 6bdb6da3fa9682303799e5c3b1f755398e87fc99
|
File diff suppressed because it is too large
Load diff
|
@ -1,213 +1,213 @@
|
|||
#ifndef DallasTemperature_h
|
||||
#define DallasTemperature_h
|
||||
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
// set to true to include code for new and delete operators
|
||||
#ifndef REQUIRESNEW
|
||||
#define REQUIRESNEW false
|
||||
#endif
|
||||
|
||||
// set to true to include code implementing alarm search functions
|
||||
#ifndef REQUIRESALARMS
|
||||
#define REQUIRESALARMS true
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <OneWire.h>
|
||||
|
||||
// Model IDs
|
||||
#define DS18S20MODEL 0x10
|
||||
#define DS18B20MODEL 0x28
|
||||
#define DS1822MODEL 0x22
|
||||
|
||||
// OneWire commands
|
||||
#define STARTCONVO 0x44 // Tells device to take a temperature reading and put it on the scratchpad
|
||||
#define COPYSCRATCH 0x48 // Copy EEPROM
|
||||
#define READSCRATCH 0xBE // Read EEPROM
|
||||
#define WRITESCRATCH 0x4E // Write to EEPROM
|
||||
#define RECALLSCRATCH 0xB8 // Reload from last known
|
||||
#define READPOWERSUPPLY 0xB4 // Determine if device needs parasite power
|
||||
#define ALARMSEARCH 0xEC // Query bus for devices with an alarm condition
|
||||
|
||||
// Scratchpad locations
|
||||
#define TEMP_LSB 0
|
||||
#define TEMP_MSB 1
|
||||
#define HIGH_ALARM_TEMP 2
|
||||
#define LOW_ALARM_TEMP 3
|
||||
#define CONFIGURATION 4
|
||||
#define INTERNAL_BYTE 5
|
||||
#define COUNT_REMAIN 6
|
||||
#define COUNT_PER_C 7
|
||||
#define SCRATCHPAD_CRC 8
|
||||
|
||||
// Device resolution
|
||||
#define TEMP_9_BIT 0x1F // 9 bit
|
||||
#define TEMP_10_BIT 0x3F // 10 bit
|
||||
#define TEMP_11_BIT 0x5F // 11 bit
|
||||
#define TEMP_12_BIT 0x7F // 12 bit
|
||||
|
||||
// Error Codes
|
||||
#define DEVICE_DISCONNECTED -127
|
||||
|
||||
typedef uint8_t DeviceAddress[8];
|
||||
|
||||
class DallasTemperature
|
||||
{
|
||||
public:
|
||||
|
||||
DallasTemperature(OneWire*);
|
||||
|
||||
// initalize bus
|
||||
void begin(void);
|
||||
|
||||
// returns the number of devices found on the bus
|
||||
uint8_t getDeviceCount(void);
|
||||
|
||||
// returns true if address is valid
|
||||
bool validAddress(uint8_t*);
|
||||
|
||||
// finds an address at a given index on the bus
|
||||
bool getAddress(uint8_t*, const uint8_t);
|
||||
|
||||
// attempt to determine if the device at the given address is connected to the bus
|
||||
bool isConnected(uint8_t*);
|
||||
|
||||
// attempt to determine if the device at the given address is connected to the bus
|
||||
// also allows for updating the read scratchpad
|
||||
bool isConnected(uint8_t*, uint8_t*);
|
||||
|
||||
// read device's scratchpad
|
||||
void readScratchPad(uint8_t*, uint8_t*);
|
||||
|
||||
// write device's scratchpad
|
||||
void writeScratchPad(uint8_t*, const uint8_t*);
|
||||
|
||||
// read device's power requirements
|
||||
bool readPowerSupply(uint8_t*);
|
||||
|
||||
// returns the current resolution, 9-12
|
||||
uint8_t getResolution(uint8_t*);
|
||||
|
||||
// set resolution of a device to 9, 10, 11, or 12 bits
|
||||
void setResolution(uint8_t*, uint8_t);
|
||||
|
||||
// sends command for all devices on the bus to perform a temperature conversion
|
||||
void requestTemperatures(void);
|
||||
|
||||
// sends command for one device to perform a temperature conversion by address
|
||||
void requestTemperaturesByAddress(uint8_t*);
|
||||
|
||||
// sends command for one device to perform a temperature conversion by index
|
||||
void requestTemperaturesByIndex(uint8_t);
|
||||
|
||||
// returns temperature in degrees C
|
||||
float getTempC(uint8_t*);
|
||||
|
||||
// returns temperature in degrees F
|
||||
float getTempF(uint8_t*);
|
||||
|
||||
// Get temperature for device index (slow)
|
||||
float getTempCByIndex(uint8_t);
|
||||
|
||||
// Get temperature for device index (slow)
|
||||
float getTempFByIndex(uint8_t);
|
||||
|
||||
// returns true if the bus requires parasite power
|
||||
bool isParasitePowerMode(void);
|
||||
|
||||
#if REQUIRESALARMS
|
||||
|
||||
typedef void AlarmHandler(uint8_t*);
|
||||
|
||||
// sets the high alarm temperature for a device
|
||||
// accepts a char. valid range is -55C - 125C
|
||||
void setHighAlarmTemp(uint8_t*, const char);
|
||||
|
||||
// sets the low alarm temperature for a device
|
||||
// accepts a char. valid range is -55C - 125C
|
||||
void setLowAlarmTemp(uint8_t*, const char);
|
||||
|
||||
// returns a signed char with the current high alarm temperature for a device
|
||||
// in the range -55C - 125C
|
||||
char getHighAlarmTemp(uint8_t*);
|
||||
|
||||
// returns a signed char with the current low alarm temperature for a device
|
||||
// in the range -55C - 125C
|
||||
char getLowAlarmTemp(uint8_t*);
|
||||
|
||||
// resets internal variables used for the alarm search
|
||||
void resetAlarmSearch(void);
|
||||
|
||||
// search the wire for devices with active alarms
|
||||
bool alarmSearch(uint8_t*);
|
||||
|
||||
// returns true if ia specific device has an alarm
|
||||
bool hasAlarm(uint8_t*);
|
||||
|
||||
// returns true if any device is reporting an alarm on the bus
|
||||
bool hasAlarm(void);
|
||||
|
||||
// runs the alarm handler for all devices returned by alarmSearch()
|
||||
void processAlarms(void);
|
||||
|
||||
// sets the alarm handler
|
||||
void setAlarmHandler(AlarmHandler *);
|
||||
|
||||
// The default alarm handler
|
||||
static void defaultAlarmHandler(uint8_t*);
|
||||
|
||||
#endif
|
||||
|
||||
// convert from celcius to farenheit
|
||||
static float toFahrenheit(const float);
|
||||
|
||||
// convert from farenheit to celsius
|
||||
static float toCelsius(const float);
|
||||
|
||||
#if REQUIRESNEW
|
||||
|
||||
// initalize memory area
|
||||
void* operator new (unsigned int);
|
||||
|
||||
// delete memory reference
|
||||
void operator delete(void*);
|
||||
|
||||
#endif
|
||||
|
||||
private:
|
||||
typedef uint8_t ScratchPad[9];
|
||||
|
||||
// parasite power on or off
|
||||
bool parasite;
|
||||
|
||||
// used to determine the delay amount needed to allow for the
|
||||
// temperature conversion to take place
|
||||
int conversionDelay;
|
||||
|
||||
// count of devices on the bus
|
||||
uint8_t devices;
|
||||
|
||||
// Take a pointer to one wire instance
|
||||
OneWire* _wire;
|
||||
|
||||
// reads scratchpad and returns the temperature in degrees C
|
||||
float calculateTemperature(uint8_t*, uint8_t*);
|
||||
|
||||
#if REQUIRESALARMS
|
||||
|
||||
// required for alarmSearch
|
||||
uint8_t alarmSearchAddress[8];
|
||||
char alarmSearchJunction;
|
||||
uint8_t alarmSearchExhausted;
|
||||
|
||||
// the alarm handler function pointer
|
||||
AlarmHandler *_AlarmHandler;
|
||||
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif
|
||||
#ifndef DallasTemperature_h
|
||||
#define DallasTemperature_h
|
||||
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
// set to true to include code for new and delete operators
|
||||
#ifndef REQUIRESNEW
|
||||
#define REQUIRESNEW false
|
||||
#endif
|
||||
|
||||
// set to true to include code implementing alarm search functions
|
||||
#ifndef REQUIRESALARMS
|
||||
#define REQUIRESALARMS true
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <OneWire.h>
|
||||
|
||||
// Model IDs
|
||||
#define DS18S20MODEL 0x10
|
||||
#define DS18B20MODEL 0x28
|
||||
#define DS1822MODEL 0x22
|
||||
|
||||
// OneWire commands
|
||||
#define STARTCONVO 0x44 // Tells device to take a temperature reading and put it on the scratchpad
|
||||
#define COPYSCRATCH 0x48 // Copy EEPROM
|
||||
#define READSCRATCH 0xBE // Read EEPROM
|
||||
#define WRITESCRATCH 0x4E // Write to EEPROM
|
||||
#define RECALLSCRATCH 0xB8 // Reload from last known
|
||||
#define READPOWERSUPPLY 0xB4 // Determine if device needs parasite power
|
||||
#define ALARMSEARCH 0xEC // Query bus for devices with an alarm condition
|
||||
|
||||
// Scratchpad locations
|
||||
#define TEMP_LSB 0
|
||||
#define TEMP_MSB 1
|
||||
#define HIGH_ALARM_TEMP 2
|
||||
#define LOW_ALARM_TEMP 3
|
||||
#define CONFIGURATION 4
|
||||
#define INTERNAL_BYTE 5
|
||||
#define COUNT_REMAIN 6
|
||||
#define COUNT_PER_C 7
|
||||
#define SCRATCHPAD_CRC 8
|
||||
|
||||
// Device resolution
|
||||
#define TEMP_9_BIT 0x1F // 9 bit
|
||||
#define TEMP_10_BIT 0x3F // 10 bit
|
||||
#define TEMP_11_BIT 0x5F // 11 bit
|
||||
#define TEMP_12_BIT 0x7F // 12 bit
|
||||
|
||||
// Error Codes
|
||||
#define DEVICE_DISCONNECTED -127
|
||||
|
||||
typedef uint8_t DeviceAddress[8];
|
||||
|
||||
class DallasTemperature
|
||||
{
|
||||
public:
|
||||
|
||||
DallasTemperature(OneWire*);
|
||||
|
||||
// initalize bus
|
||||
void begin(void);
|
||||
|
||||
// returns the number of devices found on the bus
|
||||
uint8_t getDeviceCount(void);
|
||||
|
||||
// returns true if address is valid
|
||||
bool validAddress(uint8_t*);
|
||||
|
||||
// finds an address at a given index on the bus
|
||||
bool getAddress(uint8_t*, const uint8_t);
|
||||
|
||||
// attempt to determine if the device at the given address is connected to the bus
|
||||
bool isConnected(uint8_t*);
|
||||
|
||||
// attempt to determine if the device at the given address is connected to the bus
|
||||
// also allows for updating the read scratchpad
|
||||
bool isConnected(uint8_t*, uint8_t*);
|
||||
|
||||
// read device's scratchpad
|
||||
void readScratchPad(uint8_t*, uint8_t*);
|
||||
|
||||
// write device's scratchpad
|
||||
void writeScratchPad(uint8_t*, const uint8_t*);
|
||||
|
||||
// read device's power requirements
|
||||
bool readPowerSupply(uint8_t*);
|
||||
|
||||
// returns the current resolution, 9-12
|
||||
uint8_t getResolution(uint8_t*);
|
||||
|
||||
// set resolution of a device to 9, 10, 11, or 12 bits
|
||||
void setResolution(uint8_t*, uint8_t);
|
||||
|
||||
// sends command for all devices on the bus to perform a temperature conversion
|
||||
void requestTemperatures(void);
|
||||
|
||||
// sends command for one device to perform a temperature conversion by address
|
||||
void requestTemperaturesByAddress(uint8_t*);
|
||||
|
||||
// sends command for one device to perform a temperature conversion by index
|
||||
void requestTemperaturesByIndex(uint8_t);
|
||||
|
||||
// returns temperature in degrees C
|
||||
float getTempC(uint8_t*);
|
||||
|
||||
// returns temperature in degrees F
|
||||
float getTempF(uint8_t*);
|
||||
|
||||
// Get temperature for device index (slow)
|
||||
float getTempCByIndex(uint8_t);
|
||||
|
||||
// Get temperature for device index (slow)
|
||||
float getTempFByIndex(uint8_t);
|
||||
|
||||
// returns true if the bus requires parasite power
|
||||
bool isParasitePowerMode(void);
|
||||
|
||||
#if REQUIRESALARMS
|
||||
|
||||
typedef void AlarmHandler(uint8_t*);
|
||||
|
||||
// sets the high alarm temperature for a device
|
||||
// accepts a char. valid range is -55C - 125C
|
||||
void setHighAlarmTemp(uint8_t*, const char);
|
||||
|
||||
// sets the low alarm temperature for a device
|
||||
// accepts a char. valid range is -55C - 125C
|
||||
void setLowAlarmTemp(uint8_t*, const char);
|
||||
|
||||
// returns a signed char with the current high alarm temperature for a device
|
||||
// in the range -55C - 125C
|
||||
char getHighAlarmTemp(uint8_t*);
|
||||
|
||||
// returns a signed char with the current low alarm temperature for a device
|
||||
// in the range -55C - 125C
|
||||
char getLowAlarmTemp(uint8_t*);
|
||||
|
||||
// resets internal variables used for the alarm search
|
||||
void resetAlarmSearch(void);
|
||||
|
||||
// search the wire for devices with active alarms
|
||||
bool alarmSearch(uint8_t*);
|
||||
|
||||
// returns true if ia specific device has an alarm
|
||||
bool hasAlarm(uint8_t*);
|
||||
|
||||
// returns true if any device is reporting an alarm on the bus
|
||||
bool hasAlarm(void);
|
||||
|
||||
// runs the alarm handler for all devices returned by alarmSearch()
|
||||
void processAlarms(void);
|
||||
|
||||
// sets the alarm handler
|
||||
void setAlarmHandler(AlarmHandler *);
|
||||
|
||||
// The default alarm handler
|
||||
static void defaultAlarmHandler(uint8_t*);
|
||||
|
||||
#endif
|
||||
|
||||
// convert from celcius to farenheit
|
||||
static float toFahrenheit(const float);
|
||||
|
||||
// convert from farenheit to celsius
|
||||
static float toCelsius(const float);
|
||||
|
||||
#if REQUIRESNEW
|
||||
|
||||
// initalize memory area
|
||||
void* operator new (unsigned int);
|
||||
|
||||
// delete memory reference
|
||||
void operator delete(void*);
|
||||
|
||||
#endif
|
||||
|
||||
private:
|
||||
typedef uint8_t ScratchPad[9];
|
||||
|
||||
// parasite power on or off
|
||||
bool parasite;
|
||||
|
||||
// used to determine the delay amount needed to allow for the
|
||||
// temperature conversion to take place
|
||||
int conversionDelay;
|
||||
|
||||
// count of devices on the bus
|
||||
uint8_t devices;
|
||||
|
||||
// Take a pointer to one wire instance
|
||||
OneWire* _wire;
|
||||
|
||||
// reads scratchpad and returns the temperature in degrees C
|
||||
float calculateTemperature(uint8_t*, uint8_t*);
|
||||
|
||||
#if REQUIRESALARMS
|
||||
|
||||
// required for alarmSearch
|
||||
uint8_t alarmSearchAddress[8];
|
||||
char alarmSearchJunction;
|
||||
uint8_t alarmSearchExhausted;
|
||||
|
||||
// the alarm handler function pointer
|
||||
AlarmHandler *_AlarmHandler;
|
||||
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,213 +1,213 @@
|
|||
#ifndef DallasTemperature_h
|
||||
#define DallasTemperature_h
|
||||
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
// set to true to include code for new and delete operators
|
||||
#ifndef REQUIRESNEW
|
||||
#define REQUIRESNEW false
|
||||
#endif
|
||||
|
||||
// set to true to include code implementing alarm search functions
|
||||
#ifndef REQUIRESALARMS
|
||||
#define REQUIRESALARMS true
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <OneWire.h>
|
||||
|
||||
// Model IDs
|
||||
#define DS18S20MODEL 0x10
|
||||
#define DS18B20MODEL 0x28
|
||||
#define DS1822MODEL 0x22
|
||||
|
||||
// OneWire commands
|
||||
#define STARTCONVO 0x44 // Tells device to take a temperature reading and put it on the scratchpad
|
||||
#define COPYSCRATCH 0x48 // Copy EEPROM
|
||||
#define READSCRATCH 0xBE // Read EEPROM
|
||||
#define WRITESCRATCH 0x4E // Write to EEPROM
|
||||
#define RECALLSCRATCH 0xB8 // Reload from last known
|
||||
#define READPOWERSUPPLY 0xB4 // Determine if device needs parasite power
|
||||
#define ALARMSEARCH 0xEC // Query bus for devices with an alarm condition
|
||||
|
||||
// Scratchpad locations
|
||||
#define TEMP_LSB 0
|
||||
#define TEMP_MSB 1
|
||||
#define HIGH_ALARM_TEMP 2
|
||||
#define LOW_ALARM_TEMP 3
|
||||
#define CONFIGURATION 4
|
||||
#define INTERNAL_BYTE 5
|
||||
#define COUNT_REMAIN 6
|
||||
#define COUNT_PER_C 7
|
||||
#define SCRATCHPAD_CRC 8
|
||||
|
||||
// Device resolution
|
||||
#define TEMP_9_BIT 0x1F // 9 bit
|
||||
#define TEMP_10_BIT 0x3F // 10 bit
|
||||
#define TEMP_11_BIT 0x5F // 11 bit
|
||||
#define TEMP_12_BIT 0x7F // 12 bit
|
||||
|
||||
// Error Codes
|
||||
#define DEVICE_DISCONNECTED -127
|
||||
|
||||
typedef uint8_t DeviceAddress[8];
|
||||
|
||||
class DallasTemperature
|
||||
{
|
||||
public:
|
||||
|
||||
DallasTemperature(OneWire*);
|
||||
|
||||
// initalize bus
|
||||
void begin(void);
|
||||
|
||||
// returns the number of devices found on the bus
|
||||
uint8_t getDeviceCount(void);
|
||||
|
||||
// returns true if address is valid
|
||||
bool validAddress(uint8_t*);
|
||||
|
||||
// finds an address at a given index on the bus
|
||||
bool getAddress(uint8_t*, const uint8_t);
|
||||
|
||||
// attempt to determine if the device at the given address is connected to the bus
|
||||
bool isConnected(uint8_t*);
|
||||
|
||||
// attempt to determine if the device at the given address is connected to the bus
|
||||
// also allows for updating the read scratchpad
|
||||
bool isConnected(uint8_t*, uint8_t*);
|
||||
|
||||
// read device's scratchpad
|
||||
void readScratchPad(uint8_t*, uint8_t*);
|
||||
|
||||
// write device's scratchpad
|
||||
void writeScratchPad(uint8_t*, const uint8_t*);
|
||||
|
||||
// read device's power requirements
|
||||
bool readPowerSupply(uint8_t*);
|
||||
|
||||
// returns the current resolution, 9-12
|
||||
uint8_t getResolution(uint8_t*);
|
||||
|
||||
// set resolution of a device to 9, 10, 11, or 12 bits
|
||||
void setResolution(uint8_t*, uint8_t);
|
||||
|
||||
// sends command for all devices on the bus to perform a temperature conversion
|
||||
void requestTemperatures(void);
|
||||
|
||||
// sends command for one device to perform a temperature conversion by address
|
||||
void requestTemperaturesByAddress(uint8_t*);
|
||||
|
||||
// sends command for one device to perform a temperature conversion by index
|
||||
void requestTemperaturesByIndex(uint8_t);
|
||||
|
||||
// returns temperature in degrees C
|
||||
float getTempC(uint8_t*);
|
||||
|
||||
// returns temperature in degrees F
|
||||
float getTempF(uint8_t*);
|
||||
|
||||
// Get temperature for device index (slow)
|
||||
float getTempCByIndex(uint8_t);
|
||||
|
||||
// Get temperature for device index (slow)
|
||||
float getTempFByIndex(uint8_t);
|
||||
|
||||
// returns true if the bus requires parasite power
|
||||
bool isParasitePowerMode(void);
|
||||
|
||||
#if REQUIRESALARMS
|
||||
|
||||
typedef void AlarmHandler(uint8_t*);
|
||||
|
||||
// sets the high alarm temperature for a device
|
||||
// accepts a char. valid range is -55C - 125C
|
||||
void setHighAlarmTemp(uint8_t*, const char);
|
||||
|
||||
// sets the low alarm temperature for a device
|
||||
// accepts a char. valid range is -55C - 125C
|
||||
void setLowAlarmTemp(uint8_t*, const char);
|
||||
|
||||
// returns a signed char with the current high alarm temperature for a device
|
||||
// in the range -55C - 125C
|
||||
char getHighAlarmTemp(uint8_t*);
|
||||
|
||||
// returns a signed char with the current low alarm temperature for a device
|
||||
// in the range -55C - 125C
|
||||
char getLowAlarmTemp(uint8_t*);
|
||||
|
||||
// resets internal variables used for the alarm search
|
||||
void resetAlarmSearch(void);
|
||||
|
||||
// search the wire for devices with active alarms
|
||||
bool alarmSearch(uint8_t*);
|
||||
|
||||
// returns true if ia specific device has an alarm
|
||||
bool hasAlarm(uint8_t*);
|
||||
|
||||
// returns true if any device is reporting an alarm on the bus
|
||||
bool hasAlarm(void);
|
||||
|
||||
// runs the alarm handler for all devices returned by alarmSearch()
|
||||
void processAlarms(void);
|
||||
|
||||
// sets the alarm handler
|
||||
void setAlarmHandler(AlarmHandler *);
|
||||
|
||||
// The default alarm handler
|
||||
static void defaultAlarmHandler(uint8_t*);
|
||||
|
||||
#endif
|
||||
|
||||
// convert from celcius to farenheit
|
||||
static float toFahrenheit(const float);
|
||||
|
||||
// convert from farenheit to celsius
|
||||
static float toCelsius(const float);
|
||||
|
||||
#if REQUIRESNEW
|
||||
|
||||
// initalize memory area
|
||||
void* operator new (unsigned int);
|
||||
|
||||
// delete memory reference
|
||||
void operator delete(void*);
|
||||
|
||||
#endif
|
||||
|
||||
private:
|
||||
typedef uint8_t ScratchPad[9];
|
||||
|
||||
// parasite power on or off
|
||||
bool parasite;
|
||||
|
||||
// used to determine the delay amount needed to allow for the
|
||||
// temperature conversion to take place
|
||||
int conversionDelay;
|
||||
|
||||
// count of devices on the bus
|
||||
uint8_t devices;
|
||||
|
||||
// Take a pointer to one wire instance
|
||||
OneWire* _wire;
|
||||
|
||||
// reads scratchpad and returns the temperature in degrees C
|
||||
float calculateTemperature(uint8_t*, uint8_t*);
|
||||
|
||||
#if REQUIRESALARMS
|
||||
|
||||
// required for alarmSearch
|
||||
uint8_t alarmSearchAddress[8];
|
||||
char alarmSearchJunction;
|
||||
uint8_t alarmSearchExhausted;
|
||||
|
||||
// the alarm handler function pointer
|
||||
AlarmHandler *_AlarmHandler;
|
||||
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif
|
||||
#ifndef DallasTemperature_h
|
||||
#define DallasTemperature_h
|
||||
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
// set to true to include code for new and delete operators
|
||||
#ifndef REQUIRESNEW
|
||||
#define REQUIRESNEW false
|
||||
#endif
|
||||
|
||||
// set to true to include code implementing alarm search functions
|
||||
#ifndef REQUIRESALARMS
|
||||
#define REQUIRESALARMS true
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <OneWire.h>
|
||||
|
||||
// Model IDs
|
||||
#define DS18S20MODEL 0x10
|
||||
#define DS18B20MODEL 0x28
|
||||
#define DS1822MODEL 0x22
|
||||
|
||||
// OneWire commands
|
||||
#define STARTCONVO 0x44 // Tells device to take a temperature reading and put it on the scratchpad
|
||||
#define COPYSCRATCH 0x48 // Copy EEPROM
|
||||
#define READSCRATCH 0xBE // Read EEPROM
|
||||
#define WRITESCRATCH 0x4E // Write to EEPROM
|
||||
#define RECALLSCRATCH 0xB8 // Reload from last known
|
||||
#define READPOWERSUPPLY 0xB4 // Determine if device needs parasite power
|
||||
#define ALARMSEARCH 0xEC // Query bus for devices with an alarm condition
|
||||
|
||||
// Scratchpad locations
|
||||
#define TEMP_LSB 0
|
||||
#define TEMP_MSB 1
|
||||
#define HIGH_ALARM_TEMP 2
|
||||
#define LOW_ALARM_TEMP 3
|
||||
#define CONFIGURATION 4
|
||||
#define INTERNAL_BYTE 5
|
||||
#define COUNT_REMAIN 6
|
||||
#define COUNT_PER_C 7
|
||||
#define SCRATCHPAD_CRC 8
|
||||
|
||||
// Device resolution
|
||||
#define TEMP_9_BIT 0x1F // 9 bit
|
||||
#define TEMP_10_BIT 0x3F // 10 bit
|
||||
#define TEMP_11_BIT 0x5F // 11 bit
|
||||
#define TEMP_12_BIT 0x7F // 12 bit
|
||||
|
||||
// Error Codes
|
||||
#define DEVICE_DISCONNECTED -127
|
||||
|
||||
typedef uint8_t DeviceAddress[8];
|
||||
|
||||
class DallasTemperature
|
||||
{
|
||||
public:
|
||||
|
||||
DallasTemperature(OneWire*);
|
||||
|
||||
// initalize bus
|
||||
void begin(void);
|
||||
|
||||
// returns the number of devices found on the bus
|
||||
uint8_t getDeviceCount(void);
|
||||
|
||||
// returns true if address is valid
|
||||
bool validAddress(uint8_t*);
|
||||
|
||||
// finds an address at a given index on the bus
|
||||
bool getAddress(uint8_t*, const uint8_t);
|
||||
|
||||
// attempt to determine if the device at the given address is connected to the bus
|
||||
bool isConnected(uint8_t*);
|
||||
|
||||
// attempt to determine if the device at the given address is connected to the bus
|
||||
// also allows for updating the read scratchpad
|
||||
bool isConnected(uint8_t*, uint8_t*);
|
||||
|
||||
// read device's scratchpad
|
||||
void readScratchPad(uint8_t*, uint8_t*);
|
||||
|
||||
// write device's scratchpad
|
||||
void writeScratchPad(uint8_t*, const uint8_t*);
|
||||
|
||||
// read device's power requirements
|
||||
bool readPowerSupply(uint8_t*);
|
||||
|
||||
// returns the current resolution, 9-12
|
||||
uint8_t getResolution(uint8_t*);
|
||||
|
||||
// set resolution of a device to 9, 10, 11, or 12 bits
|
||||
void setResolution(uint8_t*, uint8_t);
|
||||
|
||||
// sends command for all devices on the bus to perform a temperature conversion
|
||||
void requestTemperatures(void);
|
||||
|
||||
// sends command for one device to perform a temperature conversion by address
|
||||
void requestTemperaturesByAddress(uint8_t*);
|
||||
|
||||
// sends command for one device to perform a temperature conversion by index
|
||||
void requestTemperaturesByIndex(uint8_t);
|
||||
|
||||
// returns temperature in degrees C
|
||||
float getTempC(uint8_t*);
|
||||
|
||||
// returns temperature in degrees F
|
||||
float getTempF(uint8_t*);
|
||||
|
||||
// Get temperature for device index (slow)
|
||||
float getTempCByIndex(uint8_t);
|
||||
|
||||
// Get temperature for device index (slow)
|
||||
float getTempFByIndex(uint8_t);
|
||||
|
||||
// returns true if the bus requires parasite power
|
||||
bool isParasitePowerMode(void);
|
||||
|
||||
#if REQUIRESALARMS
|
||||
|
||||
typedef void AlarmHandler(uint8_t*);
|
||||
|
||||
// sets the high alarm temperature for a device
|
||||
// accepts a char. valid range is -55C - 125C
|
||||
void setHighAlarmTemp(uint8_t*, const char);
|
||||
|
||||
// sets the low alarm temperature for a device
|
||||
// accepts a char. valid range is -55C - 125C
|
||||
void setLowAlarmTemp(uint8_t*, const char);
|
||||
|
||||
// returns a signed char with the current high alarm temperature for a device
|
||||
// in the range -55C - 125C
|
||||
char getHighAlarmTemp(uint8_t*);
|
||||
|
||||
// returns a signed char with the current low alarm temperature for a device
|
||||
// in the range -55C - 125C
|
||||
char getLowAlarmTemp(uint8_t*);
|
||||
|
||||
// resets internal variables used for the alarm search
|
||||
void resetAlarmSearch(void);
|
||||
|
||||
// search the wire for devices with active alarms
|
||||
bool alarmSearch(uint8_t*);
|
||||
|
||||
// returns true if ia specific device has an alarm
|
||||
bool hasAlarm(uint8_t*);
|
||||
|
||||
// returns true if any device is reporting an alarm on the bus
|
||||
bool hasAlarm(void);
|
||||
|
||||
// runs the alarm handler for all devices returned by alarmSearch()
|
||||
void processAlarms(void);
|
||||
|
||||
// sets the alarm handler
|
||||
void setAlarmHandler(AlarmHandler *);
|
||||
|
||||
// The default alarm handler
|
||||
static void defaultAlarmHandler(uint8_t*);
|
||||
|
||||
#endif
|
||||
|
||||
// convert from celcius to farenheit
|
||||
static float toFahrenheit(const float);
|
||||
|
||||
// convert from farenheit to celsius
|
||||
static float toCelsius(const float);
|
||||
|
||||
#if REQUIRESNEW
|
||||
|
||||
// initalize memory area
|
||||
void* operator new (unsigned int);
|
||||
|
||||
// delete memory reference
|
||||
void operator delete(void*);
|
||||
|
||||
#endif
|
||||
|
||||
private:
|
||||
typedef uint8_t ScratchPad[9];
|
||||
|
||||
// parasite power on or off
|
||||
bool parasite;
|
||||
|
||||
// used to determine the delay amount needed to allow for the
|
||||
// temperature conversion to take place
|
||||
int conversionDelay;
|
||||
|
||||
// count of devices on the bus
|
||||
uint8_t devices;
|
||||
|
||||
// Take a pointer to one wire instance
|
||||
OneWire* _wire;
|
||||
|
||||
// reads scratchpad and returns the temperature in degrees C
|
||||
float calculateTemperature(uint8_t*, uint8_t*);
|
||||
|
||||
#if REQUIRESALARMS
|
||||
|
||||
// required for alarmSearch
|
||||
uint8_t alarmSearchAddress[8];
|
||||
char alarmSearchJunction;
|
||||
uint8_t alarmSearchExhausted;
|
||||
|
||||
// the alarm handler function pointer
|
||||
AlarmHandler *_AlarmHandler;
|
||||
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -1,231 +1,231 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>REST with RPL router</title>
|
||||
<speedlimit>1.0</speedlimit>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>50.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>slipradio</identifier>
|
||||
<description>Sky SLIP radio</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/slip-radio/slip-radio.c</source>
|
||||
<commands EXPORT="discard">make slip-radio.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/slip-radio/slip-radio.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>server</identifier>
|
||||
<description>Erbium Server</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.c</source>
|
||||
<commands EXPORT="discard">make er-example-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>client</identifier>
|
||||
<description>Erbium Client</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-client.c</source>
|
||||
<commands EXPORT="discard">make er-example-client.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-client.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>30.303994886410642</x>
|
||||
<y>17.22128424003353</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>slipradio</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>46.57186415376375</x>
|
||||
<y>37.25589203828498</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>server</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>18.194682268367348</x>
|
||||
<y>50.210548118402656</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>client</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>259</width>
|
||||
<z>0</z>
|
||||
<height>179</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>2</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AttributeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.LEDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<viewport>2.255467003316979 0.0 0.0 2.255467003316979 59.30641698643764 -13.478401994502008</viewport>
|
||||
</plugin_config>
|
||||
<width>300</width>
|
||||
<z>2</z>
|
||||
<height>178</height>
|
||||
<location_x>262</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>762</width>
|
||||
<z>4</z>
|
||||
<height>491</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>182</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
<analyzers name="6lowpan" />
|
||||
</plugin_config>
|
||||
<width>451</width>
|
||||
<z>-1</z>
|
||||
<height>305</height>
|
||||
<location_x>73</location_x>
|
||||
<location_y>140</location_y>
|
||||
<minimized>true</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<showWatchpoints />
|
||||
<zoomfactor>25.49079397896416</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1624</width>
|
||||
<z>5</z>
|
||||
<height>252</height>
|
||||
<location_x>6</location_x>
|
||||
<location_y>712</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>1</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>853</width>
|
||||
<z>3</z>
|
||||
<height>491</height>
|
||||
<location_x>765</location_x>
|
||||
<location_y>182</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
SerialSocketServer
|
||||
<mote_arg>0</mote_arg>
|
||||
<width>422</width>
|
||||
<z>1</z>
|
||||
<height>82</height>
|
||||
<location_x>606</location_x>
|
||||
<location_y>51</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>REST with RPL router</title>
|
||||
<speedlimit>1.0</speedlimit>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>50.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>slipradio</identifier>
|
||||
<description>Sky SLIP radio</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/slip-radio/slip-radio.c</source>
|
||||
<commands EXPORT="discard">make slip-radio.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/slip-radio/slip-radio.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>server</identifier>
|
||||
<description>Erbium Server</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.c</source>
|
||||
<commands EXPORT="discard">make er-example-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>client</identifier>
|
||||
<description>Erbium Client</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-client.c</source>
|
||||
<commands EXPORT="discard">make er-example-client.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-client.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>30.303994886410642</x>
|
||||
<y>17.22128424003353</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>slipradio</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>46.57186415376375</x>
|
||||
<y>37.25589203828498</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>server</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>18.194682268367348</x>
|
||||
<y>50.210548118402656</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>client</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>259</width>
|
||||
<z>0</z>
|
||||
<height>179</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>2</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AttributeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.LEDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<viewport>2.255467003316979 0.0 0.0 2.255467003316979 59.30641698643764 -13.478401994502008</viewport>
|
||||
</plugin_config>
|
||||
<width>300</width>
|
||||
<z>2</z>
|
||||
<height>178</height>
|
||||
<location_x>262</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>762</width>
|
||||
<z>4</z>
|
||||
<height>491</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>182</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
<analyzers name="6lowpan" />
|
||||
</plugin_config>
|
||||
<width>451</width>
|
||||
<z>-1</z>
|
||||
<height>305</height>
|
||||
<location_x>73</location_x>
|
||||
<location_y>140</location_y>
|
||||
<minimized>true</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<showWatchpoints />
|
||||
<zoomfactor>25.49079397896416</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1624</width>
|
||||
<z>5</z>
|
||||
<height>252</height>
|
||||
<location_x>6</location_x>
|
||||
<location_y>712</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>1</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>853</width>
|
||||
<z>3</z>
|
||||
<height>491</height>
|
||||
<location_x>765</location_x>
|
||||
<location_y>182</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
SerialSocketServer
|
||||
<mote_arg>0</mote_arg>
|
||||
<width>422</width>
|
||||
<z>1</z>
|
||||
<height>82</height>
|
||||
<location_x>606</location_x>
|
||||
<location_y>51</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
|
|
|
@ -1,231 +1,231 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>REST with RPL router</title>
|
||||
<speedlimit>1.0</speedlimit>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>50.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>rplroot</identifier>
|
||||
<description>Sky RPL Root</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-border-router/border-router.c</source>
|
||||
<commands EXPORT="discard">make border-router.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-border-router/border-router.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>server</identifier>
|
||||
<description>Erbium Server</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.c</source>
|
||||
<commands EXPORT="discard">make er-example-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>client</identifier>
|
||||
<description>Erbium Client</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-client.c</source>
|
||||
<commands EXPORT="discard">make er-example-client.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-client.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>33.260163187353555</x>
|
||||
<y>30.643217359962595</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>rplroot</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>46.57186415376375</x>
|
||||
<y>40.35946215910942</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>server</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>18.638049428485125</x>
|
||||
<y>47.55034515769599</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>client</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>259</width>
|
||||
<z>0</z>
|
||||
<height>179</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AttributeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.LEDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<viewport>3.61568947862321 0.0 0.0 3.61568947862321 15.610600779367 -85.92728269158351</viewport>
|
||||
</plugin_config>
|
||||
<width>300</width>
|
||||
<z>2</z>
|
||||
<height>178</height>
|
||||
<location_x>261</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>762</width>
|
||||
<z>3</z>
|
||||
<height>491</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>182</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
<analyzers name="6lowpan" />
|
||||
</plugin_config>
|
||||
<width>451</width>
|
||||
<z>-1</z>
|
||||
<height>305</height>
|
||||
<location_x>73</location_x>
|
||||
<location_y>140</location_y>
|
||||
<minimized>true</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
SerialSocketServer
|
||||
<mote_arg>0</mote_arg>
|
||||
<width>422</width>
|
||||
<z>4</z>
|
||||
<height>74</height>
|
||||
<location_x>578</location_x>
|
||||
<location_y>18</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<showWatchpoints />
|
||||
<zoomfactor>25.49079397896416</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1624</width>
|
||||
<z>5</z>
|
||||
<height>252</height>
|
||||
<location_x>6</location_x>
|
||||
<location_y>712</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>2</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>853</width>
|
||||
<z>1</z>
|
||||
<height>491</height>
|
||||
<location_x>765</location_x>
|
||||
<location_y>182</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>REST with RPL router</title>
|
||||
<speedlimit>1.0</speedlimit>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>50.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>rplroot</identifier>
|
||||
<description>Sky RPL Root</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-border-router/border-router.c</source>
|
||||
<commands EXPORT="discard">make border-router.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-border-router/border-router.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>server</identifier>
|
||||
<description>Erbium Server</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.c</source>
|
||||
<commands EXPORT="discard">make er-example-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>client</identifier>
|
||||
<description>Erbium Client</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-client.c</source>
|
||||
<commands EXPORT="discard">make er-example-client.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-client.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>33.260163187353555</x>
|
||||
<y>30.643217359962595</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>rplroot</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>46.57186415376375</x>
|
||||
<y>40.35946215910942</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>server</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>18.638049428485125</x>
|
||||
<y>47.55034515769599</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>client</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>259</width>
|
||||
<z>0</z>
|
||||
<height>179</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AttributeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.LEDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<viewport>3.61568947862321 0.0 0.0 3.61568947862321 15.610600779367 -85.92728269158351</viewport>
|
||||
</plugin_config>
|
||||
<width>300</width>
|
||||
<z>2</z>
|
||||
<height>178</height>
|
||||
<location_x>261</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>762</width>
|
||||
<z>3</z>
|
||||
<height>491</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>182</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
<analyzers name="6lowpan" />
|
||||
</plugin_config>
|
||||
<width>451</width>
|
||||
<z>-1</z>
|
||||
<height>305</height>
|
||||
<location_x>73</location_x>
|
||||
<location_y>140</location_y>
|
||||
<minimized>true</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
SerialSocketServer
|
||||
<mote_arg>0</mote_arg>
|
||||
<width>422</width>
|
||||
<z>4</z>
|
||||
<height>74</height>
|
||||
<location_x>578</location_x>
|
||||
<location_y>18</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<showWatchpoints />
|
||||
<zoomfactor>25.49079397896416</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1624</width>
|
||||
<z>5</z>
|
||||
<height>252</height>
|
||||
<location_x>6</location_x>
|
||||
<location_y>712</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>2</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>853</width>
|
||||
<z>1</z>
|
||||
<height>491</height>
|
||||
<location_x>765</location_x>
|
||||
<location_y>182</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
|
|
|
@ -1,193 +1,193 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>REST with RPL router</title>
|
||||
<speedlimit>1.0</speedlimit>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>50.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>rplroot</identifier>
|
||||
<description>Sky RPL Root</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-border-router/border-router.c</source>
|
||||
<commands EXPORT="discard">make border-router.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-border-router/border-router.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>server</identifier>
|
||||
<description>Erbium Server</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.c</source>
|
||||
<commands EXPORT="discard">make er-example-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>33.260163187353555</x>
|
||||
<y>30.643217359962595</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>rplroot</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>35.100895239785295</x>
|
||||
<y>39.70574552287428</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>server</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>259</width>
|
||||
<z>0</z>
|
||||
<height>179</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AttributeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.LEDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<viewport>7.9849281638410705 0.0 0.0 7.9849281638410705 -133.27812697619663 -225.04752569190535</viewport>
|
||||
</plugin_config>
|
||||
<width>300</width>
|
||||
<z>1</z>
|
||||
<height>175</height>
|
||||
<location_x>262</location_x>
|
||||
<location_y>2</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>560</width>
|
||||
<z>3</z>
|
||||
<height>326</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>293</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
<analyzers name="6lowpan" />
|
||||
</plugin_config>
|
||||
<width>451</width>
|
||||
<z>-1</z>
|
||||
<height>305</height>
|
||||
<location_x>73</location_x>
|
||||
<location_y>140</location_y>
|
||||
<minimized>true</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
SerialSocketServer
|
||||
<mote_arg>0</mote_arg>
|
||||
<width>422</width>
|
||||
<z>4</z>
|
||||
<height>74</height>
|
||||
<location_x>39</location_x>
|
||||
<location_y>199</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<showWatchpoints />
|
||||
<zoomfactor>25.49079397896416</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1624</width>
|
||||
<z>5</z>
|
||||
<height>252</height>
|
||||
<location_x>4</location_x>
|
||||
<location_y>622</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>1</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>702</width>
|
||||
<z>2</z>
|
||||
<height>646</height>
|
||||
<location_x>564</location_x>
|
||||
<location_y>2</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>REST with RPL router</title>
|
||||
<speedlimit>1.0</speedlimit>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>50.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>rplroot</identifier>
|
||||
<description>Sky RPL Root</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-border-router/border-router.c</source>
|
||||
<commands EXPORT="discard">make border-router.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-border-router/border-router.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
org.contikios.cooja.mspmote.SkyMoteType
|
||||
<identifier>server</identifier>
|
||||
<description>Erbium Server</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.c</source>
|
||||
<commands EXPORT="discard">make er-example-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/er-rest-example/er-example-server.sky</firmware>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>33.260163187353555</x>
|
||||
<y>30.643217359962595</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>rplroot</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>35.100895239785295</x>
|
||||
<y>39.70574552287428</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>server</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>259</width>
|
||||
<z>0</z>
|
||||
<height>179</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AttributeVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.LEDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<viewport>7.9849281638410705 0.0 0.0 7.9849281638410705 -133.27812697619663 -225.04752569190535</viewport>
|
||||
</plugin_config>
|
||||
<width>300</width>
|
||||
<z>1</z>
|
||||
<height>175</height>
|
||||
<location_x>262</location_x>
|
||||
<location_y>2</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>560</width>
|
||||
<z>3</z>
|
||||
<height>326</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>293</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
<analyzers name="6lowpan" />
|
||||
</plugin_config>
|
||||
<width>451</width>
|
||||
<z>-1</z>
|
||||
<height>305</height>
|
||||
<location_x>73</location_x>
|
||||
<location_y>140</location_y>
|
||||
<minimized>true</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
SerialSocketServer
|
||||
<mote_arg>0</mote_arg>
|
||||
<width>422</width>
|
||||
<z>4</z>
|
||||
<height>74</height>
|
||||
<location_x>39</location_x>
|
||||
<location_y>199</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<showWatchpoints />
|
||||
<zoomfactor>25.49079397896416</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1624</width>
|
||||
<z>5</z>
|
||||
<height>252</height>
|
||||
<location_x>4</location_x>
|
||||
<location_y>622</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>1</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>702</width>
|
||||
<z>2</z>
|
||||
<height>646</height>
|
||||
<location_x>564</location_x>
|
||||
<location_y>2</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
|
|
|
@ -1,72 +1,72 @@
|
|||
/*
|
||||
* Copyright (c) 2011, Swedish Institute of Computer Science
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the Institute nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* Sets up some commands for the RF230 radio.
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
#include "cmd.h"
|
||||
|
||||
#include "radio/rf230/radio.h"
|
||||
#include "radio/rf230bb/rf230bb.h"
|
||||
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
||||
#include <stdio.h>
|
||||
#define PRINTF(FORMAT,args...) printf_P(PSTR(FORMAT),##args)
|
||||
#define PRINTSHORT(FORMAT,args...) printf_P(PSTR(FORMAT),##args)
|
||||
#else
|
||||
#define PRINTF(...)
|
||||
#define PRINTSHORT(...)
|
||||
#endif
|
||||
|
||||
int
|
||||
cmd_handler_rf230(const uint8_t *data, int len)
|
||||
{
|
||||
if(data[0] == '!') {
|
||||
if(data[1] == 'C') {
|
||||
PRINTF("CMD: Setting channel: %d\n", data[2]);
|
||||
rf230_set_channel(data[2]);
|
||||
return 1;
|
||||
}
|
||||
} else if(data[0] == '?') {
|
||||
if(data[1] == 'C') {
|
||||
uint8_t buf[4];
|
||||
PRINTF("CMD: Getting channel: %d\n", data[2]);
|
||||
buf[0] = '!';
|
||||
buf[1] = 'C';
|
||||
buf[2] = rf230_get_channel();
|
||||
cmd_send(buf, 3);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* Copyright (c) 2011, Swedish Institute of Computer Science
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the Institute nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* Sets up some commands for the RF230 radio.
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
#include "cmd.h"
|
||||
|
||||
#include "radio/rf230/radio.h"
|
||||
#include "radio/rf230bb/rf230bb.h"
|
||||
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
||||
#include <stdio.h>
|
||||
#define PRINTF(FORMAT,args...) printf_P(PSTR(FORMAT),##args)
|
||||
#define PRINTSHORT(FORMAT,args...) printf_P(PSTR(FORMAT),##args)
|
||||
#else
|
||||
#define PRINTF(...)
|
||||
#define PRINTSHORT(...)
|
||||
#endif
|
||||
|
||||
int
|
||||
cmd_handler_rf230(const uint8_t *data, int len)
|
||||
{
|
||||
if(data[0] == '!') {
|
||||
if(data[1] == 'C') {
|
||||
PRINTF("CMD: Setting channel: %d\n", data[2]);
|
||||
rf230_set_channel(data[2]);
|
||||
return 1;
|
||||
}
|
||||
} else if(data[0] == '?') {
|
||||
if(data[1] == 'C') {
|
||||
uint8_t buf[4];
|
||||
PRINTF("CMD: Getting channel: %d\n", data[2]);
|
||||
buf[0] = '!';
|
||||
buf[1] = 'C';
|
||||
buf[2] = rf230_get_channel();
|
||||
cmd_send(buf, 3);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue