author
int64 658
755k
| date
stringlengths 19
19
| timezone
int64 -46,800
43.2k
| hash
stringlengths 40
40
| message
stringlengths 5
490
| mods
list | language
stringclasses 20
values | license
stringclasses 3
values | repo
stringlengths 5
68
| original_message
stringlengths 12
491
|
---|---|---|---|---|---|---|---|---|---|
491,595 |
16.08.2017 02:25:44
| -7,200 |
5cc3657c9de587bf7df41a4a8bbc576b4dda0491
|
DEFAULTLINKCOST should be used when numTxAck is 0 AND numTx is 0.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -274,6 +274,22 @@ bool neighbors_isNeighborWithHigherDAGrank(uint8_t index) {\nreturn returnVal;\n}\n+bool neighbors_reachedMaxTransmission(uint8_t index){\n+ bool returnVal;\n+\n+ if (\n+ neighbors_vars.neighbors[index].used == TRUE &&\n+ neighbors_vars.neighbors[index].numTx > DEFAULTLINKCOST &&\n+ neighbors_vars.neighbors[index].numTxACK == 0\n+ ) {\n+ returnVal = TRUE;\n+ } else {\n+ returnVal = FALSE;\n+ }\n+\n+ return returnVal;\n+}\n+\n//===== updating neighbor information\n/**\n@@ -508,7 +524,11 @@ uint16_t neighbors_getLinkMetric(uint8_t index) {\n// we assume that this neighbor has already been checked for being in use\n// calculate link cost to this neighbor\nif (neighbors_vars.neighbors[index].numTxACK==0) {\n+ if (neighbors_vars.neighbors[index].numTx<=DEFAULTLINKCOST){\nrankIncrease = (3*DEFAULTLINKCOST-2)*MINHOPRANKINCREASE;\n+ } else {\n+ rankIncrease = (3*LARGESTLINKCOST-2)*MINHOPRANKINCREASE;\n+ }\n} else {\n//6TiSCH minimal draft using OF0 for rank computation: ((3*numTx/numTxAck)-2)*minHopRankIncrease\n// numTx is on 8 bits, so scaling up 10 bits won't lead to saturation\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.h",
"new_path": "openstack/02b-MAChigh/neighbors.h",
"diff": "#define BADNEIGHBORMAXRSSI -80 //dBm\n#define GOODNEIGHBORMINRSSI -90 //dBm\n#define SWITCHSTABILITYTHRESHOLD 3\n-#define DEFAULTLINKCOST 15\n+#define DEFAULTLINKCOST 4\n+#define LARGESTLINKCOST 8\n#define MAXDAGRANK 0xffff\n#define DEFAULTDAGRANK MAXDAGRANK\n@@ -73,6 +74,7 @@ bool neighbors_isStableNeighborByIndex(uint8_t index);\nbool neighbors_isInsecureNeighbor(open_addr_t* address);\nbool neighbors_isNeighborWithLowerDAGrank(uint8_t index);\nbool neighbors_isNeighborWithHigherDAGrank(uint8_t index);\n+bool neighbors_reachedMaxTransmission(uint8_t index);\n// updating neighbor information\nvoid neighbors_indicateRx(\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.c",
"new_path": "openstack/03b-IPv6/icmpv6rpl.c",
"diff": "@@ -386,6 +386,10 @@ void icmpv6rpl_updateMyDAGrankAndParentSelection() {\nprevRankIncrease = icmpv6rpl_vars.rankIncrease;\n// update my rank to current parent first\nif (icmpv6rpl_vars.haveParent==TRUE){\n+ if (neighbors_reachedMaxTransmission(icmpv6rpl_vars.ParentIndex)==FALSE){\n+ // I havn't enough transmission to my parent, don't update.\n+ return;\n+ }\nrankIncrease = neighbors_getLinkMetric(icmpv6rpl_vars.ParentIndex);\nneighborRank = neighbors_getNeighborRank(icmpv6rpl_vars.ParentIndex);\ntentativeDAGrank = (uint32_t)neighborRank+rankIncrease;\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -560,6 +560,7 @@ functionsToChange = [\n'neighbors_isInsecureNeighbor',\n'neighbors_isNeighborWithLowerDAGrank',\n'neighbors_isNeighborWithHigherDAGrank',\n+ 'neighbors_reachedMaxTransmission',\n'neighbors_indicateRx',\n'neighbors_indicateTx',\n'neighbors_updateSequenceNumber',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-492. DEFAULTLINKCOST should be used when numTxAck is 0 AND numTx is 0.
|
491,595 |
21.08.2017 18:03:00
| -7,200 |
1b70781c0bb05e1376d914eae2c6dba2268db6e1
|
support channel offset specification when issuing 6p command.
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -546,6 +546,7 @@ void openserial_handleEcho(uint8_t* buf, uint8_t bufLen){\nvoid openserial_get6pInfo(uint8_t commandId, uint8_t* code,uint8_t* cellOptions,uint8_t* numCells,cellInfo_ht* celllist_add,cellInfo_ht* celllist_delete,uint8_t* listOffset,uint8_t* maxListLen,uint8_t ptr, uint8_t commandLen){\nuint8_t i;\n+ uint8_t celllistLen;\n// clear command\nif (commandId == COMMAND_SET_6P_CLEAR){\n@@ -582,9 +583,10 @@ void openserial_get6pInfo(uint8_t commandId, uint8_t* code,uint8_t* cellOptions,\n*code = IANA_6TOP_CMD_ADD;\n// retrieve cell list\ni = 0;\n- while(commandLen>0){\n+ celllistLen = commandLen/2;\n+ while(commandLen>celllistLen){\ncelllist_add[i].slotoffset = openserial_vars.inputBuf[ptr];\n- celllist_add[i].channeloffset = DEFAULT_CHANNEL_OFFSET;\n+ celllist_add[i].channeloffset = openserial_vars.inputBuf[ptr+celllistLen];\ncelllist_add[i].isUsed = TRUE;\nptr += 1;\ncommandLen -= 1;\n@@ -596,10 +598,12 @@ void openserial_get6pInfo(uint8_t commandId, uint8_t* code,uint8_t* cellOptions,\n// delete command\nif (commandId == COMMAND_SET_6P_DELETE){\n*code = IANA_6TOP_CMD_DELETE;\n+ // retrieve cell list\ni = 0;\n- while(commandLen>0){\n+ celllistLen = commandLen/2;\n+ while(commandLen>celllistLen){\ncelllist_delete[i].slotoffset = openserial_vars.inputBuf[ptr];\n- celllist_delete[i].channeloffset = DEFAULT_CHANNEL_OFFSET;\n+ celllist_delete[i].channeloffset = openserial_vars.inputBuf[ptr+celllistLen];\ncelllist_delete[i].isUsed = TRUE;\nptr += 1;\ncommandLen -= 1;\n@@ -615,17 +619,20 @@ void openserial_get6pInfo(uint8_t commandId, uint8_t* code,uint8_t* cellOptions,\ni = 0;\nwhile(i<*numCells){\ncelllist_delete[i].slotoffset = openserial_vars.inputBuf[ptr];\n- celllist_delete[i].channeloffset = DEFAULT_CHANNEL_OFFSET;\n+ celllist_delete[i].channeloffset = openserial_vars.inputBuf[ptr+*numCells];\ncelllist_delete[i].isUsed = TRUE;\nptr += 1;\n- commandLen -= 1;\ni++;\n}\n+\n+ commandLen -= (*numCells) * 2;\n+ ptr += *numCells;\n// retrieve cell list to be relocated\ni = 0;\n- while(commandLen>0){\n+ celllistLen = commandLen/2;\n+ while(commandLen>celllistLen){\ncelllist_add[i].slotoffset = openserial_vars.inputBuf[ptr];\n- celllist_add[i].channeloffset = DEFAULT_CHANNEL_OFFSET;\n+ celllist_add[i].channeloffset = openserial_vars.inputBuf[ptr+celllistLen];\ncelllist_add[i].isUsed = TRUE;\nptr += 1;\ncommandLen -= 1;\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -1706,7 +1706,7 @@ bool sixtop_areAvailableCellsToBeRemoved(\ni = 0;\nnumOfavailableCells = 0;\n- available = FALSE;\n+ available = TRUE;\n// translate cellOptions to cell type\nif (cellOptions == LINKOPTIONS_TX){\n@@ -1727,6 +1727,7 @@ bool sixtop_areAvailableCellsToBeRemoved(\n} else {\ndo {\nif (cellList[i].isUsed){\n+ memset(&info,0,sizeof(slotinfo_element_t));\nif (type==CELLTYPE_TXRX){\nschedule_getSlotInfo(cellList[i].slotoffset,&anycastAddr,&info);\n} else {\n@@ -1742,16 +1743,14 @@ bool sixtop_areAvailableCellsToBeRemoved(\ni++;\n}while(i<CELLLIST_MAX_LEN && numOfavailableCells<numOfCells);\n- if(numOfavailableCells>0){\n+ if(numOfavailableCells==numOfCells && available == TRUE){\n//the rest link will not be scheduled, mark them as off type\nwhile(i<CELLLIST_MAX_LEN){\ncellList[i].isUsed = FALSE;\ni++;\n}\n- // local schedule can statisfy the bandwidth of cell request.\n- available = TRUE;\n} else {\n- // local schedule can't statisfy the bandwidth of cell request\n+ // local schedule can't satisfy the bandwidth of cell request\navailable = FALSE;\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.h",
"new_path": "openstack/02b-MAChigh/sixtop.h",
"diff": "// SF ID\n#define SFID_SF0 0\n-// Default Ch. ID\n-#define DEFAULT_CHANNEL_OFFSET 2\n-\ntypedef enum {\nSIXTOP_CELL_REQUEST = 0x00,\nSIXTOP_CELL_RESPONSE = 0x01,\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
SW-298. support channel offset specification when issuing 6p command.
|
491,609 |
31.08.2017 15:06:56
| -7,200 |
b4d826ecae62dccb09d0032ddc2122570cf1c752
|
Pass unencrypted errors to the application.
|
[
{
"change_type": "MODIFY",
"old_path": "openapps/opencoap/opencoap.c",
"new_path": "openapps/opencoap/opencoap.c",
"diff": "@@ -353,9 +353,12 @@ void opencoap_receive(OpenQueueEntry_t* msg) {\nfound=TRUE;\n}\n- // resource found, verify if it needs to be decrypted\n+ // resource found\n+ // verify if it needs to be decrypted\n+ // errors are passed to the application without decryption as they do not contain\n+ // object security option\nif (found==TRUE && temp_desc->callbackRx!=NULL) {\n- if (temp_desc->securityContext != NULL) {\n+ if (temp_desc->securityContext != NULL && coap_header.Code < COAP_CODE_RESP_BADREQ) {\ncoap_incomingOptionsLen = MAX_COAP_OPTIONS;\ndecStatus = openoscoap_unprotect_message(temp_desc->securityContext,\ncoap_header.Ver,\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-696. Pass unencrypted errors to the application.
|
491,609 |
01.09.2017 17:56:33
| -7,200 |
cac256231ea774b12377a44467387db617eef958
|
Initalize the OSCOAP context just before sending the Join Request.
|
[
{
"change_type": "MODIFY",
"old_path": "openapps/cjoin/cjoin.c",
"new_path": "openapps/cjoin/cjoin.c",
"diff": "@@ -74,7 +74,6 @@ void cjoin_init() {\ncjoin_vars.timerId = opentimers_create();\nidmanager_setJoinKey((uint8_t *) masterSecret);\n- cjoin_init_security_context();\ncjoin_schedule();\n}\n@@ -192,6 +191,10 @@ void cjoin_task_cb() {\n// cancel the startup timer but do not destroy it as we reuse it for retransmissions\nopentimers_cancel(cjoin_vars.timerId);\n+ // init the security context only here in order to use the latest joinKey\n+ // that may be set over the serial\n+ cjoin_init_security_context();\n+\ncjoin_sendJoinRequest(joinProxy);\nreturn;\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-697. Initalize the OSCOAP context just before sending the Join Request.
|
491,609 |
12.09.2017 19:28:43
| -7,200 |
4333a07683d0bac2c73f5a1bca102befae1b520e
|
Join Proxy must be a stable neighbor.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -112,6 +112,7 @@ open_addr_t* neighbors_getJoinProxy() {\njoinProxy = NULL;\nfor (i=0;i<MAXNUMNEIGHBORS;i++) {\nif (neighbors_vars.neighbors[i].used==TRUE &&\n+ neighbors_vars.neighbors[i].stableNeighbor==TRUE &&\nneighbors_vars.neighbors[i].joinPrio <= joinPrioMinimum) {\njoinProxy = &(neighbors_vars.neighbors[i].addr_64b);\njoinPrioMinimum = neighbors_vars.neighbors[i].joinPrio;\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-699. Join Proxy must be a stable neighbor.
|
491,609 |
13.09.2017 11:51:41
| -7,200 |
e178267c0d4579ba8f1bcaeba44e5c8a094875bc
|
Allow L2SEC to be configured even when it is not used.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154_security.c",
"new_path": "openstack/02a-MAClow/IEEE802154_security.c",
"diff": "#include \"IEEE802154_security.h\"\n//=============================define==========================================\n-#ifdef L2_SECURITY_ACTIVE\n//=========================== variables =======================================\nieee802154_security_vars_t ieee802154_security_vars;\n-//=========================== prototypes ======================================\n-\n-//=========================== admin ===========================================\n+//========= common functions regardless of whether L2SEC is used or not =======\n+// following 6 functions are also called when L2SEC is not used. This is to facilitate\n+// automated testing of SECJOIN without L2SEC and to ensure the order in which nodes\n+// start sending out EBs. With the current implementation, EBs are sent only once the\n+// node has received a Join Response from the JRC.\n-/**\n-\\brief Initialization of security tables and parameters.\n-*/\nvoid IEEE802154_security_init(void) {\n// TODO joinPermitted flag should be set dynamically upon a button press\n@@ -45,7 +43,33 @@ void IEEE802154_security_init(void) {\nmemset(&ieee802154_security_vars.k2.value[0], 0x00, 16);\n}\n+uint8_t IEEE802154_security_getBeaconKeyIndex(void) {\n+ return ieee802154_security_vars.k1.index;\n+}\n+uint8_t IEEE802154_security_getDataKeyIndex(void) {\n+ return ieee802154_security_vars.k2.index;\n+}\n+\n+void IEEE802154_security_setBeaconKey(uint8_t index, uint8_t* value) {\n+ ieee802154_security_vars.k1.index = index;\n+ memcpy(ieee802154_security_vars.k1.value, value, 16);\n+}\n+\n+void IEEE802154_security_setDataKey(uint8_t index, uint8_t* value) {\n+ ieee802154_security_vars.k2.index = index;\n+ memcpy(ieee802154_security_vars.k2.value, value, 16);\n+}\n+\n+bool IEEE802154_security_isConfigured() {\n+ if (ieee802154_security_vars.k1.index != IEEE802154_SECURITY_KEYINDEX_INVALID &&\n+ ieee802154_security_vars.k2.index != IEEE802154_SECURITY_KEYINDEX_INVALID) {\n+ return TRUE;\n+ }\n+ return FALSE;\n+}\n+\n//=========================== public ==========================================\n+#ifdef L2_SECURITY_ACTIVE\n/**\n\\brief Adding of Auxiliary Security Header to the IEEE802.15.4 MAC header\n*/\n@@ -441,31 +465,6 @@ uint8_t IEEE802154_security_auxLengthChecking(uint8_t KeyIdMode,\nreturn auxilary_len;\n}\n-uint8_t IEEE802154_security_getBeaconKeyIndex(void) {\n- return ieee802154_security_vars.k1.index;\n-}\n-uint8_t IEEE802154_security_getDataKeyIndex(void) {\n- return ieee802154_security_vars.k2.index;\n-}\n-\n-void IEEE802154_security_setBeaconKey(uint8_t index, uint8_t* value) {\n- ieee802154_security_vars.k1.index = index;\n- memcpy(ieee802154_security_vars.k1.value, value, 16);\n-}\n-\n-void IEEE802154_security_setDataKey(uint8_t index, uint8_t* value) {\n- ieee802154_security_vars.k2.index = index;\n- memcpy(ieee802154_security_vars.k2.value, value, 16);\n-}\n-\n-bool IEEE802154_security_isConfigured() {\n- if (ieee802154_security_vars.k1.index != IEEE802154_SECURITY_KEYINDEX_INVALID &&\n- ieee802154_security_vars.k2.index != IEEE802154_SECURITY_KEYINDEX_INVALID) {\n- return TRUE;\n- }\n- return FALSE;\n-}\n-\nuint8_t IEEE802154_security_getSecurityLevel(OpenQueueEntry_t *msg) {\nif (IEEE802154_security_isConfigured() == FALSE) {\nreturn IEEE154_ASH_SLF_TYPE_NOSEC;\n@@ -526,10 +525,6 @@ bool IEEE802154_security_acceptableLevel(OpenQueueEntry_t* msg, ieee802154_heade\n#else /* L2_SECURITY_ACTIVE */\n-void IEEE802154_security_init(void) {\n- return;\n-}\n-\nvoid IEEE802154_security_prependAuxiliarySecurityHeader(OpenQueueEntry_t* msg){\nreturn;\n}\n@@ -554,25 +549,6 @@ uint8_t IEEE802154_security_auxLengthChecking(uint8_t kid, uint8_t sup, uint8_t\nreturn (uint8_t) 0;\n}\n-uint8_t IEEE802154_security_getBeaconKeyIndex(void) {\n- return (uint8_t) 0;\n-}\n-uint8_t IEEE802154_security_getDataKeyIndex(void) {\n- return (uint8_t) 0;\n-}\n-\n-void IEEE802154_security_setBeaconKey(uint8_t index, uint8_t* value) {\n- return;\n-}\n-\n-void IEEE802154_security_setDataKey(uint8_t index, uint8_t* value) {\n- return;\n-}\n-\n-bool IEEE802154_security_isConfigured() {\n- return TRUE;\n-}\n-\nuint8_t IEEE802154_security_getSecurityLevel(OpenQueueEntry_t *msg) {\nreturn IEEE154_ASH_SLF_TYPE_NOSEC;\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-701. Allow L2SEC to be configured even when it is not used.
|
491,609 |
18.09.2017 14:08:56
| -7,200 |
a2eaec08c0beca334609a81cf01630ef94c28102
|
Introduce a flag within L2SEC to signal presence of dynamic keying support.
|
[
{
"change_type": "MODIFY",
"old_path": "openapps/cjoin/cjoin.c",
"new_path": "openapps/cjoin/cjoin.c",
"diff": "@@ -56,6 +56,9 @@ void cjoin_setIsJoined(bool newValue);\n//=========================== public ==========================================\nvoid cjoin_init() {\n+ // declare the usage of dynamic keying to L2 security module\n+ IEEE802154_security_setDynamicKeying();\n+\n// prepare the resource descriptor for the /j path\ncjoin_vars.desc.path0len = sizeof(cjoin_path0)-1;\ncjoin_vars.desc.path0val = (uint8_t*)(&cjoin_path0);\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154_security.c",
"new_path": "openstack/02a-MAClow/IEEE802154_security.c",
"diff": "ieee802154_security_vars_t ieee802154_security_vars;\n//========= common functions regardless of whether L2SEC is used or not =======\n-// following 6 functions are also called when L2SEC is not used. This is to facilitate\n+// following 7 functions are also called when L2SEC is not used. This is to facilitate\n// automated testing of SECJOIN without L2SEC and to ensure the order in which nodes\n// start sending out EBs. With the current implementation, EBs are sent only once the\n// node has received a Join Response from the JRC.\nvoid IEEE802154_security_init(void) {\n+ // By default, we assume that no dynamic keying (SEC JOIN) is used\n+ // if an app is linked with dynamic keying support, it should set\n+ // this flag to true by calling IEEE802154_security_setDynamicKeying()\n+ ieee802154_security_vars.dynamicKeying = FALSE;\n+\n// TODO joinPermitted flag should be set dynamically upon a button press\n// and propagated through the network via EBs\nieee802154_security_vars.joinPermitted = TRUE;\n@@ -61,6 +66,10 @@ void IEEE802154_security_setDataKey(uint8_t index, uint8_t* value) {\n}\nbool IEEE802154_security_isConfigured() {\n+ if (ieee802154_security_vars.dynamicKeying == FALSE) {\n+ return TRUE;\n+ }\n+\nif (ieee802154_security_vars.k1.index != IEEE802154_SECURITY_KEYINDEX_INVALID &&\nieee802154_security_vars.k2.index != IEEE802154_SECURITY_KEYINDEX_INVALID) {\nreturn TRUE;\n@@ -68,6 +77,10 @@ bool IEEE802154_security_isConfigured() {\nreturn FALSE;\n}\n+void IEEE802154_security_setDynamicKeying() {\n+ ieee802154_security_vars.dynamicKeying = TRUE;\n+}\n+\n//=========================== public ==========================================\n#ifdef L2_SECURITY_ACTIVE\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154_security.h",
"new_path": "openstack/02a-MAClow/IEEE802154_security.h",
"diff": "@@ -52,6 +52,7 @@ typedef struct{\n//=========================== variables =======================================\ntypedef struct {\n+ bool dynamicKeying;\nbool joinPermitted;\nsymmetric_key_802154_t k1;\nsymmetric_key_802154_t k2;\n@@ -73,6 +74,7 @@ void IEEE802154_security_setDataKey(uint8_t index, uint8_t* value);\nuint8_t IEEE802154_security_getSecurityLevel(OpenQueueEntry_t *msg);\nbool IEEE802154_security_acceptableLevel(OpenQueueEntry_t* msg, ieee802154_header_iht* parsedHeader);\nbool IEEE802154_security_isConfigured(void);\n+void IEEE802154_security_setDynamicKeying(void);\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -464,6 +464,7 @@ functionsToChange = [\n'IEEE802154_security_getSecurityLevel',\n'IEEE802154_security_acceptableLevel',\n'IEEE802154_security_isConfigured',\n+ 'IEEE802154_security_setDynamicKeying',\n# IEEE802154\n'ieee802154_prependHeader',\n'ieee802154_retrieveHeader',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
Introduce a flag within L2SEC to signal presence of dynamic keying support.
|
491,593 |
18.09.2017 14:52:08
| -7,200 |
31ca34b7410317e97d998bec0265ac8abf6da596
|
Assign to serial.baudrate instead of setBaudrate
|
[
{
"change_type": "MODIFY",
"old_path": "bootloader/telosb/bsl",
"new_path": "bootloader/telosb/bsl",
"diff": "@@ -1165,7 +1165,7 @@ class BootStrapLoader(LowLevel):\nself.bslTxRx(self.BSL_CHANGEBAUD, #Command: change baudrate\na, l) #args are coded in adr and len\ntime.sleep(0.010) #recomended delay\n- self.serialport.setBaudrate(baudrate)\n+ self.serialport.baudrate = baudrate\ndef actionReadBSLVersion(self):\n\"\"\"informational output of BSL version number.\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
Assign to serial.baudrate instead of setBaudrate
|
491,593 |
20.09.2017 11:26:33
| -7,200 |
7fede0c4ec301363cfba4a628e04cae3119cbf82
|
Having short sniffer TIME_PERIOD
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_sniffer/03oos_sniffer.c",
"new_path": "projects/common/03oos_sniffer/03oos_sniffer.c",
"diff": "#define LENGTH_PACKET 125+LENGTH_CRC ///< maximum length is 127 bytes\n#define CHANNEL 20 ///< 20=2.450GHz\n#define ID 0x99 ///< byte sent in the packets\n-#define TIMER_PERIOD 0x1fff\n+#define TIMER_PERIOD 0x1ff\n//=========================== variables =======================================\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
Having short sniffer TIME_PERIOD
|
491,595 |
20.09.2017 22:28:30
| -7,200 |
a19459c158ef7b9d395c26ca7723286753bf21d5
|
Apply inhibitatation behavior before synchronizing to the network.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -61,6 +61,8 @@ void activity_rie6(void);\nvoid activity_ri9(PORT_TIMER_WIDTH capturedTime);\n// inhibit serial\nvoid activity_inhibitSerial(void);\n+void activity_handleSerial_start(void);\n+void activity_handleSerial_stop(void);\n// frame validity check\nbool isValidRxFrame(ieee802154_header_iht* ieee802514_header);\n@@ -367,9 +369,17 @@ void isr_ieee154e_timer(opentimers_id_t id) {\ncase S_TXACK:\nactivity_rie6();\nbreak;\n+ case S_SYNCRX:\n+ break;\ncase S_SLEEP:\nactivity_inhibitSerial();\nbreak;\n+ case S_SYNCLISTEN:\n+ activity_handleSerial_start();\n+ break;\n+ case S_SYNCRXSERSTART:\n+ activity_handleSerial_stop();\n+ break;\ndefault:\n// log the error\nopenserial_printCritical(\n@@ -525,11 +535,22 @@ bool debugPrint_macStats() {\n//======= SYNCHRONIZING\nport_INLINE void activity_synchronize_newSlot() {\n+\n+ openserial_inhibitStart();\n+\n// I'm in the middle of receiving a packet\nif (ieee154e_vars.state==S_SYNCRX) {\nreturn;\n}\n+ opentimers_scheduleAbsolute(\n+ ieee154e_vars.serialInhibitTimerId, // timerId\n+ DURATION_si0, // duration\n+ ieee154e_vars.startOfSlotReference, // reference\n+ TIME_TICS, // timetype\n+ isr_ieee154e_timer // callback\n+ );\n+\nieee154e_vars.radioOnInit=sctimer_readCounter();\nieee154e_vars.radioOnThisSlot=TRUE;\n@@ -614,7 +635,7 @@ port_INLINE void activity_synchronize_endOfFrame(PORT_TIMER_WIDTH capturedTime)\n(errorparameter_t)ieee154e_vars.state,\n(errorparameter_t)0);\n// abort\n- endSlot();\n+ return;\n}\n// change state\n@@ -628,7 +649,6 @@ port_INLINE void activity_synchronize_endOfFrame(PORT_TIMER_WIDTH capturedTime)\n(errorparameter_t)0,\n(errorparameter_t)0);\n// abort\n- endSlot();\nreturn;\n}\n@@ -766,9 +786,6 @@ port_INLINE void activity_synchronize_endOfFrame(PORT_TIMER_WIDTH capturedTime)\n// return to listening state\nchangeState(S_SYNCLISTEN);\n-\n- // enable serial\n- openserial_inhibitStop(); // synchronize endOfFrame\n}\nport_INLINE bool ieee154e_processIEs(OpenQueueEntry_t* pkt, uint16_t* lenIE) {\n@@ -2150,6 +2167,25 @@ port_INLINE void activity_inhibitSerial(void) {\nopenserial_inhibitStart(); // activity_inhibitSerial\n}\n+port_INLINE void activity_handleSerial_start(void){\n+ changeState(S_SYNCRXSERSTART);\n+\n+ openserial_inhibitStop(); // activity_inhibitSerial\n+\n+ opentimers_scheduleAbsolute(\n+ ieee154e_vars.serialInhibitTimerId, // timerId\n+ DURATION_si1, // duration\n+ ieee154e_vars.startOfSlotReference, // reference\n+ TIME_TICS, // timetype\n+ isr_ieee154e_timer // callback\n+ );\n+}\n+\n+port_INLINE void activity_handleSerial_stop(void){\n+ openserial_inhibitStart();\n+ changeState(S_SYNCLISTEN);\n+}\n+\n//======= frame validity check\n/**\n@@ -2770,6 +2806,7 @@ void changeState(ieee154e_state_t newstate) {\nbreak;\ncase S_SLEEP:\ncase S_RXDATAOFFSET:\n+ case S_SYNCRXSERSTART:\ndebugpins_fsm_clr();\nbreak;\ncase S_SYNCRX:\n@@ -2901,11 +2938,11 @@ void endSlot() {\n// change state\nchangeState(S_SLEEP);\n- // arm serialInhibit timer (if we are still BEFORE DURATION_si)\n+ // arm serialInhibit timer (if we are still BEFORE DURATION_si1)\nif (ieee154e_vars.isSync==TRUE) {\nopentimers_scheduleAbsolute(\nieee154e_vars.serialInhibitTimerId, // timerId\n- DURATION_si, // duration\n+ DURATION_si1, // duration\nieee154e_vars.startOfSlotReference, // reference\nTIME_TICS, // timetype\nisr_ieee154e_timer // callback\n@@ -2913,7 +2950,7 @@ void endSlot() {\n}\n// resume serial activity (if we are still BEFORE DURATION_si)\n- if (DURATION_si+ieee154e_vars.startOfSlotReference-opentimers_getValue()<ieee154e_vars.slotDuration) {\n+ if (DURATION_si1+ieee154e_vars.startOfSlotReference-opentimers_getValue()<ieee154e_vars.slotDuration) {\nopenserial_inhibitStop(); // end of slot\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -149,6 +149,7 @@ typedef enum {\nS_TXACKDELAY = 0x17, // 'go' signal given, waiting for SFD Tx ACK\nS_TXACK = 0x18, // Tx ACK SFD received, sending bytes\nS_RXPROC = 0x19, // processing received data\n+ S_SYNCRXSERSTART = 0x1a, // stop serial port activity\n} ieee154e_state_t;\n#define TIMESLOT_TEMPLATE_ID 0x00\n@@ -218,7 +219,8 @@ enum ieee154e_linkOption_enum {\n#define DURATION_rt7 ieee154e_vars.lastCapturedTime+TsTxAckDelay-delayTx+wdRadioTx\n#define DURATION_rt8 ieee154e_vars.lastCapturedTime+wdAckDuration\n// serialInhibit\n-#define DURATION_si ieee154e_vars.lastCapturedTime+ieee154e_vars.slotDuration-SERIALINHIBITGUARD\n+#define DURATION_si0 ieee154e_vars.slotDuration-2*SERIALINHIBITGUARD\n+#define DURATION_si1 ieee154e_vars.slotDuration-SERIALINHIBITGUARD\n//=========================== typedef =========================================\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. Apply inhibitatation behavior before synchronizing to the network.
|
491,595 |
20.09.2017 22:29:20
| -7,200 |
8837d4ed5b56b4cd2f2df81c2805c9a0da98fad6
|
efficient opentimer callback.
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/opentimers.c",
"new_path": "drivers/common/opentimers.c",
"diff": "@@ -355,6 +355,7 @@ void opentimers_timer_callback(void){\nPORT_TIMER_WIDTH tempTimerGap;\nPORT_TIMER_WIDTH tempLastTimeout = opentimers_vars.currentTimeout;\n// 1. find the expired timer\n+ idToCallCB = TOO_MANY_TIMERS_ERROR;\nfor (i=0;i<MAX_NUM_TIMERS;i++){\nif (opentimers_vars.timersBuf[i].isrunning==TRUE){\n// all timers in the past within TIMERTHRESHOLD ticks\n@@ -366,6 +367,13 @@ void opentimers_timer_callback(void){\nif (tempLastTimeout>opentimers_vars.timersBuf[i].currentCompareValue){\ntempLastTimeout = opentimers_vars.timersBuf[i].currentCompareValue;\n}\n+ if (idToCallCB==TOO_MANY_TIMERS_ERROR){\n+ idToCallCB = i;\n+ } else {\n+ if (opentimers_vars.timersBuf[i].priority<opentimers_vars.timersBuf[idToCallCB].priority){\n+ idToCallCB = i;\n+ }\n+ }\n}\n}\n}\n@@ -376,19 +384,6 @@ void opentimers_timer_callback(void){\n// 2. call the callback of expired timers\nopentimers_vars.insideISR = TRUE;\n- idToCallCB = TOO_MANY_TIMERS_ERROR;\n- // find out the timer expired with highest priority\n- for (j=0;j<MAX_NUM_TIMERS;j++){\n- if (opentimers_vars.timersBuf[j].hasExpired == TRUE){\n- if (idToCallCB==TOO_MANY_TIMERS_ERROR){\n- idToCallCB = j;\n- } else {\n- if (opentimers_vars.timersBuf[j].priority<opentimers_vars.timersBuf[idToCallCB].priority){\n- idToCallCB = j;\n- }\n- }\n- }\n- }\nif (idToCallCB==TOO_MANY_TIMERS_ERROR){\n// no more timer expired\n} else {\n@@ -420,6 +415,7 @@ void opentimers_timer_callback(void){\n}\nopentimers_vars.timersBuf[j].hasExpired = FALSE;\n}\n+ break;\n}\n}\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. efficient opentimer callback.
|
491,592 |
25.09.2017 10:52:30
| -7,200 |
a45dd7793108b013aaf2af3f76e814a14fb27bc5
|
fixing inverted leds and enabling antenna switch
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b/board.c",
"new_path": "bsp/boards/openmote-b/board.c",
"diff": "@@ -47,6 +47,8 @@ bool board_timer_expired(uint32_t future);\nstatic void clock_init(void);\nstatic void gpio_init(void);\nstatic void button_init(void);\n+static void antenna_init(void);\n+\nstatic void SysCtrlDeepSleepSetting(void);\nstatic void SysCtrlSleepSetting(void);\n@@ -72,6 +74,7 @@ void board_init(void) {\ngpio_init();\nclock_init();\n+ antenna_init();\nboard_timer_init();\nleds_init();\ndebugpins_init();\n@@ -80,10 +83,16 @@ void board_init(void) {\nuart_init();\nradio_init();\ni2c_init();\n- sensors_init();\n+ //sensors_init();\ncryptoengine_init();\n}\n+void antenna_init(){\n+ //use cc2538 2.4ghz radio\n+ GPIOPinWrite(BSP_ANTENNA_BASE, BSP_ANTENNA_CC2538_24GHZ, BSP_ANTENNA_CC2538_24GHZ);\n+ GPIOPinWrite(BSP_ANTENNA_BASE, BSP_ANTENNA_AT215_24GHZ, 0);\n+}\n+\n/**\n* Puts the board to sleep\n*/\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b/board_info.h",
"new_path": "bsp/boards/openmote-b/board_info.h",
"diff": "#define NUMSENSORS 7\n+//====== Antenna options ====\n+#define BSP_ANTENNA_BASE GPIO_D_BASE\n+#define BSP_ANTENNA_CC2538_24GHZ GPIO_PIN_4 //!< PD4 -- 2.4ghz\n+#define BSP_ANTENNA_AT215_24GHZ GPIO_PIN_3 //!< PD3 -- subghz\n+\n+\n//=========================== typedef ========================================\n//=========================== variables =======================================\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b/leds.c",
"new_path": "bsp/boards/openmote-b/leds.c",
"diff": "@@ -41,7 +41,7 @@ void bspLedToggle(uint8_t ui8Leds);\nvoid leds_init() {\nGPIOPinTypeGPIOOutput(BSP_LED_BASE, BSP_LED_ALL);\n- GPIOPinWrite(BSP_LED_BASE, BSP_LED_ALL, 0);\n+ GPIOPinWrite(BSP_LED_BASE, BSP_LED_ALL, BSP_LED_ALL);\n}\n// red\n@@ -182,7 +182,8 @@ port_INLINE void bspLedSet(uint8_t ui8Leds)\n//\n// Turn on specified LEDs\n//\n- GPIOPinWrite(BSP_LED_BASE, ui8Leds, ui8Leds);\n+ GPIOPinWrite(BSP_LED_BASE, ui8Leds, 0);\n+\n}\nport_INLINE void bspLedClear(uint8_t ui8Leds)\n@@ -190,7 +191,7 @@ port_INLINE void bspLedClear(uint8_t ui8Leds)\n//\n// Turn off specified LEDs\n//\n- GPIOPinWrite(BSP_LED_BASE, ui8Leds, 0);\n+ GPIOPinWrite(BSP_LED_BASE, ui8Leds, ui8Leds);\n}\nport_INLINE void bspLedToggle(uint8_t ui8Leds)\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-705 fixing inverted leds and enabling antenna switch
|
491,592 |
25.09.2017 11:09:39
| -7,200 |
7621c1ab5f22b90635f14a38ede6a2202c76824f
|
adding compilation in travis
|
[
{
"change_type": "MODIFY",
"old_path": ".travis.yml",
"new_path": ".travis.yml",
"diff": "@@ -28,6 +28,7 @@ script:\n- scons board=openmote-cc2538 toolchain=armgcc verbose=1 oos_openwsn\n- scons board=openmote-cc2538 goldenImage=sniffer toolchain=armgcc verbose=1 oos_sniffer\n- scons board=openmote-cc2538 goldenImage=root toolchain=armgcc verbose=1 oos_openwsn\n+- scons board=openmote-b toolchain=armgcc verbose=1 oos_openwsn\n- scons board=wsn430v14 toolchain=mspgcc verbose=1 oos_openwsn\n- scons board=wsn430v13b toolchain=mspgcc verbose=1 oos_openwsn\n- scons board=gina toolchain=mspgcc verbose=1 oos_openwsn\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-705 - adding compilation in travis
|
491,592 |
25.09.2017 16:37:10
| -7,200 |
a6e57ac5ba4a7e52521fd6f6c92d8c1a7af88482
|
adding si70x driver
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b/SConscript",
"new_path": "bsp/boards/openmote-b/SConscript",
"diff": "@@ -4,23 +4,11 @@ Import('env')\nlocalEnv = env.Clone()\n-# adxl346 = localEnv.SConscript(\n- # os.path.join('#','bsp','chips','adxl346','SConscript'),\n- # variant_dir = 'adxl346',\n- # exports = {'env': env},\n-# )\n-\n-# max44009 = localEnv.SConscript(\n- # os.path.join('#','bsp','chips','max44009','SConscript'),\n- # variant_dir = 'max44009',\n- # exports = {'env': env},\n-# )\n-\n-#sht21 = localEnv.SConscript(\n-# os.path.join('#','bsp','chips','sht21','SConscript'),\n-# variant_dir = 'sht21',\n-# exports = {'env': env},\n-#)\n+si70x = localEnv.SConscript(\n+ os.path.join('#','bsp','chips','si70x','SConscript'),\n+ variant_dir = 'si70x',\n+ exports = {'env': env},\n+)\nsource = \\\n[file for file in Glob('*.c') if file.name.find('iar')==-1] + \\\n@@ -31,12 +19,10 @@ localEnv.Append(\nos.path.join('#','bsp','boards','openmote-b'),\nos.path.join('#','bsp','boards','openmote-b','headers'),\nos.path.join('#','bsp','boards','openmote-b','source'),\n- #os.path.join('#','bsp','chips','adxl346'),\n- #os.path.join('#','bsp','chips','max44009'),\n- #os.path.join('#','bsp','chips','sht21'),\n+ os.path.join('#','bsp','chips','si70x'),\n],\n)\n-board = localEnv.Object(source=source) #+ adxl346 + max44009 + sht21\n+board = localEnv.Object(source=source) + si70x\nReturn('board')\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b/board.c",
"new_path": "bsp/boards/openmote-b/board.c",
"diff": "@@ -83,7 +83,7 @@ void board_init(void) {\nuart_init();\nradio_init();\ni2c_init();\n- //sensors_init();\n+ sensors_init();\ncryptoengine_init();\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b/sensors.c",
"new_path": "bsp/boards/openmote-b/sensors.c",
"diff": "/**\n\\brief Definition of the \"sensors\" board-specific driver.\n\\author Nicola Accettura <nicola.accettura@eecs.berkeley.edu>, March 2015.\n+ \\author Xavier Vilajosana <xvilajosana@eecs.berkeley.edu>, March 2017.\n*/\n#include \"adc_sensor.h\"\n#include \"board.h\"\n#include \"sensors.h\"\n-#include \"adxl346.h\"\n-#include \"max44009.h\"\n-#include \"sht21.h\"\n+#include \"si70x.h\"\n//=========================== defines =========================================\n@@ -30,24 +29,12 @@ void sensors_init(void) {\nmemset(&sensors_vars,0,sizeof(sensors_vars_t));\n- if (sht21_is_present()==1) {\n- sht21_init();\n+ if (si70x_is_present()==1) {\n+ si70x_init();\nsensors_vars.sensorsTypes[SENSOR_TEMPERATURE] = 1;\nsensors_vars.sensorsTypes[SENSOR_HUMIDITY] = 1;\n}\n- if (max44009_is_present()==1) {\n- max44009_init();\n- sensors_vars.sensorsTypes[SENSOR_LIGHT] = 1;\n- }\n-\n- if (adxl346_is_present()==1) {\n- adxl346_init();\n- sensors_vars.sensorsTypes[SENSOR_XACCELERATION] = 1;\n- sensors_vars.sensorsTypes[SENSOR_YACCELERATION] = 1;\n- sensors_vars.sensorsTypes[SENSOR_ZACCELERATION] = 1;\n- }\n-\nadc_sensor_init();\nsensors_vars.sensorsTypes[SENSOR_ADCTEMPERATURE] = 1;\n@@ -71,17 +58,9 @@ callbackRead_cbt sensors_getCallbackRead(uint8_t sensorType) {\nswitch (sensorType) {\ncase SENSOR_TEMPERATURE:\n- return &sht21_read_temperature;\n+ return &si70x_read_temperature;\ncase SENSOR_HUMIDITY:\n- return &sht21_read_humidity;\n- case SENSOR_LIGHT:\n- return &max44009_read_light;\n- case SENSOR_XACCELERATION:\n- return (callbackRead_cbt)&adxl346_read_x;\n- case SENSOR_YACCELERATION:\n- return (callbackRead_cbt)&adxl346_read_y;\n- case SENSOR_ZACCELERATION:\n- return (callbackRead_cbt)&adxl346_read_z;\n+ return &si70x_read_humidity;\ncase SENSOR_ADCTEMPERATURE:\nreturn &adc_sens_read_temperature;\ndefault:\n@@ -99,17 +78,9 @@ callbackConvert_cbt sensors_getCallbackConvert(uint8_t sensorType) {\nswitch (sensorType) {\ncase SENSOR_TEMPERATURE:\n- return &sht21_convert_temperature;\n+ return &si70x_convert_temperature;\ncase SENSOR_HUMIDITY:\n- return &sht21_convert_humidity;\n- case SENSOR_LIGHT:\n- return &max44009_convert_light;\n- case SENSOR_XACCELERATION:\n- return NULL;\n- case SENSOR_YACCELERATION:\n- return NULL;\n- case SENSOR_ZACCELERATION:\n- return NULL;\n+ return &si70x_convert_humidity;\ncase SENSOR_ADCTEMPERATURE:\nreturn &adc_sens_convert_temperature;\ndefault:\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "bsp/chips/si70x/SConscript",
"diff": "+Import('env')\n+\n+localEnv = env.Clone()\n+\n+source = ['si70x.c']\n+si70x = localEnv.Object(source=source)\n+\n+Return('si70x')\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "bsp/chips/si70x/si70x.c",
"diff": "+/**\n+ * \\file\n+ * Device drivers for SI70X temperature and humidity sensor in OpenMote-CC2538.\n+ * \\author\n+ * Xavi Vilajosana, xvilajosana@eecs.berkeley.edu\n+ */\n+\n+#include \"stdint.h\"\n+#include \"stdbool.h\"\n+\n+#include \"i2c.h\"\n+#include \"si70x.h\"\n+\n+//=========================== define ==========================================\n+\n+#define SI70X_ADDRESS ( 0x80 )\n+\n+#define SI70X_USER_REG_READ ( 0xE7 )\n+#define SI70X_USER_REG_WRITE ( 0xE6 )\n+#define SI70X_USER_REG_RESERVED_BITS ( 0x38 )\n+\n+#define SI70X_RESOLUTION_12b_14b ( (0 << 7) | (0 << 0) )\n+#define SI70X_RESOLUTION_8b_12b ( (0 << 7) | (1 << 0) )\n+#define SI70X_RESOLUTION_10b_13b ( (1 << 7) | (0 << 0) )\n+#define SI70X_RESOLUTION_11b_11b ( (1 << 7) | (1 << 0) )\n+#define SI70X_BATTERY_ABOVE_2V25 ( 0 << 6 )\n+#define SI70X_BATTERY_BELOW_2V25 ( 1 << 6 )\n+#define SI70X_ONCHIP_HEATER_ENABLE ( 1 << 2 )\n+#define SI70X_ONCHIP_HEATER_DISABLE ( 0 << 2 )\n+#define SI70X_OTP_RELOAD_ENABLE ( 0 << 1 )\n+#define SI70X_OTP_RELOAD_DISABLE ( 1 << 1 )\n+\n+#define SI70X_TEMPERATURE_HM_CMD ( 0xE3 )\n+#define SI70X_HUMIDITY_HM_CMD ( 0xE5 )\n+#define SI70X_TEMPERATURE_NHM_CMD ( 0xF3 )\n+#define SI70X_HUMIDITY_NHM_CMD ( 0xF5 )\n+#define SI70X_RESET_CMD ( 0xFE )\n+\n+#define SI70X_STATUS_MASK ( 0xFC )\n+\n+#define SI70X_DEFAULT_CONFIG ( SI70X_RESOLUTION_12b_14b | \\\n+ SI70X_ONCHIP_HEATER_DISABLE | \\\n+ SI70X_BATTERY_ABOVE_2V25 | \\\n+ SI70X_OTP_RELOAD_DISABLE )\n+\n+#define SI70X_USER_CONFIG ( SI70X_RESOLUTION_8b_12b | \\\n+ SI70X_ONCHIP_HEATER_DISABLE | \\\n+ SI70X_BATTERY_ABOVE_2V25 | \\\n+ SI70X_OTP_RELOAD_DISABLE )\n+\n+//=========================== variables =======================================\n+\n+//=========================== prototypes ======================================\n+\n+static void si70x_pre_init(void);\n+\n+//=========================== public ==========================================\n+\n+void si70x_init(void) {\n+ uint8_t config[2];\n+\n+ // Pre-init the STH21 if required\n+ si70x_pre_init();\n+\n+ // Setup the configuration vector, the first position holds address\n+ // and the second position holds the actual configuration\n+ config[0] = SI70X_USER_REG_WRITE;\n+ config[1] = 0;\n+\n+ // Read the current configuration according to the datasheet (pag. 9, fig. 18)\n+ i2c_write_byte(SI70X_ADDRESS, SI70X_USER_REG_READ);\n+ i2c_read_byte(SI70X_ADDRESS, &config[1]);\n+\n+ // Clean all the configuration bits except those reserved\n+ config[1] &= SI70X_USER_REG_RESERVED_BITS;\n+\n+ // Set the configuration bits without changing those reserved\n+ config[1] |= SI70X_USER_CONFIG;\n+\n+ i2c_write_bytes(SI70X_ADDRESS, config, sizeof(config));\n+}\n+\n+void si70x_reset(void) {\n+ // Send a soft-reset command according to the datasheet (pag. 9, fig. 17)\n+ i2c_write_byte(SI70X_ADDRESS, SI70X_RESET_CMD);\n+}\n+\n+uint8_t si70x_is_present(void) {\n+ uint8_t is_present;\n+\n+ // Pre-init the STH21 if required\n+ si70x_pre_init();\n+\n+ // Read the current configuration according to the datasheet (pag. 9, fig. 18)\n+ i2c_write_byte(SI70X_ADDRESS, SI70X_USER_REG_READ);\n+ i2c_read_byte(SI70X_ADDRESS, &is_present);\n+\n+ // Clear the reserved bits according to the datasheet (pag. 9, tab. 8)\n+ is_present &= ~SI70X_USER_REG_RESERVED_BITS;\n+\n+ return (is_present == SI70X_DEFAULT_CONFIG || is_present == SI70X_USER_CONFIG);\n+}\n+\n+uint16_t si70x_read_temperature(void) {\n+ uint8_t si70x_temperature[2];\n+ uint16_t temperature;\n+\n+ // Read the current temperature according to the datasheet (pag. 8, fig. 15)\n+ i2c_write_byte(SI70X_ADDRESS, SI70X_TEMPERATURE_HM_CMD);\n+ i2c_read_bytes(SI70X_ADDRESS, si70x_temperature, sizeof(si70x_temperature));\n+\n+ temperature = (si70x_temperature[0] << 8) | (si70x_temperature[1] & SI70X_STATUS_MASK);\n+\n+ return temperature;\n+}\n+\n+float si70x_convert_temperature(uint16_t temperature) {\n+ float result;\n+\n+ result = -46.85;\n+ result += 175.72 * temperature / 65536;\n+\n+ return result;\n+}\n+\n+uint16_t si70x_read_humidity(void) {\n+ uint8_t si70x_humidity[2];\n+ uint16_t humidity;\n+\n+ // Read the current humidity according to the datasheet (pag. 8, fig. 15)\n+ i2c_write_byte(SI70X_ADDRESS, SI70X_HUMIDITY_HM_CMD);\n+ i2c_read_bytes(SI70X_ADDRESS, si70x_humidity, sizeof(si70x_humidity));\n+\n+ humidity = (si70x_humidity[0] << 8) | (si70x_humidity[1] & SI70X_STATUS_MASK);\n+\n+ return humidity;\n+}\n+\n+float si70x_convert_humidity(uint16_t humidity) {\n+ float result;\n+\n+ result = -6.0;\n+ result += 125.0 * humidity / 65536;\n+\n+ return result;\n+}\n+\n+//=========================== private =========================================\n+\n+static void si70x_pre_init(void) {\n+ static bool is_initialized = false;\n+ volatile uint32_t i;\n+\n+ if (is_initialized == false) {\n+ // Delay needed for the SI70X to startup\n+ for (i = 0x1FFFF; i != 0; i--);\n+ is_initialized = true;\n+ }\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "bsp/chips/si70x/si70x.h",
"diff": "+/**\n+ * \\file\n+ * Device drivers for SI70X temperature and humidity sensor in OpenMote-B.\n+ * \\author\n+ * Pere Tuset, OpenMote <peretuset@openmote.com>\n+ */\n+\n+#ifndef __SI70X_H__\n+#define __SI70X_H__\n+\n+void si70x_init(void);\n+void si70x_reset(void);\n+uint8_t si70x_is_present(void);\n+uint16_t si70x_read_temperature(void);\n+float si70x_convert_temperature(uint16_t temperature);\n+uint16_t si70x_read_humidity(void);\n+float si70x_convert_humidity(uint16_t humidity);\n+\n+#endif /* ifndef __SI70X_H__ */\n+\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/openmote-b/03oos_openwsn/03oos_openwsn.ewp",
"new_path": "projects/openmote-b/03oos_openwsn/03oos_openwsn.ewp",
"diff": "</option>\n<option>\n<name>Input description</name>\n- <state>Automatic choice of formatter.</state>\n+ <state>Automatic choice of formatter, without multibyte support.</state>\n</option>\n<option>\n<name>Output description</name>\n- <state>Automatic choice of formatter.</state>\n+ <state>Automatic choice of formatter, without multibyte support.</state>\n</option>\n<option>\n<name>GOutputBinary</name>\n<state>$PROJ_DIR$\\..\\..\\..\\bsp\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\</state>\n- <state>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\adxl346\\</state>\n- <state>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\max44009\\</state>\n- <state>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\sht21\\</state>\n+ <state>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\si70x\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\kernel\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\drivers\\common\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\inc\\</state>\n<group>\n<name>chips</name>\n<group>\n- <name>adxl346</name>\n+ <name>si70x</name>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\adxl346\\adxl346.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\si70x\\si70x.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\adxl346\\adxl346.h</name>\n- </file>\n- </group>\n- <group>\n- <name>max44009</name>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\max44009\\max44009.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\max44009\\max44009.h</name>\n- </file>\n- </group>\n- <group>\n- <name>sht21</name>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\sht21\\sht21.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\sht21\\sht21.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\si70x\\si70x.h</name>\n</file>\n</group>\n</group>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-705 adding si70x driver
|
491,595 |
27.10.2017 15:37:43
| -7,200 |
a4c9c8925024736c3931bba02b8031b99db36adc
|
use other port rather than 5683. (used by JRC)
|
[
{
"change_type": "MODIFY",
"old_path": "openapps/cinfo/cinfo.py",
"new_path": "openapps/cinfo/cinfo.py",
"diff": "@@ -8,8 +8,9 @@ from coap import coap\nimport signal\nMOTE_IP = 'bbbb::1415:92cc:0:2'\n+UDPPORT = 61618 # can't be the port used in OV\n-c = coap.coap()\n+c = coap.coap(udpPort=UDPPORT)\n# read the information about the board status\np = c.GET('coap://[{0}]/i'.format(MOTE_IP))\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/cleds/cleds.py",
"new_path": "openapps/cleds/cleds.py",
"diff": "@@ -7,8 +7,9 @@ sys.path.insert(0,os.path.join(here,'..','..','..','..','..','..','coap'))\nfrom coap import coap\nMOTE_IP = 'bbbb::1415:92cc:0:2'\n+UDPPORT = 61618 # can't be the port used in OV\n-c = coap.coap()\n+c = coap.coap(udpPort=UDPPORT)\n# read status of debug LED\np = c.GET('coap://[{0}]/l'.format(MOTE_IP))\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/cwellknown/cwellknown.py",
"new_path": "openapps/cwellknown/cwellknown.py",
"diff": "@@ -7,8 +7,9 @@ sys.path.insert(0,os.path.join(here,'..','..','..','..','..','..','coap'))\nfrom coap import coap\nMOTE_IP = 'bbbb::1415:92cc:0:2'\n+UDPPORT = 61618 # can't be the port used in OV\n-c = coap.coap()\n+c = coap.coap(udpPort=UDPPORT)\n# read the information about the board status\np = c.GET('coap://[{0}]/.well-known/core'.format(MOTE_IP))\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/rrt/rrt.py",
"new_path": "openapps/rrt/rrt.py",
"diff": "@@ -7,8 +7,9 @@ sys.path.insert(0,os.path.join(here,'..','..','..','..','..','..','coap'))\nfrom coap import coap\nMOTE_IP = 'bbbb::1415:92cc:0:2'\n+UDPPORT = 61618 # can't be the port used in OV\n-c = coap.coap()\n+c = coap.coap(udpPort=UDPPORT)\n# read the information about the board status\np = c.GET('coap://[{0}]/rt'.format(MOTE_IP))\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-709. use other port rather than 5683. (used by JRC)
|
491,595 |
05.11.2017 13:06:13
| -3,600 |
5a609a0c7a9875635314eddd5000ea9dcc80e963
|
fix the Travis.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/SConscript",
"new_path": "openstack/SConscript",
"diff": "@@ -45,7 +45,6 @@ sources_h = [\n#=== 02b-MAChigh\nos.path.join('02b-MAChigh','neighbors.h'),\nos.path.join('02b-MAChigh','sf0.h'),\n- os.path.join('02b-MAChigh','sfx.h'),\nos.path.join('02b-MAChigh','schedule.h'),\nos.path.join('02b-MAChigh','sixtop.h'),\n#=== 03a-IPHC\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -631,7 +631,6 @@ functionsToChange = [\n'sf0_getMetadata',\n'sf0_translateMetadata',\n'sf0_handleRCError',\n- 'sf0_appPktPeriod',\n# sixtop\n'sixtop_init',\n'sixtop_setKaPeriod',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. fix the Travis.
|
491,595 |
05.11.2017 22:10:59
| -3,600 |
f5cac20c80be929f5702bab106f928bec378ba2c
|
remove additional code.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -777,13 +777,6 @@ port_INLINE bool ieee154e_processIEs(OpenQueueEntry_t* pkt, uint16_t* lenIE) {\nieee154e_syncSlotOffset();\nschedule_syncSlotOffset(ieee154e_vars.slotOffset);\nieee154e_vars.nextActiveSlotOffset = schedule_getNextActiveSlotOffset();\n-\n- // get real frequence\n- if (ieee154e_vars.slotOffset==0){\n- // use the real frequence which is indicated by next byte\n- ieee154e_vars.freq = *((uint8_t*)(pkt->payload)+*lenIE);\n- }\n-\n/*\ninfer the asnOffset based on the fact that\nieee154e_vars.freq = 11 + (asnOffset + channelOffset)%16\n@@ -1125,13 +1118,8 @@ port_INLINE void activity_ti2() {\npacketfunctions_reserveFooterSize(&ieee154e_vars.localCopyForTransmission, 2);\n#endif\n-\n- if (ieee154e_vars.slotOffset !=0){\n// configure the radio for that frequency\nradio_setFrequency(ieee154e_vars.freq);\n- } else {\n- radio_setFrequency(SYNCHRONIZING_CHANNEL);\n- }\n// load the packet in the radio's Tx buffer\nradio_loadPacket(ieee154e_vars.localCopyForTransmission.payload,\n@@ -1598,13 +1586,9 @@ port_INLINE void activity_ri2() {\n// radiotimer_schedule(DURATION_rt2);\n#endif\n-\n- if (ieee154e_vars.slotOffset !=0){\n// configure the radio for that frequency\nradio_setFrequency(ieee154e_vars.freq);\n- } else {\n- radio_setFrequency(SYNCHRONIZING_CHANNEL);\n- }\n+\n#ifdef SLOT_FSM_IMPLEMENTATION_MULTIPLE_TIMER_INTERRUPT\nradio_rxEnable_scum();\n#else\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -43,7 +43,7 @@ static const uint8_t ebIEsBytestream[] = {\n#define TX_POWER 31 // 1=-25dBm, 31=0dBm (max value)\n#define RESYNCHRONIZATIONGUARD 5 // in 32kHz ticks. min distance to the end of the slot to successfully synchronize\n#define US_PER_TICK 30 // number of us per 32kHz clock tick\n-#define EBPERIOD 2 // in seconds: 2 -> EB every 2 seconds\n+#define EBPERIOD 10 // in seconds: 2 -> EB every 2 seconds\n#define MAXKAPERIOD 2000 // in slots: @15ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n#define DESYNCTIMEOUT 2333 // in slots: @15ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n#define LIMITLARGETIMECORRECTION 5 // threshold number of ticks to declare a timeCorrection \"large\"\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "@@ -20,7 +20,7 @@ The superframe reappears over time and can be arbitrarily long.\n#define SLOTFRAME_LENGTH 101 //should be 101\n//draft-ietf-6tisch-minimal-06\n-#define SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS 2\n+#define SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS 1\n#define SCHEDULE_MINIMAL_6TISCH_SLOTOFFSET 0\n#define SCHEDULE_MINIMAL_6TISCH_CHANNELOFFSET 0\n#define SCHEDULE_MINIMAL_6TISCH_DEFAULT_SLOTFRAME_HANDLE 0 //id of slotframe\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.h",
"new_path": "openstack/cross-layers/openqueue.h",
"diff": "//=========================== define ==========================================\n-#define QUEUELENGTH 15\n+#define QUEUELENGTH 10\n//=========================== typedef =========================================\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. remove additional code.
|
491,595 |
06.11.2017 13:14:12
| -3,600 |
4339a0852ffdaaedfe9c9ca47dec0478f23310f0
|
remove generation field from 6p frame.
|
[
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -385,7 +385,6 @@ typedef struct {\nasn_t asn;\nuint8_t joinPrio;\nbool f6PNORES;\n- uint8_t generation;\nuint8_t sequenceNumber;\n} neighborRow_t;\nEND_PACK\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -132,16 +132,6 @@ bool neighbors_getNeighborNoResource(uint8_t index){\nreturn neighbors_vars.neighbors[index].f6PNORES;\n}\n-uint8_t neighbors_getGeneration(open_addr_t* address){\n- uint8_t i;\n- for (i=0;i<MAXNUMNEIGHBORS;i++){\n- if (packetfunctions_sameAddress(address, &neighbors_vars.neighbors[i].addr_64b)){\n- break;\n- }\n- }\n- return neighbors_vars.neighbors[i].generation;\n-}\n-\nuint8_t neighbors_getSequenceNumber(open_addr_t* address){\nuint8_t i;\nfor (i=0;i<MAXNUMNEIGHBORS;i++){\n@@ -447,27 +437,21 @@ void neighbors_updateSequenceNumber(open_addr_t* address){\nuint8_t i;\nfor (i=0;i<MAXNUMNEIGHBORS;i++){\nif (packetfunctions_sameAddress(address, &neighbors_vars.neighbors[i].addr_64b)){\n- neighbors_vars.neighbors[i].sequenceNumber = (neighbors_vars.neighbors[i].sequenceNumber+1) & 0x0F;\n- break;\n- }\n+ neighbors_vars.neighbors[i].sequenceNumber = (neighbors_vars.neighbors[i].sequenceNumber+1) & 0xFF;\n+ // rollover from 0xff to 0x01\n+ if (neighbors_vars.neighbors[i].sequenceNumber == 0){\n+ neighbors_vars.neighbors[i].sequenceNumber = 1;\n}\n-}\n-\n-void neighbors_updateGeneration(open_addr_t* address){\n- uint8_t i;\n- for (i=0;i<MAXNUMNEIGHBORS;i++){\n- if (packetfunctions_sameAddress(address, &neighbors_vars.neighbors[i].addr_64b)){\n- neighbors_vars.neighbors[i].generation = (neighbors_vars.neighbors[i].generation+1)%9;\nbreak;\n}\n}\n}\n-void neighbors_resetGeneration(open_addr_t* address){\n+void neighbors_resetSequenceNumber(open_addr_t* address){\nuint8_t i;\nfor (i=0;i<MAXNUMNEIGHBORS;i++){\nif (packetfunctions_sameAddress(address, &neighbors_vars.neighbors[i].addr_64b)){\n- neighbors_vars.neighbors[i].generation = 0;\n+ neighbors_vars.neighbors[i].sequenceNumber = 0;\nbreak;\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.h",
"new_path": "openstack/02b-MAChigh/neighbors.h",
"diff": "@@ -63,7 +63,6 @@ open_addr_t* neighbors_getJoinProxy(void);\nbool neighbors_getNeighborNoResource(uint8_t index);\nint8_t neighbors_getRssi(uint8_t index);\nuint8_t neighbors_getNumTx(uint8_t index);\n-uint8_t neighbors_getGeneration(open_addr_t* address);\nuint8_t neighbors_getSequenceNumber(open_addr_t* address);\n// setters\nvoid neighbors_setNeighborRank(uint8_t index, dagrank_t rank);\n@@ -93,8 +92,7 @@ void neighbors_indicateTx(\nasn_t* asnTimestamp\n);\nvoid neighbors_updateSequenceNumber(open_addr_t* address);\n-void neighbors_updateGeneration(open_addr_t* address);\n-void neighbors_resetGeneration(open_addr_t* address);\n+void neighbors_resetSequenceNumber(open_addr_t* address);\n// get addresses\nbool neighbors_getNeighborEui64(open_addr_t* address,uint8_t addr_type,uint8_t index);\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sf0.c",
"new_path": "openstack/02b-MAChigh/sf0.c",
"diff": "@@ -78,6 +78,10 @@ void sf0_handleRCError(uint8_t code){\nif (code==IANA_6TOP_RC_SFID_ERR){\n// TBD: the sfId does not match\n}\n+\n+ if (code==IANA_6TOP_RC_SEQNUM_ERR){\n+ // TBD: the seqNum does not match\n+ }\n}\n//=========================== private =========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -62,7 +62,6 @@ void sixtop_six2six_notifyReceive(\nuint8_t code,\nuint8_t sfId,\nuint8_t seqNum,\n- uint8_t gen,\nuint8_t ptr,\nuint8_t length,\nOpenQueueEntry_t* pkt\n@@ -174,7 +173,6 @@ owerror_t sixtop_request(\nuint8_t i;\nuint8_t len;\nuint16_t length_groupid_type;\n- uint8_t scheduleGeneration;\nuint8_t sequenceNumber;\nowerror_t outcome;\n@@ -278,9 +276,8 @@ owerror_t sixtop_request(\n// append 6p Seqnum and schedule Generation\npacketfunctions_reserveHeaderSize(pkt,sizeof(uint8_t));\n- scheduleGeneration = neighbors_getGeneration(neighbor);\nsequenceNumber = neighbors_getSequenceNumber(neighbor);\n- *((uint8_t*)(pkt->payload)) = sequenceNumber | (scheduleGeneration<<IANA_6TOP_GEN_SHIFT);\n+ *((uint8_t*)(pkt->payload)) = sequenceNumber;\nlen += 1;\n// append 6p sfid\n@@ -321,7 +318,6 @@ owerror_t sixtop_request(\noutcome = sixtop_send(pkt);\nif (outcome == E_SUCCESS){\n- neighbors_updateSequenceNumber(neighbor);\n//update states\nswitch(code){\ncase IANA_6TOP_CMD_ADD:\n@@ -864,7 +860,6 @@ void timer_sixtop_six2six_timeout_fired(void) {\nvoid sixtop_six2six_sendDone(OpenQueueEntry_t* msg, owerror_t error){\n- bool scheduleChanged;\nmsg->owner = COMPONENT_SIXTOP_RES;\n// if this is a request send done\n@@ -911,50 +906,40 @@ void sixtop_six2six_sendDone(OpenQueueEntry_t* msg, owerror_t error){\n// if this is a response send done\nif (msg->l2_sixtop_messageType == SIXTOP_CELL_RESPONSE){\nif(error == E_SUCCESS) {\n+ neighbors_updateSequenceNumber(&(msg->l2_nextORpreviousHop));\n// in case a response is sent out, check the return code\nif (msg->l2_sixtop_returnCode == IANA_6TOP_RC_SUCCESS){\nif (msg->l2_sixtop_command == IANA_6TOP_CMD_ADD){\n- if (\nsixtop_addCells(\nmsg->l2_sixtop_frameID,\nmsg->l2_sixtop_celllist_add,\n&(msg->l2_nextORpreviousHop),\nmsg->l2_sixtop_cellOptions\n- ) == TRUE\n- ){\n- neighbors_updateGeneration(&(msg->l2_nextORpreviousHop));\n- }\n+ );\n}\nif (msg->l2_sixtop_command == IANA_6TOP_CMD_DELETE){\n- if (\nsixtop_removeCells(\nmsg->l2_sixtop_frameID,\nmsg->l2_sixtop_celllist_delete,\n&(msg->l2_nextORpreviousHop),\nmsg->l2_sixtop_cellOptions\n- ) == TRUE\n- ){\n- neighbors_updateGeneration(&(msg->l2_nextORpreviousHop));\n- }\n+ );\n}\nif ( msg->l2_sixtop_command == IANA_6TOP_CMD_RELOCATE){\n- scheduleChanged = sixtop_removeCells(\n+ sixtop_removeCells(\nmsg->l2_sixtop_frameID,\nmsg->l2_sixtop_celllist_delete,\n&(msg->l2_nextORpreviousHop),\nmsg->l2_sixtop_cellOptions\n);\n- scheduleChanged |= sixtop_addCells(\n+ sixtop_addCells(\nmsg->l2_sixtop_frameID,\nmsg->l2_sixtop_celllist_add,\n&(msg->l2_nextORpreviousHop),\nmsg->l2_sixtop_cellOptions\n);\n- if (scheduleChanged){\n- neighbors_updateGeneration(&(msg->l2_nextORpreviousHop));\n- }\n}\nif ( msg->l2_sixtop_command == IANA_6TOP_CMD_CLEAR){\n@@ -962,15 +947,14 @@ void sixtop_six2six_sendDone(OpenQueueEntry_t* msg, owerror_t error){\nmsg->l2_sixtop_frameID,\n&(msg->l2_nextORpreviousHop)\n);\n- neighbors_resetGeneration(&(msg->l2_nextORpreviousHop));\n+ neighbors_resetSequenceNumber(&(msg->l2_nextORpreviousHop));\n}\n} else {\n// the return code doesn't end up with SUCCESS\n// The return code will be processed on request side.\n}\n} else {\n- // doesn't receive the ACK of response packet from request side.\n- // Do nothing, request side will timeout when it doesn't receive the response packet.\n+ // doesn't receive the ACK of response packet from request side after maximum retries.\n}\n}\n// free the buffer\n@@ -980,7 +964,7 @@ void sixtop_six2six_sendDone(OpenQueueEntry_t* msg, owerror_t error){\nport_INLINE bool sixtop_processIEs(OpenQueueEntry_t* pkt, uint16_t * lenIE) {\nuint8_t ptr;\nuint8_t temp_8b;\n- uint8_t subtypeid,code,sfid,version,type,seqNum,gen;\n+ uint8_t subtypeid,code,sfid,version,type,seqNum;\nuint16_t temp_16b,len,headerlen;\nptr=0;\n@@ -1033,13 +1017,12 @@ port_INLINE bool sixtop_processIEs(OpenQueueEntry_t* pkt, uint16_t * lenIE) {\nptr += 1;\nheaderlen += 1;\n// get 6p seqNum and GEN\n- seqNum = *((uint8_t*)(pkt->payload)+ptr) & 0x0f;\n- gen = (*((uint8_t*)(pkt->payload)+ptr) & 0xf0)>>4;\n+ seqNum = *((uint8_t*)(pkt->payload)+ptr) & 0xff;\nptr += 1;\nheaderlen += 1;\n// give six2six to process\n- sixtop_six2six_notifyReceive(version,type,code,sfid,seqNum,gen,ptr,len-headerlen,pkt);\n+ sixtop_six2six_notifyReceive(version,type,code,sfid,seqNum,ptr,len-headerlen,pkt);\n*lenIE = len+2;\nreturn TRUE;\n}\n@@ -1050,7 +1033,6 @@ void sixtop_six2six_notifyReceive(\nuint8_t code,\nuint8_t sfId,\nuint8_t seqNum,\n- uint8_t gen,\nuint8_t ptr,\nuint8_t length,\nOpenQueueEntry_t* pkt\n@@ -1072,7 +1054,6 @@ void sixtop_six2six_notifyReceive(\nuint8_t pktLen = length;\nuint8_t response_pktLen = 0;\ncellInfo_ht celllist_list[CELLLIST_MAX_LEN];\n- bool scheduleChanged;\nif (type == SIXTOP_CELL_REQUEST){\n// if this is a 6p request message\n@@ -1110,9 +1091,9 @@ void sixtop_six2six_notifyReceive(\nreturnCode = IANA_6TOP_RC_SFID_ERR;\nbreak;\n}\n- // generation check\n- if (gen != neighbors_getGeneration(&(pkt->l2_nextORpreviousHop)) && code != IANA_6TOP_CMD_CLEAR){\n- returnCode = IANA_6TOP_RC_GEN_ERR;\n+ // sequenceNumber check\n+ if (seqNum != neighbors_getSequenceNumber(&(pkt->l2_nextORpreviousHop)) && code != IANA_6TOP_CMD_CLEAR){\n+ returnCode = IANA_6TOP_RC_SEQNUM_ERR;\nbreak;\n}\n// previous 6p transcation check\n@@ -1383,9 +1364,9 @@ void sixtop_six2six_notifyReceive(\nresponse_pkt->l2_sixtop_cellOptions = cellOptions;\n}\n- // append 6p Seqnum and schedule Generation\n+ // append 6p Seqnum\npacketfunctions_reserveHeaderSize(response_pkt,sizeof(uint8_t));\n- *((uint8_t*)(response_pkt->payload)) = seqNum | gen<<IANA_6TOP_GEN_SHIFT;\n+ *((uint8_t*)(response_pkt->payload)) = seqNum;\nresponse_pktLen += 1;\n// append 6p sfid\n@@ -1430,6 +1411,7 @@ void sixtop_six2six_notifyReceive(\nif (type == SIXTOP_CELL_RESPONSE) {\n// this is a 6p response message\n+ neighbors_updateSequenceNumber(&(pkt->l2_nextORpreviousHop));\n// if the code is SUCCESS\nif (code == IANA_6TOP_RC_SUCCESS || code == IANA_6TOP_RC_EOL){\n@@ -1447,28 +1429,20 @@ void sixtop_six2six_notifyReceive(\npktLen -= 4;\ni++;\n}\n- if (\nsixtop_addCells(\nsixtop_vars.cb_sf_getMetadata(), // frame id\npkt->l2_sixtop_celllist_add, // celllist to be added\n&(pkt->l2_nextORpreviousHop), // neighbor that cells to be added to\nsixtop_vars.cellOptions // cell options\n- ) == TRUE\n- ) {\n- neighbors_updateGeneration(&(pkt->l2_nextORpreviousHop));\n- }\n+ );\nbreak;\ncase SIX_STATE_WAIT_DELETERESPONSE:\n- if (\nsixtop_removeCells(\nsixtop_vars.cb_sf_getMetadata(),\nsixtop_vars.celllist_toDelete,\n&(pkt->l2_nextORpreviousHop),\nsixtop_vars.cellOptions\n- ) == TRUE\n- ) {\n- neighbors_updateGeneration(&(pkt->l2_nextORpreviousHop));\n- }\n+ );\nbreak;\ncase SIX_STATE_WAIT_RELOCATERESPONSE:\ni = 0;\n@@ -1483,23 +1457,18 @@ void sixtop_six2six_notifyReceive(\npktLen -= 4;\ni++;\n}\n- scheduleChanged = sixtop_removeCells(\n+ sixtop_removeCells(\nsixtop_vars.cb_sf_getMetadata(),\nsixtop_vars.celllist_toDelete,\n&(pkt->l2_nextORpreviousHop),\nsixtop_vars.cellOptions\n);\n- scheduleChanged |= sixtop_addCells(\n+ sixtop_addCells(\nsixtop_vars.cb_sf_getMetadata(), // frame id\npkt->l2_sixtop_celllist_add, // celllist to be added\n&(pkt->l2_nextORpreviousHop), // neighbor that cells to be added to\nsixtop_vars.cellOptions // cell options\n);\n- if (scheduleChanged) {\n- neighbors_updateGeneration(&(pkt->l2_nextORpreviousHop));\n- // record the wrong status\n- break;\n- }\nbreak;\ncase SIX_STATE_WAIT_COUNTRESPONSE:\nnumCells = *((uint8_t*)(pkt->payload)+ptr);\n@@ -1538,7 +1507,7 @@ void sixtop_six2six_notifyReceive(\nsixtop_vars.cb_sf_getMetadata(),\n&(pkt->l2_nextORpreviousHop)\n);\n- neighbors_resetGeneration(&(pkt->l2_nextORpreviousHop));\n+ neighbors_resetSequenceNumber(&(pkt->l2_nextORpreviousHop));\nbreak;\ndefault:\n// should neven happen\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.h",
"new_path": "openstack/02b-MAChigh/sixtop.h",
"diff": "#define IANA_6TOP_TYPE_REQUEST 0<<IANA_6TOP_TYPE_SHIFT\n#define IANA_6TOP_TYPE_RESPONSE 1<<IANA_6TOP_TYPE_SHIFT\n#define IANA_6TOP_TYPE_CONFIRMATION 2<<IANA_6TOP_TYPE_SHIFT\n-// 6p schedule generation shift\n-#define IANA_6TOP_GEN_SHIFT 4\n// 6P command Id\n#define IANA_6TOP_CMD_NONE 0x00\n#define IANA_6TOP_CMD_ADD 0x01 // CMD_ADD | add one or more cells\n#define IANA_6TOP_RC_RESET 0x03 // RC_RESET | critical error, reset\n#define IANA_6TOP_RC_VER_ERR 0x04 // RC_VER_ERR | unsupported 6P version\n#define IANA_6TOP_RC_SFID_ERR 0x05 // RC_SFID_ERR | unsupported SFID\n-#define IANA_6TOP_RC_GEN_ERR 0x06 // RC_GEN_ERR | wrong schedule generation\n+#define IANA_6TOP_RC_SEQNUM_ERR 0x06 // RC_SEQNUM_ERR | wrong sequence number\n#define IANA_6TOP_RC_BUSY 0x07 // RC_BUSY | busy\n#define IANA_6TOP_RC_NORES 0x08 // RC_NORES | not enough resources\n#define IANA_6TOP_RC_CELLLIST_ERR 0x09 // RC_CELLLIST_ERR | cellList error\n@@ -82,7 +80,7 @@ typedef enum {\n// >2^4*3*(101/9)*15=8080 (2^MAXEB * maxretries * (slotframe / numberOfsharedCellsFor6p)*slotlength) (ms))\n// on the receiver side of sixtop, it may has mutiple sixtop request in the queue to response (most of them will return with RC BUSY)\n// increase the timeout longer than calculated value\n-#define SIX2SIX_TIMEOUT_MS 10000\n+#define SIX2SIX_TIMEOUT_MS 20000\ntypedef uint8_t (*sixtop_sf_getsfid)(void);\ntypedef uint16_t (*sixtop_sf_getmetadata)(void);\ntypedef metadata_t (*sixtop_sf_translatemetadata)(void);\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -554,7 +554,6 @@ functionsToChange = [\n'neighbors_getLinkMetric',\n'neighbors_getKANeighbor',\n'neighbors_getJoinProxy',\n- 'neighbors_getGeneration',\n'neighbors_getSequenceNumber',\n'neighbors_setNeighborRank',\n'neighbors_setPreferredParent',\n@@ -571,8 +570,7 @@ functionsToChange = [\n'neighbors_indicateRx',\n'neighbors_indicateTx',\n'neighbors_updateSequenceNumber',\n- 'neighbors_updateGeneration',\n- 'neighbors_resetGeneration',\n+ 'neighbors_resetSequenceNumber',\n'neighbors_indicateRxDIO',\n'neighbors_getNeighborEui64',\n'neighbors_removeOld',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-710. remove generation field from 6p frame.
|
491,595 |
06.11.2017 13:34:38
| -3,600 |
a7e5ef142c40a3f6c1a46bdec51137c0c62623d8
|
Node chooses random frequency to listen EB at beginning.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -531,11 +531,11 @@ port_INLINE void activity_synchronize_newSlot() {\n// turn off the radio (in case it wasn't yet)\nradio_rfOff();\n- // configure the radio to listen to the default synchronizing channel\n- radio_setFrequency(SYNCHRONIZING_CHANNEL);\n-\n// update record of current channel\n- ieee154e_vars.freq = SYNCHRONIZING_CHANNEL;\n+ ieee154e_vars.freq = (openrandom_get16b()&0x0F) + 11;\n+\n+ // configure the radio to listen to the default synchronizing channel\n+ radio_setFrequency(ieee154e_vars.freq);\n// switch on the radio in Rx mode.\nradio_rxEnable();\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -38,7 +38,6 @@ static const uint8_t ebIEsBytestream[] = {\n#define EB_IE_LEN 28\n#define NUM_CHANNELS 16 // number of channels to channel hop on\n-#define SYNCHRONIZING_CHANNEL 26 // channel the mote listens on to synchronize (physical channel)\n#define TXRETRIES 3 // number of MAC retries before declaring failed\n#define TX_POWER 31 // 1=-25dBm, 31=0dBm (max value)\n#define RESYNCHRONIZATIONGUARD 5 // in 32kHz ticks. min distance to the end of the slot to successfully synchronize\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-712. Node chooses random frequency to listen EB at beginning.
|
491,595 |
06.11.2017 15:37:54
| -3,600 |
d582711f7697cc4fe5fca34393f5057b87d99b5f
|
send EB and DIO on portion of minimal cell of 1/6*(neighbor+1) and 1/6*(neighbor+1) respectively.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "#include \"sixtop.h\"\n#include \"adaptive_sync.h\"\n#include \"sctimer.h\"\n+#include \"openrandom.h\"\n//=========================== variables =======================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -42,7 +42,7 @@ static const uint8_t ebIEsBytestream[] = {\n#define TX_POWER 31 // 1=-25dBm, 31=0dBm (max value)\n#define RESYNCHRONIZATIONGUARD 5 // in 32kHz ticks. min distance to the end of the slot to successfully synchronize\n#define US_PER_TICK 30 // number of us per 32kHz clock tick\n-#define EBPERIOD 2 // in seconds: 2 -> EB every 2 seconds\n+#define EB_PORTION 6 // The portion of minimal cells that used for sending EB.\n#define MAXKAPERIOD 2000 // in slots: @15ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n#define DESYNCTIMEOUT 2333 // in slots: @15ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n#define LIMITLARGETIMECORRECTION 5 // threshold number of ticks to declare a timeCorrection \"large\"\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -106,7 +106,7 @@ void sixtop_init() {\nsixtop_vars.dsn = 0;\nsixtop_vars.mgtTaskCounter = 0;\nsixtop_vars.kaPeriod = MAXKAPERIOD;\n- sixtop_vars.ebPeriod = EBPERIOD;\n+ sixtop_vars.ebPeriod = EB_PORTION*(neighbors_getNumNeighbors()+1);\nsixtop_vars.isResponseEnabled = TRUE;\nsixtop_vars.six2six_state = SIX_STATE_IDLE;\n@@ -630,16 +630,29 @@ void sixtop_timeout_timer_cb(opentimers_id_t id) {\n//======= EB/KA task\nvoid timer_sixtop_sendEb_fired(){\n+\n+ uint16_t newPeriod;\n+ // current period\n+ newPeriod = EB_PORTION*(neighbors_getNumNeighbors()+1);\n+ if (\n+ sixtop_vars.ebPeriod < newPeriod &&\n+ sixtop_vars.ebCounter > newPeriod\n+ ){\n+ sixtop_vars.ebCounter = 0;\n+ sixtop_vars.ebPeriod = newPeriod;\n+ sixtop_sendEB();\n+ } else {\n+ sixtop_vars.ebPeriod = newPeriod;\nsixtop_vars.ebCounter = (sixtop_vars.ebCounter+1)%sixtop_vars.ebPeriod;\nswitch (sixtop_vars.ebCounter) {\ncase 0:\n- // called every EBPERIOD seconds\nsixtop_sendEB();\nbreak;\ndefault:\nbreak;\n}\n}\n+}\n/**\n\\brief Timer handlers which triggers MAC management task.\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.c",
"new_path": "openstack/03b-IPv6/icmpv6rpl.c",
"diff": "@@ -80,7 +80,7 @@ void icmpv6rpl_init() {\nicmpv6rpl_vars.dioDestination.type = ADDR_128B;\nmemcpy(&icmpv6rpl_vars.dioDestination.addr_128b[0],all_routers_multicast,sizeof(all_routers_multicast));\n- icmpv6rpl_vars.dioPeriod = TIMER_DIO_TIMEOUT;\n+ icmpv6rpl_vars.dioPeriod = DIO_PORTION*(neighbors_getNumNeighbors()+1);\nicmpv6rpl_vars.timerIdDIO = opentimers_create();\n//initialize PIO -> move this to dagroot code\n@@ -610,16 +610,29 @@ void icmpv6rpl_timer_DIO_cb(opentimers_id_t id) {\n\\note This function is executed in task context, called by the scheduler.\n*/\nvoid icmpv6rpl_timer_DIO_task() {\n+\n+ uint16_t newPeriod;\n+ // current period\n+ newPeriod = DIO_PORTION*(neighbors_getNumNeighbors()+1);\n+ if (\n+ icmpv6rpl_vars.dioPeriod < newPeriod &&\n+ icmpv6rpl_vars.dioTimerCounter > newPeriod\n+ ){\n+ icmpv6rpl_vars.dioTimerCounter = 0;\n+ icmpv6rpl_vars.dioPeriod = newPeriod;\n+ sendDIO();\n+ } else {\n+ icmpv6rpl_vars.dioPeriod = newPeriod;\nicmpv6rpl_vars.dioTimerCounter = (icmpv6rpl_vars.dioTimerCounter+1)%icmpv6rpl_vars.dioPeriod;\nswitch (icmpv6rpl_vars.dioTimerCounter) {\ncase 0:\n- // called every TIMER_DIO_TIMEOUT seconds\nsendDIO();\nbreak;\ndefault:\nbreak;\n}\n}\n+}\n/**\n\\brief Prepare and a send a RPL DIO.\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.h",
"new_path": "openstack/03b-IPv6/icmpv6rpl.h",
"diff": "//=========================== define ==========================================\n-#define TIMER_DIO_TIMEOUT 10 // seconds\n+#define DIO_PORTION 6 // The portion of minimal cells that used for sending DIO.\n#define TIMER_DAO_TIMEOUT 60 // seconds\n// Non-Storing Mode of Operation (1)\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-711. send EB and DIO on portion of minimal cell of 1/6*(neighbor+1) and 1/6*(neighbor+1) respectively.
|
491,595 |
06.11.2017 19:21:23
| -3,600 |
7e879d42cc009e1c8cbdcb52b9cfb009eebff2ac
|
implementing the MSF algorithm to adapting to traffic.
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -173,6 +173,9 @@ owerror_t openserial_printCritical(\n) {\nopentimers_id_t id;\nuint32_t reference;\n+\n+ printf(\"critical error happened %d %d %d %d\\n\", calling_component,error_code,arg1,arg2);\n+\n// blink error LED, this is serious\nleds_error_blink();\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -39,7 +39,7 @@ static const uint8_t infoStackName[] = \"OpenWSN \";\n#define MAXNUMNEIGHBORS 10\n// maximum celllist length\n-#define CELLLIST_MAX_LEN 3\n+#define CELLLIST_MAX_LEN 5\nenum {\nE_SUCCESS = 0,\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/c6t/c6t.c",
"new_path": "openapps/c6t/c6t.c",
"diff": "@@ -105,7 +105,7 @@ owerror_t c6t_receive(OpenQueueEntry_t* msg,\nIANA_6TOP_CMD_ADD, // code\n&neighbor, // neighbor\n1, // number cells\n- LINKOPTIONS_TX, // cellOptions\n+ CELLOPTIONS_TX, // cellOptions\ncelllist_add, // celllist to add\nNULL, // celllist to delete (not used)\nmsf_getsfid(), // sfid\n@@ -145,7 +145,7 @@ owerror_t c6t_receive(OpenQueueEntry_t* msg,\nIANA_6TOP_CMD_ADD, // code\n&neighbor, // neighbor\n1, // number cells\n- LINKOPTIONS_TX, // cellOptions\n+ CELLOPTIONS_TX, // cellOptions\ncelllist_add, // celllist to add\nNULL, // celllist to delete (not used)\nmsf_getsfid(), // sfid\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -909,9 +909,10 @@ port_INLINE void activity_ti1ORri1() {\nopenserial_stop();\n// assuming that there is nothing to send\nieee154e_vars.dataToSend = NULL;\n+ // get the neighbor to check this is dedicated cell or not later\n+ schedule_getNeighbor(&neighbor);\n// check whether we can send\nif (schedule_getOkToSend()) {\n- schedule_getNeighbor(&neighbor);\nieee154e_vars.dataToSend = openqueue_macGetDataPacket(&neighbor);\nif ((ieee154e_vars.dataToSend==NULL) && (cellType==CELLTYPE_TXRX)) {\ncouldSendEB=TRUE;\n@@ -920,11 +921,12 @@ port_INLINE void activity_ti1ORri1() {\n}\n}\n- // udpate cell usgae bitmap, set as true if I have packet to send\n- if (ieee154e_vars.dataToSend==NULL) {\n- schedule_updateCellUsageBitMap(FALSE);\n- } else {\n- schedule_updateCellUsageBitMap(TRUE);\n+ // update numcellpassed and numcellused on dedicated cell\n+ if (packetfunctions_isBroadcastMulticast(&neighbor)==FALSE){\n+ if (ieee154e_vars.dataToSend!=NULL) {\n+ msf_updateCellsUsed();\n+ }\n+ msf_updateCellsPassed();\n}\nif (ieee154e_vars.dataToSend==NULL) {\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "#include \"sixtop.h\"\n#include \"scheduler.h\"\n#include \"schedule.h\"\n-#include \"idmanager.h\"\n#include \"openapps.h\"\n#include \"openrandom.h\"\n//=========================== definition =====================================\n-#define IANA_6TISCH_SFID_MSF 0\n-#define SF0THRESHOLD 2\n-\n//=========================== variables =======================================\nmsf_vars_t msf_vars;\n//=========================== prototypes ======================================\n-void msf_bandwidthEstimate_task(void);\n// sixtop callback\nuint16_t msf_getMetadata(void);\nmetadata_t msf_translateMetadata(void);\nvoid msf_handleRCError(uint8_t code);\n+// msf private\n+void msf_trigger6pAdd(void);\n+void msf_trigger6pDelete(void);\n//=========================== public ==========================================\n@@ -33,15 +31,28 @@ void msf_init(void) {\nsixtop_setSFcallback(msf_getsfid,msf_getMetadata,msf_translateMetadata,msf_handleRCError);\n}\n-// this function is called once per slotframe.\n-void msf_notifyNewSlotframe(void) {\n- scheduler_push_task(msf_bandwidthEstimate_task,TASKPRIO_MSF);\n-}\n-\nvoid msf_setBackoff(uint8_t value){\nmsf_vars.backoff = value;\n}\n+// called by schedule\n+void msf_updateCellsPassed(void){\n+ msf_vars.numCellsPassed++;\n+ if (msf_vars.numCellsPassed == MAX_NUMCELLS){\n+ if (msf_vars.numCellsUsed > LIM_NUMCELLSUSED_HIGH){\n+ msf_trigger6pAdd();\n+ }\n+ if (msf_vars.numCellsUsed < LIM_NUMCELLSUSED_LOW){\n+ msf_trigger6pDelete();\n+ }\n+ msf_vars.numCellsPassed = 0;\n+ msf_vars.numCellsUsed = 0;\n+ }\n+}\n+\n+void msf_updateCellsUsed(void){\n+ msf_vars.numCellsUsed++;\n+}\n//=========================== callback =========================================\nuint8_t msf_getsfid(void){\n@@ -86,24 +97,11 @@ void msf_handleRCError(uint8_t code){\n//=========================== private =========================================\n-void msf_bandwidthEstimate_task(void){\n+\n+void msf_trigger6pAdd(void){\nopen_addr_t neighbor;\nbool foundNeighbor;\n- int8_t bw_outgoing;\n- int8_t bw_incoming;\n- int8_t bw_self;\ncellInfo_ht celllist_add[CELLLIST_MAX_LEN];\n- cellInfo_ht celllist_delete[CELLLIST_MAX_LEN];\n-\n- // do not reserve cells if I'm a DAGroot\n- if (idmanager_getIsDAGroot()){\n- return;\n- }\n-\n- if (msf_vars.backoff>0){\n- msf_vars.backoff -= 1;\n- return;\n- }\n// get preferred parent\nfoundNeighbor = icmpv6rpl_getPreferredParentEui64(&neighbor);\n@@ -111,62 +109,50 @@ void msf_bandwidthEstimate_task(void){\nreturn;\n}\n- // get bandwidth of outgoing, incoming and self.\n- // Here we just calculate the estimated bandwidth for\n- // the application sending on dedicate cells(TX or Rx).\n- bw_outgoing = schedule_getNumOfSlotsByType(CELLTYPE_TX);\n- bw_incoming = schedule_getNumOfSlotsByType(CELLTYPE_RX);\n-\n- // get self required bandwith, you can design your\n- // application and assign bw_self accordingly.\n- // for example:\n- // bw_self = application_getBandwdith(app_name);\n- // By default, it's set to zero.\n- // bw_self = openapps_getBandwidth(COMPONENT_UINJECT);\n- bw_self = msf_vars.numAppPacketsPerSlotFrame;\n-\n- // In msf, scheduledCells = bw_outgoing\n- // requiredCells = bw_incoming + bw_self\n- // when scheduledCells<requiredCells, add one or more cell\n-\n- if (bw_outgoing <= bw_incoming+bw_self){\n- if (msf_candidateAddCellList(celllist_add,bw_incoming+bw_self-bw_outgoing+1)==FALSE){\n+ if (msf_candidateAddCellList(celllist_add,NUMCELLS_MSF)==FALSE){\n// failed to get cell list to add\nreturn;\n}\n+\nsixtop_request(\nIANA_6TOP_CMD_ADD, // code\n&neighbor, // neighbor\n- bw_incoming+bw_self-bw_outgoing+1, // number cells\n- LINKOPTIONS_TX, // cellOptions\n+ NUMCELLS_MSF, // number cells\n+ CELLOPTIONS_MSF, // cellOptions\ncelllist_add, // celllist to add\nNULL, // celllist to delete (not used)\nIANA_6TISCH_SFID_MSF, // sfid\n0, // list command offset (not used)\n0 // list command maximum celllist (not used)\n);\n- } else {\n- // remove cell(s)\n- if ( (bw_incoming+bw_self) < (bw_outgoing-SF0THRESHOLD)) {\n- if (msf_candidateRemoveCellList(celllist_delete,&neighbor,SF0THRESHOLD)==FALSE){\n+}\n+\n+void msf_trigger6pDelete(void){\n+ open_addr_t neighbor;\n+ bool foundNeighbor;\n+ cellInfo_ht celllist_delete[CELLLIST_MAX_LEN];\n+\n+ // get preferred parent\n+ foundNeighbor = icmpv6rpl_getPreferredParentEui64(&neighbor);\n+ if (foundNeighbor==FALSE) {\n+ return;\n+ }\n+\n+ if (msf_candidateRemoveCellList(celllist_delete,&neighbor,1)==FALSE){\n// failed to get cell list to delete\nreturn;\n}\nsixtop_request(\nIANA_6TOP_CMD_DELETE, // code\n&neighbor, // neighbor\n- SF0THRESHOLD, // number cells\n- LINKOPTIONS_TX, // cellOptions\n+ NUMCELLS_MSF, // number cells\n+ CELLOPTIONS_MSF, // cellOptions\nNULL, // celllist to add (not used)\ncelllist_delete, // celllist to delete\nIANA_6TISCH_SFID_MSF, // sfid\n0, // list command offset (not used)\n0 // list command maximum celllist (not used)\n);\n- } else {\n- // nothing to do\n- }\n- }\n}\nvoid msf_appPktPeriod(uint8_t numAppPacketsPerSlotFrame){\n@@ -187,7 +173,7 @@ bool msf_candidateAddCellList(\nslotoffset = openrandom_get16b()%schedule_getFrameLength();\nif(schedule_isSlotOffsetAvailable(slotoffset)==TRUE){\ncellList[numCandCells].slotoffset = slotoffset;\n- cellList[numCandCells].channeloffset = openrandom_get16b()%16;\n+ cellList[numCandCells].channeloffset = openrandom_get16b()&0x0F;\ncellList[numCandCells].isUsed = TRUE;\nnumCandCells++;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.h",
"new_path": "openstack/02b-MAChigh/msf.h",
"diff": "//=========================== define ==========================================\n-#define CELL_USAGE_CALCULATION_WINDOWS 16\n+#define IANA_6TISCH_SFID_MSF 0\n+#define CELLOPTIONS_MSF CELLOPTIONS_TX | CELLOPTIONS_RX | CELLOPTIONS_SHARED\n+#define NUMCELLS_MSF 1\n+\n+#define MAX_NUMCELLS 16\n+#define LIM_NUMCELLSUSED_HIGH 12\n+#define LIM_NUMCELLSUSED_LOW 4\n//=========================== typedef =========================================\ntypedef struct {\nuint8_t numAppPacketsPerSlotFrame;\nuint8_t backoff;\n+ uint8_t numCellsPassed;\n+ uint8_t numCellsUsed;\n} msf_vars_t;\n//=========================== module variables ================================\n@@ -27,13 +35,9 @@ typedef struct {\n// admin\nvoid msf_init(void);\n-// notification from schedule\n-void msf_notifyNewSlotframe(void);\nvoid msf_appPktPeriod(uint8_t numAppPacketsPerSlotFrame);\n-\nvoid msf_setBackoff(uint8_t value);\nuint8_t msf_getsfid(void);\n-\nbool msf_candidateAddCellList(\ncellInfo_ht* cellList,\nuint8_t requiredCells\n@@ -43,6 +47,9 @@ bool msf_candidateRemoveCellList(\nopen_addr_t* neighbor,\nuint8_t requiredCells\n);\n+// called by schedule\n+void msf_updateCellsPassed(void);\n+void msf_updateCellsUsed(void);\n/**\n\\}\n\\}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.c",
"new_path": "openstack/02b-MAChigh/schedule.c",
"diff": "@@ -493,49 +493,6 @@ bool schedule_isSlotOffsetAvailable(uint16_t slotOffset){\nreturn TRUE;\n}\n-uint8_t schedule_getUsageStatus(scheduleEntry_t* entry){\n- uint8_t count;\n- uint16_t bm;\n-\n- count = 0;\n- bm = entry->usageBitMap;\n-\n- while (bm>0){\n- count = count+1;\n- bm = bm & (bm-1);\n- }\n- return count;\n-}\n-\n-uint16_t schedule_getTotalCellUsageStatus(cellType_t type, open_addr_t* neighbor){\n- uint16_t usageCount = 0;\n- scheduleEntry_t* scheduleWalker;\n-\n- INTERRUPT_DECLARATION();\n- DISABLE_INTERRUPTS();\n-\n- scheduleWalker = schedule_vars.currentScheduleEntry;\n- do {\n- if(\n- type == scheduleWalker->type &&\n- (\n- (\n- type == CELLTYPE_TX &&\n- packetfunctions_sameAddress(&(scheduleWalker->neighbor),neighbor)\n- ) ||\n- type == CELLTYPE_TXRX\n- )\n- ){\n- usageCount += schedule_getUsageStatus(scheduleWalker);\n- }\n- scheduleWalker = scheduleWalker->next;\n- }while(scheduleWalker!=schedule_vars.currentScheduleEntry);\n-\n- ENABLE_INTERRUPTS();\n-\n- return usageCount;\n-}\n-\nuint16_t schedule_getCellsCounts(uint8_t frameID,cellType_t type, open_addr_t* neighbor){\nuint16_t count = 0;\nscheduleEntry_t* scheduleWalker;\n@@ -588,28 +545,6 @@ scheduleEntry_t* schedule_getCurrentScheduleEntry(){\nreturn schedule_vars.currentScheduleEntry;\n}\n-//=== from otf\n-uint8_t schedule_getNumOfSlotsByType(cellType_t type){\n- uint8_t returnVal;\n- scheduleEntry_t* scheduleWalker;\n-\n- INTERRUPT_DECLARATION();\n- DISABLE_INTERRUPTS();\n-\n- returnVal = 0;\n- scheduleWalker = schedule_vars.currentScheduleEntry;\n- do {\n- if(type == scheduleWalker->type){\n- returnVal += 1;\n- }\n- scheduleWalker = scheduleWalker->next;\n- }while(scheduleWalker!=schedule_vars.currentScheduleEntry);\n-\n- ENABLE_INTERRUPTS();\n-\n- return returnVal;\n-}\n-\nuint8_t schedule_getNumberOfFreeEntries(){\nuint8_t i;\nuint8_t counter;\n@@ -892,22 +827,6 @@ void schedule_indicateTx(asn_t* asnTimestamp, bool succesfullTx) {\nENABLE_INTERRUPTS();\n}\n-void schedule_updateCellUsageBitMap(bool hasPacketToSend){\n- uint16_t temp;\n-\n- schedule_vars.currentScheduleEntry->bitMapIndex += 1;\n- if (schedule_vars.currentScheduleEntry->bitMapIndex == CELL_USAGE_CALCULATION_WINDOWS){\n- schedule_vars.currentScheduleEntry->bitMapIndex = 0;\n- }\n-\n- temp = (uint16_t)1 << schedule_vars.currentScheduleEntry->bitMapIndex;\n- if (hasPacketToSend) {\n- schedule_vars.currentScheduleEntry->usageBitMap |= temp;\n- } else {\n- schedule_vars.currentScheduleEntry->usageBitMap &= ~temp;\n- }\n-}\n-\nbool schedule_getOneCellAfterOffset(uint8_t metadata,uint8_t offset,open_addr_t* neighbor, uint8_t cellOptions, uint16_t* slotoffset, uint16_t* channeloffset){\nbool returnVal;\nscheduleEntry_t* scheduleWalker;\n@@ -916,13 +835,13 @@ bool schedule_getOneCellAfterOffset(uint8_t metadata,uint8_t offset,open_addr_t*\nDISABLE_INTERRUPTS();\n// translate cellOptions to cell type\n- if (cellOptions == LINKOPTIONS_TX){\n+ if (cellOptions == CELLOPTIONS_TX){\ntype = CELLTYPE_TX;\n}\n- if (cellOptions == LINKOPTIONS_RX){\n+ if (cellOptions == CELLOPTIONS_RX){\ntype = CELLTYPE_RX;\n}\n- if (cellOptions == (LINKOPTIONS_TX | LINKOPTIONS_RX | LINKOPTIONS_SHARED)){\n+ if (cellOptions == (CELLOPTIONS_TX | CELLOPTIONS_RX | CELLOPTIONS_SHARED)){\ntype = CELLTYPE_TXRX;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "@@ -76,11 +76,11 @@ See MINBE for an explanation of backoff.\n#define MIN_NUMTX_FOR_PDR 50 // don't calculate PDR when numTx is lower than this value\ntypedef enum{\n- LINKOPTIONS_TX = 1<<0,\n- LINKOPTIONS_RX = 1<<1,\n- LINKOPTIONS_SHARED = 1<<2,\n- LINKOPTIONS_TIMEKEPPING = 1<<3,\n- LINKOPTIONS_PRIORITY = 1<<4\n+ CELLOPTIONS_TX = 1<<0,\n+ CELLOPTIONS_RX = 1<<1,\n+ CELLOPTIONS_SHARED = 1<<2,\n+ CELLOPTIONS_TIMEKEPPING = 1<<3,\n+ CELLOPTIONS_PRIORITY = 1<<4\n}linkOptions_t;\n//=========================== typedef =========================================\n@@ -186,8 +186,6 @@ owerror_t schedule_removeActiveSlot(\nopen_addr_t* neighbor\n);\nbool schedule_isSlotOffsetAvailable(uint16_t slotOffset);\n-uint8_t schedule_getUsageStatus(scheduleEntry_t* entry);\n-uint16_t schedule_getTotalCellUsageStatus(cellType_t type, open_addr_t* neighbor);\nuint16_t schedule_getCellsCounts(\nuint8_t frameID,\ncellType_t type,\n@@ -198,7 +196,6 @@ void schedule_removeAllCells(\nopen_addr_t* previousHop\n);\nscheduleEntry_t* schedule_getCurrentScheduleEntry(void);\n-uint8_t schedule_getNumOfSlotsByType(cellType_t type);\nuint8_t schedule_getNumberOfFreeEntries(void);\n// from IEEE802154E\n@@ -227,9 +224,6 @@ bool schedule_getOneCellAfterOffset(\nuint16_t* slotoffset,\nuint16_t* channeloffset\n);\n-\n-void schedule_updateCellUsageBitMap(bool hasPacketToSend);\n-\n/**\n\\}\n\\}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -1158,8 +1158,8 @@ void sixtop_six2six_notifyReceive(\nreturnCode = IANA_6TOP_RC_SUCCESS;\nstartingOffset = offset;\n- if ((cellOptions & (LINKOPTIONS_TX | LINKOPTIONS_RX)) != (LINKOPTIONS_TX | LINKOPTIONS_RX)){\n- cellOptions_transformed = cellOptions ^ (LINKOPTIONS_TX | LINKOPTIONS_RX);\n+ if ((cellOptions & (CELLOPTIONS_TX | CELLOPTIONS_RX)) != (CELLOPTIONS_TX | CELLOPTIONS_RX)){\n+ cellOptions_transformed = cellOptions ^ (CELLOPTIONS_TX | CELLOPTIONS_RX);\n} else {\ncellOptions_transformed = cellOptions;\n}\n@@ -1206,8 +1206,8 @@ void sixtop_six2six_notifyReceive(\nif (code == IANA_6TOP_CMD_COUNT){\nnumCells = 0;\nstartingOffset = 0;\n- if ((cellOptions & (LINKOPTIONS_TX | LINKOPTIONS_RX)) != (LINKOPTIONS_TX | LINKOPTIONS_RX)){\n- cellOptions_transformed = cellOptions ^ (LINKOPTIONS_TX | LINKOPTIONS_RX);\n+ if ((cellOptions & (CELLOPTIONS_TX | CELLOPTIONS_RX)) != (CELLOPTIONS_TX | CELLOPTIONS_RX)){\n+ cellOptions_transformed = cellOptions ^ (CELLOPTIONS_TX | CELLOPTIONS_RX);\n} else {\ncellOptions_transformed = cellOptions;\n}\n@@ -1287,8 +1287,8 @@ void sixtop_six2six_notifyReceive(\npktLen -= 4;\ni++;\n}\n- if ((cellOptions & (LINKOPTIONS_TX | LINKOPTIONS_RX)) != (LINKOPTIONS_TX | LINKOPTIONS_RX)){\n- cellOptions_transformed = cellOptions ^ (LINKOPTIONS_TX | LINKOPTIONS_RX);\n+ if ((cellOptions & (CELLOPTIONS_TX | CELLOPTIONS_RX)) != (CELLOPTIONS_TX | CELLOPTIONS_RX)){\n+ cellOptions_transformed = cellOptions ^ (CELLOPTIONS_TX | CELLOPTIONS_RX);\n} else {\ncellOptions_transformed = cellOptions;\n}\n@@ -1327,8 +1327,8 @@ void sixtop_six2six_notifyReceive(\ntemp16--;\ni++;\n}\n- if ((cellOptions & (LINKOPTIONS_TX | LINKOPTIONS_RX)) != (LINKOPTIONS_TX | LINKOPTIONS_RX)){\n- cellOptions_transformed = cellOptions ^ (LINKOPTIONS_TX | LINKOPTIONS_RX);\n+ if ((cellOptions & (CELLOPTIONS_TX | CELLOPTIONS_RX)) != (CELLOPTIONS_TX | CELLOPTIONS_RX)){\n+ cellOptions_transformed = cellOptions ^ (CELLOPTIONS_TX | CELLOPTIONS_RX);\n} else {\ncellOptions_transformed = cellOptions;\n}\n@@ -1371,8 +1371,8 @@ void sixtop_six2six_notifyReceive(\nresponse_pkt->l2_sixtop_returnCode = returnCode;\nresponse_pkt->l2_sixtop_frameID = metadata;\n// revert tx and rx link option bits\n- if ((cellOptions & (LINKOPTIONS_TX | LINKOPTIONS_RX)) != (LINKOPTIONS_TX | LINKOPTIONS_RX)){\n- response_pkt->l2_sixtop_cellOptions = cellOptions ^ (LINKOPTIONS_TX | LINKOPTIONS_RX);\n+ if ((cellOptions & (CELLOPTIONS_TX | CELLOPTIONS_RX)) != (CELLOPTIONS_TX | CELLOPTIONS_RX)){\n+ response_pkt->l2_sixtop_cellOptions = cellOptions ^ (CELLOPTIONS_TX | CELLOPTIONS_RX);\n} else {\nresponse_pkt->l2_sixtop_cellOptions = cellOptions;\n}\n@@ -1555,15 +1555,15 @@ bool sixtop_addCells(\nbool hasCellsAdded;\n// translate cellOptions to cell type\n- if (cellOptions == LINKOPTIONS_TX){\n+ if (cellOptions == CELLOPTIONS_TX){\ntype = CELLTYPE_TX;\nisShared = FALSE;\n}\n- if (cellOptions == LINKOPTIONS_RX){\n+ if (cellOptions == CELLOPTIONS_RX){\ntype = CELLTYPE_RX;\nisShared = FALSE;\n}\n- if (cellOptions == (LINKOPTIONS_TX | LINKOPTIONS_RX | LINKOPTIONS_SHARED)){\n+ if (cellOptions == (CELLOPTIONS_TX | CELLOPTIONS_RX | CELLOPTIONS_SHARED)){\ntype = CELLTYPE_TXRX;\nisShared = TRUE;\n}\n@@ -1605,13 +1605,13 @@ bool sixtop_removeCells(\nbool hasCellsRemoved;\n// translate cellOptions to cell type\n- if (cellOptions == LINKOPTIONS_TX){\n+ if (cellOptions == CELLOPTIONS_TX){\nisShared = FALSE;\n}\n- if (cellOptions == LINKOPTIONS_RX){\n+ if (cellOptions == CELLOPTIONS_RX){\nisShared = FALSE;\n}\n- if (cellOptions == (LINKOPTIONS_TX | LINKOPTIONS_RX | LINKOPTIONS_SHARED)){\n+ if (cellOptions == (CELLOPTIONS_TX | CELLOPTIONS_RX | CELLOPTIONS_SHARED)){\nisShared = TRUE;\n}\n@@ -1700,13 +1700,13 @@ bool sixtop_areAvailableCellsToBeRemoved(\navailable = TRUE;\n// translate cellOptions to cell type\n- if (cellOptions == LINKOPTIONS_TX){\n+ if (cellOptions == CELLOPTIONS_TX){\ntype = CELLTYPE_TX;\n}\n- if (cellOptions == LINKOPTIONS_RX){\n+ if (cellOptions == CELLOPTIONS_RX){\ntype = CELLTYPE_RX;\n}\n- if (cellOptions == (LINKOPTIONS_TX | LINKOPTIONS_RX | LINKOPTIONS_SHARED)){\n+ if (cellOptions == (CELLOPTIONS_TX | CELLOPTIONS_RX | CELLOPTIONS_SHARED)){\ntype = CELLTYPE_TXRX;\nmemset(&anycastAddr,0,sizeof(open_addr_t));\nanycastAddr.type = ADDR_ANYCAST;\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -592,8 +592,6 @@ functionsToChange = [\n'schedule_getMaxActiveSlots',\n'schedule_removeActiveSlot',\n'schedule_isSlotOffsetAvailable',\n- 'schedule_getUsageStatus',\n- 'schedule_getTotalCellUsageStatus',\n'schedule_statistic_poorLinkQuality',\n'schedule_getCellsCounts',\n'schedule_removeAllCells',\n@@ -611,16 +609,12 @@ functionsToChange = [\n'schedule_resetBackoff',\n'schedule_indicateRx',\n'schedule_indicateTx',\n- 'schedule_updateCellUsageBitMap',\n'schedule_resetEntry',\n- 'schedule_getNumOfSlotsByType',\n'schedule_getNumberOfFreeEntries',\n'schedule_getOneCellAfterOffset',\n'schedule_getToBeRemovedCells',\n# msf\n'msf_init',\n- 'msf_bandwidthEstimate_task',\n- 'msf_notifyNewSlotframe',\n'msf_appPktPeriod',\n'msf_setBackoff',\n'msf_getsfid',\n@@ -629,6 +623,10 @@ functionsToChange = [\n'msf_getMetadata',\n'msf_translateMetadata',\n'msf_handleRCError',\n+ 'msf_trigger6pAdd',\n+ 'msf_trigger6pDelete',\n+ 'msf_updateCellsPassed',\n+ 'msf_updateCellsUsed',\n# sixtop\n'sixtop_init',\n'sixtop_setKaPeriod',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. implementing the MSF algorithm to adapting to traffic.
|
491,595 |
06.11.2017 19:24:21
| -3,600 |
25bcf61e082cba1760ecf623c9a7a11901c1885e
|
add anycast type address check in packetfunctions_isBroadcastMulticast.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/packetfunctions.c",
"new_path": "openstack/cross-layers/packetfunctions.c",
"diff": "@@ -82,6 +82,12 @@ void packetfunctions_mac16bToMac64b(open_addr_t* mac16b, open_addr_t* mac64btoWr\nbool packetfunctions_isBroadcastMulticast(open_addr_t* address) {\nuint8_t i;\nuint8_t address_length;\n+\n+ // anycast type\n+ if (address->type==ADDR_ANYCAST) {\n+ return TRUE;\n+ }\n+\n//IPv6 multicast\nif (address->type==ADDR_128B) {\nif (address->addr_128b[0]==0xff) {\n@@ -90,6 +96,7 @@ bool packetfunctions_isBroadcastMulticast(open_addr_t* address) {\nreturn FALSE;\n}\n}\n+\n//15.4 broadcast\nswitch (address->type) {\ncase ADDR_16B:\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. add anycast type address check in packetfunctions_isBroadcastMulticast.
|
491,595 |
06.11.2017 20:12:58
| -3,600 |
9f7f8f1528defabf954cbbf98cd8fad02ced7581
|
doing indenting.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -113,7 +113,6 @@ void ieee154e_init() {\nmemset(&ieee154e_vars,0,sizeof(ieee154e_vars_t));\nmemset(&ieee154e_dbg,0,sizeof(ieee154e_dbg_t));\n- // to easy debug, by default we use signle channel to communication\n// set singleChannel to 0 to enable channel hopping.\nieee154e_vars.singleChannel = 0;\nieee154e_vars.isAckEnabled = TRUE;\n@@ -157,7 +156,6 @@ void ieee154e_init() {\nisr_ieee154e_newSlot // callback\n);\n// radiotimer_start(ieee154e_vars.slotDuration);\n- //\nIEEE802154_security_init();\n}\n@@ -1796,8 +1794,7 @@ port_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {\n// bypass authentication of beacons during join process\nelse if(ieee154e_vars.dataReceived->l2_frameType == IEEE154_TYPE_BEACON) { // not joined yet\npacketfunctions_tossFooter(ieee154e_vars.dataReceived, ieee154e_vars.dataReceived->l2_authenticationLength);\n- }\n- else {\n+ } else {\nbreak;\n}\n}\n@@ -1805,7 +1802,6 @@ port_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {\n// toss the IEEE802.15.4 header\npacketfunctions_tossHeader(ieee154e_vars.dataReceived,ieee802514_header.headerLength);\n-\nif (\nieee802514_header.frameType == IEEE154_TYPE_BEACON && // if it is not a beacon and have ie, the ie will be processed in sixtop\nieee802514_header.ieListPresent==TRUE &&\n@@ -1916,7 +1912,8 @@ port_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {\n// or in case I'm in the middle of the join process when parent is not yet selected\nif ((idmanager_getIsDAGroot()==FALSE &&\nicmpv6rpl_isPreferredParent(&(ieee154e_vars.dataReceived->l2_nextORpreviousHop))) ||\n- IEEE802154_security_isConfigured() == FALSE) {\n+ IEEE802154_security_isConfigured() == FALSE\n+ ) {\nsynchronizePacket(ieee154e_vars.syncCapturedTime);\n}\n// indicate reception to upper layer (no ACK asked)\n@@ -2292,7 +2289,8 @@ bool isValidJoin(OpenQueueEntry_t* eb, ieee802154_header_iht *parsedHeader) {\nparsedHeader->frameType==IEEE154_TYPE_BEACON &&\npacketfunctions_sameAddress(&parsedHeader->panid,idmanager_getMyID(ADDR_PANID)) &&\nieee154e_processIEs(eb,&lenIE)\n- )==FALSE) {\n+ )==FALSE\n+ ) {\nreturn FALSE;\n}\n@@ -2305,8 +2303,7 @@ bool isValidJoin(OpenQueueEntry_t* eb, ieee802154_header_iht *parsedHeader) {\nif (IEEE802154_security_incomingFrame(eb) == E_SUCCESS) {\nreturn TRUE;\n}\n- }\n- else {\n+ } else {\n// bypass authentication check for beacons if security is not configured\npacketfunctions_tossFooter(eb,eb->l2_authenticationLength);\nreturn TRUE;\n@@ -2888,7 +2885,6 @@ void endSlot() {\n// indicate \"received packet\" to upper layer since we don't want to loose packets\nnotif_receive(ieee154e_vars.dataReceived);\n*/\n- // if this is a sixtop resonse, if I indicate \"received packet\", the schedule to my parent may not consistent\n// free dataReceived so corresponding RAM memory can be recycled\nopenqueue_freePacketBuffer(ieee154e_vars.dataReceived);\n@@ -2912,7 +2908,6 @@ void endSlot() {\nieee154e_vars.ackReceived = NULL;\n}\n-\n// change state\nchangeState(S_SLEEP);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.c",
"new_path": "openstack/02b-MAChigh/schedule.c",
"diff": "@@ -327,7 +327,6 @@ owerror_t schedule_addActiveSlot(\nslotContainer->bitMapIndex = 0;\nslotContainer->usageBitMap = 0x003F;// last 6 bits are pre-set\n-\n// insert in circular list\nif (schedule_vars.currentScheduleEntry==NULL) {\n// this is the first active slot added\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "@@ -108,8 +108,6 @@ typedef struct {\nuint8_t numTx;\nuint8_t numTxACK;\nasn_t lastUsedAsn;\n- uint16_t usageBitMap;\n- uint8_t bitMapIndex;\nbool mark_toBeRemoved;\nvoid* next;\n} scheduleEntry_t;\n@@ -126,8 +124,6 @@ typedef struct {\nuint8_t numTx;\nuint8_t numTxACK;\nasn_t lastUsedAsn;\n- uint16_t usageBitMap;\n- uint8_t bitMapIndex;\n} debugScheduleEntry_t;\nEND_PACK\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "//=========================== defination =====================================\n-//#define OPENQUEUE_DEBUG\n#define HIGH_PRIORITY_QUEUE_ENTRY 5\n//=========================== variables =======================================\n@@ -88,11 +87,6 @@ OpenQueueEntry_t* openqueue_getFreePacketBuffer(uint8_t creator) {\nif (openqueue_vars.queue[i].owner==COMPONENT_NULL) {\nopenqueue_vars.queue[i].creator=creator;\nopenqueue_vars.queue[i].owner=COMPONENT_OPENQUEUE;\n-#ifdef OPENQUEUE_DEBUG\n- if (openqueue_vars.queue[i].creator == COMPONENT_SIXTOP_RES){\n- printf(\"mote %d a buffer is occupied by sixtop res\\n\",idmanager_getMyID(ADDR_16B)->addr_16b[1]);\n- }\n-#endif\nENABLE_INTERRUPTS();\nreturn &openqueue_vars.queue[i];\n}\n@@ -116,11 +110,6 @@ owerror_t openqueue_freePacketBuffer(OpenQueueEntry_t* pkt) {\nDISABLE_INTERRUPTS();\nfor (i=0;i<QUEUELENGTH;i++) {\nif (&openqueue_vars.queue[i]==pkt) {\n-#ifdef OPENQUEUE_DEBUG\n- if (openqueue_vars.queue[i].creator == COMPONENT_SIXTOP_RES){\n- printf(\"mote %d release a sixtop res buffer\\n\",idmanager_getMyID(ADDR_16B)->addr_16b[1]);\n- }\n-#endif\nif (openqueue_vars.queue[i].owner==COMPONENT_NULL) {\n// log the error\nopenserial_printCritical(COMPONENT_OPENQUEUE,ERR_FREEING_UNUSED,\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. doing indenting.
|
491,595 |
06.11.2017 20:14:23
| -3,600 |
d1ae41ab93ba194f2ed180f6040eea7581144f7b
|
remove printf.
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -174,8 +174,6 @@ owerror_t openserial_printCritical(\nopentimers_id_t id;\nuint32_t reference;\n- printf(\"critical error happened %d %d %d %d\\n\", calling_component,error_code,arg1,arg2);\n-\n// blink error LED, this is serious\nleds_error_blink();\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. remove printf.
|
491,595 |
07.11.2017 00:29:54
| -3,600 |
0a5e4bd98b2a080d4f548c4c334b44387ef54e16
|
The shared cell scheduled by 6P is dedicated cell not an anycast type cell.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -1590,12 +1590,7 @@ bool sixtop_addCells(\nisShared = TRUE;\n}\n- if (isShared){\n- memset(&temp_neighbor,0,sizeof(temp_neighbor));\n- temp_neighbor.type = ADDR_ANYCAST;\n- } else {\nmemcpy(&temp_neighbor,previousHop,sizeof(open_addr_t));\n- }\nhasCellsAdded = FALSE;\n// add cells to schedule\n@@ -1622,27 +1617,10 @@ bool sixtop_removeCells(\nuint8_t cellOptions\n){\nuint8_t i;\n- bool isShared;\nopen_addr_t temp_neighbor;\nbool hasCellsRemoved;\n- // translate cellOptions to cell type\n- if (cellOptions == LINKOPTIONS_TX){\n- isShared = FALSE;\n- }\n- if (cellOptions == LINKOPTIONS_RX){\n- isShared = FALSE;\n- }\n- if (cellOptions == (LINKOPTIONS_TX | LINKOPTIONS_RX | LINKOPTIONS_SHARED)){\n- isShared = TRUE;\n- }\n-\n- if (isShared){\n- memset(&temp_neighbor,0,sizeof(temp_neighbor));\n- temp_neighbor.type = ADDR_ANYCAST;\n- } else {\nmemcpy(&temp_neighbor,previousHop,sizeof(open_addr_t));\n- }\nhasCellsRemoved = FALSE;\n// delete cells from schedule\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-717. The shared cell scheduled by 6P is dedicated cell not an anycast type cell.
|
491,595 |
07.11.2017 14:45:02
| -3,600 |
4aeec78e1e7c562c05e4b625fde7c334baca16ae
|
implement msf housekeeping.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "#include \"schedule.h\"\n#include \"openapps.h\"\n#include \"openrandom.h\"\n+#include \"idmanager.h\"\n//=========================== definition =====================================\n@@ -19,9 +20,13 @@ msf_vars_t msf_vars;\nuint16_t msf_getMetadata(void);\nmetadata_t msf_translateMetadata(void);\nvoid msf_handleRCError(uint8_t code);\n+\n+void msf_timer_housekeeping_cb(opentimers_id_t id);\n+void msf_timer_housekeeping_task(void);\n// msf private\nvoid msf_trigger6pAdd(void);\nvoid msf_trigger6pDelete(void);\n+void msf_housekeeping(void);\n//=========================== public ==========================================\n@@ -29,6 +34,14 @@ void msf_init(void) {\nmemset(&msf_vars,0,sizeof(msf_vars_t));\nmsf_vars.numAppPacketsPerSlotFrame = 0;\nsixtop_setSFcallback(msf_getsfid,msf_getMetadata,msf_translateMetadata,msf_handleRCError);\n+ msf_vars.housekeepingTimerId = opentimers_create();\n+ opentimers_scheduleIn(\n+ msf_vars.housekeepingTimerId,\n+ 872 +(openrandom_get16b()&0xff),\n+ TIME_MS,\n+ TIMER_ONESHOT,\n+ msf_timer_housekeeping_cb\n+ );\n}\nvoid msf_setBackoff(uint8_t value){\n@@ -95,8 +108,30 @@ void msf_handleRCError(uint8_t code){\n}\n}\n-//=========================== private =========================================\n+void msf_timer_housekeeping_cb(opentimers_id_t id){\n+ scheduler_push_task(msf_timer_housekeeping_task,TASKPRIO_MSF);\n+ // update the period\n+ opentimers_scheduleIn(\n+ msf_vars.housekeepingTimerId,\n+ 872 +(openrandom_get16b()&0xff),\n+ TIME_MS,\n+ TIMER_ONESHOT,\n+ msf_timer_housekeeping_cb\n+ );\n+}\n+\n+void msf_timer_housekeeping_task(void){\n+ msf_vars.housekeepingTimerCounter = (msf_vars.housekeepingTimerCounter+1)%HOUSEKEEPING_PERIOD;\n+ switch (msf_vars.housekeepingTimerCounter) {\n+ case 0:\n+ msf_housekeeping();\n+ break;\n+ default:\n+ break;\n+ }\n+}\n+//=========================== private =========================================\nvoid msf_trigger6pAdd(void){\nopen_addr_t neighbor;\n@@ -138,7 +173,12 @@ void msf_trigger6pDelete(void){\nreturn;\n}\n- if (msf_candidateRemoveCellList(celllist_delete,&neighbor,1)==FALSE){\n+ if (schedule_getNumberOfDedicatedCells(&neighbor)<=1){\n+ // at least one dedicated cell presents\n+ return;\n+ }\n+\n+ if (msf_candidateRemoveCellList(celllist_delete,&neighbor,NUMCELLS_MSF)==FALSE){\n// failed to get cell list to delete\nreturn;\n}\n@@ -216,3 +256,42 @@ bool msf_candidateRemoveCellList(\nreturn TRUE;\n}\n}\n+\n+void msf_housekeeping(void){\n+\n+ open_addr_t neighbor;\n+ bool foundNeighbor;\n+ cellInfo_ht celllist_add[CELLLIST_MAX_LEN];\n+ cellInfo_ht celllist_delete[CELLLIST_MAX_LEN];\n+ foundNeighbor = icmpv6rpl_getPreferredParentEui64(&neighbor);\n+ if (foundNeighbor==FALSE) {\n+ return;\n+ }\n+ if (schedule_getNumberOfDedicatedCells(&neighbor)==0){\n+ msf_trigger6pAdd();\n+ return;\n+ }\n+\n+ if (schedule_isNumTxWrapped(&neighbor)==FALSE){\n+ return;\n+ }\n+\n+ memset(celllist_delete, 0, CELLLIST_MAX_LEN*sizeof(cellInfo_ht));\n+ if (schedule_getCellsToBeRelocated(&neighbor, celllist_delete)){\n+ if (msf_candidateAddCellList(celllist_add,NUMCELLS_MSF)==FALSE){\n+ // failed to get cell list to add\n+ return;\n+ }\n+ sixtop_request(\n+ IANA_6TOP_CMD_RELOCATE, // code\n+ &neighbor, // neighbor\n+ NUMCELLS_MSF, // number cells\n+ CELLOPTIONS_MSF, // cellOptions\n+ celllist_add, // celllist to add\n+ celllist_delete, // celllist to delete\n+ IANA_6TISCH_SFID_MSF, // sfid\n+ 0, // list command offset (not used)\n+ 0 // list command maximum celllist (not used)\n+ );\n+ }\n+}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.h",
"new_path": "openstack/02b-MAChigh/msf.h",
"diff": "*/\n#include \"opendefs.h\"\n-\n+#include \"opentimers.h\"\n//=========================== define ==========================================\n#define IANA_6TISCH_SFID_MSF 0\n#define LIM_NUMCELLSUSED_HIGH 12\n#define LIM_NUMCELLSUSED_LOW 4\n+#define HOUSEKEEPING_PERIOD 60 // seconds\n+\n//=========================== typedef =========================================\ntypedef struct {\n@@ -27,6 +29,8 @@ typedef struct {\nuint8_t backoff;\nuint8_t numCellsPassed;\nuint8_t numCellsUsed;\n+ opentimers_id_t housekeepingTimerId;\n+ uint8_t housekeepingTimerCounter;\n} msf_vars_t;\n//=========================== module variables ================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.c",
"new_path": "openstack/02b-MAChigh/schedule.c",
"diff": "@@ -556,6 +556,113 @@ uint8_t schedule_getNumberOfFreeEntries(){\nreturn counter;\n}\n+uint8_t schedule_getNumberOfDedicatedCells(open_addr_t* neighbor){\n+ uint8_t i;\n+ uint8_t counter;\n+\n+ INTERRUPT_DECLARATION();\n+ DISABLE_INTERRUPTS();\n+\n+ counter = 0;\n+ for(i=0;i<MAXACTIVESLOTS;i++) {\n+ if(\n+ packetfunctions_sameAddress(&schedule_vars.scheduleBuf[i].neighbor, neighbor) == TRUE\n+ ){\n+ counter++;\n+ }\n+ }\n+\n+ ENABLE_INTERRUPTS();\n+\n+ return counter;\n+}\n+\n+bool schedule_isNumTxWrapped(open_addr_t* neighbor){\n+ uint8_t i;\n+\n+ INTERRUPT_DECLARATION();\n+ DISABLE_INTERRUPTS();\n+\n+ for(i=0;i<MAXACTIVESLOTS;i++) {\n+ if(\n+ packetfunctions_sameAddress(&schedule_vars.scheduleBuf[i].neighbor, neighbor) == TRUE\n+ ){\n+ if (schedule_vars.scheduleBuf[i].numTx<0xFF/2){\n+ ENABLE_INTERRUPTS();\n+ return FALSE;\n+ }\n+ }\n+ }\n+\n+ ENABLE_INTERRUPTS();\n+ return TRUE;\n+}\n+bool schedule_getCellsToBeRelocated(open_addr_t* neighbor, cellInfo_ht* celllist){\n+ uint8_t i;\n+\n+ uint16_t highestPDR;\n+ uint16_t cellPDR;\n+\n+ INTERRUPT_DECLARATION();\n+ DISABLE_INTERRUPTS();\n+\n+ highestPDR = 0;\n+ // found the cell with higest PDR\n+ for(i=0;i<MAXACTIVESLOTS;i++) {\n+ if(\n+ packetfunctions_sameAddress(&schedule_vars.scheduleBuf[i].neighbor, neighbor) == TRUE\n+ ){\n+ if (schedule_vars.scheduleBuf[i].numTx>0){\n+ cellPDR = 100*schedule_vars.scheduleBuf[i].numTxACK/schedule_vars.scheduleBuf[i].numTx;\n+ if (cellPDR > highestPDR){\n+ highestPDR = cellPDR;\n+ }\n+ }\n+ }\n+ }\n+\n+ if (highestPDR==0){\n+ // no cell to relocate\n+ return FALSE;\n+ }\n+\n+ for(i=0;i<MAXACTIVESLOTS;i++) {\n+ if(\n+ packetfunctions_sameAddress(&schedule_vars.scheduleBuf[i].neighbor, neighbor) == TRUE\n+ ){\n+ if (schedule_vars.scheduleBuf[i].numTx>0){\n+ cellPDR = 100*schedule_vars.scheduleBuf[i].numTxACK/schedule_vars.scheduleBuf[i].numTx;\n+ if (highestPDR-cellPDR > RELOCATE_PDRTHRES){\n+ celllist->isUsed = TRUE;\n+ celllist->slotoffset = schedule_vars.scheduleBuf[i].slotOffset;\n+ celllist->channeloffset = schedule_vars.scheduleBuf[i].channelOffset;\n+ return TRUE;\n+ }\n+ }\n+ }\n+ }\n+\n+ ENABLE_INTERRUPTS();\n+\n+ return FALSE;\n+}\n+\n+bool schedule_hasDedicatedCells(void){\n+ uint8_t i;\n+\n+ INTERRUPT_DECLARATION();\n+ DISABLE_INTERRUPTS();\n+\n+ for(i=0;i<MAXACTIVESLOTS;i++) {\n+ if(schedule_vars.scheduleBuf[i].neighbor.type == ADDR_64B){\n+ return TRUE;\n+ }\n+ }\n+\n+ ENABLE_INTERRUPTS();\n+ return FALSE;\n+}\n+\n//=== from IEEE802154E: reading the schedule and updating statistics\nvoid schedule_syncSlotOffset(slotOffset_t targetSlotOffset) {\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "@@ -72,8 +72,7 @@ See MINBE for an explanation of backoff.\n/**\n\\brief a threshold used for triggering the maintaining process.uint: percent\n*/\n-#define PDR_THRESHOLD 80 // 80 means 80%\n-#define MIN_NUMTX_FOR_PDR 50 // don't calculate PDR when numTx is lower than this value\n+#define RELOCATE_PDRTHRES 50 // 50 means 50%\ntypedef enum{\nCELLOPTIONS_TX = 1<<0,\n@@ -108,7 +107,6 @@ typedef struct {\nuint8_t numTx;\nuint8_t numTxACK;\nasn_t lastUsedAsn;\n- bool mark_toBeRemoved;\nvoid* next;\n} scheduleEntry_t;\n@@ -195,6 +193,10 @@ void schedule_removeAllCells(\n);\nscheduleEntry_t* schedule_getCurrentScheduleEntry(void);\nuint8_t schedule_getNumberOfFreeEntries(void);\n+uint8_t schedule_getNumberOfDedicatedCells(open_addr_t* neighbor);\n+bool schedule_isNumTxWrapped(open_addr_t* neighbor);\n+bool schedule_getCellsToBeRelocated(open_addr_t* neighbor, cellInfo_ht* celllist);\n+bool schedule_hasDedicatedCells(void);\n// from IEEE802154E\nvoid schedule_syncSlotOffset(slotOffset_t targetSlotOffset);\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -611,6 +611,10 @@ functionsToChange = [\n'schedule_indicateTx',\n'schedule_resetEntry',\n'schedule_getNumberOfFreeEntries',\n+ 'schedule_getNumberOfDedicatedCells',\n+ 'schedule_hasDedicatedCells',\n+ 'schedule_isNumTxWrapped',\n+ 'schedule_getCellsToBeRelocated',\n'schedule_getOneCellAfterOffset',\n'schedule_getToBeRemovedCells',\n# msf\n@@ -623,6 +627,9 @@ functionsToChange = [\n'msf_getMetadata',\n'msf_translateMetadata',\n'msf_handleRCError',\n+ 'msf_timer_housekeeping_cb',\n+ 'msf_timer_housekeeping_task',\n+ 'msf_housekeeping',\n'msf_trigger6pAdd',\n'msf_trigger6pDelete',\n'msf_updateCellsPassed',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-715. implement msf housekeeping.
|
491,595 |
07.11.2017 14:49:08
| -3,600 |
3299bf11aca2ea4d2fde1344def0268050a93bf7
|
traffic control on the minimal cell and dedicated cell.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -818,8 +818,7 @@ port_INLINE void activity_ti1ORri1() {\nif (idmanager_getIsDAGroot()==FALSE) {\nif(ieee154e_vars.deSyncTimeout > ieee154e_vars.numOfSleepSlots){\nieee154e_vars.deSyncTimeout -= ieee154e_vars.numOfSleepSlots;\n- }\n- else{\n+ } else {\n// Reset sleep slots\nieee154e_vars.numOfSleepSlots = 1;\n@@ -910,8 +909,16 @@ port_INLINE void activity_ti1ORri1() {\nieee154e_vars.dataToSend = NULL;\n// get the neighbor to check this is dedicated cell or not later\nschedule_getNeighbor(&neighbor);\n+\n// check whether we can send\nif (schedule_getOkToSend()) {\n+ if (schedule_hasDedicatedCells()){\n+ if (packetfunctions_isBroadcastMulticast(&neighbor)==FALSE){\n+ ieee154e_vars.dataToSend = openqueue_macGetDedicatedPacket(&neighbor);\n+ } else {\n+ ieee154e_vars.dataToSend = openqueue_macGetBoardcastPacket();\n+ }\n+ } else {\nieee154e_vars.dataToSend = openqueue_macGetDataPacket(&neighbor);\nif ((ieee154e_vars.dataToSend==NULL) && (cellType==CELLTYPE_TXRX)) {\ncouldSendEB=TRUE;\n@@ -927,6 +934,7 @@ port_INLINE void activity_ti1ORri1() {\n}\nmsf_updateCellsPassed();\n}\n+ }\nif (ieee154e_vars.dataToSend==NULL) {\nif (cellType==CELLTYPE_TX) {\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "@@ -328,13 +328,12 @@ OpenQueueEntry_t* openqueue_macGetEBPacket() {\nreturn NULL;\n}\n-OpenQueueEntry_t* openqueue_macGetDIOPacket(){\n+OpenQueueEntry_t* openqueue_macGetBoardcastPacket(){\nuint8_t i;\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\nfor (i=0;i<QUEUELENGTH;i++) {\nif (openqueue_vars.queue[i].owner==COMPONENT_SIXTOP_TO_IEEE802154E &&\n- openqueue_vars.queue[i].creator==COMPONENT_ICMPv6RPL &&\npacketfunctions_isBroadcastMulticast(&(openqueue_vars.queue[i].l2_nextORpreviousHop))) {\nENABLE_INTERRUPTS();\nreturn &openqueue_vars.queue[i];\n@@ -344,7 +343,7 @@ OpenQueueEntry_t* openqueue_macGetDIOPacket(){\nreturn NULL;\n}\n-OpenQueueEntry_t* openqueue_macGetUnicastPacket(open_addr_t* toNeighbor){\n+OpenQueueEntry_t* openqueue_macGetDedicatedPacket(open_addr_t* toNeighbor){\nuint8_t i;\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\n@@ -358,7 +357,7 @@ OpenQueueEntry_t* openqueue_macGetUnicastPacket(open_addr_t* toNeighbor){\n(\ntoNeighbor->type==ADDR_64B &&\npacketfunctions_sameAddress(toNeighbor,&openqueue_vars.queue[i].l2_nextORpreviousHop)\n- ) || toNeighbor->type==ADDR_ANYCAST\n+ )\n)\n){\nENABLE_INTERRUPTS();\n@@ -369,12 +368,11 @@ OpenQueueEntry_t* openqueue_macGetUnicastPacket(open_addr_t* toNeighbor){\nfor (i=0;i<QUEUELENGTH;i++) {\nif (\nopenqueue_vars.queue[i].owner==COMPONENT_SIXTOP_TO_IEEE802154E &&\n- packetfunctions_isBroadcastMulticast(&(openqueue_vars.queue[i].l2_nextORpreviousHop))==FALSE &&\n(\n(\ntoNeighbor->type==ADDR_64B &&\npacketfunctions_sameAddress(toNeighbor,&openqueue_vars.queue[i].l2_nextORpreviousHop)\n- ) || toNeighbor->type==ADDR_ANYCAST\n+ )\n)\n){\nENABLE_INTERRUPTS();\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.h",
"new_path": "openstack/cross-layers/openqueue.h",
"diff": "@@ -47,8 +47,8 @@ uint8_t openqueue_sixtopGetNumberOfPacketCreatedBy(uint8_t creator);\n// called by IEEE80215E\nOpenQueueEntry_t* openqueue_macGetDataPacket(open_addr_t* toNeighbor);\nOpenQueueEntry_t* openqueue_macGetEBPacket(void);\n-OpenQueueEntry_t* openqueue_macGetDIOPacket(void);\n-OpenQueueEntry_t* openqueue_macGetUnicastPacket(open_addr_t* toNeighbor);\n+OpenQueueEntry_t* openqueue_macGetBoardcastPacket(void);\n+OpenQueueEntry_t* openqueue_macGetDedicatedPacket(open_addr_t* toNeighbor);\n/**\n\\}\n\\}\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -799,8 +799,8 @@ functionsToChange = [\n'openqueue_macGetDataPacket',\n'openqueue_macGetEBPacket',\n'openqueue_reset_entry',\n- 'openqueue_macGetDIOPacket',\n- 'openqueue_macGetUnicastPacket',\n+ 'openqueue_macGetBoardcastPacket',\n+ 'openqueue_macGetDedicatedPacket',\n# openrandom\n'openrandom_init',\n'openrandom_get16b',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. traffic control on the minimal cell and dedicated cell.
|
491,595 |
07.11.2017 15:57:45
| -3,600 |
70ebd9bbceb6f80405f6d4d319d10e71419fcfc9
|
apply backoff on each neighbor.
|
[
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -387,6 +387,8 @@ typedef struct {\nbool f6PNORES;\nuint8_t generation;\nuint8_t sequenceNumber;\n+ uint8_t backoffExponenton;\n+ uint8_t backoff;\n} neighborRow_t;\nEND_PACK\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "#include \"idmanager.h\"\n#include \"openserial.h\"\n#include \"IEEE802154E.h\"\n+#include \"openrandom.h\"\n//=========================== variables =======================================\n@@ -485,6 +486,57 @@ bool neighbors_getNeighborEui64(open_addr_t* address, uint8_t addr_type, uint8_\n}\nreturn ReturnVal;\n}\n+// ==== update backoff\n+void neighbors_updateBackoff(open_addr_t* address){\n+ uint8_t i;\n+ for (i=0;i<MAXNUMNEIGHBORS;i++){\n+ if (packetfunctions_sameAddress(address, &neighbors_vars.neighbors[i].addr_64b)){\n+ // increase the backoffExponent\n+ if (neighbors_vars.neighbors[i].backoffExponenton<MAXBE) {\n+ neighbors_vars.neighbors[i].backoffExponenton++;\n+ }\n+ // set the backoff to a random value in [0..2^BE]\n+ neighbors_vars.neighbors[i].backoff = openrandom_get16b()%(1<<neighbors_vars.neighbors[i].backoffExponenton);\n+ break;\n+ }\n+ }\n+}\n+void neighbors_decreaseBackoff(open_addr_t* address){\n+ uint8_t i;\n+ for (i=0;i<MAXNUMNEIGHBORS;i++){\n+ if (packetfunctions_sameAddress(address, &neighbors_vars.neighbors[i].addr_64b)){\n+ if (neighbors_vars.neighbors[i].backoff>0) {\n+ neighbors_vars.neighbors[i].backoff--;\n+ }\n+ break;\n+ }\n+ }\n+}\n+bool neighbors_backoffHitZero(open_addr_t* address){\n+ uint8_t i;\n+ bool returnVal;\n+\n+ returnVal = FALSE;\n+ for (i=0;i<MAXNUMNEIGHBORS;i++){\n+ if (packetfunctions_sameAddress(address, &neighbors_vars.neighbors[i].addr_64b)){\n+ returnVal = (neighbors_vars.neighbors[i].backoff==0);\n+ break;\n+ }\n+ }\n+ return returnVal;\n+}\n+\n+void neighbors_resetBackoff(open_addr_t* address){\n+ uint8_t i;\n+\n+ for (i=0;i<MAXNUMNEIGHBORS;i++){\n+ if (packetfunctions_sameAddress(address, &neighbors_vars.neighbors[i].addr_64b)){\n+ neighbors_vars.neighbors[i].backoffExponenton = MINBE-1;\n+ neighbors_vars.neighbors[i].backoff = 0;\n+ break;\n+ }\n+ }\n+}\n//===== setters\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.h",
"new_path": "openstack/02b-MAChigh/neighbors.h",
"diff": "@@ -97,6 +97,11 @@ void neighbors_resetGeneration(open_addr_t* address);\n// get addresses\nbool neighbors_getNeighborEui64(open_addr_t* address,uint8_t addr_type,uint8_t index);\n+// update backoff field\n+void neighbors_updateBackoff(open_addr_t* address);\n+void neighbors_decreaseBackoff(open_addr_t* address);\n+bool neighbors_backoffHitZero(open_addr_t* address);\n+void neighbors_resetBackoff(open_addr_t* address);\n// maintenance\nvoid neighbors_removeOld(void);\n// debug\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.c",
"new_path": "openstack/02b-MAChigh/schedule.c",
"diff": "@@ -35,8 +35,7 @@ void schedule_init() {\nfor (running_slotOffset=0;running_slotOffset<MAXACTIVESLOTS;running_slotOffset++) {\nschedule_resetEntry(&schedule_vars.scheduleBuf[running_slotOffset]);\n}\n- schedule_vars.backoffExponenton_minimalCell = MINBE-1;\n- schedule_vars.backoffExponenton_dedicatedCell = MINBE-1;\n+ schedule_vars.backoffExponenton = MINBE-1;\nschedule_vars.maxActiveSlots = MAXACTIVESLOTS;\nstart_slotOffset = SCHEDULE_MINIMAL_6TISCH_SLOTOFFSET;\n@@ -154,8 +153,8 @@ bool debugPrint_backoff() {\nuint8_t temp[2];\n// gather status data\n- temp[0] = schedule_vars.backoffExponenton_minimalCell;\n- temp[1] = schedule_vars.backoff_minimalCell;\n+ temp[0] = schedule_vars.backoffExponenton;\n+ temp[1] = schedule_vars.backoff;\n// send status data over serial port\nopenserial_printStatus(\n@@ -735,32 +734,22 @@ bool schedule_getOkToSend(void) {\n// shared slot: check backoff before answering\nif (schedule_vars.currentScheduleEntry->neighbor.type == ADDR_ANYCAST){\n-\n// this is a minimal cell\n-\n- if (schedule_vars.backoff_minimalCell>0) {\n- schedule_vars.backoff_minimalCell--;\n+ if (schedule_vars.backoff>0) {\n+ schedule_vars.backoff--;\n}\n// only return TRUE if backoff hit 0\n- if (schedule_vars.backoff_minimalCell==0) {\n+ if (schedule_vars.backoff==0) {\nreturnVal = TRUE;\n} else {\nreturnVal = FALSE;\n}\n} else {\n// this is a dedicated cell\n+ neighbors_decreaseBackoff(&schedule_vars.currentScheduleEntry->neighbor);\n- if (schedule_vars.backoff_dedicatedCell>0) {\n- schedule_vars.backoff_dedicatedCell--;\n- }\n-\n- // only return TRUE if backoff hit 0\n- if (schedule_vars.backoff_dedicatedCell==0) {\n- returnVal = TRUE;\n- } else {\n- returnVal = FALSE;\n- }\n+ returnVal = neighbors_backoffHitZero(&schedule_vars.currentScheduleEntry->neighbor);\n}\n}\n@@ -778,11 +767,9 @@ void schedule_resetBackoff() {\nDISABLE_INTERRUPTS();\n// reset backoffExponent\n- schedule_vars.backoffExponenton_minimalCell = MINBE-1;\n- schedule_vars.backoffExponenton_dedicatedCell = MINBE-1;\n+ schedule_vars.backoffExponenton = MINBE-1;\n// reset backoff\n- schedule_vars.backoff_minimalCell = 0;\n- schedule_vars.backoff_dedicatedCell = 0;\n+ schedule_vars.backoff = 0;\nENABLE_INTERRUPTS();\n}\n@@ -830,26 +817,22 @@ void schedule_indicateTx(asn_t* asnTimestamp, bool succesfullTx) {\nif (succesfullTx==TRUE) {\nif (schedule_vars.currentScheduleEntry->neighbor.type==ADDR_ANYCAST){\n// reset backoffExponent\n- schedule_vars.backoffExponenton_minimalCell = MINBE-1;\n+ schedule_vars.backoffExponenton = MINBE-1;\n// reset backoff\n- schedule_vars.backoff_minimalCell = 0;\n+ schedule_vars.backoff = 0;\n} else {\n- schedule_vars.backoffExponenton_dedicatedCell = MINBE-1;\n- schedule_vars.backoff_dedicatedCell = 0;\n+ neighbors_resetBackoff(&schedule_vars.currentScheduleEntry->neighbor);\n}\n} else {\nif (schedule_vars.currentScheduleEntry->neighbor.type==ADDR_ANYCAST){\n// increase the backoffExponent\n- if (schedule_vars.backoffExponenton_minimalCell<MAXBE) {\n- schedule_vars.backoffExponenton_minimalCell++;\n+ if (schedule_vars.backoffExponenton<MAXBE) {\n+ schedule_vars.backoffExponenton++;\n}\n// set the backoff to a random value in [0..2^BE]\n- schedule_vars.backoff_minimalCell = openrandom_get16b()%(1<<schedule_vars.backoffExponenton_minimalCell);\n+ schedule_vars.backoff = openrandom_get16b()%(1<<schedule_vars.backoffExponenton);\n} else {\n- if (schedule_vars.backoffExponenton_dedicatedCell<MAXBE) {\n- schedule_vars.backoffExponenton_dedicatedCell++;\n- }\n- schedule_vars.backoff_dedicatedCell = openrandom_get16b()%(1<<schedule_vars.backoffExponenton_dedicatedCell);\n+ neighbors_updateBackoff(&schedule_vars.currentScheduleEntry->neighbor);\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "@@ -143,10 +143,8 @@ typedef struct {\nframeLength_t maxActiveSlots;\nuint8_t frameHandle;\nuint8_t frameNumber;\n- uint8_t backoffExponenton_minimalCell;\n- uint8_t backoff_minimalCell;\n- uint8_t backoffExponenton_dedicatedCell;\n- uint8_t backoff_dedicatedCell;\n+ uint8_t backoffExponenton;\n+ uint8_t backoff;\nuint8_t debugPrintRow;\n} schedule_vars_t;\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -569,6 +569,10 @@ functionsToChange = [\n'neighbors_resetGeneration',\n'neighbors_indicateRxDIO',\n'neighbors_getNeighborEui64',\n+ 'neighbors_updateBackoff',\n+ 'neighbors_decreaseBackoff',\n+ 'neighbors_backoffHitZero',\n+ 'neighbors_resetBackoff',\n'neighbors_removeOld',\n'debugPrint_neighbors',\n'registerNewNeighbor',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-716. apply backoff on each neighbor.
|
491,595 |
07.11.2017 17:24:02
| -3,600 |
3133b2e467b6bb7547dd6712b6a6ff60aa410650
|
Control the traffic on minimal cell and dedicated cells.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -912,27 +912,30 @@ port_INLINE void activity_ti1ORri1() {\n// check whether we can send\nif (schedule_getOkToSend()) {\n- if (schedule_hasDedicatedCells()){\nif (packetfunctions_isBroadcastMulticast(&neighbor)==FALSE){\n+ // this is a dedicated cell\nieee154e_vars.dataToSend = openqueue_macGetDedicatedPacket(&neighbor);\n- } else {\n- ieee154e_vars.dataToSend = openqueue_macGetBoardcastPacket();\n+ // update numcellpassed and numcellused on dedicated cell\n+ if (ieee154e_vars.dataToSend!=NULL) {\n+ msf_updateCellsUsed(&neighbor);\n}\n+ msf_updateCellsPassed(&neighbor);\n} else {\n+ // this is minimal cell\nieee154e_vars.dataToSend = openqueue_macGetDataPacket(&neighbor);\nif ((ieee154e_vars.dataToSend==NULL) && (cellType==CELLTYPE_TXRX)) {\ncouldSendEB=TRUE;\n// look for an EB packet in the queue\nieee154e_vars.dataToSend = openqueue_macGetEBPacket();\n+ } else {\n+ // there is a packet to send\n+ if (\n+ schedule_hasDedicatedCellToNeighbor(&ieee154e_vars.dataToSend->l2_nextORpreviousHop)\n+ ) {\n+ // leave the packet to be sent on dedicated cell and pick up a broadcast packet.\n+ ieee154e_vars.dataToSend = openqueue_macGetBoardcastPacket();\n}\n}\n-\n- // update numcellpassed and numcellused on dedicated cell\n- if (packetfunctions_isBroadcastMulticast(&neighbor)==FALSE){\n- if (ieee154e_vars.dataToSend!=NULL) {\n- msf_updateCellsUsed();\n- }\n- msf_updateCellsPassed();\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "#include \"openapps.h\"\n#include \"openrandom.h\"\n#include \"idmanager.h\"\n+#include \"icmpv6rpl.h\"\n//=========================== definition =====================================\n@@ -49,7 +50,12 @@ void msf_setBackoff(uint8_t value){\n}\n// called by schedule\n-void msf_updateCellsPassed(void){\n+void msf_updateCellsPassed(open_addr_t* neighbor){\n+\n+ if (icmpv6rpl_isPreferredParent(neighbor)==FALSE){\n+ return;\n+ }\n+\nmsf_vars.numCellsPassed++;\nif (msf_vars.numCellsPassed == MAX_NUMCELLS){\nif (msf_vars.numCellsUsed > LIM_NUMCELLSUSED_HIGH){\n@@ -63,7 +69,12 @@ void msf_updateCellsPassed(void){\n}\n}\n-void msf_updateCellsUsed(void){\n+void msf_updateCellsUsed(open_addr_t* neighbor){\n+\n+ if (icmpv6rpl_isPreferredParent(neighbor)==FALSE){\n+ return;\n+ }\n+\nmsf_vars.numCellsUsed++;\n}\n//=========================== callback =========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.h",
"new_path": "openstack/02b-MAChigh/msf.h",
"diff": "@@ -52,8 +52,8 @@ bool msf_candidateRemoveCellList(\nuint8_t requiredCells\n);\n// called by schedule\n-void msf_updateCellsPassed(void);\n-void msf_updateCellsUsed(void);\n+void msf_updateCellsPassed(open_addr_t* neighbor);\n+void msf_updateCellsUsed(open_addr_t* neighbor);\n/**\n\\}\n\\}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.c",
"new_path": "openstack/02b-MAChigh/schedule.c",
"diff": "@@ -647,14 +647,17 @@ bool schedule_getCellsToBeRelocated(open_addr_t* neighbor, cellInfo_ht* celllist\nreturn FALSE;\n}\n-bool schedule_hasDedicatedCells(void){\n+bool schedule_hasDedicatedCellToNeighbor(open_addr_t* neighbor){\nuint8_t i;\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\nfor(i=0;i<MAXACTIVESLOTS;i++) {\n- if(schedule_vars.scheduleBuf[i].neighbor.type == ADDR_64B){\n+ if(\n+ schedule_vars.scheduleBuf[i].neighbor.type == ADDR_64B &&\n+ packetfunctions_sameAddress(neighbor,&schedule_vars.scheduleBuf[i].neighbor)\n+ ){\nreturn TRUE;\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "@@ -194,7 +194,7 @@ uint8_t schedule_getNumberOfFreeEntries(void);\nuint8_t schedule_getNumberOfDedicatedCells(open_addr_t* neighbor);\nbool schedule_isNumTxWrapped(open_addr_t* neighbor);\nbool schedule_getCellsToBeRelocated(open_addr_t* neighbor, cellInfo_ht* celllist);\n-bool schedule_hasDedicatedCells(void);\n+bool schedule_hasDedicatedCellToNeighbor(open_addr_t* neighbor);\n// from IEEE802154E\nvoid schedule_syncSlotOffset(slotOffset_t targetSlotOffset);\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.h",
"new_path": "openstack/03b-IPv6/icmpv6rpl.h",
"diff": "@@ -218,14 +218,14 @@ uint8_t icmpv6rpl_getRPLIntanceID(void);\nowerror_t icmpv6rpl_getRPLDODAGid(uint8_t* address_128b);\nvoid icmpv6rpl_setDIOPeriod(uint16_t dioPeriod);\nvoid icmpv6rpl_setDAOPeriod(uint16_t daoPeriod);\n-bool icmpv6rpl_getPreferredParentIndex(uint8_t* indexptr); // new DB\n-bool icmpv6rpl_getPreferredParentEui64(open_addr_t* addressToWrite); // new DB\n-bool icmpv6rpl_isPreferredParent(open_addr_t* address); // new DB\n-dagrank_t icmpv6rpl_getMyDAGrank(void); // new DB\n-void icmpv6rpl_setMyDAGrank(dagrank_t rank); // new DB\n-void icmpv6rpl_killPreferredParent(void); // new DB\n-void icmpv6rpl_updateMyDAGrankAndParentSelection(void); // new DB\n-void icmpv6rpl_indicateRxDIO(OpenQueueEntry_t* msg); // new DB\n+bool icmpv6rpl_getPreferredParentIndex(uint8_t* indexptr);\n+bool icmpv6rpl_getPreferredParentEui64(open_addr_t* addressToWrite);\n+bool icmpv6rpl_isPreferredParent(open_addr_t* address);\n+dagrank_t icmpv6rpl_getMyDAGrank(void);\n+void icmpv6rpl_setMyDAGrank(dagrank_t rank);\n+void icmpv6rpl_killPreferredParent(void);\n+void icmpv6rpl_updateMyDAGrankAndParentSelection(void);\n+void icmpv6rpl_indicateRxDIO(OpenQueueEntry_t* msg);\nbool icmpv6rpl_daoSent(void);\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "@@ -345,42 +345,37 @@ OpenQueueEntry_t* openqueue_macGetBoardcastPacket(){\nOpenQueueEntry_t* openqueue_macGetDedicatedPacket(open_addr_t* toNeighbor){\nuint8_t i;\n+ uint8_t packet_index;\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\n+ packet_index = QUEUELENGTH;\n// first to look the sixtop RES packet\nfor (i=0;i<QUEUELENGTH;i++) {\nif (\nopenqueue_vars.queue[i].owner==COMPONENT_SIXTOP_TO_IEEE802154E &&\n- openqueue_vars.queue[i].creator==COMPONENT_SIXTOP_RES &&\n- (\n(\ntoNeighbor->type==ADDR_64B &&\npacketfunctions_sameAddress(toNeighbor,&openqueue_vars.queue[i].l2_nextORpreviousHop)\n)\n- )\n){\n- ENABLE_INTERRUPTS();\n- return &openqueue_vars.queue[i];\n+ if (packet_index==QUEUELENGTH){\n+ packet_index = i;\n+ } else {\n+ if (openqueue_vars.queue[i].creator<openqueue_vars.queue[packet_index].creator){\n+ packet_index = i;\n}\n}\n-\n- for (i=0;i<QUEUELENGTH;i++) {\n- if (\n- openqueue_vars.queue[i].owner==COMPONENT_SIXTOP_TO_IEEE802154E &&\n- (\n- (\n- toNeighbor->type==ADDR_64B &&\n- packetfunctions_sameAddress(toNeighbor,&openqueue_vars.queue[i].l2_nextORpreviousHop)\n- )\n- )\n- ){\n- ENABLE_INTERRUPTS();\n- return &openqueue_vars.queue[i];\n}\n}\n+\n+ if (packet_index == QUEUELENGTH){\nENABLE_INTERRUPTS();\nreturn NULL;\n+ } else {\n+ ENABLE_INTERRUPTS();\n+ return &openqueue_vars.queue[packet_index];\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -616,7 +616,7 @@ functionsToChange = [\n'schedule_resetEntry',\n'schedule_getNumberOfFreeEntries',\n'schedule_getNumberOfDedicatedCells',\n- 'schedule_hasDedicatedCells',\n+ 'schedule_hasDedicatedCellToNeighbor',\n'schedule_isNumTxWrapped',\n'schedule_getCellsToBeRelocated',\n'schedule_getOneCellAfterOffset',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. Control the traffic on minimal cell and dedicated cells.
|
491,595 |
07.11.2017 17:26:46
| -3,600 |
1b9f25f5bc8ecb3cf2a1b71901abf6002b769f54
|
reset its backoff variable when a neighbor is removed.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -803,6 +803,8 @@ void removeNeighbor(uint8_t neighborIndex) {\nneighbors_vars.neighbors[neighborIndex].asn.bytes2and3 = 0;\nneighbors_vars.neighbors[neighborIndex].asn.byte4 = 0;\nneighbors_vars.neighbors[neighborIndex].f6PNORES = FALSE;\n+ neighbors_vars.neighbors[neighborIndex].backoffExponenton = MINBE-1;;\n+ neighbors_vars.neighbors[neighborIndex].backoff = 0;\n}\n//=========================== helpers =========================================\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. reset its backoff variable when a neighbor is removed.
|
491,595 |
07.11.2017 17:30:52
| -3,600 |
6ca52898355c08cd64e5d15ebd6302817067fbe0
|
initial its backoff variables when register a new neighbor.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -758,6 +758,8 @@ void registerNewNeighbor(open_addr_t* address,\nneighbors_vars.neighbors[i].numTx = 0;\nneighbors_vars.neighbors[i].numTxACK = 0;\nmemcpy(&neighbors_vars.neighbors[i].asn,asnTimestamp,sizeof(asn_t));\n+ neighbors_vars.neighbors[i].backoffExponenton = MINBE-1;;\n+ neighbors_vars.neighbors[i].backoff = 0;\n//update jp\nif (joinPrioPresent==TRUE){\nneighbors_vars.neighbors[i].joinPrio=joinPrio;\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. initial its backoff variables when register a new neighbor.
|
491,595 |
07.11.2017 20:56:50
| -3,600 |
6d79c167477ab4707dbdff3f24393fc51ca4deb0
|
Synchronize to any packet before having a dedicated cell.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -1699,6 +1699,7 @@ port_INLINE void activity_rie3() {\nport_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {\nieee802154_header_iht ieee802514_header;\nuint16_t lenIE=0;\n+ open_addr_t* addressToWrite;\n// change state\nchangeState(S_TXACKOFFSET);\n@@ -1922,9 +1923,18 @@ port_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {\n} else {\n// synchronize to the received packet if I'm not a DAGroot and this is my preferred parent\n// or in case I'm in the middle of the join process when parent is not yet selected\n- if ((idmanager_getIsDAGroot()==FALSE &&\n- icmpv6rpl_isPreferredParent(&(ieee154e_vars.dataReceived->l2_nextORpreviousHop))) ||\n- IEEE802154_security_isConfigured() == FALSE\n+ // or in case I don't have a dedicated cell to my parent yet\n+ if (\n+ (\n+ idmanager_getIsDAGroot() == FALSE &&\n+ icmpv6rpl_isPreferredParent(&(ieee154e_vars.dataReceived->l2_nextORpreviousHop))\n+ ) ||\n+ IEEE802154_security_isConfigured() == FALSE ||\n+ icmpv6rpl_getPreferredParentEui64(addressToWrite) == FALSE ||\n+ (\n+ icmpv6rpl_getPreferredParentEui64(addressToWrite) &&\n+ schedule_hasDedicatedCellToNeighbor(addressToWrite)== FALSE\n+ )\n) {\nsynchronizePacket(ieee154e_vars.syncCapturedTime);\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-718. Synchronize to any packet before having a dedicated cell.
|
491,595 |
07.11.2017 21:05:02
| -3,600 |
8738d575eeacf28aa1a0d346564b010b2e4f2d65
|
don't need synchronize at ri9.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -2127,11 +2127,6 @@ port_INLINE void activity_ri9(PORT_TIMER_WIDTH capturedTime) {\n// clear local variable\nieee154e_vars.ackToSend = NULL;\n- // synchronize to the received packet\n- if (idmanager_getIsDAGroot()==FALSE && icmpv6rpl_isPreferredParent(&(ieee154e_vars.dataReceived->l2_nextORpreviousHop))) {\n- synchronizePacket(ieee154e_vars.syncCapturedTime);\n- }\n-\n// inform upper layer of reception (after ACK sent)\nnotif_receive(ieee154e_vars.dataReceived);\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-719. don't need synchronize at ri9.
|
491,595 |
07.11.2017 22:35:06
| -3,600 |
ac2cbb1618558525d5af45c1af3574fd5eaba6db
|
handle return code: retries and clear.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "@@ -20,10 +20,14 @@ msf_vars_t msf_vars;\n// sixtop callback\nuint16_t msf_getMetadata(void);\nmetadata_t msf_translateMetadata(void);\n-void msf_handleRCError(uint8_t code);\n+void msf_handleRCError(uint8_t code, open_addr_t* address);\nvoid msf_timer_housekeeping_cb(opentimers_id_t id);\nvoid msf_timer_housekeeping_task(void);\n+\n+void msf_timer_waitretry_cb(opentimers_id_t id);\n+\n+void msf_timer_clear_task(void);\n// msf private\nvoid msf_trigger6pAdd(void);\nvoid msf_trigger6pDelete(void);\n@@ -43,10 +47,7 @@ void msf_init(void) {\nTIMER_ONESHOT,\nmsf_timer_housekeeping_cb\n);\n-}\n-\n-void msf_setBackoff(uint8_t value){\n- msf_vars.backoff = value;\n+ msf_vars.waitretryTimerId = opentimers_create();\n}\n// called by schedule\n@@ -91,32 +92,50 @@ metadata_t msf_translateMetadata(void){\nreturn METADATA_TYPE_FRAMEID;\n}\n-void msf_handleRCError(uint8_t code){\n- if (code==IANA_6TOP_RC_BUSY){\n- // disable msf for [0...2^4] slotframe long time\n- msf_setBackoff(openrandom_get16b()%(1<<4));\n- }\n+void msf_handleRCError(uint8_t code, open_addr_t* address){\n+ uint16_t waitDuration;\n- if (code==IANA_6TOP_RC_RESET){\n- // TBD: the neighbor can't statisfy the 6p request with given cells, call msf to make a decision\n- // (e.g. issue another 6p request with different cell list)\n+ if (\n+ code==IANA_6TOP_RC_RESET ||\n+ code==IANA_6TOP_RC_LOCKED ||\n+ code==IANA_6TOP_RC_BUSY\n+ ){\n+ // waitretry\n+ msf_vars.waitretry = TRUE;\n+ waitDuration = WAITDURATION_MIN+openrandom_get16b()%WAITDURATION_RANDOM_RANGE;\n+ opentimers_scheduleIn(\n+ msf_vars.waitretryTimerId,\n+ waitDuration,\n+ TIME_MS,\n+ TIMER_ONESHOT,\n+ msf_timer_waitretry_cb\n+ );\n}\n- if (code==IANA_6TOP_RC_ERROR){\n- // TBD: the neighbor can't statisfy the 6p request, call msf to make a decision\n+ if (\n+ code==IANA_6TOP_RC_ERROR ||\n+ code==IANA_6TOP_RC_VER_ERR ||\n+ code==IANA_6TOP_RC_SFID_ERR\n+ ){\n+ // quarantine\n}\n- if (code==IANA_6TOP_RC_VER_ERR){\n- // TBD: the 6p verion does not match\n+ if (\n+ code==IANA_6TOP_RC_SEQNUM_ERR ||\n+ code==IANA_6TOP_RC_CELLLIST_ERR\n+ ){\n+ // clear\n+ scheduler_push_task(msf_timer_clear_task,TASKPRIO_MSF);\n}\n- if (code==IANA_6TOP_RC_SFID_ERR){\n- // TBD: the sfId does not match\n+ if (code==IANA_6TOP_RC_NORES){\n+ // mark neighbor f6NORES\n+ neighbors_setNeighborNoResource(address);\n}\n-\n- if (code==IANA_6TOP_RC_SEQNUM_ERR){\n- // TBD: the seqNum does not match\n}\n+\n+void msf_timer_waitretry_cb(opentimers_id_t id){\n+ msf_vars.waitretry = FALSE;\n}\nvoid msf_timer_housekeeping_cb(opentimers_id_t id){\n@@ -142,6 +161,29 @@ void msf_timer_housekeeping_task(void){\n}\n}\n+void msf_timer_clear_task(void){\n+ open_addr_t neighbor;\n+ bool foundNeighbor;\n+\n+ // get preferred parent\n+ foundNeighbor = icmpv6rpl_getPreferredParentEui64(&neighbor);\n+ if (foundNeighbor==FALSE) {\n+ return;\n+ }\n+\n+ sixtop_request(\n+ IANA_6TOP_CMD_CLEAR, // code\n+ &neighbor, // neighbor\n+ NUMCELLS_MSF, // number cells\n+ CELLOPTIONS_MSF, // cellOptions\n+ NULL, // celllist to add (not used)\n+ NULL, // celllist to delete (not used)\n+ IANA_6TISCH_SFID_MSF, // sfid\n+ 0, // list command offset (not used)\n+ 0 // list command maximum celllist (not used)\n+ );\n+}\n+\n//=========================== private =========================================\nvoid msf_trigger6pAdd(void){\n@@ -149,6 +191,10 @@ void msf_trigger6pAdd(void){\nbool foundNeighbor;\ncellInfo_ht celllist_add[CELLLIST_MAX_LEN];\n+ if (msf_vars.waitretry){\n+ return;\n+ }\n+\n// get preferred parent\nfoundNeighbor = icmpv6rpl_getPreferredParentEui64(&neighbor);\nif (foundNeighbor==FALSE) {\n@@ -178,6 +224,10 @@ void msf_trigger6pDelete(void){\nbool foundNeighbor;\ncellInfo_ht celllist_delete[CELLLIST_MAX_LEN];\n+ if (msf_vars.waitretry){\n+ return;\n+ }\n+\n// get preferred parent\nfoundNeighbor = icmpv6rpl_getPreferredParentEui64(&neighbor);\nif (foundNeighbor==FALSE) {\n@@ -287,6 +337,10 @@ void msf_housekeeping(void){\nreturn;\n}\n+ if (msf_vars.waitretry){\n+ return;\n+ }\n+\nmemset(celllist_delete, 0, CELLLIST_MAX_LEN*sizeof(cellInfo_ht));\nif (schedule_getCellsToBeRelocated(&neighbor, celllist_delete)){\nif (msf_candidateAddCellList(celllist_add,NUMCELLS_MSF)==FALSE){\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.h",
"new_path": "openstack/02b-MAChigh/msf.h",
"diff": "#define LIM_NUMCELLSUSED_LOW 4\n#define HOUSEKEEPING_PERIOD 60 // seconds\n+#define QUARANTINE_DURATION 300 // seconds\n+#define WAITDURATION_MIN 30000 // miliseconds\n+#define WAITDURATION_RANDOM_RANGE 30000 // miliseconds\n//=========================== typedef =========================================\n@@ -31,6 +34,8 @@ typedef struct {\nuint8_t numCellsUsed;\nopentimers_id_t housekeepingTimerId;\nuint8_t housekeepingTimerCounter;\n+ opentimers_id_t waitretryTimerId;\n+ bool waitretry;\n} msf_vars_t;\n//=========================== module variables ================================\n@@ -40,7 +45,6 @@ typedef struct {\n// admin\nvoid msf_init(void);\nvoid msf_appPktPeriod(uint8_t numAppPacketsPerSlotFrame);\n-void msf_setBackoff(uint8_t value);\nuint8_t msf_getsfid(void);\nbool msf_candidateAddCellList(\ncellInfo_ht* cellList,\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -1527,7 +1527,7 @@ void sixtop_six2six_notifyReceive(\nbreak;\n}\n} else {\n- sixtop_vars.cb_sf_handleRCError(code);\n+ sixtop_vars.cb_sf_handleRCError(code, &(pkt->l2_nextORpreviousHop));\n}\nopenserial_printInfo(\nCOMPONENT_SIXTOP,\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.h",
"new_path": "openstack/02b-MAChigh/sixtop.h",
"diff": "#define IANA_6TOP_RC_VER_ERR 0x04 // RC_VER_ERR | unsupported 6P version\n#define IANA_6TOP_RC_SFID_ERR 0x05 // RC_SFID_ERR | unsupported SFID\n#define IANA_6TOP_RC_SEQNUM_ERR 0x06 // RC_SEQNUM_ERR | wrong sequence number\n-#define IANA_6TOP_RC_BUSY 0x07 // RC_BUSY | busy\n-#define IANA_6TOP_RC_NORES 0x08 // RC_NORES | not enough resources\n-#define IANA_6TOP_RC_CELLLIST_ERR 0x09 // RC_CELLLIST_ERR | cellList error\n+#define IANA_6TOP_RC_CELLLIST_ERR 0x07 // RC_CELLLIST_ERR | cellList error\n+#define IANA_6TOP_RC_BUSY 0x08 // RC_BUSY | busy\n+#define IANA_6TOP_RC_LOCKED 0x09 // RC_LOCKED | locked\n+#define IANA_6TOP_RC_NORES 0x0a // RC_NORES | not enough resources\n// SF ID\n#define SFID_SF0 0\n@@ -84,7 +85,7 @@ typedef enum {\ntypedef uint8_t (*sixtop_sf_getsfid)(void);\ntypedef uint16_t (*sixtop_sf_getmetadata)(void);\ntypedef metadata_t (*sixtop_sf_translatemetadata)(void);\n-typedef void (*sixtop_sf_handle_callback)(uint8_t arg);\n+typedef void (*sixtop_sf_handle_callback)(uint8_t arg, open_addr_t* address);\n#define SIXTOP_MINIMAL_EBPERIOD 5 // minist period of sending EB\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -618,7 +618,6 @@ functionsToChange = [\n# msf\n'msf_init',\n'msf_appPktPeriod',\n- 'msf_setBackoff',\n'msf_getsfid',\n'msf_candidateAddCellList',\n'msf_candidateRemoveCellList',\n@@ -627,6 +626,8 @@ functionsToChange = [\n'msf_handleRCError',\n'msf_timer_housekeeping_cb',\n'msf_timer_housekeeping_task',\n+ 'msf_timer_waitretry_cb',\n+ 'msf_timer_clear_task',\n'msf_housekeeping',\n'msf_trigger6pAdd',\n'msf_trigger6pDelete',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-714. handle return code: retries and clear.
|
491,595 |
07.11.2017 22:39:02
| -3,600 |
5d4cec125759c0af3b27eb290cb5141967025cfb
|
reset sequence number when the neighbor is removed.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -807,6 +807,7 @@ void removeNeighbor(uint8_t neighborIndex) {\nneighbors_vars.neighbors[neighborIndex].asn.bytes2and3 = 0;\nneighbors_vars.neighbors[neighborIndex].asn.byte4 = 0;\nneighbors_vars.neighbors[neighborIndex].f6PNORES = FALSE;\n+ neighbors_vars.neighbors[neighborIndex].sequenceNumber = 0;\n}\n//=========================== helpers =========================================\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-720. reset sequence number when the neighbor is removed.
|
491,595 |
07.11.2017 23:38:07
| -3,600 |
e8f35bc050f242e9a76888686d8affda6d2c009e
|
don't send any packet except 6P or CJOIN before having a dedicated cell.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -1699,7 +1699,7 @@ port_INLINE void activity_rie3() {\nport_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {\nieee802154_header_iht ieee802514_header;\nuint16_t lenIE=0;\n- open_addr_t* addressToWrite;\n+ open_addr_t addressToWrite;\n// change state\nchangeState(S_TXACKOFFSET);\n@@ -1930,10 +1930,10 @@ port_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {\nicmpv6rpl_isPreferredParent(&(ieee154e_vars.dataReceived->l2_nextORpreviousHop))\n) ||\nIEEE802154_security_isConfigured() == FALSE ||\n- icmpv6rpl_getPreferredParentEui64(addressToWrite) == FALSE ||\n+ icmpv6rpl_getPreferredParentEui64(&addressToWrite) == FALSE ||\n(\n- icmpv6rpl_getPreferredParentEui64(addressToWrite) &&\n- schedule_hasDedicatedCellToNeighbor(addressToWrite)== FALSE\n+ icmpv6rpl_getPreferredParentEui64(&addressToWrite) &&\n+ schedule_hasDedicatedCellToNeighbor(&addressToWrite)== FALSE\n)\n) {\nsynchronizePacket(ieee154e_vars.syncCapturedTime);\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -349,6 +349,23 @@ owerror_t sixtop_request(\nowerror_t sixtop_send(OpenQueueEntry_t *msg) {\n+ open_addr_t addressToWrite;\n+\n+ if (\n+ idmanager_getIsDAGroot() == FALSE &&\n+ (\n+ icmpv6rpl_getPreferredParentEui64(&addressToWrite) == FALSE ||\n+ (\n+ icmpv6rpl_getPreferredParentEui64(&addressToWrite) &&\n+ schedule_hasDedicatedCellToNeighbor(&addressToWrite)== FALSE &&\n+ msg->creator != COMPONENT_SIXTOP_RES &&\n+ msg->creator != COMPONENT_CJOIN\n+ )\n+ )\n+ ){\n+ return E_FAIL;\n+ }\n+\n// set metadata\nmsg->owner = COMPONENT_SIXTOP;\nmsg->l2_frameType = IEEE154_TYPE_DATA;\n@@ -691,7 +708,9 @@ port_INLINE void sixtop_sendEB() {\nuint8_t i;\nuint8_t eb_len;\nuint16_t temp16b;\n+ open_addr_t addressToWrite;\n+ memset(&addressToWrite,0,sizeof(open_addr_t));\nif (\n(ieee154e_isSynch()==FALSE) ||\n(IEEE802154_security_isConfigured()==FALSE) ||\n@@ -713,6 +732,26 @@ port_INLINE void sixtop_sendEB() {\nreturn;\n}\n+ if (\n+ idmanager_getIsDAGroot() == FALSE &&\n+ (\n+ icmpv6rpl_getPreferredParentEui64(&addressToWrite) == FALSE ||\n+ (\n+ icmpv6rpl_getPreferredParentEui64(&addressToWrite) &&\n+ schedule_hasDedicatedCellToNeighbor(&addressToWrite) == FALSE\n+ )\n+ )\n+ ){\n+ // delete packets genereted by this module (EB and KA) from openqueue\n+ openqueue_removeAllCreatedBy(COMPONENT_SIXTOP);\n+\n+ // I'm not busy sending an EB or KA\n+ sixtop_vars.busySendingEB = FALSE;\n+ sixtop_vars.busySendingKA = FALSE;\n+\n+ return;\n+ }\n+\nif (sixtop_vars.busySendingEB==TRUE) {\n// don't continue if I'm still sending a previous EB\nreturn;\n@@ -824,6 +863,17 @@ port_INLINE void sixtop_sendKA() {\nreturn;\n}\n+ if (schedule_hasDedicatedCellToNeighbor(kaNeighAddr) == FALSE){\n+ // delete packets genereted by this module (EB and KA) from openqueue\n+ openqueue_removeAllCreatedBy(COMPONENT_SIXTOP);\n+\n+ // I'm not busy sending an EB or KA\n+ sixtop_vars.busySendingEB = FALSE;\n+ sixtop_vars.busySendingKA = FALSE;\n+\n+ return;\n+ }\n+\n// if I get here, I will send a KA\n// get a free packet buffer\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-721. don't send any packet except 6P or CJOIN before having a dedicated cell.
|
491,595 |
08.11.2017 02:29:14
| -3,600 |
8f22ba2975ca04e510f775e4affc0b79e17e1d8a
|
Remove the old neighbors and issue 6P Clear when no activity from a neighbor is detected or the parent changed.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -43,8 +43,8 @@ static const uint8_t ebIEsBytestream[] = {\n#define RESYNCHRONIZATIONGUARD 5 // in 32kHz ticks. min distance to the end of the slot to successfully synchronize\n#define US_PER_TICK 30 // number of us per 32kHz clock tick\n#define EB_PORTION 6 // The portion of minimal cells that used for sending EB.\n-#define MAXKAPERIOD 2000 // in slots: @15ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n-#define DESYNCTIMEOUT 2333 // in slots: @15ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n+#define MAXKAPERIOD 1000 // in slots: 2000@15ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n+#define DESYNCTIMEOUT 2333 // in slots: 2333@15ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n#define LIMITLARGETIMECORRECTION 5 // threshold number of ticks to declare a timeCorrection \"large\"\n#define LENGTH_IEEE154_MAX 128 // max length of a valid radio packet\n#define DUTY_CYCLE_WINDOW_LIMIT (0xFFFFFFFF>>1) // limit of the dutycycle window\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "@@ -78,6 +78,23 @@ void msf_updateCellsUsed(open_addr_t* neighbor){\nmsf_vars.numCellsUsed++;\n}\n+\n+void msf_trigger6pClear(open_addr_t* neighbor){\n+\n+ if (schedule_hasDedicatedCellToNeighbor(neighbor)>0){\n+ sixtop_request(\n+ IANA_6TOP_CMD_CLEAR, // code\n+ neighbor, // neighbor\n+ NUMCELLS_MSF, // number cells\n+ CELLOPTIONS_MSF, // cellOptions\n+ NULL, // celllist to add (not used)\n+ NULL, // celllist to delete (not used)\n+ IANA_6TISCH_SFID_MSF, // sfid\n+ 0, // list command offset (not used)\n+ 0 // list command maximum celllist (not used)\n+ );\n+ }\n+}\n//=========================== callback =========================================\nuint8_t msf_getsfid(void){\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.h",
"new_path": "openstack/02b-MAChigh/msf.h",
"diff": "@@ -58,6 +58,8 @@ bool msf_candidateRemoveCellList(\n// called by schedule\nvoid msf_updateCellsPassed(open_addr_t* neighbor);\nvoid msf_updateCellsUsed(open_addr_t* neighbor);\n+// called by icmpv6rpl, where parent changed\n+void msf_trigger6pClear(open_addr_t* neighbor);\n/**\n\\}\n\\}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "#include \"openserial.h\"\n#include \"IEEE802154E.h\"\n#include \"openrandom.h\"\n+#include \"msf.h\"\n//=========================== variables =======================================\n@@ -524,6 +525,7 @@ void neighbors_setNeighborNoResource(open_addr_t* address){\nfor (i=0;i<MAXNUMNEIGHBORS;i++) {\nif (isThisRowMatching(address,i)) {\nneighbors_vars.neighbors[i].f6PNORES = TRUE;\n+ icmpv6rpl_updateMyDAGrankAndParentSelection();\nbreak;\n}\n}\n@@ -575,8 +577,6 @@ uint16_t neighbors_getLinkMetric(uint8_t index) {\nvoid neighbors_removeOld() {\nuint8_t i, j;\nbool haveParent;\n- uint8_t neighborIndexWithLowestRank[3];\n- dagrank_t lowestRank;\nPORT_TIMER_WIDTH timeSinceHeard;\n// remove old neighbor\n@@ -584,93 +584,13 @@ void neighbors_removeOld() {\nif (neighbors_vars.neighbors[i].used==1) {\ntimeSinceHeard = ieee154e_asnDiff(&neighbors_vars.neighbors[i].asn);\nif (timeSinceHeard>DESYNCTIMEOUT) {\n- haveParent = icmpv6rpl_getPreferredParentIndex(&j);\n- if (haveParent && (i==j)) { // this is our preferred parent, carefully!\n- icmpv6rpl_killPreferredParent();\n- removeNeighbor(i);\n- icmpv6rpl_updateMyDAGrankAndParentSelection();\n- } else {\n- removeNeighbor(i);\n- }\n- }\n- }\n- }\n-\n- // neighbors marked as NO_RES will never removed.\n-\n- // first round\n- lowestRank = MAXDAGRANK;\n- for (i=0;i<MAXNUMNEIGHBORS;i++) {\n- if (neighbors_vars.neighbors[i].used==1) {\n- if (\n- lowestRank>neighbors_vars.neighbors[i].DAGrank &&\n- neighbors_vars.neighbors[i].f6PNORES == FALSE\n- ){\n- lowestRank = neighbors_vars.neighbors[i].DAGrank;\n- neighborIndexWithLowestRank[0] = i;\n- }\n- }\n- }\n-\n- if (lowestRank==MAXDAGRANK){\n- // none of the neighbors have rank yet\n- return;\n- }\n- // second round\n- lowestRank = MAXDAGRANK;\n- for (i=0;i<MAXNUMNEIGHBORS;i++) {\n- if (neighbors_vars.neighbors[i].used==1) {\n- if (\n- lowestRank>neighbors_vars.neighbors[i].DAGrank &&\n- i != neighborIndexWithLowestRank[0] &&\n- neighbors_vars.neighbors[i].f6PNORES == FALSE\n- ){\n- lowestRank = neighbors_vars.neighbors[i].DAGrank;\n- neighborIndexWithLowestRank[1] = i;\n-\n- }\n- }\n- }\n-\n- if (lowestRank==MAXDAGRANK){\n- // only one neighbor has rank\n- return;\n- }\n-\n- // third round\n- lowestRank = MAXDAGRANK;\n- for (i=0;i<MAXNUMNEIGHBORS;i++) {\n- if (neighbors_vars.neighbors[i].used==1) {\n- if (\n- lowestRank>neighbors_vars.neighbors[i].DAGrank &&\n- i != neighborIndexWithLowestRank[0] &&\n- i != neighborIndexWithLowestRank[1] &&\n- neighbors_vars.neighbors[i].f6PNORES == FALSE\n- ){\n- lowestRank = neighbors_vars.neighbors[i].DAGrank;\n- neighborIndexWithLowestRank[2] = i;\n- }\n- }\n- }\n-\n- if (lowestRank==MAXDAGRANK){\n- // only two neighbors have rank\n- return;\n- }\n-\n- // remove all neighbors except the ones that f6PNORES flag is set or is recorded as lowest 3 rank neighbors\n- for (i=0;i<MAXNUMNEIGHBORS;i++) {\n- if (neighbors_vars.neighbors[i].used==1) {\n- if (\n- i!= neighborIndexWithLowestRank[0] &&\n- i!= neighborIndexWithLowestRank[1] &&\n- i!= neighborIndexWithLowestRank[2]\n- ) {\n+ msf_trigger6pClear(&neighbors_vars.neighbors[i].addr_64b);\nhaveParent = icmpv6rpl_getPreferredParentIndex(&j);\nif (haveParent && (i==j)) { // this is our preferred parent, carefully!\nicmpv6rpl_killPreferredParent();\nicmpv6rpl_updateMyDAGrankAndParentSelection();\n}\n+ // keep the NORES neighbor in the table\nif (neighbors_vars.neighbors[i].f6PNORES == FALSE){\nremoveNeighbor(i);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -266,6 +266,9 @@ owerror_t sixtop_request(\npacketfunctions_reserveHeaderSize(pkt,sizeof(uint8_t));\n*((uint8_t*)(pkt->payload)) = cellOptions;\nlen+=1;\n+ } else {\n+ // record the neighbor in case no response for clear\n+ memcpy(&sixtop_vars.neighborToClearCells,neighbor,sizeof(open_addr_t));\n}\n// append 6p metadata\n@@ -916,6 +919,16 @@ port_INLINE void sixtop_sendKA() {\n//======= six2six task\nvoid timer_sixtop_six2six_timeout_fired(void) {\n+\n+ if (sixtop_vars.six2six_state == SIX_STATE_WAIT_CLEARRESPONSE){\n+ // no response for the 6p clear, just clear locally\n+ schedule_removeAllCells(\n+ sixtop_vars.cb_sf_getMetadata(),\n+ &sixtop_vars.neighborToClearCells\n+ );\n+ neighbors_resetSequenceNumber(&sixtop_vars.neighborToClearCells);\n+ memset(&sixtop_vars.neighborToClearCells,0,sizeof(open_addr_t));\n+ }\n// timeout timer fired, reset the state of sixtop to idle\nsixtop_vars.six2six_state = SIX_STATE_IDLE;\nopentimers_cancel(sixtop_vars.timeoutTimerId);\n@@ -1585,6 +1598,7 @@ void sixtop_six2six_notifyReceive(\n(errorparameter_t)code,\n(errorparameter_t)sixtop_vars.six2six_state\n);\n+ memset(&sixtop_vars.neighborToClearCells,0,sizeof(open_addr_t));\nsixtop_vars.six2six_state = SIX_STATE_IDLE;\nopentimers_cancel(sixtop_vars.timeoutTimerId);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.h",
"new_path": "openstack/02b-MAChigh/sixtop.h",
"diff": "@@ -112,6 +112,7 @@ typedef struct {\nsixtop_sf_getmetadata cb_sf_getMetadata;\nsixtop_sf_translatemetadata cb_sf_translateMetadata;\nsixtop_sf_handle_callback cb_sf_handleRCError;\n+ open_addr_t neighborToClearCells;\n} sixtop_vars_t;\n//=========================== prototypes ======================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.c",
"new_path": "openstack/03b-IPv6/icmpv6rpl.c",
"diff": "#include \"idmanager.h\"\n#include \"opentimers.h\"\n#include \"IEEE802154E.h\"\n+#include \"msf.h\"\n//=========================== variables =======================================\n@@ -372,6 +373,8 @@ void icmpv6rpl_updateMyDAGrankAndParentSelection() {\ndagrank_t neighborRank;\nuint32_t tentativeDAGrank;\n+ open_addr_t addressToWrite;\n+\n// if I'm a DAGroot, my DAGrank is always MINHOPRANKINCREASE\nif ((idmanager_getIsDAGroot())==TRUE) {\n// the dagrank is not set through setting command, set rank to MINHOPRANKINCREASE here\n@@ -386,6 +389,10 @@ void icmpv6rpl_updateMyDAGrankAndParentSelection() {\nprevRankIncrease = icmpv6rpl_vars.rankIncrease;\n// update my rank to current parent first\nif (icmpv6rpl_vars.haveParent==TRUE){\n+\n+ if (neighbors_getNeighborNoResource(icmpv6rpl_vars.ParentIndex)==TRUE){\n+ icmpv6rpl_vars.myDAGrank = 65535;\n+ } else {\nif (neighbors_reachedMaxTransmission(icmpv6rpl_vars.ParentIndex)==FALSE){\n// I havn't enough transmission to my parent, don't update.\nreturn;\n@@ -399,6 +406,7 @@ void icmpv6rpl_updateMyDAGrankAndParentSelection() {\nicmpv6rpl_vars.myDAGrank = (uint16_t)tentativeDAGrank;\n}\n}\n+ }\npreviousDAGrank = icmpv6rpl_vars.myDAGrank;\nfoundBetterParent = FALSE;\nicmpv6rpl_vars.haveParent = FALSE;\n@@ -456,6 +464,9 @@ void icmpv6rpl_updateMyDAGrankAndParentSelection() {\nneighbors_setPreferredParent(prevParentIndex, FALSE);\n// set neighbors as preferred parent\nneighbors_setPreferredParent(icmpv6rpl_vars.ParentIndex, TRUE);\n+ // get prepare parent address\n+ neighbors_getNeighborEui64(&addressToWrite,ADDR_64B,prevParentIndex);\n+ msf_trigger6pClear(&addressToWrite);\n}\n}\n} else {\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -631,6 +631,7 @@ functionsToChange = [\n'msf_housekeeping',\n'msf_trigger6pAdd',\n'msf_trigger6pDelete',\n+ 'msf_trigger6pClear',\n'msf_updateCellsPassed',\n'msf_updateCellsUsed',\n# sixtop\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-713. Remove the old neighbors and issue 6P Clear when no activity from a neighbor is detected or the parent changed.
|
491,595 |
08.11.2017 14:19:35
| -3,600 |
f907a984ad2a47ab61a49ee914c93b452f3fe49b
|
don't update myrank and parent before having enough tx on current parent.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -253,12 +253,12 @@ bool neighbors_isNeighborWithHigherDAGrank(uint8_t index) {\nreturn returnVal;\n}\n-bool neighbors_reachedMaxTransmission(uint8_t index){\n+bool neighbors_reachedMinimalTransmission(uint8_t index){\nbool returnVal;\nif (\nneighbors_vars.neighbors[index].used == TRUE &&\n- neighbors_vars.neighbors[index].numTx > DEFAULTLINKCOST\n+ neighbors_vars.neighbors[index].numTx > MINIMAL_TX\n) {\nreturnVal = TRUE;\n} else {\n@@ -550,11 +550,7 @@ uint16_t neighbors_getLinkMetric(uint8_t index) {\n// we assume that this neighbor has already been checked for being in use\n// calculate link cost to this neighbor\nif (neighbors_vars.neighbors[index].numTxACK==0) {\n- if (neighbors_vars.neighbors[index].numTx<=DEFAULTLINKCOST){\nrankIncrease = (3*DEFAULTLINKCOST-2)*MINHOPRANKINCREASE;\n- } else {\n- rankIncrease = (3*LARGESTLINKCOST-2)*MINHOPRANKINCREASE;\n- }\n} else {\n//6TiSCH minimal draft using OF0 for rank computation: ((3*numTx/numTxAck)-2)*minHopRankIncrease\n// numTx is on 8 bits, so scaling up 10 bits won't lead to saturation\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.h",
"new_path": "openstack/02b-MAChigh/neighbors.h",
"diff": "#define BADNEIGHBORMAXRSSI -80 //dBm\n#define GOODNEIGHBORMINRSSI -90 //dBm\n#define SWITCHSTABILITYTHRESHOLD 3\n-#define DEFAULTLINKCOST 4\n-#define LARGESTLINKCOST 8\n+#define DEFAULTLINKCOST 8\n+#define MINIMAL_TX DEFAULTLINKCOST\n#define MAXDAGRANK 0xffff\n#define DEFAULTDAGRANK MAXDAGRANK\n@@ -73,7 +73,7 @@ bool neighbors_isStableNeighbor(open_addr_t* address);\nbool neighbors_isStableNeighborByIndex(uint8_t index);\nbool neighbors_isInsecureNeighbor(open_addr_t* address);\nbool neighbors_isNeighborWithHigherDAGrank(uint8_t index);\n-bool neighbors_reachedMaxTransmission(uint8_t index);\n+bool neighbors_reachedMinimalTransmission(uint8_t index);\n// updating neighbor information\nvoid neighbors_indicateRx(\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.c",
"new_path": "openstack/03b-IPv6/icmpv6rpl.c",
"diff": "@@ -393,7 +393,7 @@ void icmpv6rpl_updateMyDAGrankAndParentSelection() {\nif (neighbors_getNeighborNoResource(icmpv6rpl_vars.ParentIndex)==TRUE){\nicmpv6rpl_vars.myDAGrank = 65535;\n} else {\n- if (neighbors_reachedMaxTransmission(icmpv6rpl_vars.ParentIndex)==FALSE){\n+ if (neighbors_reachedMinimalTransmission(icmpv6rpl_vars.ParentIndex)==FALSE){\n// I havn't enough transmission to my parent, don't update.\nreturn;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -565,7 +565,7 @@ functionsToChange = [\n'neighbors_isStableNeighborByIndex',\n'neighbors_isInsecureNeighbor',\n'neighbors_isNeighborWithHigherDAGrank',\n- 'neighbors_reachedMaxTransmission',\n+ 'neighbors_reachedMinimalTransmission',\n'neighbors_indicateRx',\n'neighbors_indicateTx',\n'neighbors_updateSequenceNumber',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-492. don't update myrank and parent before having enough tx on current parent.
|
491,595 |
08.11.2017 16:58:29
| -3,600 |
3fd3000e794e2b6d0cf57388d2d58e9e4c50c43e
|
re-order the checking sequence.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -356,13 +356,15 @@ owerror_t sixtop_send(OpenQueueEntry_t *msg) {\nif (\nidmanager_getIsDAGroot() == FALSE &&\n+ (\n+ msg->creator != COMPONENT_SIXTOP_RES &&\n+ msg->creator != COMPONENT_CJOIN &&\n(\nicmpv6rpl_getPreferredParentEui64(&addressToWrite) == FALSE ||\n(\nicmpv6rpl_getPreferredParentEui64(&addressToWrite) &&\n- schedule_hasDedicatedCellToNeighbor(&addressToWrite)== FALSE &&\n- msg->creator != COMPONENT_SIXTOP_RES &&\n- msg->creator != COMPONENT_CJOIN\n+ schedule_hasDedicatedCellToNeighbor(&addressToWrite)== FALSE\n+ )\n)\n)\n){\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-721. re-order the checking sequence.
|
491,595 |
09.11.2017 01:29:00
| -3,600 |
1f9d39b1dce206f3878cb8b4f1943da431204da7
|
fix the abnormal neighbor removal behavior.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -933,7 +933,12 @@ port_INLINE void activity_ti1ORri1() {\nschedule_hasDedicatedCellToNeighbor(&ieee154e_vars.dataToSend->l2_nextORpreviousHop)\n) {\n// leave the packet to be sent on dedicated cell and pick up a broadcast packet.\n- ieee154e_vars.dataToSend = openqueue_macGetBoardcastPacket();\n+ ieee154e_vars.dataToSend = openqueue_macGetDIOPacket();\n+ if (ieee154e_vars.dataToSend==NULL){\n+ couldSendEB=TRUE;\n+ // look for an EB packet in the queue\n+ ieee154e_vars.dataToSend = openqueue_macGetEBPacket();\n+ }\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -574,6 +574,17 @@ void neighbors_removeOld() {\nuint8_t i, j;\nbool haveParent;\nPORT_TIMER_WIDTH timeSinceHeard;\n+ open_addr_t addressToWrite;\n+\n+ if (\n+ icmpv6rpl_getPreferredParentEui64(&addressToWrite) == FALSE ||\n+ (\n+ icmpv6rpl_getPreferredParentEui64(&addressToWrite) &&\n+ schedule_hasDedicatedCellToNeighbor(&addressToWrite)== FALSE\n+ )\n+ ) {\n+ return;\n+ }\n// remove old neighbor\nfor (i=0;i<MAXNUMNEIGHBORS;i++) {\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "@@ -271,12 +271,13 @@ OpenQueueEntry_t* openqueue_macGetEBPacket() {\nreturn NULL;\n}\n-OpenQueueEntry_t* openqueue_macGetBoardcastPacket(){\n+OpenQueueEntry_t* openqueue_macGetDIOPacket(){\nuint8_t i;\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\nfor (i=0;i<QUEUELENGTH;i++) {\nif (openqueue_vars.queue[i].owner==COMPONENT_SIXTOP_TO_IEEE802154E &&\n+ openqueue_vars.queue[i].creator==COMPONENT_ICMPv6RPL &&\npacketfunctions_isBroadcastMulticast(&(openqueue_vars.queue[i].l2_nextORpreviousHop))) {\nENABLE_INTERRUPTS();\nreturn &openqueue_vars.queue[i];\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.h",
"new_path": "openstack/cross-layers/openqueue.h",
"diff": "@@ -44,7 +44,7 @@ OpenQueueEntry_t* openqueue_sixtopGetReceivedPacket(void);\n// called by IEEE80215E\nOpenQueueEntry_t* openqueue_macGetDataPacket(open_addr_t* toNeighbor);\nOpenQueueEntry_t* openqueue_macGetEBPacket(void);\n-OpenQueueEntry_t* openqueue_macGetBoardcastPacket(void);\n+OpenQueueEntry_t* openqueue_macGetDIOPacket(void);\nOpenQueueEntry_t* openqueue_macGetDedicatedPacket(open_addr_t* toNeighbor);\n/**\n\\}\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -796,7 +796,7 @@ functionsToChange = [\n'openqueue_macGetDataPacket',\n'openqueue_macGetEBPacket',\n'openqueue_reset_entry',\n- 'openqueue_macGetBoardcastPacket',\n+ 'openqueue_macGetDIOPacket',\n'openqueue_macGetDedicatedPacket',\n# openrandom\n'openrandom_init',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. fix the abnormal neighbor removal behavior.
|
491,595 |
09.11.2017 02:00:28
| -3,600 |
a93b9361e314ac236c41483f1a0db9b77a4a4c21
|
increasing the timeout for 6p.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.h",
"new_path": "openstack/02b-MAChigh/sixtop.h",
"diff": "@@ -81,7 +81,7 @@ typedef enum {\n// >2^4*3*(101/9)*15=8080 (2^MAXEB * maxretries * (slotframe / numberOfsharedCellsFor6p)*slotlength) (ms))\n// on the receiver side of sixtop, it may has mutiple sixtop request in the queue to response (most of them will return with RC BUSY)\n// increase the timeout longer than calculated value\n-#define SIX2SIX_TIMEOUT_MS 20000\n+#define SIX2SIX_TIMEOUT_MS 65535\ntypedef uint8_t (*sixtop_sf_getsfid)(void);\ntypedef uint16_t (*sixtop_sf_getmetadata)(void);\ntypedef metadata_t (*sixtop_sf_translatemetadata)(void);\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. increasing the timeout for 6p.
|
491,595 |
09.11.2017 02:54:05
| -3,600 |
ed9ca7803e807f50424057f9c36838446f3028de
|
change some parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -36,7 +36,7 @@ static const uint8_t infoStackName[] = \"OpenWSN \";\n#define LENGTH_ADDR64b 8\n#define LENGTH_ADDR128b 16\n-#define MAXNUMNEIGHBORS 10\n+#define MAXNUMNEIGHBORS 30\n// maximum celllist length\n#define CELLLIST_MAX_LEN 5\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "#include \"openrandom.h\"\n#include \"idmanager.h\"\n#include \"icmpv6rpl.h\"\n+#include \"IEEE802154E.h\"\n//=========================== definition =====================================\n@@ -341,6 +342,11 @@ void msf_housekeeping(void){\nbool foundNeighbor;\ncellInfo_ht celllist_add[CELLLIST_MAX_LEN];\ncellInfo_ht celllist_delete[CELLLIST_MAX_LEN];\n+\n+ if (ieee154e_isSynch()==FALSE) {\n+ return;\n+ }\n+\nfoundNeighbor = icmpv6rpl_getPreferredParentEui64(&neighbor);\nif (foundNeighbor==FALSE) {\nreturn;\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "@@ -39,7 +39,7 @@ The superframe reappears over time and can be arbitrarily long.\nfor serial port to transmit data to dagroot.\n*/\n-#define NUMSLOTSOFF 10\n+#define NUMSLOTSOFF 30\n/**\n\\brief Maximum number of active slots in a superframe.\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. change some parameters.
|
491,595 |
09.11.2017 11:23:46
| -3,600 |
48c0e2dc67e5fc401c5f065da23f74d1a728e700
|
remove COMPONENT_SF.
|
[
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -144,39 +144,38 @@ enum {\nCOMPONENT_NEIGHBORS = 0x0d,\nCOMPONENT_SCHEDULE = 0x0e,\nCOMPONENT_SIXTOP_RES = 0x0f,\n- COMPONENT_SF = 0x10,\n//IPHC\n- COMPONENT_OPENBRIDGE = 0x11,\n- COMPONENT_IPHC = 0x12,\n+ COMPONENT_OPENBRIDGE = 0x10,\n+ COMPONENT_IPHC = 0x11,\n//IPv6\n- COMPONENT_FORWARDING = 0x13,\n- COMPONENT_ICMPv6 = 0x14,\n- COMPONENT_ICMPv6ECHO = 0x15,\n- COMPONENT_ICMPv6ROUTER = 0x16,\n- COMPONENT_ICMPv6RPL = 0x17,\n+ COMPONENT_FORWARDING = 0x12,\n+ COMPONENT_ICMPv6 = 0x13,\n+ COMPONENT_ICMPv6ECHO = 0x14,\n+ COMPONENT_ICMPv6ROUTER = 0x15,\n+ COMPONENT_ICMPv6RPL = 0x16,\n//TRAN\n- COMPONENT_OPENTCP = 0x18,\n- COMPONENT_OPENUDP = 0x19,\n- COMPONENT_OPENCOAP = 0x1a,\n+ COMPONENT_OPENTCP = 0x17,\n+ COMPONENT_OPENUDP = 0x18,\n+ COMPONENT_OPENCOAP = 0x19,\n// applications\n- COMPONENT_C6T = 0x1b,\n- COMPONENT_CEXAMPLE = 0x1c,\n- COMPONENT_CINFO = 0x1d,\n- COMPONENT_CLEDS = 0x1e,\n- COMPONENT_CSENSORS = 0x1f,\n- COMPONENT_CSTORM = 0x20,\n- COMPONENT_CWELLKNOWN = 0x21,\n- COMPONENT_TECHO = 0x22,\n- COMPONENT_TOHLONE = 0x23,\n- COMPONENT_UECHO = 0x24,\n- COMPONENT_UINJECT = 0x25,\n- COMPONENT_RRT = 0x26,\n- COMPONENT_SECURITY = 0x27,\n- COMPONENT_USERIALBRIDGE = 0x28,\n- COMPONENT_UEXPIRATION = 0x29,\n- COMPONENT_UMONITOR = 0x2a,\n- COMPONENT_CJOIN = 0x2b,\n- COMPONENT_OPENOSCOAP = 0x2c,\n+ COMPONENT_C6T = 0x1a,\n+ COMPONENT_CEXAMPLE = 0x1b,\n+ COMPONENT_CINFO = 0x1c,\n+ COMPONENT_CLEDS = 0x1d,\n+ COMPONENT_CSENSORS = 0x1e,\n+ COMPONENT_CSTORM = 0x1f,\n+ COMPONENT_CWELLKNOWN = 0x20,\n+ COMPONENT_TECHO = 0x21,\n+ COMPONENT_TOHLONE = 0x22,\n+ COMPONENT_UECHO = 0x23,\n+ COMPONENT_UINJECT = 0x24,\n+ COMPONENT_RRT = 0x25,\n+ COMPONENT_SECURITY = 0x26,\n+ COMPONENT_USERIALBRIDGE = 0x27,\n+ COMPONENT_UEXPIRATION = 0x28,\n+ COMPONENT_UMONITOR = 0x29,\n+ COMPONENT_CJOIN = 0x2a,\n+ COMPONENT_OPENOSCOAP = 0x2b,\n};\n/**\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. remove COMPONENT_SF.
|
491,595 |
09.11.2017 11:28:17
| -3,600 |
185c401c90c5c3642c54d049e0dc58d6d42a4a39
|
Update neighbors' NumTx and numTxACK only after having a dedicated cell to parent.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -379,6 +379,7 @@ void neighbors_indicateTx(\nasn_t* asnTs\n) {\nuint8_t i;\n+ uint8_t parentIndex;\n// don't run through this function if packet was sent to broadcast address\nif (packetfunctions_isBroadcastMulticast(l2_dest)==TRUE) {\nreturn;\n@@ -387,6 +388,19 @@ void neighbors_indicateTx(\n// loop through neighbor table\nfor (i=0;i<MAXNUMNEIGHBORS;i++) {\nif (isThisRowMatching(l2_dest,i)) {\n+\n+ // only update numTx and numTxACK when I have a dedicated cell\n+ if (\n+ icmpv6rpl_getPreferredParentIndex(&parentIndex)==FALSE ||\n+ schedule_hasDedicatedCellToNeighbor(&neighbors_vars.neighbors[parentIndex].addr_64b)==FALSE\n+ ){\n+ if (was_finally_acked==TRUE) {\n+ memcpy(&neighbors_vars.neighbors[i].asn,asnTs,sizeof(asn_t));\n+ }\n+\n+ break;\n+ }\n+\n// handle roll-over case\nif (neighbors_vars.neighbors[i].numTx>(0xff-numTxAttempts)) {\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-723. Update neighbors' NumTx and numTxACK only after having a dedicated cell to parent.
|
491,595 |
09.11.2017 14:58:58
| -3,600 |
bd74448f0469e9f8eb831db974feafa6b149e163
|
increase the size of outputbuf size to 1024.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/python/openwsnmodule_obj.h",
"new_path": "bsp/boards/python/openwsnmodule_obj.h",
"diff": "@@ -55,7 +55,7 @@ void sctimer_intr_compare(OpenMote* self);\n// uart\nvoid uart_intr_tx(OpenMote* self);\nvoid uart_intr_rx(OpenMote* self);\n-void uart_writeBufferByLen_FASTSIM(OpenMote* self, uint8_t* buffer, uint8_t len);\n+void uart_writeBufferByLen_FASTSIM(OpenMote* self, uint8_t* buffer, uint16_t len);\n// supply\nvoid supply_on(OpenMote* self);\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/python/uart_obj.c",
"new_path": "bsp/boards/python/uart_obj.c",
"diff": "@@ -159,14 +159,14 @@ void uart_writeByte(OpenMote* self, uint8_t byteToWrite) {\n}\n#endif\n-void uart_writeCircularBuffer_FASTSIM(OpenMote* self, uint8_t* buffer, uint8_t* outputBufIdxR, uint8_t* outputBufIdxW) {\n+void uart_writeCircularBuffer_FASTSIM(OpenMote* self, uint8_t* buffer, uint16_t* outputBufIdxR, uint16_t* outputBufIdxW) {\nPyObject* frame;\nPyObject* arglist;\nPyObject* result;\nPyObject* item;\nint res;\n- uint8_t len;\n- uint8_t i;\n+ int16_t len;\n+ uint16_t i;\n#ifdef TRACE_ON\nprintf(\"C@0x%x: uart_writeCircularBuffer_FASTSIM(buffer=%x,outputBufIdxR=%x,outputBufIdxW=%x)... \\n\",\n@@ -179,12 +179,16 @@ void uart_writeCircularBuffer_FASTSIM(OpenMote* self, uint8_t* buffer, uint8_t*\n// forward to Python\nlen = (*outputBufIdxW)-(*outputBufIdxR);\n+ if (len<0){\n+ len = len+OUTPUT_BUFFER_MASK+1;\n+ }\n+\nframe = PyList_New(len);\ni = 0;\nwhile (*outputBufIdxR!=*outputBufIdxW) {\n// get element at outputBufIdxR\n- item = PyInt_FromLong(buffer[*outputBufIdxR]);\n+ item = PyInt_FromLong(buffer[OUTPUT_BUFFER_MASK & *outputBufIdxR]);\nres = PyList_SetItem(frame,i,item);\nif (res!=0) {\nprintf(\"[CRITICAL] uart_writeCircularBuffer_FASTSIM() failed setting list item\\r\\n\");\n@@ -210,12 +214,12 @@ void uart_writeCircularBuffer_FASTSIM(OpenMote* self, uint8_t* buffer, uint8_t*\n#endif\n}\n-void uart_writeBufferByLen_FASTSIM(OpenMote* self, uint8_t* buffer, uint8_t len) {\n+void uart_writeBufferByLen_FASTSIM(OpenMote* self, uint8_t* buffer, uint16_t len) {\nPyObject* frame;\nPyObject* arglist;\nPyObject* result;\nPyObject* item;\n- uint8_t i;\n+ uint16_t i;\nint res;\n#ifdef TRACE_ON\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/uart.h",
"new_path": "bsp/boards/uart.h",
"diff": "@@ -39,7 +39,7 @@ void uart_clearRxInterrupts(void);\nvoid uart_clearTxInterrupts(void);\nvoid uart_writeByte(uint8_t byteToWrite);\n#ifdef FASTSIM\n-void uart_writeCircularBuffer_FASTSIM(uint8_t* buffer, uint8_t* outputBufIdxR, uint8_t* outputBufIdxW);\n+void uart_writeCircularBuffer_FASTSIM(uint8_t* buffer, uint16_t* outputBufIdxR, uint16_t* outputBufIdxW);\n#endif\nuint8_t uart_readByte(void);\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -402,7 +402,7 @@ void openserial_startOutput() {\n&openserial_vars.outputBufIdxW\n);\n#else\n- uart_writeByte(openserial_vars.outputBuf[openserial_vars.outputBufIdxR++]);\n+ uart_writeByte(openserial_vars.outputBuf[OUTPUT_BUFFER_MASK & (openserial_vars.outputBufIdxR++)]);\n#endif\n} else {\nopenserial_stop();\n@@ -802,7 +802,7 @@ port_INLINE void outputHdlcOpen() {\nopenserial_vars.outputCrc = HDLC_CRCINIT;\n// write the opening HDLC flag\n- openserial_vars.outputBuf[openserial_vars.outputBufIdxW++] = HDLC_FLAG;\n+ openserial_vars.outputBuf[OUTPUT_BUFFER_MASK & (openserial_vars.outputBufIdxW++)] = HDLC_FLAG;\n}\n/**\n\\brief Add a byte to the outgoing HDLC frame being built.\n@@ -814,10 +814,10 @@ port_INLINE void outputHdlcWrite(uint8_t b) {\n// add byte to buffer\nif (b==HDLC_FLAG || b==HDLC_ESCAPE) {\n- openserial_vars.outputBuf[openserial_vars.outputBufIdxW++] = HDLC_ESCAPE;\n+ openserial_vars.outputBuf[OUTPUT_BUFFER_MASK & (openserial_vars.outputBufIdxW++)] = HDLC_ESCAPE;\nb = b^HDLC_ESCAPE_MASK;\n}\n- openserial_vars.outputBuf[openserial_vars.outputBufIdxW++] = b;\n+ openserial_vars.outputBuf[OUTPUT_BUFFER_MASK & (openserial_vars.outputBufIdxW++)] = b;\n}\n/**\n\\brief Finalize the outgoing HDLC frame.\n@@ -833,7 +833,7 @@ port_INLINE void outputHdlcClose() {\noutputHdlcWrite((finalCrc>>8)&0xff);\n// write the closing HDLC flag\n- openserial_vars.outputBuf[openserial_vars.outputBufIdxW++] = HDLC_FLAG;\n+ openserial_vars.outputBuf[OUTPUT_BUFFER_MASK & (openserial_vars.outputBufIdxW++)] = HDLC_FLAG;\n}\n//===== hdlc (input)\n@@ -903,7 +903,7 @@ void isr_openserial_tx() {\nopenserial_vars.outputBufFilled = FALSE;\n}\nif (openserial_vars.outputBufFilled) {\n- uart_writeByte(openserial_vars.outputBuf[openserial_vars.outputBufIdxR++]);\n+ uart_writeByte(openserial_vars.outputBuf[OUTPUT_BUFFER_MASK & (openserial_vars.outputBufIdxR++)]);\n}\nbreak;\ncase MODE_OFF:\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.h",
"new_path": "drivers/common/openserial.h",
"diff": "\\warning should be exactly 256 so wrap-around on the index does not require\nthe use of a slow modulo operator.\n*/\n-#define SERIAL_OUTPUT_BUFFER_SIZE 256 // leave at 256!\n+#define SERIAL_OUTPUT_BUFFER_SIZE 1024 // leave at 256!\n+#define OUTPUT_BUFFER_MASK 0x3FF\n/**\n\\brief Number of bytes of the serial input buffer, in bytes.\n@@ -114,8 +115,8 @@ typedef struct {\n// output\nbool outputBufFilled;\nuint16_t outputCrc;\n- uint8_t outputBufIdxW;\n- uint8_t outputBufIdxR;\n+ uint16_t outputBufIdxW;\n+ uint16_t outputBufIdxR;\nuint8_t outputBuf[SERIAL_OUTPUT_BUFFER_SIZE];\n} openserial_vars_t;\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-724. increase the size of outputbuf size to 1024.
|
491,595 |
09.11.2017 15:51:59
| -3,600 |
853234c4ebccf86b2f61f79e2d3f78e96da70862
|
dagroot doesn't synchronize to anyone ever.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -1930,16 +1930,16 @@ port_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {\n// or in case I'm in the middle of the join process when parent is not yet selected\n// or in case I don't have a dedicated cell to my parent yet\nif (\n- (\nidmanager_getIsDAGroot() == FALSE &&\n- icmpv6rpl_isPreferredParent(&(ieee154e_vars.dataReceived->l2_nextORpreviousHop))\n- ) ||\n+ (\n+ icmpv6rpl_isPreferredParent(&(ieee154e_vars.dataReceived->l2_nextORpreviousHop)) ||\nIEEE802154_security_isConfigured() == FALSE ||\nicmpv6rpl_getPreferredParentEui64(&addressToWrite) == FALSE ||\n(\nicmpv6rpl_getPreferredParentEui64(&addressToWrite) &&\nschedule_hasDedicatedCellToNeighbor(&addressToWrite)== FALSE\n)\n+ )\n) {\nsynchronizePacket(ieee154e_vars.syncCapturedTime);\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. dagroot doesn't synchronize to anyone ever.
|
491,595 |
11.11.2017 03:26:47
| -3,600 |
ae5631e496d478d776a0c5f51655d6a48a8ab323
|
clear the other cells only when there is a cell to my current parent.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "@@ -338,7 +338,8 @@ bool msf_candidateRemoveCellList(\nvoid msf_housekeeping(void){\n- open_addr_t neighbor;\n+ open_addr_t parentNeighbor;\n+ open_addr_t* nonParentNeighbor;\nbool foundNeighbor;\ncellInfo_ht celllist_add[CELLLIST_MAX_LEN];\ncellInfo_ht celllist_delete[CELLLIST_MAX_LEN];\n@@ -347,32 +348,38 @@ void msf_housekeeping(void){\nreturn;\n}\n- foundNeighbor = icmpv6rpl_getPreferredParentEui64(&neighbor);\n+ foundNeighbor = icmpv6rpl_getPreferredParentEui64(&parentNeighbor);\nif (foundNeighbor==FALSE) {\nreturn;\n}\n- if (schedule_getNumberOfDedicatedCells(&neighbor)==0){\n+ if (schedule_getNumberOfDedicatedCells(&parentNeighbor)==0){\nmsf_trigger6pAdd();\nreturn;\n}\n- if (schedule_isNumTxWrapped(&neighbor)==FALSE){\n+ if (msf_vars.waitretry){\nreturn;\n}\n- if (msf_vars.waitretry){\n+ nonParentNeighbor = schedule_getNonParentNeighborWithDedicatedCells(&parentNeighbor);\n+ if (nonParentNeighbor != NULL){\n+ msf_trigger6pClear(nonParentNeighbor);\n+ return;\n+ }\n+\n+ if (schedule_isNumTxWrapped(&parentNeighbor)==FALSE){\nreturn;\n}\nmemset(celllist_delete, 0, CELLLIST_MAX_LEN*sizeof(cellInfo_ht));\n- if (schedule_getCellsToBeRelocated(&neighbor, celllist_delete)){\n+ if (schedule_getCellsToBeRelocated(&parentNeighbor, celllist_delete)){\nif (msf_candidateAddCellList(celllist_add,NUMCELLS_MSF)==FALSE){\n// failed to get cell list to add\nreturn;\n}\nsixtop_request(\nIANA_6TOP_CMD_RELOCATE, // code\n- &neighbor, // neighbor\n+ &parentNeighbor, // neighbor\nNUMCELLS_MSF, // number cells\nCELLOPTIONS_MSF, // cellOptions\ncelllist_add, // celllist to add\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.c",
"new_path": "openstack/02b-MAChigh/schedule.c",
"diff": "@@ -533,6 +533,26 @@ uint8_t schedule_getNumberOfDedicatedCells(open_addr_t* neighbor){\nreturn counter;\n}\n+open_addr_t* schedule_getNonParentNeighborWithDedicatedCells(open_addr_t* neighbor){\n+ uint8_t i;\n+\n+ INTERRUPT_DECLARATION();\n+ DISABLE_INTERRUPTS();\n+\n+ for(i=0;i<MAXACTIVESLOTS;i++) {\n+ if(\n+ schedule_vars.scheduleBuf[i].neighbor.type == ADDR_64B &&\n+ packetfunctions_sameAddress(&schedule_vars.scheduleBuf[i].neighbor, neighbor) == FALSE\n+ ){\n+ return &schedule_vars.scheduleBuf[i].neighbor;\n+ }\n+ }\n+\n+ ENABLE_INTERRUPTS();\n+\n+ return NULL;\n+}\n+\nbool schedule_isNumTxWrapped(open_addr_t* neighbor){\nuint8_t i;\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "@@ -186,6 +186,7 @@ uint8_t schedule_getNumberOfDedicatedCells(open_addr_t* neighbor);\nbool schedule_isNumTxWrapped(open_addr_t* neighbor);\nbool schedule_getCellsToBeRelocated(open_addr_t* neighbor, cellInfo_ht* celllist);\nbool schedule_hasDedicatedCellToNeighbor(open_addr_t* neighbor);\n+open_addr_t* schedule_getNonParentNeighborWithDedicatedCells(open_addr_t* neighbor);\n// from IEEE802154E\nvoid schedule_syncSlotOffset(slotOffset_t targetSlotOffset);\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.c",
"new_path": "openstack/03b-IPv6/icmpv6rpl.c",
"diff": "@@ -466,7 +466,6 @@ void icmpv6rpl_updateMyDAGrankAndParentSelection() {\nneighbors_setPreferredParent(icmpv6rpl_vars.ParentIndex, TRUE);\n// get prepare parent address\nneighbors_getNeighborEui64(&addressToWrite,ADDR_64B,prevParentIndex);\n- msf_trigger6pClear(&addressToWrite);\n}\n}\n} else {\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -610,6 +610,7 @@ functionsToChange = [\n'schedule_resetEntry',\n'schedule_getNumberOfFreeEntries',\n'schedule_getNumberOfDedicatedCells',\n+ 'schedule_getNonParentNeighborWithDedicatedCells',\n'schedule_hasDedicatedCellToNeighbor',\n'schedule_isNumTxWrapped',\n'schedule_getCellsToBeRelocated',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. clear the other cells only when there is a cell to my current parent.
|
491,595 |
11.11.2017 14:59:54
| -3,600 |
c2df41b56627177355376f663303be7dade22bef
|
change the rank updating algorithm.
|
[
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -384,6 +384,7 @@ typedef struct {\nasn_t asn;\nuint8_t joinPrio;\nbool f6PNORES;\n+ bool inBlacklist;\nuint8_t sequenceNumber;\nuint8_t backoffExponenton;\nuint8_t backoff;\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -134,6 +134,10 @@ bool neighbors_getNeighborNoResource(uint8_t index){\nreturn neighbors_vars.neighbors[index].f6PNORES;\n}\n+bool neighbors_getNeighborIsInBlacklist(uint8_t index){\n+ return neighbors_vars.neighbors[index].inBlacklist;\n+}\n+\nuint8_t neighbors_getSequenceNumber(open_addr_t* address){\nuint8_t i;\nfor (i=0;i<MAXNUMNEIGHBORS;i++){\n@@ -258,7 +262,7 @@ bool neighbors_reachedMinimalTransmission(uint8_t index){\nif (\nneighbors_vars.neighbors[index].used == TRUE &&\n- neighbors_vars.neighbors[index].numTx > MINIMAL_TX\n+ neighbors_vars.neighbors[index].numTx > MINIMAL_NUM_TX\n) {\nreturnVal = TRUE;\n} else {\n@@ -379,7 +383,6 @@ void neighbors_indicateTx(\nasn_t* asnTs\n) {\nuint8_t i;\n- uint8_t parentIndex;\n// don't run through this function if packet was sent to broadcast address\nif (packetfunctions_isBroadcastMulticast(l2_dest)==TRUE) {\nreturn;\n@@ -388,19 +391,6 @@ void neighbors_indicateTx(\n// loop through neighbor table\nfor (i=0;i<MAXNUMNEIGHBORS;i++) {\nif (isThisRowMatching(l2_dest,i)) {\n-\n- // only update numTx and numTxACK when I have a dedicated cell\n- if (\n- icmpv6rpl_getPreferredParentIndex(&parentIndex)==FALSE ||\n- schedule_hasDedicatedCellToNeighbor(&neighbors_vars.neighbors[parentIndex].addr_64b)==FALSE\n- ){\n- if (was_finally_acked==TRUE) {\n- memcpy(&neighbors_vars.neighbors[i].asn,asnTs,sizeof(asn_t));\n- }\n-\n- break;\n- }\n-\n// handle roll-over case\nif (neighbors_vars.neighbors[i].numTx>(0xff-numTxAttempts)) {\n@@ -415,13 +405,9 @@ void neighbors_indicateTx(\nneighbors_vars.neighbors[i].numTxACK++;\nmemcpy(&neighbors_vars.neighbors[i].asn,asnTs,sizeof(asn_t));\n}\n- // #TODO : investigate this TX wrap thing! @incorrect in the meantime\n- // DB (Nov 2015) I believe this is correct. The ratio numTx/numTxAck is still a correct approximation\n- // of ETX after scaling down by a factor 2. Obviously, each one of numTx and numTxAck is no longer an\n- // accurate count of the related events, so don't rely of them to keep track of frames sent and ack received,\n- // and don't use numTx as a frame sequence number!\n- // The scaling means that older events have less weight when the scaling occurs. It is a way of progressively\n- // forgetting about the ancient past and giving more importance to recent observations.\n+\n+ // numTx and numTxAck changed,, update my rank\n+ icmpv6rpl_updateMyDAGrankAndParentSelection();\nbreak;\n}\n}\n@@ -564,7 +550,15 @@ uint16_t neighbors_getLinkMetric(uint8_t index) {\n// we assume that this neighbor has already been checked for being in use\n// calculate link cost to this neighbor\nif (neighbors_vars.neighbors[index].numTxACK==0) {\n+ if (neighbors_vars.neighbors[index].numTx > DEFAULTLINKCOST){\n+ if (neighbors_vars.neighbors[index].numTx < MINIMAL_NUM_TX){\n+ rankIncrease = (3*neighbors_vars.neighbors[index].numTx-2)*MINHOPRANKINCREASE;\n+ } else {\n+ rankIncrease = 65535;\n+ }\n+ } else {\nrankIncrease = (3*DEFAULTLINKCOST-2)*MINHOPRANKINCREASE;\n+ }\n} else {\n//6TiSCH minimal draft using OF0 for rank computation: ((3*numTx/numTxAck)-2)*minHopRankIncrease\n// numTx is on 8 bits, so scaling up 10 bits won't lead to saturation\n@@ -578,6 +572,14 @@ uint16_t neighbors_getLinkMetric(uint8_t index) {\n} else {\nrankIncrease = (uint16_t)(rankIncreaseIntermediary >> 10);\n}\n+\n+ if (\n+ rankIncrease>(3*DEFAULTLINKCOST-2)*MINHOPRANKINCREASE &&\n+ neighbors_vars.neighbors[index].numTx > MINIMAL_NUM_TX\n+ ){\n+ // PDR too low, put the neighbor in blacklist\n+ neighbors_vars.neighbors[index].inBlacklist = TRUE;\n+ }\n}\nreturn rankIncrease;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.h",
"new_path": "openstack/02b-MAChigh/neighbors.h",
"diff": "#define BADNEIGHBORMAXRSSI -80 //dBm\n#define GOODNEIGHBORMINRSSI -90 //dBm\n#define SWITCHSTABILITYTHRESHOLD 3\n-#define DEFAULTLINKCOST 8\n-#define MINIMAL_TX DEFAULTLINKCOST\n+#define DEFAULTLINKCOST 4 // this value has too be no greater than 6, when MAXEB is 4 and MAXRETRIES is 4\n+#define MINIMAL_NUM_TX 64\n#define MAXDAGRANK 0xffff\n#define DEFAULTDAGRANK MAXDAGRANK\n@@ -61,6 +61,7 @@ uint16_t neighbors_getLinkMetric(uint8_t index);\nopen_addr_t* neighbors_getKANeighbor(uint16_t kaPeriod);\nopen_addr_t* neighbors_getJoinProxy(void);\nbool neighbors_getNeighborNoResource(uint8_t index);\n+bool neighbors_getNeighborIsInBlacklist(uint8_t index);\nint8_t neighbors_getRssi(uint8_t index);\nuint8_t neighbors_getNumTx(uint8_t index);\nuint8_t neighbors_getSequenceNumber(open_addr_t* address);\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.c",
"new_path": "openstack/03b-IPv6/icmpv6rpl.c",
"diff": "@@ -304,7 +304,8 @@ bool icmpv6rpl_getPreferredParentIndex(uint8_t* indexptr) {\nbool icmpv6rpl_getPreferredParentEui64(open_addr_t* addressToWrite) {\nif (\nicmpv6rpl_vars.haveParent &&\n- neighbors_getNeighborNoResource(icmpv6rpl_vars.ParentIndex)==FALSE\n+ neighbors_getNeighborNoResource(icmpv6rpl_vars.ParentIndex) == FALSE &&\n+ neighbors_getNeighborIsInBlacklist(icmpv6rpl_vars.ParentIndex) == FALSE\n){\nreturn neighbors_getNeighborEui64(addressToWrite,ADDR_64B,icmpv6rpl_vars.ParentIndex);\n} else {\n@@ -390,7 +391,10 @@ void icmpv6rpl_updateMyDAGrankAndParentSelection() {\n// update my rank to current parent first\nif (icmpv6rpl_vars.haveParent==TRUE){\n- if (neighbors_getNeighborNoResource(icmpv6rpl_vars.ParentIndex)==TRUE){\n+ if (\n+ neighbors_getNeighborNoResource(icmpv6rpl_vars.ParentIndex) == TRUE ||\n+ neighbors_getNeighborIsInBlacklist(icmpv6rpl_vars.ParentIndex) == TRUE\n+ ){\nicmpv6rpl_vars.myDAGrank = 65535;\n} else {\nif (neighbors_reachedMinimalTransmission(icmpv6rpl_vars.ParentIndex)==FALSE){\n@@ -415,7 +419,10 @@ void icmpv6rpl_updateMyDAGrankAndParentSelection() {\nfor (i=0;i<MAXNUMNEIGHBORS;i++) {\nif (neighbors_isStableNeighborByIndex(i)) { // in use and link is stable\n// neighbor marked as NORES can't be parent\n- if (neighbors_getNeighborNoResource(i)==TRUE) {\n+ if (\n+ neighbors_getNeighborNoResource(i) == TRUE ||\n+ neighbors_getNeighborIsInBlacklist(i)== TRUE\n+ ) {\ncontinue;\n}\n// get link cost to this neighbor\n@@ -565,10 +572,10 @@ void icmpv6rpl_indicateRxDIO(OpenQueueEntry_t* msg) {\nneighborRank=neighbors_getNeighborRank(i);\nif (\n(icmpv6rpl_vars.incomingDio->rank > neighborRank) &&\n- (icmpv6rpl_vars.incomingDio->rank - neighborRank) > (DEFAULTLINKCOST*2*MINHOPRANKINCREASE)\n+ (icmpv6rpl_vars.incomingDio->rank - neighborRank) > ((3*DEFAULTLINKCOST-2)*MINHOPRANKINCREASE)\n) {\n// the new DAGrank looks suspiciously high, only increment a bit\n- neighbors_setNeighborRank(i,neighborRank + (DEFAULTLINKCOST*2*MINHOPRANKINCREASE));\n+ neighbors_setNeighborRank(i,neighborRank + ((3*DEFAULTLINKCOST-2)*2*MINHOPRANKINCREASE));\nopenserial_printError(COMPONENT_NEIGHBORS,ERR_LARGE_DAGRANK,\n(errorparameter_t)icmpv6rpl_vars.incomingDio->rank,\n(errorparameter_t)neighborRank);\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -559,6 +559,7 @@ functionsToChange = [\n'neighbors_setPreferredParent',\n'neighbors_getNeighborNoResource',\n'neighbors_setNeighborNoResource',\n+ 'neighbors_getNeighborIsInBlacklist',\n'neighbors_getRssi',\n'neighbors_getNumTx',\n'neighbors_isStableNeighbor',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. change the rank updating algorithm.
|
491,595 |
11.11.2017 18:33:00
| -3,600 |
497c8b5b371260c4219ca1363c82046bc47ee612
|
send sixtop response with SEQNUM_ERR code on minimal cell only.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -931,6 +931,11 @@ port_INLINE void activity_ti1ORri1() {\n// there is a packet to send\nif (\nschedule_hasDedicatedCellToNeighbor(&ieee154e_vars.dataToSend->l2_nextORpreviousHop)\n+ ) {\n+ // allow sixtop response with SEQNUM_ERR return code send on minimal cell\n+ if (\n+ ieee154e_vars.dataToSend->creator!=COMPONENT_SIXTOP_RES ||\n+ ieee154e_vars.dataToSend->l2_sixtop_returnCode != IANA_6TOP_RC_SEQNUM_ERR\n) {\n// leave the packet to be sent on dedicated cell and pick up a broadcast packet.\nieee154e_vars.dataToSend = openqueue_macGetDIOPacket();\n@@ -943,6 +948,7 @@ port_INLINE void activity_ti1ORri1() {\n}\n}\n}\n+ }\nif (ieee154e_vars.dataToSend==NULL) {\nif (cellType==CELLTYPE_TX) {\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "@@ -301,6 +301,10 @@ OpenQueueEntry_t* openqueue_macGetDedicatedPacket(open_addr_t* toNeighbor){\n(\ntoNeighbor->type==ADDR_64B &&\npacketfunctions_sameAddress(toNeighbor,&openqueue_vars.queue[i].l2_nextORpreviousHop)\n+ ) && // sixtop response with SEQNUM_ERR shouldn't be send on dedicated cell\n+ (\n+ openqueue_vars.queue[i].creator != COMPONENT_SIXTOP_RES ||\n+ openqueue_vars.queue[i].l2_sixtop_returnCode != IANA_6TOP_RC_SEQNUM_ERR\n)\n){\nif (packet_index==QUEUELENGTH){\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. send sixtop response with SEQNUM_ERR code on minimal cell only.
|
491,595 |
11.11.2017 23:44:32
| -3,600 |
394ef01a4ce4aeffd2a492875c1aec31df344a0e
|
update parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "@@ -39,7 +39,12 @@ void msf_housekeeping(void);\nvoid msf_init(void) {\nmemset(&msf_vars,0,sizeof(msf_vars_t));\nmsf_vars.numAppPacketsPerSlotFrame = 0;\n- sixtop_setSFcallback(msf_getsfid,msf_getMetadata,msf_translateMetadata,msf_handleRCError);\n+ sixtop_setSFcallback(\n+ (sixtop_sf_getsfid)msf_getsfid,\n+ (sixtop_sf_getmetadata)msf_getMetadata,\n+ (sixtop_sf_translatemetadata)msf_translateMetadata,\n+ (sixtop_sf_handle_callback)msf_handleRCError\n+ );\nmsf_vars.housekeepingTimerId = opentimers_create();\nopentimers_scheduleIn(\nmsf_vars.housekeepingTimerId,\n@@ -209,6 +214,10 @@ void msf_trigger6pAdd(void){\nbool foundNeighbor;\ncellInfo_ht celllist_add[CELLLIST_MAX_LEN];\n+ if (ieee154e_isSynch()==FALSE) {\n+ return;\n+ }\n+\nif (msf_vars.waitretry){\nreturn;\n}\n@@ -242,6 +251,10 @@ void msf_trigger6pDelete(void){\nbool foundNeighbor;\ncellInfo_ht celllist_delete[CELLLIST_MAX_LEN];\n+ if (ieee154e_isSynch()==FALSE) {\n+ return;\n+ }\n+\nif (msf_vars.waitretry){\nreturn;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.h",
"new_path": "openstack/02b-MAChigh/neighbors.h",
"diff": "#define GOODNEIGHBORMINRSSI -90 //dBm\n#define SWITCHSTABILITYTHRESHOLD 3\n#define DEFAULTLINKCOST 4 // this value has too be no greater than 6, when MAXEB is 4 and MAXRETRIES is 4\n-#define MINIMAL_NUM_TX 64\n+#define MINIMAL_NUM_TX 16\n#define MAXDAGRANK 0xffff\n#define DEFAULTDAGRANK MAXDAGRANK\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. update parameters.
|
491,595 |
23.11.2017 12:44:33
| -3,600 |
35d9c26b5a38998f3ab297ecbcdac421f9eacfba
|
add bsp_sctimer project.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/board.c",
"new_path": "bsp/boards/scum/board.c",
"diff": "// bsp modules\n#include \"leds.h\"\n#include \"uart.h\"\n-#include \"bsp_timer.h\"\n#include \"radio.h\"\n-#include \"radiotimer.h\"\n#include \"eui64.h\"\n+#include \"sctimer.h\"\n//=========================== variables =======================================\n@@ -36,9 +35,8 @@ void board_init() {\ndebugpins_init();\nleds_init();\nuart_init();\n- bsp_timer_init();\n+ sctimer_init();\nradio_init();\n- radiotimer_init();\neui64_get(eui);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/board_info.h",
"new_path": "bsp/boards/scum/board_info.h",
"diff": "@@ -40,10 +40,10 @@ to return the board's description.\n// this is called when require to WRITE the RFTIMER counter/compare registers,\n// where the value is going to be multiplied.\n-#define TIMER_COUTER_CONVERT_32K_TO_500K(value) value*61/4\n+#define TIMER_COUNTER_CONVERT_32K_TO_500K(value) value*61/4\n// this is called when require to READ the RFTIMER counter/compare registers,\n// where the value is going to be divided.\n-#define TIMER_COUTER_CONVERT_500K_TO_32K(value) value*4/61\n+#define TIMER_COUNTER_CONVERT_500K_TO_32K(value) value*4/61\n//===== radio\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/cm0dsasm.s",
"new_path": "bsp/boards/scum/cm0dsasm.s",
"diff": "@@ -108,7 +108,7 @@ RF_Handler PROC\nRFTIMER_Handler PROC\nEXPORT RFTIMER_Handler\n- IMPORT radiotimer_isr\n+ IMPORT sctimer_isr\nPUSH {R0,LR}\n@@ -116,7 +116,7 @@ RFTIMER_Handler PROC\nMSR PRIMASK, R0 ;\n;STR R0,[R1]\n- BL radiotimer_isr\n+ BL sctimer_isr\nMOVS R0, #0 ;ENABLE all interrupts\nMSR PRIMASK, R0\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/radio.c",
"new_path": "bsp/boards/scum/radio.c",
"diff": "#include \"board.h\"\n#include \"radio.h\"\n-#include \"radiotimer.h\"\n+#include \"sctimer.h\"\n#include \"debugpins.h\"\n#include \"leds.h\"\n#include \"memory_map.h\"\n//=========================== variables =======================================\ntypedef struct {\n- radiotimer_capture_cbt startFrame_cb;\n- radiotimer_capture_cbt endFrame_cb;\n+ radio_capture_cbt startFrame_cb;\n+ radio_capture_cbt endFrame_cb;\nuint8_t radio_tx_buffer[MAXLENGTH_TRX_BUFFER] __attribute__ ((aligned (4)));\nuint8_t radio_rx_buffer[MAXLENGTH_TRX_BUFFER] __attribute__ ((aligned (4)));\nradio_state_t state;\n@@ -75,19 +75,11 @@ void radio_init() {\nradio_vars.state = RADIOSTATE_RFOFF;\n}\n-void radio_setOverflowCb(radiotimer_compare_cbt cb) {\n- radiotimer_setOverflowCb(cb);\n-}\n-\n-void radio_setCompareCb(radiotimer_compare_cbt cb) {\n- radiotimer_setCompareCb(cb);\n-}\n-\n-void radio_setStartFrameCb(radiotimer_capture_cbt cb) {\n+void radio_setStartFrameCb(radio_capture_cbt cb) {\nradio_vars.startFrame_cb = cb;\n}\n-void radio_setEndFrameCb(radiotimer_capture_cbt cb) {\n+void radio_setEndFrameCb(radio_capture_cbt cb) {\nradio_vars.endFrame_cb = cb;\n}\n@@ -98,24 +90,6 @@ void radio_reset() {\nPORT_PIN_RADIO_RESET_LOW();\n}\n-//===== timer\n-\n-void radio_startTimer(PORT_TIMER_WIDTH period) {\n- radiotimer_start(period);\n-}\n-\n-PORT_TIMER_WIDTH radio_getTimerValue() {\n- return radiotimer_getValue();\n-}\n-\n-void radio_setTimerPeriod(PORT_TIMER_WIDTH period) {\n- radiotimer_setPeriod(period);\n-}\n-\n-PORT_TIMER_WIDTH radio_getTimerPeriod() {\n- return radiotimer_getPeriod();\n-}\n-\n//===== RF admin\nvoid radio_setFrequency(uint8_t frequency) {\n@@ -159,7 +133,7 @@ void radio_loadPacket_prepare(uint8_t* packet, uint8_t len){\nRFCONTROLLER_REG__TX_PACK_LEN = len;\n}\n-void radio_loadPacket(uint8_t* packet, uint8_t len) {\n+void radio_loadPacket(uint8_t* packet, uint16_t len) {\nuint8_t i;\n// change state\nradio_vars.state = RADIOSTATE_LOADING_PACKET;\n@@ -278,7 +252,7 @@ kick_scheduler_t radio_isr() {\nif (irq_status & TX_SFD_DONE_INT) {\n#ifdef SLOT_FSM_IMPLEMENTATION_MULTIPLE_TIMER_INTERRUPT\n// get the capture Time from capture register\n- capturedTime = TIMER_COUTER_CONVERT_500K_TO_32K(RFTIMER_REG__CAPTURE0);\n+ capturedTime = TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__CAPTURE0);\n#endif\nRFCONTROLLER_REG__INT_CLEAR = TX_SFD_DONE_INT;\n// a SFD is just sent, update radio state\n@@ -287,7 +261,7 @@ kick_scheduler_t radio_isr() {\nif (irq_status & RX_SFD_DONE_INT) {\n#ifdef SLOT_FSM_IMPLEMENTATION_MULTIPLE_TIMER_INTERRUPT\n// get the capture Time from capture register\n- capturedTime = TIMER_COUTER_CONVERT_500K_TO_32K(RFTIMER_REG__CAPTURE1);\n+ capturedTime = TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__CAPTURE1);\n#endif\nRFCONTROLLER_REG__INT_CLEAR = RX_SFD_DONE_INT;\n// a SFD is just received, update radio state\n@@ -306,14 +280,14 @@ kick_scheduler_t radio_isr() {\nif (irq_status & TX_SEND_DONE_INT) {\n#ifdef SLOT_FSM_IMPLEMENTATION_MULTIPLE_TIMER_INTERRUPT\n// get the capture Time from capture register\n- capturedTime = TIMER_COUTER_CONVERT_500K_TO_32K(RFTIMER_REG__CAPTURE2);\n+ capturedTime = TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__CAPTURE2);\n#endif\nRFCONTROLLER_REG__INT_CLEAR = TX_SEND_DONE_INT;\n}\nif (irq_status & RX_DONE_INT) {\n#ifdef SLOT_FSM_IMPLEMENTATION_MULTIPLE_TIMER_INTERRUPT\n// get the capture Time from capture register\n- capturedTime = TIMER_COUTER_CONVERT_500K_TO_32K(RFTIMER_REG__CAPTURE3);\n+ capturedTime = TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__CAPTURE3);\n#endif\nRFCONTROLLER_REG__INT_CLEAR = RX_DONE_INT;\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "bsp/boards/scum/sctimer.c",
"diff": "+/**\n+\\brief SCuM-specific definition of the \"sctimer\" bsp module, A timer module with only a single compare value.\n+\n+\\author Tengfei Chang <tengfei.chang@inria.fr> Novemeber 22, 2017.\n+*/\n+\n+#include \"memory_map.h\"\n+#include \"string.h\"\n+#include \"sctimer.h\"\n+#include \"board.h\"\n+#include \"debugpins.h\"\n+\n+// ========================== define ==========================================\n+\n+#define RFTIMER_MAX_COUNT 0x3ffffff // use a value less than 0xffffffff/61 and also equal to 2^n-1\n+#define TIMERLOOP_THRESHOLD 0xfffff // 0xffff is 2 seconds @ 32768Hz clock\n+#define MINIMUM_COMPAREVALE_ADVANCE 10\n+\n+// ========================== variable ========================================\n+\n+typedef struct {\n+ sctimer_cbt sctimer_cb;\n+ PORT_TIMER_WIDTH last_compare_value;\n+} sctimer_vars_t;\n+\n+sctimer_vars_t sctimer_vars;\n+\n+\n+// ========================== private =========================================\n+\n+void sctimer_isr_internal(void);\n+\n+// ========================== protocol =========================================\n+\n+/**\n+\\brief Initialization sctimer.\n+*/\n+void sctimer_init(void){\n+\n+ memset(&sctimer_vars, 0, sizeof(sctimer_vars_t));\n+\n+ // set period of radiotimer\n+ RFTIMER_REG__MAX_COUNT = RFTIMER_MAX_COUNT;\n+ // enable timer and interrupt\n+ RFTIMER_REG__CONTROL = 0x07;\n+}\n+\n+void sctimer_set_callback(sctimer_cbt cb){\n+ sctimer_vars.sctimer_cb = cb;\n+}\n+\n+/**\n+\\brief set compare interrupt\n+*/\n+void sctimer_setCompare(PORT_TIMER_WIDTH val){\n+ sctimer_enable();\n+ if (TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__COUNTER) - val < TIMERLOOP_THRESHOLD){\n+ // the timer is already late, schedule the ISR right now manually\n+ // not sure how to do this in scum, just miss this ISR for now\n+ // don't clear the flag, so another interrupt will happen after exiting the ISR\n+ } else {\n+ if (val-TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__COUNTER)<MINIMUM_COMPAREVALE_ADVANCE){\n+ // there is hardware limitation to schedule the timer within TIMERTHRESHOLD ticks\n+ // schedule ISR right now manually\n+ // don't clear the flag, so another interrupt will happen after exiting the ISR\n+ } else {\n+ // only clear the flag here\n+ RFTIMER_REG__INT_CLEAR = RFTIMER_REG__INT_COMPARE0_INT;\n+ // schedule the timer at val\n+ RFTIMER_REG__COMPARE0 = (PORT_TIMER_WIDTH)(TIMER_COUNTER_CONVERT_32K_TO_500K(val) & RFTIMER_MAX_COUNT);\n+ RFTIMER_REG__COMPARE0_CONTROL = RFTIMER_COMPARE_ENABLE | \\\n+ RFTIMER_COMPARE_INTERRUPT_ENABLE;\n+ }\n+ }\n+}\n+\n+/**\n+\\brief Return the current value of the timer's counter.\n+\n+ \\returns The current value of the timer's counter.\n+*/\n+PORT_TIMER_WIDTH sctimer_readCounter(void){\n+ return TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__COUNTER);\n+}\n+\n+void sctimer_enable(void){\n+ // enable compare interrupt (this also cancels any pending interrupts)\n+ RFTIMER_REG__COMPARE0_CONTROL = RFTIMER_COMPARE_ENABLE | \\\n+ RFTIMER_COMPARE_INTERRUPT_ENABLE;\n+}\n+\n+void sctimer_disable(void){\n+ RFTIMER_REG__COMPARE0_CONTROL = 0x0;\n+}\n+\n+// ========================== private =========================================\n+\n+kick_scheduler_t sctimer_isr(void){\n+ debugpins_isr_set();\n+ if (sctimer_vars.sctimer_cb!=NULL) {\n+ sctimer_vars.sctimer_cb();\n+ debugpins_isr_clr();\n+ return KICK_SCHEDULER;\n+ }\n+ debugpins_isr_clr();\n+ return DO_NOT_KICK_SCHEDULER;\n+}\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "projects/scum/01bsp_sctimer/01bsp_sctimer.uvprojx",
"diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n+<Project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"project_projx.xsd\">\n+\n+ <SchemaVersion>2.1</SchemaVersion>\n+\n+ <Header>### uVision Project, (C) Keil Software</Header>\n+\n+ <Targets>\n+ <Target>\n+ <TargetName>Target SCuM</TargetName>\n+ <ToolsetNumber>0x4</ToolsetNumber>\n+ <ToolsetName>ARM-ADS</ToolsetName>\n+ <pCCUsed>5060528::V5.06 update 5 (build 528)::ARMCC</pCCUsed>\n+ <uAC6>0</uAC6>\n+ <TargetOption>\n+ <TargetCommonOption>\n+ <Device>ARMCM0</Device>\n+ <Vendor>ARM</Vendor>\n+ <PackID>ARM.CMSIS.5.0.1</PackID>\n+ <PackURL>http://www.keil.com/pack/</PackURL>\n+ <Cpu>IRAM(0x20000000,0x00020000) IROM(0x00000000,0x00040000) CPUTYPE(\"Cortex-M0\") CLOCK(12000000) ESEL ELITTLE</Cpu>\n+ <FlashUtilSpec></FlashUtilSpec>\n+ <StartupFile></StartupFile>\n+ <FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000)</FlashDriverDll>\n+ <DeviceId>0</DeviceId>\n+ <RegisterFile>$$Device:ARMCM0$Device\\ARM\\ARMCM0\\Include\\ARMCM0.h</RegisterFile>\n+ <MemoryEnv></MemoryEnv>\n+ <Cmp></Cmp>\n+ <Asm></Asm>\n+ <Linker></Linker>\n+ <OHString></OHString>\n+ <InfinionOptionDll></InfinionOptionDll>\n+ <SLE66CMisc></SLE66CMisc>\n+ <SLE66AMisc></SLE66AMisc>\n+ <SLE66LinkerMisc></SLE66LinkerMisc>\n+ <SFDFile>$$Device:ARMCM0$Device\\ARM\\SVD\\ARMCM0.svd</SFDFile>\n+ <bCustSvd>0</bCustSvd>\n+ <UseEnv>0</UseEnv>\n+ <BinPath></BinPath>\n+ <IncludePath></IncludePath>\n+ <LibPath></LibPath>\n+ <RegisterFilePath></RegisterFilePath>\n+ <DBRegisterFilePath></DBRegisterFilePath>\n+ <TargetStatus>\n+ <Error>0</Error>\n+ <ExitCodeStop>0</ExitCodeStop>\n+ <ButtonStop>0</ButtonStop>\n+ <NotGenerated>0</NotGenerated>\n+ <InvalidFlash>1</InvalidFlash>\n+ </TargetStatus>\n+ <OutputDirectory>.\\Objects\\</OutputDirectory>\n+ <OutputName>01bsp_sctimer</OutputName>\n+ <CreateExecutable>1</CreateExecutable>\n+ <CreateLib>0</CreateLib>\n+ <CreateHexFile>1</CreateHexFile>\n+ <DebugInformation>1</DebugInformation>\n+ <BrowseInformation>1</BrowseInformation>\n+ <ListingPath>.\\Listings\\</ListingPath>\n+ <HexFormatSelection>1</HexFormatSelection>\n+ <Merge32K>0</Merge32K>\n+ <CreateBatchFile>1</CreateBatchFile>\n+ <BeforeCompile>\n+ <RunUserProg1>0</RunUserProg1>\n+ <RunUserProg2>0</RunUserProg2>\n+ <UserProg1Name></UserProg1Name>\n+ <UserProg2Name></UserProg2Name>\n+ <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n+ <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n+ <nStopU1X>0</nStopU1X>\n+ <nStopU2X>0</nStopU2X>\n+ </BeforeCompile>\n+ <BeforeMake>\n+ <RunUserProg1>0</RunUserProg1>\n+ <RunUserProg2>0</RunUserProg2>\n+ <UserProg1Name></UserProg1Name>\n+ <UserProg2Name></UserProg2Name>\n+ <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n+ <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n+ <nStopB1X>0</nStopB1X>\n+ <nStopB2X>0</nStopB2X>\n+ </BeforeMake>\n+ <AfterMake>\n+ <RunUserProg1>1</RunUserProg1>\n+ <RunUserProg2>1</RunUserProg2>\n+ <UserProg1Name>fromelf --bin .\\Objects\\01bsp_sctimer.axf -o .\\Objects\\01bsp_sctimer.bin</UserProg1Name>\n+ <UserProg2Name>fromelf -cvf .\\Objects\\01bsp_sctimer.axf -o .\\Objects\\disasm.txt</UserProg2Name>\n+ <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n+ <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n+ <nStopA1X>0</nStopA1X>\n+ <nStopA2X>0</nStopA2X>\n+ </AfterMake>\n+ <SelectedForBatchBuild>0</SelectedForBatchBuild>\n+ <SVCSIdString></SVCSIdString>\n+ </TargetCommonOption>\n+ <CommonProperty>\n+ <UseCPPCompiler>0</UseCPPCompiler>\n+ <RVCTCodeConst>0</RVCTCodeConst>\n+ <RVCTZI>0</RVCTZI>\n+ <RVCTOtherData>0</RVCTOtherData>\n+ <ModuleSelection>0</ModuleSelection>\n+ <IncludeInBuild>1</IncludeInBuild>\n+ <AlwaysBuild>0</AlwaysBuild>\n+ <GenerateAssemblyFile>0</GenerateAssemblyFile>\n+ <AssembleAssemblyFile>0</AssembleAssemblyFile>\n+ <PublicsOnly>0</PublicsOnly>\n+ <StopOnExitCode>3</StopOnExitCode>\n+ <CustomArgument></CustomArgument>\n+ <IncludeLibraryModules></IncludeLibraryModules>\n+ <ComprImg>1</ComprImg>\n+ </CommonProperty>\n+ <DllOption>\n+ <SimDllName>SARMCM3.DLL</SimDllName>\n+ <SimDllArguments> </SimDllArguments>\n+ <SimDlgDll>DARMCM1.DLL</SimDlgDll>\n+ <SimDlgDllArguments>-pCM0</SimDlgDllArguments>\n+ <TargetDllName>SARMCM3.DLL</TargetDllName>\n+ <TargetDllArguments> </TargetDllArguments>\n+ <TargetDlgDll>TARMCM1.DLL</TargetDlgDll>\n+ <TargetDlgDllArguments>-pCM0</TargetDlgDllArguments>\n+ </DllOption>\n+ <DebugOption>\n+ <OPTHX>\n+ <HexSelection>1</HexSelection>\n+ <HexRangeLowAddress>0</HexRangeLowAddress>\n+ <HexRangeHighAddress>0</HexRangeHighAddress>\n+ <HexOffset>0</HexOffset>\n+ <Oh166RecLen>16</Oh166RecLen>\n+ </OPTHX>\n+ </DebugOption>\n+ <Utilities>\n+ <Flash1>\n+ <UseTargetDll>1</UseTargetDll>\n+ <UseExternalTool>0</UseExternalTool>\n+ <RunIndependent>0</RunIndependent>\n+ <UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>\n+ <Capability>1</Capability>\n+ <DriverSelection>4096</DriverSelection>\n+ </Flash1>\n+ <bUseTDR>1</bUseTDR>\n+ <Flash2>BIN\\UL2CM3.DLL</Flash2>\n+ <Flash3>\"\" ()</Flash3>\n+ <Flash4></Flash4>\n+ <pFcarmOut></pFcarmOut>\n+ <pFcarmGrp></pFcarmGrp>\n+ <pFcArmRoot></pFcArmRoot>\n+ <FcArmLst>0</FcArmLst>\n+ </Utilities>\n+ <TargetArmAds>\n+ <ArmAdsMisc>\n+ <GenerateListings>0</GenerateListings>\n+ <asHll>1</asHll>\n+ <asAsm>1</asAsm>\n+ <asMacX>1</asMacX>\n+ <asSyms>1</asSyms>\n+ <asFals>1</asFals>\n+ <asDbgD>1</asDbgD>\n+ <asForm>1</asForm>\n+ <ldLst>0</ldLst>\n+ <ldmm>1</ldmm>\n+ <ldXref>1</ldXref>\n+ <BigEnd>0</BigEnd>\n+ <AdsALst>1</AdsALst>\n+ <AdsACrf>1</AdsACrf>\n+ <AdsANop>0</AdsANop>\n+ <AdsANot>0</AdsANot>\n+ <AdsLLst>1</AdsLLst>\n+ <AdsLmap>1</AdsLmap>\n+ <AdsLcgr>1</AdsLcgr>\n+ <AdsLsym>1</AdsLsym>\n+ <AdsLszi>1</AdsLszi>\n+ <AdsLtoi>1</AdsLtoi>\n+ <AdsLsun>1</AdsLsun>\n+ <AdsLven>1</AdsLven>\n+ <AdsLsxf>1</AdsLsxf>\n+ <RvctClst>0</RvctClst>\n+ <GenPPlst>0</GenPPlst>\n+ <AdsCpuType>\"Cortex-M0\"</AdsCpuType>\n+ <RvctDeviceName></RvctDeviceName>\n+ <mOS>0</mOS>\n+ <uocRom>0</uocRom>\n+ <uocRam>0</uocRam>\n+ <hadIROM>1</hadIROM>\n+ <hadIRAM>1</hadIRAM>\n+ <hadXRAM>0</hadXRAM>\n+ <uocXRam>0</uocXRam>\n+ <RvdsVP>0</RvdsVP>\n+ <hadIRAM2>0</hadIRAM2>\n+ <hadIROM2>0</hadIROM2>\n+ <StupSel>8</StupSel>\n+ <useUlib>0</useUlib>\n+ <EndSel>1</EndSel>\n+ <uLtcg>0</uLtcg>\n+ <nSecure>0</nSecure>\n+ <RoSelD>3</RoSelD>\n+ <RwSelD>3</RwSelD>\n+ <CodeSel>0</CodeSel>\n+ <OptFeed>0</OptFeed>\n+ <NoZi1>0</NoZi1>\n+ <NoZi2>0</NoZi2>\n+ <NoZi3>0</NoZi3>\n+ <NoZi4>0</NoZi4>\n+ <NoZi5>0</NoZi5>\n+ <Ro1Chk>0</Ro1Chk>\n+ <Ro2Chk>0</Ro2Chk>\n+ <Ro3Chk>0</Ro3Chk>\n+ <Ir1Chk>1</Ir1Chk>\n+ <Ir2Chk>0</Ir2Chk>\n+ <Ra1Chk>0</Ra1Chk>\n+ <Ra2Chk>0</Ra2Chk>\n+ <Ra3Chk>0</Ra3Chk>\n+ <Im1Chk>1</Im1Chk>\n+ <Im2Chk>0</Im2Chk>\n+ <OnChipMemories>\n+ <Ocm1>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm1>\n+ <Ocm2>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm2>\n+ <Ocm3>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm3>\n+ <Ocm4>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm4>\n+ <Ocm5>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm5>\n+ <Ocm6>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm6>\n+ <IRAM>\n+ <Type>0</Type>\n+ <StartAddress>0x20000000</StartAddress>\n+ <Size>0x20000</Size>\n+ </IRAM>\n+ <IROM>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x40000</Size>\n+ </IROM>\n+ <XRAM>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </XRAM>\n+ <OCR_RVCT1>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT1>\n+ <OCR_RVCT2>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT2>\n+ <OCR_RVCT3>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT3>\n+ <OCR_RVCT4>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x10000</Size>\n+ </OCR_RVCT4>\n+ <OCR_RVCT5>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT5>\n+ <OCR_RVCT6>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT6>\n+ <OCR_RVCT7>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT7>\n+ <OCR_RVCT8>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT8>\n+ <OCR_RVCT9>\n+ <Type>0</Type>\n+ <StartAddress>0x20000000</StartAddress>\n+ <Size>0x10000</Size>\n+ </OCR_RVCT9>\n+ <OCR_RVCT10>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT10>\n+ </OnChipMemories>\n+ <RvctStartVector></RvctStartVector>\n+ </ArmAdsMisc>\n+ <Cads>\n+ <interw>1</interw>\n+ <Optim>1</Optim>\n+ <oTime>0</oTime>\n+ <SplitLS>0</SplitLS>\n+ <OneElfS>1</OneElfS>\n+ <Strict>0</Strict>\n+ <EnumInt>0</EnumInt>\n+ <PlainCh>0</PlainCh>\n+ <Ropi>0</Ropi>\n+ <Rwpi>0</Rwpi>\n+ <wLevel>2</wLevel>\n+ <uThumb>0</uThumb>\n+ <uSurpInc>0</uSurpInc>\n+ <uC99>1</uC99>\n+ <useXO>0</useXO>\n+ <v6Lang>1</v6Lang>\n+ <v6LangP>1</v6LangP>\n+ <vShortEn>1</vShortEn>\n+ <vShortWch>1</vShortWch>\n+ <v6Lto>0</v6Lto>\n+ <v6WtE>0</v6WtE>\n+ <v6Rtti>0</v6Rtti>\n+ <VariousControls>\n+ <MiscControls></MiscControls>\n+ <Define></Define>\n+ <Undefine></Undefine>\n+ <IncludePath>..\\..\\..\\bsp\\boards;..\\..\\..\\bsp\\boards\\scum</IncludePath>\n+ </VariousControls>\n+ </Cads>\n+ <Aads>\n+ <interw>1</interw>\n+ <Ropi>0</Ropi>\n+ <Rwpi>0</Rwpi>\n+ <thumb>1</thumb>\n+ <SplitLS>0</SplitLS>\n+ <SwStkChk>0</SwStkChk>\n+ <NoWarn>0</NoWarn>\n+ <uSurpInc>0</uSurpInc>\n+ <useXO>0</useXO>\n+ <uClangAs>0</uClangAs>\n+ <VariousControls>\n+ <MiscControls></MiscControls>\n+ <Define></Define>\n+ <Undefine></Undefine>\n+ <IncludePath></IncludePath>\n+ </VariousControls>\n+ </Aads>\n+ <LDads>\n+ <umfTarg>1</umfTarg>\n+ <Ropi>0</Ropi>\n+ <Rwpi>0</Rwpi>\n+ <noStLib>0</noStLib>\n+ <RepFail>1</RepFail>\n+ <useFile>0</useFile>\n+ <TextAddressRange>0x00000000</TextAddressRange>\n+ <DataAddressRange>0x20000000</DataAddressRange>\n+ <pXoBase></pXoBase>\n+ <ScatterFile></ScatterFile>\n+ <IncludeLibs></IncludeLibs>\n+ <IncludeLibsPath></IncludeLibsPath>\n+ <Misc></Misc>\n+ <LinkerInputFile></LinkerInputFile>\n+ <DisabledWarnings></DisabledWarnings>\n+ </LDads>\n+ </TargetArmAds>\n+ </TargetOption>\n+ <Groups>\n+ <Group>\n+ <GroupName>application</GroupName>\n+ <Files>\n+ <File>\n+ <FileName>01bsp_sctimer.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\common\\01bsp_sctimer\\01bsp_sctimer.c</FilePath>\n+ </File>\n+ </Files>\n+ </Group>\n+ <Group>\n+ <GroupName>startUp</GroupName>\n+ <Files>\n+ <File>\n+ <FileName>cm0dsasm.s</FileName>\n+ <FileType>2</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\cm0dsasm.s</FilePath>\n+ </File>\n+ </Files>\n+ </Group>\n+ <Group>\n+ <GroupName>boards</GroupName>\n+ <Files>\n+ <File>\n+ <FileName>board.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\board.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>debugpins.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\debugpins.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>eui64.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\eui64.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>leds.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\leds.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>radio.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\radio.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>sctimer.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\sctimer.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>uart.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\uart.h</FilePath>\n+ </File>\n+ </Files>\n+ </Group>\n+ <Group>\n+ <GroupName>scum</GroupName>\n+ <Files>\n+ <File>\n+ <FileName>board.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\board.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>debugpins.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\debugpins.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>eui64.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\eui64.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>leds.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\leds.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>radio.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\radio.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>sctimer.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\sctimer.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>uart.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\uart.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>board_info.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\board_info.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>memory_map.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\memory_map.h</FilePath>\n+ </File>\n+ </Files>\n+ </Group>\n+ </Groups>\n+ </Target>\n+ </Targets>\n+\n+ <RTE>\n+ <apis/>\n+ <components/>\n+ <files/>\n+ </RTE>\n+\n+</Project>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726. add bsp_sctimer project.
|
491,595 |
23.11.2017 12:51:01
| -3,600 |
130fab03af42efc76860996a6b518b21245c45f6
|
FW-726/ update bsp_leds project.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/scum/01bsp_leds/01bsp_leds.uvprojx",
"new_path": "projects/scum/01bsp_leds/01bsp_leds.uvprojx",
"diff": "<TargetName>Target SCuM</TargetName>\n<ToolsetNumber>0x4</ToolsetNumber>\n<ToolsetName>ARM-ADS</ToolsetName>\n- <pCCUsed>5060183::V5.06 update 2 (build 183)::ARMCC</pCCUsed>\n+ <pCCUsed>5060528::V5.06 update 5 (build 528)::ARMCC</pCCUsed>\n+ <uAC6>0</uAC6>\n<TargetOption>\n<TargetCommonOption>\n<Device>ARMCM0</Device>\n<Vendor>ARM</Vendor>\n- <PackID>ARM.CMSIS.4.5.0</PackID>\n+ <PackID>ARM.CMSIS.5.0.1</PackID>\n<PackURL>http://www.keil.com/pack/</PackURL>\n<Cpu>IRAM(0x20000000,0x20000) IROM(0x00000000,0x40000) CPUTYPE(\"Cortex-M0\") CLOCK(12000000) ESEL ELITTLE</Cpu>\n<FlashUtilSpec></FlashUtilSpec>\n<OutputName>01bsp_leds</OutputName>\n<CreateExecutable>1</CreateExecutable>\n<CreateLib>0</CreateLib>\n- <CreateHexFile>0</CreateHexFile>\n+ <CreateHexFile>1</CreateHexFile>\n<DebugInformation>1</DebugInformation>\n<BrowseInformation>1</BrowseInformation>\n<ListingPath>.\\Listings\\</ListingPath>\n<HexFormatSelection>1</HexFormatSelection>\n<Merge32K>0</Merge32K>\n- <CreateBatchFile>0</CreateBatchFile>\n+ <CreateBatchFile>1</CreateBatchFile>\n<BeforeCompile>\n<RunUserProg1>0</RunUserProg1>\n<RunUserProg2>0</RunUserProg2>\n<vShortWch>1</vShortWch>\n<v6Lto>0</v6Lto>\n<v6WtE>0</v6WtE>\n+ <v6Rtti>0</v6Rtti>\n<VariousControls>\n<MiscControls></MiscControls>\n<Define></Define>\n<NoWarn>0</NoWarn>\n<uSurpInc>0</uSurpInc>\n<useXO>0</useXO>\n+ <uClangAs>0</uClangAs>\n<VariousControls>\n<MiscControls></MiscControls>\n<Define></Define>\n<FilePath>..\\..\\..\\bsp\\boards\\radio.h</FilePath>\n</File>\n<File>\n- <FileName>radiotimer.h</FileName>\n+ <FileName>uart.h</FileName>\n<FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\radiotimer.h</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\uart.h</FilePath>\n</File>\n<File>\n- <FileName>uart.h</FileName>\n+ <FileName>sctimer.h</FileName>\n<FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\uart.h</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\sctimer.h</FilePath>\n</File>\n</Files>\n</Group>\n<Group>\n<GroupName>scum</GroupName>\n<Files>\n- <File>\n- <FileName>cm0dsasm.s</FileName>\n- <FileType>2</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\cm0dsasm.s</FilePath>\n- </File>\n<File>\n<FileName>leds.c</FileName>\n<FileType>1</FileType>\n<FileType>1</FileType>\n<FilePath>..\\..\\..\\bsp\\boards\\scum\\board.c</FilePath>\n</File>\n+ <File>\n+ <FileName>debugpins.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\debugpins.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>eui64.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\eui64.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>radio.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\radio.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>sctimer.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\sctimer.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>uart.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\uart.c</FilePath>\n+ </File>\n+ </Files>\n+ </Group>\n+ <Group>\n+ <GroupName>startUp</GroupName>\n+ <Files>\n+ <File>\n+ <FileName>cm0dsasm.s</FileName>\n+ <FileType>2</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\cm0dsasm.s</FilePath>\n+ </File>\n</Files>\n</Group>\n</Groups>\n</Target>\n</Targets>\n+ <RTE>\n+ <apis/>\n+ <components/>\n+ <files/>\n+ </RTE>\n+\n</Project>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726/ update bsp_leds project.
|
491,595 |
23.11.2017 13:39:03
| -3,600 |
5c284097181e5b124dd9f483239a6089c9e5cdaa
|
update uart project.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/scum/01bsp_uart/01bsp_uart.uvprojx",
"new_path": "projects/scum/01bsp_uart/01bsp_uart.uvprojx",
"diff": "<TargetName>Target SCuM</TargetName>\n<ToolsetNumber>0x4</ToolsetNumber>\n<ToolsetName>ARM-ADS</ToolsetName>\n- <pCCUsed>5060183::V5.06 update 2 (build 183)::ARMCC</pCCUsed>\n+ <pCCUsed>5060528::V5.06 update 5 (build 528)::ARMCC</pCCUsed>\n+ <uAC6>0</uAC6>\n<TargetOption>\n<TargetCommonOption>\n<Device>ARMCM0</Device>\n<Vendor>ARM</Vendor>\n- <PackID>ARM.CMSIS.4.5.0</PackID>\n+ <PackID>ARM.CMSIS.5.0.1</PackID>\n<PackURL>http://www.keil.com/pack/</PackURL>\n<Cpu>IRAM(0x20000000,0x20000) IROM(0x00000000,0x40000) CPUTYPE(\"Cortex-M0\") CLOCK(12000000) ESEL ELITTLE</Cpu>\n<FlashUtilSpec></FlashUtilSpec>\n<OutputName>01bsp_uart</OutputName>\n<CreateExecutable>1</CreateExecutable>\n<CreateLib>0</CreateLib>\n- <CreateHexFile>0</CreateHexFile>\n+ <CreateHexFile>1</CreateHexFile>\n<DebugInformation>1</DebugInformation>\n<BrowseInformation>1</BrowseInformation>\n<ListingPath>.\\Listings\\</ListingPath>\n<HexFormatSelection>1</HexFormatSelection>\n<Merge32K>0</Merge32K>\n- <CreateBatchFile>0</CreateBatchFile>\n+ <CreateBatchFile>1</CreateBatchFile>\n<BeforeCompile>\n<RunUserProg1>0</RunUserProg1>\n<RunUserProg2>0</RunUserProg2>\n<vShortWch>1</vShortWch>\n<v6Lto>0</v6Lto>\n<v6WtE>0</v6WtE>\n+ <v6Rtti>0</v6Rtti>\n<VariousControls>\n<MiscControls></MiscControls>\n<Define></Define>\n<NoWarn>0</NoWarn>\n<uSurpInc>0</uSurpInc>\n<useXO>0</useXO>\n+ <uClangAs>0</uClangAs>\n<VariousControls>\n<MiscControls></MiscControls>\n<Define></Define>\n<FilePath>..\\..\\..\\bsp\\boards\\radio.h</FilePath>\n</File>\n<File>\n- <FileName>radiotimer.h</FileName>\n+ <FileName>uart.h</FileName>\n<FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\radiotimer.h</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\uart.h</FilePath>\n</File>\n<File>\n- <FileName>uart.h</FileName>\n+ <FileName>sctimer.h</FileName>\n<FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\uart.h</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\sctimer.h</FilePath>\n</File>\n</Files>\n</Group>\n<FilePath>..\\..\\..\\bsp\\boards\\scum\\uart.c</FilePath>\n</File>\n<File>\n- <FileName>bsp_timer.c</FileName>\n+ <FileName>sctimer.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\sctimer.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>radio.c</FileName>\n<FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\bsp_timer.c</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\radio.c</FilePath>\n</File>\n<File>\n- <FileName>radiotimer.c</FileName>\n+ <FileName>eui64.c</FileName>\n<FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\radiotimer.c</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\eui64.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>debugpins.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\debugpins.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>retarget.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\retarget.c</FilePath>\n</File>\n</Files>\n</Group>\n</Target>\n</Targets>\n+ <RTE>\n+ <apis/>\n+ <components/>\n+ <files/>\n+ </RTE>\n+\n</Project>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726. update uart project.
|
491,595 |
23.11.2017 20:57:24
| -3,600 |
9ddc90ffc30a95f066825606008bdede26e79640
|
update sctimer project.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/sctimer.c",
"new_path": "bsp/boards/scum/sctimer.c",
"diff": "typedef struct {\nsctimer_cbt sctimer_cb;\nPORT_TIMER_WIDTH last_compare_value;\n+ uint8_t noNeedClearFlag;\n} sctimer_vars_t;\nsctimer_vars_t sctimer_vars;\n@@ -58,14 +59,15 @@ void sctimer_setCompare(PORT_TIMER_WIDTH val){\n// the timer is already late, schedule the ISR right now manually\n// not sure how to do this in scum, just miss this ISR for now\n// don't clear the flag, so another interrupt will happen after exiting the ISR\n+ sctimer_vars.noNeedClearFlag = 1;\n} else {\nif (val-TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__COUNTER)<MINIMUM_COMPAREVALE_ADVANCE){\n// there is hardware limitation to schedule the timer within TIMERTHRESHOLD ticks\n// schedule ISR right now manually\n// don't clear the flag, so another interrupt will happen after exiting the ISR\n+ sctimer_vars.noNeedClearFlag = 1;\n} else {\n- // only clear the flag here\n- RFTIMER_REG__INT_CLEAR = RFTIMER_REG__INT_COMPARE0_INT;\n+ // mark clear the flag here\n// schedule the timer at val\nRFTIMER_REG__COMPARE0 = (PORT_TIMER_WIDTH)(TIMER_COUNTER_CONVERT_32K_TO_500K(val) & RFTIMER_MAX_COUNT);\nRFTIMER_REG__COMPARE0_CONTROL = RFTIMER_COMPARE_ENABLE | \\\n@@ -100,8 +102,12 @@ kick_scheduler_t sctimer_isr(void){\nif (sctimer_vars.sctimer_cb!=NULL) {\nsctimer_vars.sctimer_cb();\ndebugpins_isr_clr();\n+ if (sctimer_vars.noNeedClearFlag==0){\n+ RFTIMER_REG__INT_CLEAR = RFTIMER_REG__INT_COMPARE0_INT;\n+ }\nreturn KICK_SCHEDULER;\n}\ndebugpins_isr_clr();\n+ RFTIMER_REG__INT_CLEAR = RFTIMER_REG__INT_COMPARE0_INT;\nreturn DO_NOT_KICK_SCHEDULER;\n}\n\\ No newline at end of file\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726. update sctimer project.
|
491,595 |
23.11.2017 21:28:27
| -3,600 |
287e09ef033fd0493c0bdd2eb4227c0433db17c6
|
update opentimers project.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/sctimer.c",
"new_path": "bsp/boards/scum/sctimer.c",
"diff": "@@ -100,6 +100,7 @@ void sctimer_disable(void){\nkick_scheduler_t sctimer_isr(void){\ndebugpins_isr_set();\nif (sctimer_vars.sctimer_cb!=NULL) {\n+ sctimer_vars.noNeedClearFlag = 0;\nsctimer_vars.sctimer_cb();\ndebugpins_isr_clr();\nif (sctimer_vars.noNeedClearFlag==0){\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/scum/02drv_opentimers/02drv_opentimers.uvprojx",
"new_path": "projects/scum/02drv_opentimers/02drv_opentimers.uvprojx",
"diff": "<TargetName>Target SCuM</TargetName>\n<ToolsetNumber>0x4</ToolsetNumber>\n<ToolsetName>ARM-ADS</ToolsetName>\n- <pCCUsed>5060183::V5.06 update 2 (build 183)::ARMCC</pCCUsed>\n+ <pCCUsed>5060528::V5.06 update 5 (build 528)::ARMCC</pCCUsed>\n+ <uAC6>0</uAC6>\n<TargetOption>\n<TargetCommonOption>\n<Device>ARMCM0</Device>\n<Vendor>ARM</Vendor>\n- <PackID>ARM.CMSIS.4.5.0</PackID>\n+ <PackID>ARM.CMSIS.5.0.1</PackID>\n<PackURL>http://www.keil.com/pack/</PackURL>\n<Cpu>IRAM(0x20000000,0x20000) IROM(0x00000000,0x40000) CPUTYPE(\"Cortex-M0\") CLOCK(12000000) ESEL ELITTLE</Cpu>\n<FlashUtilSpec></FlashUtilSpec>\n<OutputName>02drv_opentimers</OutputName>\n<CreateExecutable>1</CreateExecutable>\n<CreateLib>0</CreateLib>\n- <CreateHexFile>0</CreateHexFile>\n+ <CreateHexFile>1</CreateHexFile>\n<DebugInformation>1</DebugInformation>\n<BrowseInformation>1</BrowseInformation>\n<ListingPath>.\\Listings\\</ListingPath>\n<vShortWch>1</vShortWch>\n<v6Lto>0</v6Lto>\n<v6WtE>0</v6WtE>\n+ <v6Rtti>0</v6Rtti>\n<VariousControls>\n<MiscControls>--gnu</MiscControls>\n<Define></Define>\n<NoWarn>0</NoWarn>\n<uSurpInc>0</uSurpInc>\n<useXO>0</useXO>\n+ <uClangAs>0</uClangAs>\n<VariousControls>\n<MiscControls></MiscControls>\n<Define></Define>\n<FileType>5</FileType>\n<FilePath>..\\..\\..\\bsp\\boards\\radio.h</FilePath>\n</File>\n- <File>\n- <FileName>radiotimer.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\radiotimer.h</FilePath>\n- </File>\n<File>\n<FileName>uart.h</FileName>\n<FileType>5</FileType>\n<FilePath>..\\..\\..\\bsp\\boards\\uart.h</FilePath>\n</File>\n<File>\n- <FileName>bsp_timer.h</FileName>\n+ <FileName>sctimer.h</FileName>\n<FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\bsp_timer.h</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\sctimer.h</FilePath>\n</File>\n</Files>\n</Group>\n<FileType>1</FileType>\n<FilePath>..\\..\\..\\bsp\\boards\\scum\\uart.c</FilePath>\n</File>\n- <File>\n- <FileName>bsp_timer.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\bsp_timer.c</FilePath>\n- </File>\n- <File>\n- <FileName>radiotimer.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\radiotimer.c</FilePath>\n- </File>\n<File>\n<FileName>debugpins.c</FileName>\n<FileType>1</FileType>\n<FileType>1</FileType>\n<FilePath>..\\..\\..\\bsp\\boards\\scum\\eui64.c</FilePath>\n</File>\n+ <File>\n+ <FileName>sctimer.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\sctimer.c</FilePath>\n+ </File>\n</Files>\n</Group>\n<Group>\n</Target>\n</Targets>\n+ <RTE>\n+ <apis/>\n+ <components/>\n+ <files/>\n+ </RTE>\n+\n</Project>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726. update opentimers project.
|
491,595 |
23.11.2017 21:32:23
| -3,600 |
7fe94de86689441198fd2f17bb01f76f6021e7fe
|
update openserial project.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/scum/02drv_openserial/02drv_openserial.uvprojx",
"new_path": "projects/scum/02drv_openserial/02drv_openserial.uvprojx",
"diff": "<TargetName>Target SCuM</TargetName>\n<ToolsetNumber>0x4</ToolsetNumber>\n<ToolsetName>ARM-ADS</ToolsetName>\n- <pCCUsed>5060183::V5.06 update 2 (build 183)::ARMCC</pCCUsed>\n+ <pCCUsed>5060528::V5.06 update 5 (build 528)::ARMCC</pCCUsed>\n+ <uAC6>0</uAC6>\n<TargetOption>\n<TargetCommonOption>\n<Device>ARMCM0</Device>\n<Vendor>ARM</Vendor>\n- <PackID>ARM.CMSIS.4.5.0</PackID>\n+ <PackID>ARM.CMSIS.5.0.1</PackID>\n<PackURL>http://www.keil.com/pack/</PackURL>\n<Cpu>IRAM(0x20000000,0x20000) IROM(0x00000000,0x40000) CPUTYPE(\"Cortex-M0\") CLOCK(12000000) ESEL ELITTLE</Cpu>\n<FlashUtilSpec></FlashUtilSpec>\n<OutputName>02drv_openserial</OutputName>\n<CreateExecutable>1</CreateExecutable>\n<CreateLib>0</CreateLib>\n- <CreateHexFile>0</CreateHexFile>\n+ <CreateHexFile>1</CreateHexFile>\n<DebugInformation>1</DebugInformation>\n<BrowseInformation>1</BrowseInformation>\n<ListingPath>.\\Listings\\</ListingPath>\n<vShortWch>1</vShortWch>\n<v6Lto>0</v6Lto>\n<v6WtE>0</v6WtE>\n+ <v6Rtti>0</v6Rtti>\n<VariousControls>\n<MiscControls>--gnu</MiscControls>\n<Define></Define>\n<NoWarn>0</NoWarn>\n<uSurpInc>0</uSurpInc>\n<useXO>0</useXO>\n+ <uClangAs>0</uClangAs>\n<VariousControls>\n<MiscControls></MiscControls>\n<Define></Define>\n<FileType>5</FileType>\n<FilePath>..\\..\\..\\bsp\\boards\\radio.h</FilePath>\n</File>\n- <File>\n- <FileName>radiotimer.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\radiotimer.h</FilePath>\n- </File>\n<File>\n<FileName>uart.h</FileName>\n<FileType>5</FileType>\n<FilePath>..\\..\\..\\bsp\\boards\\uart.h</FilePath>\n</File>\n<File>\n- <FileName>bsp_timer.h</FileName>\n+ <FileName>sctimer.h</FileName>\n<FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\bsp_timer.h</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\sctimer.h</FilePath>\n</File>\n</Files>\n</Group>\n<FilePath>..\\..\\..\\bsp\\boards\\scum\\uart.c</FilePath>\n</File>\n<File>\n- <FileName>bsp_timer.c</FileName>\n+ <FileName>debugpins.c</FileName>\n<FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\bsp_timer.c</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\debugpins.c</FilePath>\n</File>\n<File>\n- <FileName>radiotimer.c</FileName>\n+ <FileName>radio.c</FileName>\n<FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\radiotimer.c</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\radio.c</FilePath>\n</File>\n<File>\n- <FileName>debugpins.c</FileName>\n+ <FileName>sctimer.c</FileName>\n<FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\debugpins.c</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\sctimer.c</FilePath>\n</File>\n<File>\n- <FileName>radio.c</FileName>\n+ <FileName>eui64.c</FileName>\n<FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\radio.c</FilePath>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\eui64.c</FilePath>\n</File>\n</Files>\n</Group>\n</Target>\n</Targets>\n+ <RTE>\n+ <apis/>\n+ <components/>\n+ <files/>\n+ </RTE>\n+\n</Project>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726. update openserial project.
|
491,595 |
25.11.2017 15:56:27
| -3,600 |
4699c91891fe7a82a44b7565a3275adf44984090
|
remove bsp_timer and radiotimer project.
|
[
{
"change_type": "DELETE",
"old_path": "projects/scum/01bsp_bsp_timer/01bsp_bsp_timer.uvprojx",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n-<Project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"project_projx.xsd\">\n-\n- <SchemaVersion>2.1</SchemaVersion>\n-\n- <Header>### uVision Project, (C) Keil Software</Header>\n-\n- <Targets>\n- <Target>\n- <TargetName>Target SCuM</TargetName>\n- <ToolsetNumber>0x4</ToolsetNumber>\n- <ToolsetName>ARM-ADS</ToolsetName>\n- <pCCUsed>5060183::V5.06 update 2 (build 183)::ARMCC</pCCUsed>\n- <TargetOption>\n- <TargetCommonOption>\n- <Device>ARMCM0</Device>\n- <Vendor>ARM</Vendor>\n- <PackID>ARM.CMSIS.4.5.0</PackID>\n- <PackURL>http://www.keil.com/pack/</PackURL>\n- <Cpu>IRAM(0x20000000,0x20000) IROM(0x00000000,0x40000) CPUTYPE(\"Cortex-M0\") CLOCK(12000000) ESEL ELITTLE</Cpu>\n- <FlashUtilSpec></FlashUtilSpec>\n- <StartupFile></StartupFile>\n- <FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0NEW_DEVICE -FS00 -FL040000 -FP0($$Device:ARMCM0$Device\\ARM\\Flash\\NEW_DEVICE.FLM))</FlashDriverDll>\n- <DeviceId>0</DeviceId>\n- <RegisterFile>$$Device:ARMCM0$Device\\ARM\\ARMCM0\\Include\\ARMCM0.h</RegisterFile>\n- <MemoryEnv></MemoryEnv>\n- <Cmp></Cmp>\n- <Asm></Asm>\n- <Linker></Linker>\n- <OHString></OHString>\n- <InfinionOptionDll></InfinionOptionDll>\n- <SLE66CMisc></SLE66CMisc>\n- <SLE66AMisc></SLE66AMisc>\n- <SLE66LinkerMisc></SLE66LinkerMisc>\n- <SFDFile>$$Device:ARMCM0$Device\\ARM\\SVD\\ARMCM0.svd</SFDFile>\n- <bCustSvd>0</bCustSvd>\n- <UseEnv>0</UseEnv>\n- <BinPath></BinPath>\n- <IncludePath></IncludePath>\n- <LibPath></LibPath>\n- <RegisterFilePath></RegisterFilePath>\n- <DBRegisterFilePath></DBRegisterFilePath>\n- <TargetStatus>\n- <Error>0</Error>\n- <ExitCodeStop>0</ExitCodeStop>\n- <ButtonStop>0</ButtonStop>\n- <NotGenerated>0</NotGenerated>\n- <InvalidFlash>1</InvalidFlash>\n- </TargetStatus>\n- <OutputDirectory>.\\Objects\\</OutputDirectory>\n- <OutputName>01bsp_bsp_timer</OutputName>\n- <CreateExecutable>1</CreateExecutable>\n- <CreateLib>0</CreateLib>\n- <CreateHexFile>0</CreateHexFile>\n- <DebugInformation>1</DebugInformation>\n- <BrowseInformation>1</BrowseInformation>\n- <ListingPath>.\\Listings\\</ListingPath>\n- <HexFormatSelection>1</HexFormatSelection>\n- <Merge32K>0</Merge32K>\n- <CreateBatchFile>0</CreateBatchFile>\n- <BeforeCompile>\n- <RunUserProg1>0</RunUserProg1>\n- <RunUserProg2>0</RunUserProg2>\n- <UserProg1Name></UserProg1Name>\n- <UserProg2Name></UserProg2Name>\n- <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n- <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n- <nStopU1X>0</nStopU1X>\n- <nStopU2X>0</nStopU2X>\n- </BeforeCompile>\n- <BeforeMake>\n- <RunUserProg1>0</RunUserProg1>\n- <RunUserProg2>0</RunUserProg2>\n- <UserProg1Name></UserProg1Name>\n- <UserProg2Name></UserProg2Name>\n- <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n- <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n- <nStopB1X>0</nStopB1X>\n- <nStopB2X>0</nStopB2X>\n- </BeforeMake>\n- <AfterMake>\n- <RunUserProg1>1</RunUserProg1>\n- <RunUserProg2>1</RunUserProg2>\n- <UserProg1Name>fromelf --bin .\\Objects\\01bsp_bsp_timer.axf -o .\\Objects\\01bsp_bsp_timer.bin</UserProg1Name>\n- <UserProg2Name>fromelf -cvf .\\Objects\\01bsp_bsp_timer.axf -o .\\Objects\\disasm.txt</UserProg2Name>\n- <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n- <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n- <nStopA1X>0</nStopA1X>\n- <nStopA2X>0</nStopA2X>\n- </AfterMake>\n- <SelectedForBatchBuild>0</SelectedForBatchBuild>\n- <SVCSIdString></SVCSIdString>\n- </TargetCommonOption>\n- <CommonProperty>\n- <UseCPPCompiler>0</UseCPPCompiler>\n- <RVCTCodeConst>0</RVCTCodeConst>\n- <RVCTZI>0</RVCTZI>\n- <RVCTOtherData>0</RVCTOtherData>\n- <ModuleSelection>0</ModuleSelection>\n- <IncludeInBuild>1</IncludeInBuild>\n- <AlwaysBuild>0</AlwaysBuild>\n- <GenerateAssemblyFile>0</GenerateAssemblyFile>\n- <AssembleAssemblyFile>0</AssembleAssemblyFile>\n- <PublicsOnly>0</PublicsOnly>\n- <StopOnExitCode>3</StopOnExitCode>\n- <CustomArgument></CustomArgument>\n- <IncludeLibraryModules></IncludeLibraryModules>\n- <ComprImg>1</ComprImg>\n- </CommonProperty>\n- <DllOption>\n- <SimDllName>SARMCM3.DLL</SimDllName>\n- <SimDllArguments> </SimDllArguments>\n- <SimDlgDll>DARMCM1.DLL</SimDlgDll>\n- <SimDlgDllArguments>-pCM0</SimDlgDllArguments>\n- <TargetDllName>SARMCM3.DLL</TargetDllName>\n- <TargetDllArguments> </TargetDllArguments>\n- <TargetDlgDll>TARMCM1.DLL</TargetDlgDll>\n- <TargetDlgDllArguments>-pCM0</TargetDlgDllArguments>\n- </DllOption>\n- <DebugOption>\n- <OPTHX>\n- <HexSelection>1</HexSelection>\n- <HexRangeLowAddress>0</HexRangeLowAddress>\n- <HexRangeHighAddress>0</HexRangeHighAddress>\n- <HexOffset>0</HexOffset>\n- <Oh166RecLen>16</Oh166RecLen>\n- </OPTHX>\n- </DebugOption>\n- <Utilities>\n- <Flash1>\n- <UseTargetDll>1</UseTargetDll>\n- <UseExternalTool>0</UseExternalTool>\n- <RunIndependent>0</RunIndependent>\n- <UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>\n- <Capability>1</Capability>\n- <DriverSelection>4096</DriverSelection>\n- </Flash1>\n- <bUseTDR>1</bUseTDR>\n- <Flash2>BIN\\UL2CM3.DLL</Flash2>\n- <Flash3>\"\" ()</Flash3>\n- <Flash4></Flash4>\n- <pFcarmOut></pFcarmOut>\n- <pFcarmGrp></pFcarmGrp>\n- <pFcArmRoot></pFcArmRoot>\n- <FcArmLst>0</FcArmLst>\n- </Utilities>\n- <TargetArmAds>\n- <ArmAdsMisc>\n- <GenerateListings>0</GenerateListings>\n- <asHll>1</asHll>\n- <asAsm>1</asAsm>\n- <asMacX>1</asMacX>\n- <asSyms>1</asSyms>\n- <asFals>1</asFals>\n- <asDbgD>1</asDbgD>\n- <asForm>1</asForm>\n- <ldLst>0</ldLst>\n- <ldmm>1</ldmm>\n- <ldXref>1</ldXref>\n- <BigEnd>0</BigEnd>\n- <AdsALst>1</AdsALst>\n- <AdsACrf>1</AdsACrf>\n- <AdsANop>0</AdsANop>\n- <AdsANot>0</AdsANot>\n- <AdsLLst>1</AdsLLst>\n- <AdsLmap>1</AdsLmap>\n- <AdsLcgr>1</AdsLcgr>\n- <AdsLsym>1</AdsLsym>\n- <AdsLszi>1</AdsLszi>\n- <AdsLtoi>1</AdsLtoi>\n- <AdsLsun>1</AdsLsun>\n- <AdsLven>1</AdsLven>\n- <AdsLsxf>1</AdsLsxf>\n- <RvctClst>0</RvctClst>\n- <GenPPlst>0</GenPPlst>\n- <AdsCpuType>\"Cortex-M0\"</AdsCpuType>\n- <RvctDeviceName></RvctDeviceName>\n- <mOS>0</mOS>\n- <uocRom>0</uocRom>\n- <uocRam>0</uocRam>\n- <hadIROM>1</hadIROM>\n- <hadIRAM>1</hadIRAM>\n- <hadXRAM>0</hadXRAM>\n- <uocXRam>0</uocXRam>\n- <RvdsVP>0</RvdsVP>\n- <hadIRAM2>0</hadIRAM2>\n- <hadIROM2>0</hadIROM2>\n- <StupSel>8</StupSel>\n- <useUlib>0</useUlib>\n- <EndSel>1</EndSel>\n- <uLtcg>0</uLtcg>\n- <nSecure>0</nSecure>\n- <RoSelD>3</RoSelD>\n- <RwSelD>3</RwSelD>\n- <CodeSel>0</CodeSel>\n- <OptFeed>0</OptFeed>\n- <NoZi1>0</NoZi1>\n- <NoZi2>0</NoZi2>\n- <NoZi3>0</NoZi3>\n- <NoZi4>0</NoZi4>\n- <NoZi5>0</NoZi5>\n- <Ro1Chk>0</Ro1Chk>\n- <Ro2Chk>0</Ro2Chk>\n- <Ro3Chk>0</Ro3Chk>\n- <Ir1Chk>1</Ir1Chk>\n- <Ir2Chk>0</Ir2Chk>\n- <Ra1Chk>0</Ra1Chk>\n- <Ra2Chk>0</Ra2Chk>\n- <Ra3Chk>0</Ra3Chk>\n- <Im1Chk>1</Im1Chk>\n- <Im2Chk>0</Im2Chk>\n- <OnChipMemories>\n- <Ocm1>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm1>\n- <Ocm2>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm2>\n- <Ocm3>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm3>\n- <Ocm4>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm4>\n- <Ocm5>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm5>\n- <Ocm6>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm6>\n- <IRAM>\n- <Type>0</Type>\n- <StartAddress>0x20000000</StartAddress>\n- <Size>0x20000</Size>\n- </IRAM>\n- <IROM>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x40000</Size>\n- </IROM>\n- <XRAM>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </XRAM>\n- <OCR_RVCT1>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT1>\n- <OCR_RVCT2>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT2>\n- <OCR_RVCT3>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT3>\n- <OCR_RVCT4>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x10000</Size>\n- </OCR_RVCT4>\n- <OCR_RVCT5>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT5>\n- <OCR_RVCT6>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT6>\n- <OCR_RVCT7>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT7>\n- <OCR_RVCT8>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT8>\n- <OCR_RVCT9>\n- <Type>0</Type>\n- <StartAddress>0x20000000</StartAddress>\n- <Size>0x10000</Size>\n- </OCR_RVCT9>\n- <OCR_RVCT10>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT10>\n- </OnChipMemories>\n- <RvctStartVector></RvctStartVector>\n- </ArmAdsMisc>\n- <Cads>\n- <interw>1</interw>\n- <Optim>1</Optim>\n- <oTime>0</oTime>\n- <SplitLS>0</SplitLS>\n- <OneElfS>1</OneElfS>\n- <Strict>0</Strict>\n- <EnumInt>0</EnumInt>\n- <PlainCh>0</PlainCh>\n- <Ropi>0</Ropi>\n- <Rwpi>0</Rwpi>\n- <wLevel>2</wLevel>\n- <uThumb>0</uThumb>\n- <uSurpInc>0</uSurpInc>\n- <uC99>0</uC99>\n- <useXO>0</useXO>\n- <v6Lang>1</v6Lang>\n- <v6LangP>1</v6LangP>\n- <vShortEn>1</vShortEn>\n- <vShortWch>1</vShortWch>\n- <v6Lto>0</v6Lto>\n- <v6WtE>0</v6WtE>\n- <VariousControls>\n- <MiscControls></MiscControls>\n- <Define></Define>\n- <Undefine></Undefine>\n- <IncludePath>..\\..\\..\\bsp\\boards;..\\..\\..\\bsp\\boards\\scum</IncludePath>\n- </VariousControls>\n- </Cads>\n- <Aads>\n- <interw>1</interw>\n- <Ropi>0</Ropi>\n- <Rwpi>0</Rwpi>\n- <thumb>1</thumb>\n- <SplitLS>0</SplitLS>\n- <SwStkChk>0</SwStkChk>\n- <NoWarn>0</NoWarn>\n- <uSurpInc>0</uSurpInc>\n- <useXO>0</useXO>\n- <VariousControls>\n- <MiscControls></MiscControls>\n- <Define></Define>\n- <Undefine></Undefine>\n- <IncludePath></IncludePath>\n- </VariousControls>\n- </Aads>\n- <LDads>\n- <umfTarg>1</umfTarg>\n- <Ropi>0</Ropi>\n- <Rwpi>0</Rwpi>\n- <noStLib>0</noStLib>\n- <RepFail>1</RepFail>\n- <useFile>0</useFile>\n- <TextAddressRange>0x00000000</TextAddressRange>\n- <DataAddressRange>0x20000000</DataAddressRange>\n- <pXoBase></pXoBase>\n- <ScatterFile></ScatterFile>\n- <IncludeLibs></IncludeLibs>\n- <IncludeLibsPath></IncludeLibsPath>\n- <Misc></Misc>\n- <LinkerInputFile></LinkerInputFile>\n- <DisabledWarnings></DisabledWarnings>\n- </LDads>\n- </TargetArmAds>\n- </TargetOption>\n- <Groups>\n- <Group>\n- <GroupName>application</GroupName>\n- <Files>\n- <File>\n- <FileName>01bsp_bsp_timer.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\common\\01bsp_bsp_timer\\01bsp_bsp_timer.c</FilePath>\n- </File>\n- </Files>\n- </Group>\n- <Group>\n- <GroupName>startUp</GroupName>\n- <Files>\n- <File>\n- <FileName>cm0dsasm.s</FileName>\n- <FileType>2</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\cm0dsasm.s</FilePath>\n- </File>\n- </Files>\n- </Group>\n- <Group>\n- <GroupName>boards</GroupName>\n- <Files>\n- <File>\n- <FileName>board.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\board.h</FilePath>\n- </File>\n- <File>\n- <FileName>debugpins.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\debugpins.h</FilePath>\n- </File>\n- <File>\n- <FileName>eui64.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\eui64.h</FilePath>\n- </File>\n- <File>\n- <FileName>leds.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\leds.h</FilePath>\n- </File>\n- <File>\n- <FileName>radio.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\radio.h</FilePath>\n- </File>\n- <File>\n- <FileName>radiotimer.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\radiotimer.h</FilePath>\n- </File>\n- <File>\n- <FileName>uart.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\uart.h</FilePath>\n- </File>\n- <File>\n- <FileName>bsp_timer.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\bsp_timer.h</FilePath>\n- </File>\n- </Files>\n- </Group>\n- <Group>\n- <GroupName>scum</GroupName>\n- <Files>\n- <File>\n- <FileName>leds.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\leds.c</FilePath>\n- </File>\n- <File>\n- <FileName>memory_map.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\memory_map.h</FilePath>\n- </File>\n- <File>\n- <FileName>board_info.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\board_info.h</FilePath>\n- </File>\n- <File>\n- <FileName>board.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\board.c</FilePath>\n- </File>\n- <File>\n- <FileName>uart.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\uart.c</FilePath>\n- </File>\n- <File>\n- <FileName>bsp_timer.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\bsp_timer.c</FilePath>\n- </File>\n- <File>\n- <FileName>radiotimer.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\radiotimer.c</FilePath>\n- </File>\n- <File>\n- <FileName>debugpins.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\debugpins.c</FilePath>\n- </File>\n- <File>\n- <FileName>radio.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\radio.c</FilePath>\n- </File>\n- </Files>\n- </Group>\n- </Groups>\n- </Target>\n- </Targets>\n-\n-</Project>\n"
},
{
"change_type": "DELETE",
"old_path": "projects/scum/01bsp_radiotimer/01bsp_radiotimer.uvprojx",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n-<Project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"project_projx.xsd\">\n-\n- <SchemaVersion>2.1</SchemaVersion>\n-\n- <Header>### uVision Project, (C) Keil Software</Header>\n-\n- <Targets>\n- <Target>\n- <TargetName>Target SCuM</TargetName>\n- <ToolsetNumber>0x4</ToolsetNumber>\n- <ToolsetName>ARM-ADS</ToolsetName>\n- <pCCUsed>5060183::V5.06 update 2 (build 183)::ARMCC</pCCUsed>\n- <TargetOption>\n- <TargetCommonOption>\n- <Device>ARMCM0</Device>\n- <Vendor>ARM</Vendor>\n- <PackID>ARM.CMSIS.4.5.0</PackID>\n- <PackURL>http://www.keil.com/pack/</PackURL>\n- <Cpu>IRAM(0x20000000,0x20000) IROM(0x00000000,0x40000) CPUTYPE(\"Cortex-M0\") CLOCK(12000000) ESEL ELITTLE</Cpu>\n- <FlashUtilSpec></FlashUtilSpec>\n- <StartupFile></StartupFile>\n- <FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0NEW_DEVICE -FS00 -FL040000 -FP0($$Device:ARMCM0$Device\\ARM\\Flash\\NEW_DEVICE.FLM))</FlashDriverDll>\n- <DeviceId>0</DeviceId>\n- <RegisterFile>$$Device:ARMCM0$Device\\ARM\\ARMCM0\\Include\\ARMCM0.h</RegisterFile>\n- <MemoryEnv></MemoryEnv>\n- <Cmp></Cmp>\n- <Asm></Asm>\n- <Linker></Linker>\n- <OHString></OHString>\n- <InfinionOptionDll></InfinionOptionDll>\n- <SLE66CMisc></SLE66CMisc>\n- <SLE66AMisc></SLE66AMisc>\n- <SLE66LinkerMisc></SLE66LinkerMisc>\n- <SFDFile>$$Device:ARMCM0$Device\\ARM\\SVD\\ARMCM0.svd</SFDFile>\n- <bCustSvd>0</bCustSvd>\n- <UseEnv>0</UseEnv>\n- <BinPath></BinPath>\n- <IncludePath></IncludePath>\n- <LibPath></LibPath>\n- <RegisterFilePath></RegisterFilePath>\n- <DBRegisterFilePath></DBRegisterFilePath>\n- <TargetStatus>\n- <Error>0</Error>\n- <ExitCodeStop>0</ExitCodeStop>\n- <ButtonStop>0</ButtonStop>\n- <NotGenerated>0</NotGenerated>\n- <InvalidFlash>1</InvalidFlash>\n- </TargetStatus>\n- <OutputDirectory>.\\Objects\\</OutputDirectory>\n- <OutputName>01bsp_radiotimer</OutputName>\n- <CreateExecutable>1</CreateExecutable>\n- <CreateLib>0</CreateLib>\n- <CreateHexFile>0</CreateHexFile>\n- <DebugInformation>1</DebugInformation>\n- <BrowseInformation>1</BrowseInformation>\n- <ListingPath>.\\Listings\\</ListingPath>\n- <HexFormatSelection>1</HexFormatSelection>\n- <Merge32K>0</Merge32K>\n- <CreateBatchFile>0</CreateBatchFile>\n- <BeforeCompile>\n- <RunUserProg1>0</RunUserProg1>\n- <RunUserProg2>0</RunUserProg2>\n- <UserProg1Name></UserProg1Name>\n- <UserProg2Name></UserProg2Name>\n- <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n- <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n- <nStopU1X>0</nStopU1X>\n- <nStopU2X>0</nStopU2X>\n- </BeforeCompile>\n- <BeforeMake>\n- <RunUserProg1>0</RunUserProg1>\n- <RunUserProg2>0</RunUserProg2>\n- <UserProg1Name></UserProg1Name>\n- <UserProg2Name></UserProg2Name>\n- <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n- <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n- <nStopB1X>0</nStopB1X>\n- <nStopB2X>0</nStopB2X>\n- </BeforeMake>\n- <AfterMake>\n- <RunUserProg1>1</RunUserProg1>\n- <RunUserProg2>1</RunUserProg2>\n- <UserProg1Name>fromelf --bin .\\Objects\\01bsp_radiotimer.axf -o .\\Objects\\01bsp_radiotimer.bin</UserProg1Name>\n- <UserProg2Name>fromelf -cvf .\\Objects\\01bsp_radiotimer.axf -o .\\Objects\\disasm.txt</UserProg2Name>\n- <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n- <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n- <nStopA1X>0</nStopA1X>\n- <nStopA2X>0</nStopA2X>\n- </AfterMake>\n- <SelectedForBatchBuild>0</SelectedForBatchBuild>\n- <SVCSIdString></SVCSIdString>\n- </TargetCommonOption>\n- <CommonProperty>\n- <UseCPPCompiler>0</UseCPPCompiler>\n- <RVCTCodeConst>0</RVCTCodeConst>\n- <RVCTZI>0</RVCTZI>\n- <RVCTOtherData>0</RVCTOtherData>\n- <ModuleSelection>0</ModuleSelection>\n- <IncludeInBuild>1</IncludeInBuild>\n- <AlwaysBuild>0</AlwaysBuild>\n- <GenerateAssemblyFile>0</GenerateAssemblyFile>\n- <AssembleAssemblyFile>0</AssembleAssemblyFile>\n- <PublicsOnly>0</PublicsOnly>\n- <StopOnExitCode>3</StopOnExitCode>\n- <CustomArgument></CustomArgument>\n- <IncludeLibraryModules></IncludeLibraryModules>\n- <ComprImg>1</ComprImg>\n- </CommonProperty>\n- <DllOption>\n- <SimDllName>SARMCM3.DLL</SimDllName>\n- <SimDllArguments> </SimDllArguments>\n- <SimDlgDll>DARMCM1.DLL</SimDlgDll>\n- <SimDlgDllArguments>-pCM0</SimDlgDllArguments>\n- <TargetDllName>SARMCM3.DLL</TargetDllName>\n- <TargetDllArguments> </TargetDllArguments>\n- <TargetDlgDll>TARMCM1.DLL</TargetDlgDll>\n- <TargetDlgDllArguments>-pCM0</TargetDlgDllArguments>\n- </DllOption>\n- <DebugOption>\n- <OPTHX>\n- <HexSelection>1</HexSelection>\n- <HexRangeLowAddress>0</HexRangeLowAddress>\n- <HexRangeHighAddress>0</HexRangeHighAddress>\n- <HexOffset>0</HexOffset>\n- <Oh166RecLen>16</Oh166RecLen>\n- </OPTHX>\n- </DebugOption>\n- <Utilities>\n- <Flash1>\n- <UseTargetDll>1</UseTargetDll>\n- <UseExternalTool>0</UseExternalTool>\n- <RunIndependent>0</RunIndependent>\n- <UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>\n- <Capability>1</Capability>\n- <DriverSelection>4096</DriverSelection>\n- </Flash1>\n- <bUseTDR>1</bUseTDR>\n- <Flash2>BIN\\UL2CM3.DLL</Flash2>\n- <Flash3>\"\" ()</Flash3>\n- <Flash4></Flash4>\n- <pFcarmOut></pFcarmOut>\n- <pFcarmGrp></pFcarmGrp>\n- <pFcArmRoot></pFcArmRoot>\n- <FcArmLst>0</FcArmLst>\n- </Utilities>\n- <TargetArmAds>\n- <ArmAdsMisc>\n- <GenerateListings>0</GenerateListings>\n- <asHll>1</asHll>\n- <asAsm>1</asAsm>\n- <asMacX>1</asMacX>\n- <asSyms>1</asSyms>\n- <asFals>1</asFals>\n- <asDbgD>1</asDbgD>\n- <asForm>1</asForm>\n- <ldLst>0</ldLst>\n- <ldmm>1</ldmm>\n- <ldXref>1</ldXref>\n- <BigEnd>0</BigEnd>\n- <AdsALst>1</AdsALst>\n- <AdsACrf>1</AdsACrf>\n- <AdsANop>0</AdsANop>\n- <AdsANot>0</AdsANot>\n- <AdsLLst>1</AdsLLst>\n- <AdsLmap>1</AdsLmap>\n- <AdsLcgr>1</AdsLcgr>\n- <AdsLsym>1</AdsLsym>\n- <AdsLszi>1</AdsLszi>\n- <AdsLtoi>1</AdsLtoi>\n- <AdsLsun>1</AdsLsun>\n- <AdsLven>1</AdsLven>\n- <AdsLsxf>1</AdsLsxf>\n- <RvctClst>0</RvctClst>\n- <GenPPlst>0</GenPPlst>\n- <AdsCpuType>\"Cortex-M0\"</AdsCpuType>\n- <RvctDeviceName></RvctDeviceName>\n- <mOS>0</mOS>\n- <uocRom>0</uocRom>\n- <uocRam>0</uocRam>\n- <hadIROM>1</hadIROM>\n- <hadIRAM>1</hadIRAM>\n- <hadXRAM>0</hadXRAM>\n- <uocXRam>0</uocXRam>\n- <RvdsVP>0</RvdsVP>\n- <hadIRAM2>0</hadIRAM2>\n- <hadIROM2>0</hadIROM2>\n- <StupSel>8</StupSel>\n- <useUlib>0</useUlib>\n- <EndSel>1</EndSel>\n- <uLtcg>0</uLtcg>\n- <nSecure>0</nSecure>\n- <RoSelD>3</RoSelD>\n- <RwSelD>3</RwSelD>\n- <CodeSel>0</CodeSel>\n- <OptFeed>0</OptFeed>\n- <NoZi1>0</NoZi1>\n- <NoZi2>0</NoZi2>\n- <NoZi3>0</NoZi3>\n- <NoZi4>0</NoZi4>\n- <NoZi5>0</NoZi5>\n- <Ro1Chk>0</Ro1Chk>\n- <Ro2Chk>0</Ro2Chk>\n- <Ro3Chk>0</Ro3Chk>\n- <Ir1Chk>1</Ir1Chk>\n- <Ir2Chk>0</Ir2Chk>\n- <Ra1Chk>0</Ra1Chk>\n- <Ra2Chk>0</Ra2Chk>\n- <Ra3Chk>0</Ra3Chk>\n- <Im1Chk>1</Im1Chk>\n- <Im2Chk>0</Im2Chk>\n- <OnChipMemories>\n- <Ocm1>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm1>\n- <Ocm2>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm2>\n- <Ocm3>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm3>\n- <Ocm4>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm4>\n- <Ocm5>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm5>\n- <Ocm6>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </Ocm6>\n- <IRAM>\n- <Type>0</Type>\n- <StartAddress>0x20000000</StartAddress>\n- <Size>0x20000</Size>\n- </IRAM>\n- <IROM>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x40000</Size>\n- </IROM>\n- <XRAM>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </XRAM>\n- <OCR_RVCT1>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT1>\n- <OCR_RVCT2>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT2>\n- <OCR_RVCT3>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT3>\n- <OCR_RVCT4>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x10000</Size>\n- </OCR_RVCT4>\n- <OCR_RVCT5>\n- <Type>1</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT5>\n- <OCR_RVCT6>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT6>\n- <OCR_RVCT7>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT7>\n- <OCR_RVCT8>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT8>\n- <OCR_RVCT9>\n- <Type>0</Type>\n- <StartAddress>0x20000000</StartAddress>\n- <Size>0x10000</Size>\n- </OCR_RVCT9>\n- <OCR_RVCT10>\n- <Type>0</Type>\n- <StartAddress>0x0</StartAddress>\n- <Size>0x0</Size>\n- </OCR_RVCT10>\n- </OnChipMemories>\n- <RvctStartVector></RvctStartVector>\n- </ArmAdsMisc>\n- <Cads>\n- <interw>1</interw>\n- <Optim>1</Optim>\n- <oTime>0</oTime>\n- <SplitLS>0</SplitLS>\n- <OneElfS>1</OneElfS>\n- <Strict>0</Strict>\n- <EnumInt>0</EnumInt>\n- <PlainCh>0</PlainCh>\n- <Ropi>0</Ropi>\n- <Rwpi>0</Rwpi>\n- <wLevel>2</wLevel>\n- <uThumb>0</uThumb>\n- <uSurpInc>0</uSurpInc>\n- <uC99>0</uC99>\n- <useXO>0</useXO>\n- <v6Lang>1</v6Lang>\n- <v6LangP>1</v6LangP>\n- <vShortEn>1</vShortEn>\n- <vShortWch>1</vShortWch>\n- <v6Lto>0</v6Lto>\n- <v6WtE>0</v6WtE>\n- <VariousControls>\n- <MiscControls></MiscControls>\n- <Define></Define>\n- <Undefine></Undefine>\n- <IncludePath>..\\..\\..\\bsp\\boards;..\\..\\..\\bsp\\boards\\scum</IncludePath>\n- </VariousControls>\n- </Cads>\n- <Aads>\n- <interw>1</interw>\n- <Ropi>0</Ropi>\n- <Rwpi>0</Rwpi>\n- <thumb>1</thumb>\n- <SplitLS>0</SplitLS>\n- <SwStkChk>0</SwStkChk>\n- <NoWarn>0</NoWarn>\n- <uSurpInc>0</uSurpInc>\n- <useXO>0</useXO>\n- <VariousControls>\n- <MiscControls></MiscControls>\n- <Define></Define>\n- <Undefine></Undefine>\n- <IncludePath></IncludePath>\n- </VariousControls>\n- </Aads>\n- <LDads>\n- <umfTarg>1</umfTarg>\n- <Ropi>0</Ropi>\n- <Rwpi>0</Rwpi>\n- <noStLib>0</noStLib>\n- <RepFail>1</RepFail>\n- <useFile>0</useFile>\n- <TextAddressRange>0x00000000</TextAddressRange>\n- <DataAddressRange>0x20000000</DataAddressRange>\n- <pXoBase></pXoBase>\n- <ScatterFile></ScatterFile>\n- <IncludeLibs></IncludeLibs>\n- <IncludeLibsPath></IncludeLibsPath>\n- <Misc></Misc>\n- <LinkerInputFile></LinkerInputFile>\n- <DisabledWarnings></DisabledWarnings>\n- </LDads>\n- </TargetArmAds>\n- </TargetOption>\n- <Groups>\n- <Group>\n- <GroupName>application</GroupName>\n- <Files>\n- <File>\n- <FileName>01bsp_radiotimer.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\common\\01bsp_radiotimer\\01bsp_radiotimer.c</FilePath>\n- </File>\n- </Files>\n- </Group>\n- <Group>\n- <GroupName>startUp</GroupName>\n- <Files>\n- <File>\n- <FileName>cm0dsasm.s</FileName>\n- <FileType>2</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\cm0dsasm.s</FilePath>\n- </File>\n- </Files>\n- </Group>\n- <Group>\n- <GroupName>boards</GroupName>\n- <Files>\n- <File>\n- <FileName>board.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\board.h</FilePath>\n- </File>\n- <File>\n- <FileName>debugpins.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\debugpins.h</FilePath>\n- </File>\n- <File>\n- <FileName>eui64.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\eui64.h</FilePath>\n- </File>\n- <File>\n- <FileName>leds.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\leds.h</FilePath>\n- </File>\n- <File>\n- <FileName>radio.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\radio.h</FilePath>\n- </File>\n- <File>\n- <FileName>radiotimer.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\radiotimer.h</FilePath>\n- </File>\n- <File>\n- <FileName>uart.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\uart.h</FilePath>\n- </File>\n- </Files>\n- </Group>\n- <Group>\n- <GroupName>scum</GroupName>\n- <Files>\n- <File>\n- <FileName>leds.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\leds.c</FilePath>\n- </File>\n- <File>\n- <FileName>memory_map.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\memory_map.h</FilePath>\n- </File>\n- <File>\n- <FileName>board_info.h</FileName>\n- <FileType>5</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\board_info.h</FilePath>\n- </File>\n- <File>\n- <FileName>board.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\board.c</FilePath>\n- </File>\n- <File>\n- <FileName>uart.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\uart.c</FilePath>\n- </File>\n- <File>\n- <FileName>bsp_timer.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\bsp_timer.c</FilePath>\n- </File>\n- <File>\n- <FileName>radiotimer.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\radiotimer.c</FilePath>\n- </File>\n- <File>\n- <FileName>debugpins.c</FileName>\n- <FileType>1</FileType>\n- <FilePath>..\\..\\..\\bsp\\boards\\scum\\debugpins.c</FilePath>\n- </File>\n- </Files>\n- </Group>\n- </Groups>\n- </Target>\n- </Targets>\n-\n-</Project>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726. remove bsp_timer and radiotimer project.
|
491,595 |
26.11.2017 16:25:53
| -3,600 |
f2b8c3a79da9103ef64968541a447a0bbe02bcb6
|
fix wrong state changes.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -1129,10 +1129,6 @@ port_INLINE void activity_ti2() {\nieee154e_vars.radioOnThisSlot=TRUE;\n// change state\nchangeState(S_TXDATAREADY);\n-#ifdef SLOT_FSM_IMPLEMENTATION_MULTIPLE_TIMER_INTERRUPT\n- // update state in advance\n- changeState(S_TXDATADELAY);\n-#endif\n}\nport_INLINE void activity_tie1() {\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726. fix wrong state changes.
|
491,595 |
26.11.2017 19:08:10
| -3,600 |
dc52f81104791f80e487cdae3c3fa44281ac5917
|
add bsp_multipletimer_radio project.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "projects/scum/01bsp_multipletimer_radio/01bsp_multipletimer_radio.uvprojx",
"diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n+<Project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"project_projx.xsd\">\n+\n+ <SchemaVersion>2.1</SchemaVersion>\n+\n+ <Header>### uVision Project, (C) Keil Software</Header>\n+\n+ <Targets>\n+ <Target>\n+ <TargetName>Target 1</TargetName>\n+ <ToolsetNumber>0x4</ToolsetNumber>\n+ <ToolsetName>ARM-ADS</ToolsetName>\n+ <pCCUsed>5060528::V5.06 update 5 (build 528)::ARMCC</pCCUsed>\n+ <uAC6>0</uAC6>\n+ <TargetOption>\n+ <TargetCommonOption>\n+ <Device>ARMCM0</Device>\n+ <Vendor>ARM</Vendor>\n+ <PackID>ARM.CMSIS.5.0.1</PackID>\n+ <PackURL>http://www.keil.com/pack/</PackURL>\n+ <Cpu>IRAM(0x20000000,0x00020000) IROM(0x00000000,0x00040000) CPUTYPE(\"Cortex-M0\") CLOCK(12000000) ESEL ELITTLE</Cpu>\n+ <FlashUtilSpec></FlashUtilSpec>\n+ <StartupFile></StartupFile>\n+ <FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000)</FlashDriverDll>\n+ <DeviceId>0</DeviceId>\n+ <RegisterFile>$$Device:ARMCM0$Device\\ARM\\ARMCM0\\Include\\ARMCM0.h</RegisterFile>\n+ <MemoryEnv></MemoryEnv>\n+ <Cmp></Cmp>\n+ <Asm></Asm>\n+ <Linker></Linker>\n+ <OHString></OHString>\n+ <InfinionOptionDll></InfinionOptionDll>\n+ <SLE66CMisc></SLE66CMisc>\n+ <SLE66AMisc></SLE66AMisc>\n+ <SLE66LinkerMisc></SLE66LinkerMisc>\n+ <SFDFile>$$Device:ARMCM0$Device\\ARM\\SVD\\ARMCM0.svd</SFDFile>\n+ <bCustSvd>0</bCustSvd>\n+ <UseEnv>0</UseEnv>\n+ <BinPath></BinPath>\n+ <IncludePath></IncludePath>\n+ <LibPath></LibPath>\n+ <RegisterFilePath></RegisterFilePath>\n+ <DBRegisterFilePath></DBRegisterFilePath>\n+ <TargetStatus>\n+ <Error>0</Error>\n+ <ExitCodeStop>0</ExitCodeStop>\n+ <ButtonStop>0</ButtonStop>\n+ <NotGenerated>0</NotGenerated>\n+ <InvalidFlash>1</InvalidFlash>\n+ </TargetStatus>\n+ <OutputDirectory>.\\Objects\\</OutputDirectory>\n+ <OutputName>01bsp_multipletimer_radio</OutputName>\n+ <CreateExecutable>1</CreateExecutable>\n+ <CreateLib>0</CreateLib>\n+ <CreateHexFile>1</CreateHexFile>\n+ <DebugInformation>1</DebugInformation>\n+ <BrowseInformation>1</BrowseInformation>\n+ <ListingPath>.\\Listings\\</ListingPath>\n+ <HexFormatSelection>1</HexFormatSelection>\n+ <Merge32K>0</Merge32K>\n+ <CreateBatchFile>0</CreateBatchFile>\n+ <BeforeCompile>\n+ <RunUserProg1>0</RunUserProg1>\n+ <RunUserProg2>0</RunUserProg2>\n+ <UserProg1Name></UserProg1Name>\n+ <UserProg2Name></UserProg2Name>\n+ <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n+ <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n+ <nStopU1X>0</nStopU1X>\n+ <nStopU2X>0</nStopU2X>\n+ </BeforeCompile>\n+ <BeforeMake>\n+ <RunUserProg1>0</RunUserProg1>\n+ <RunUserProg2>0</RunUserProg2>\n+ <UserProg1Name></UserProg1Name>\n+ <UserProg2Name></UserProg2Name>\n+ <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n+ <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n+ <nStopB1X>0</nStopB1X>\n+ <nStopB2X>0</nStopB2X>\n+ </BeforeMake>\n+ <AfterMake>\n+ <RunUserProg1>1</RunUserProg1>\n+ <RunUserProg2>1</RunUserProg2>\n+ <UserProg1Name>fromelf --bin .\\Objects\\01bsp_multipletimer_radio.axf -o .\\Objects\\01bsp_multipletimer_radio.bin</UserProg1Name>\n+ <UserProg2Name>fromelf -cvf .\\Objects\\01bsp_multipletimer_radio.axf -o .\\Objects\\disasm.txt</UserProg2Name>\n+ <UserProg1Dos16Mode>0</UserProg1Dos16Mode>\n+ <UserProg2Dos16Mode>0</UserProg2Dos16Mode>\n+ <nStopA1X>0</nStopA1X>\n+ <nStopA2X>0</nStopA2X>\n+ </AfterMake>\n+ <SelectedForBatchBuild>0</SelectedForBatchBuild>\n+ <SVCSIdString></SVCSIdString>\n+ </TargetCommonOption>\n+ <CommonProperty>\n+ <UseCPPCompiler>0</UseCPPCompiler>\n+ <RVCTCodeConst>0</RVCTCodeConst>\n+ <RVCTZI>0</RVCTZI>\n+ <RVCTOtherData>0</RVCTOtherData>\n+ <ModuleSelection>0</ModuleSelection>\n+ <IncludeInBuild>1</IncludeInBuild>\n+ <AlwaysBuild>0</AlwaysBuild>\n+ <GenerateAssemblyFile>0</GenerateAssemblyFile>\n+ <AssembleAssemblyFile>0</AssembleAssemblyFile>\n+ <PublicsOnly>0</PublicsOnly>\n+ <StopOnExitCode>3</StopOnExitCode>\n+ <CustomArgument></CustomArgument>\n+ <IncludeLibraryModules></IncludeLibraryModules>\n+ <ComprImg>1</ComprImg>\n+ </CommonProperty>\n+ <DllOption>\n+ <SimDllName>SARMCM3.DLL</SimDllName>\n+ <SimDllArguments> </SimDllArguments>\n+ <SimDlgDll>DARMCM1.DLL</SimDlgDll>\n+ <SimDlgDllArguments>-pCM0</SimDlgDllArguments>\n+ <TargetDllName>SARMCM3.DLL</TargetDllName>\n+ <TargetDllArguments> </TargetDllArguments>\n+ <TargetDlgDll>TARMCM1.DLL</TargetDlgDll>\n+ <TargetDlgDllArguments>-pCM0</TargetDlgDllArguments>\n+ </DllOption>\n+ <DebugOption>\n+ <OPTHX>\n+ <HexSelection>1</HexSelection>\n+ <HexRangeLowAddress>0</HexRangeLowAddress>\n+ <HexRangeHighAddress>0</HexRangeHighAddress>\n+ <HexOffset>0</HexOffset>\n+ <Oh166RecLen>16</Oh166RecLen>\n+ </OPTHX>\n+ </DebugOption>\n+ <Utilities>\n+ <Flash1>\n+ <UseTargetDll>1</UseTargetDll>\n+ <UseExternalTool>0</UseExternalTool>\n+ <RunIndependent>0</RunIndependent>\n+ <UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>\n+ <Capability>1</Capability>\n+ <DriverSelection>4096</DriverSelection>\n+ </Flash1>\n+ <bUseTDR>1</bUseTDR>\n+ <Flash2>BIN\\UL2CM3.DLL</Flash2>\n+ <Flash3>\"\" ()</Flash3>\n+ <Flash4></Flash4>\n+ <pFcarmOut></pFcarmOut>\n+ <pFcarmGrp></pFcarmGrp>\n+ <pFcArmRoot></pFcArmRoot>\n+ <FcArmLst>0</FcArmLst>\n+ </Utilities>\n+ <TargetArmAds>\n+ <ArmAdsMisc>\n+ <GenerateListings>0</GenerateListings>\n+ <asHll>1</asHll>\n+ <asAsm>1</asAsm>\n+ <asMacX>1</asMacX>\n+ <asSyms>1</asSyms>\n+ <asFals>1</asFals>\n+ <asDbgD>1</asDbgD>\n+ <asForm>1</asForm>\n+ <ldLst>0</ldLst>\n+ <ldmm>1</ldmm>\n+ <ldXref>1</ldXref>\n+ <BigEnd>0</BigEnd>\n+ <AdsALst>1</AdsALst>\n+ <AdsACrf>1</AdsACrf>\n+ <AdsANop>0</AdsANop>\n+ <AdsANot>0</AdsANot>\n+ <AdsLLst>1</AdsLLst>\n+ <AdsLmap>1</AdsLmap>\n+ <AdsLcgr>1</AdsLcgr>\n+ <AdsLsym>1</AdsLsym>\n+ <AdsLszi>1</AdsLszi>\n+ <AdsLtoi>1</AdsLtoi>\n+ <AdsLsun>1</AdsLsun>\n+ <AdsLven>1</AdsLven>\n+ <AdsLsxf>1</AdsLsxf>\n+ <RvctClst>0</RvctClst>\n+ <GenPPlst>0</GenPPlst>\n+ <AdsCpuType>\"Cortex-M0\"</AdsCpuType>\n+ <RvctDeviceName></RvctDeviceName>\n+ <mOS>0</mOS>\n+ <uocRom>0</uocRom>\n+ <uocRam>0</uocRam>\n+ <hadIROM>1</hadIROM>\n+ <hadIRAM>1</hadIRAM>\n+ <hadXRAM>0</hadXRAM>\n+ <uocXRam>0</uocXRam>\n+ <RvdsVP>0</RvdsVP>\n+ <hadIRAM2>0</hadIRAM2>\n+ <hadIROM2>0</hadIROM2>\n+ <StupSel>8</StupSel>\n+ <useUlib>0</useUlib>\n+ <EndSel>1</EndSel>\n+ <uLtcg>0</uLtcg>\n+ <nSecure>0</nSecure>\n+ <RoSelD>3</RoSelD>\n+ <RwSelD>3</RwSelD>\n+ <CodeSel>0</CodeSel>\n+ <OptFeed>0</OptFeed>\n+ <NoZi1>0</NoZi1>\n+ <NoZi2>0</NoZi2>\n+ <NoZi3>0</NoZi3>\n+ <NoZi4>0</NoZi4>\n+ <NoZi5>0</NoZi5>\n+ <Ro1Chk>0</Ro1Chk>\n+ <Ro2Chk>0</Ro2Chk>\n+ <Ro3Chk>0</Ro3Chk>\n+ <Ir1Chk>1</Ir1Chk>\n+ <Ir2Chk>0</Ir2Chk>\n+ <Ra1Chk>0</Ra1Chk>\n+ <Ra2Chk>0</Ra2Chk>\n+ <Ra3Chk>0</Ra3Chk>\n+ <Im1Chk>1</Im1Chk>\n+ <Im2Chk>0</Im2Chk>\n+ <OnChipMemories>\n+ <Ocm1>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm1>\n+ <Ocm2>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm2>\n+ <Ocm3>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm3>\n+ <Ocm4>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm4>\n+ <Ocm5>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm5>\n+ <Ocm6>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </Ocm6>\n+ <IRAM>\n+ <Type>0</Type>\n+ <StartAddress>0x20000000</StartAddress>\n+ <Size>0x20000</Size>\n+ </IRAM>\n+ <IROM>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x40000</Size>\n+ </IROM>\n+ <XRAM>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </XRAM>\n+ <OCR_RVCT1>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT1>\n+ <OCR_RVCT2>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT2>\n+ <OCR_RVCT3>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT3>\n+ <OCR_RVCT4>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x10000</Size>\n+ </OCR_RVCT4>\n+ <OCR_RVCT5>\n+ <Type>1</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT5>\n+ <OCR_RVCT6>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT6>\n+ <OCR_RVCT7>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT7>\n+ <OCR_RVCT8>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT8>\n+ <OCR_RVCT9>\n+ <Type>0</Type>\n+ <StartAddress>0x20000000</StartAddress>\n+ <Size>0x10000</Size>\n+ </OCR_RVCT9>\n+ <OCR_RVCT10>\n+ <Type>0</Type>\n+ <StartAddress>0x0</StartAddress>\n+ <Size>0x0</Size>\n+ </OCR_RVCT10>\n+ </OnChipMemories>\n+ <RvctStartVector></RvctStartVector>\n+ </ArmAdsMisc>\n+ <Cads>\n+ <interw>1</interw>\n+ <Optim>1</Optim>\n+ <oTime>0</oTime>\n+ <SplitLS>0</SplitLS>\n+ <OneElfS>1</OneElfS>\n+ <Strict>0</Strict>\n+ <EnumInt>0</EnumInt>\n+ <PlainCh>0</PlainCh>\n+ <Ropi>0</Ropi>\n+ <Rwpi>0</Rwpi>\n+ <wLevel>2</wLevel>\n+ <uThumb>0</uThumb>\n+ <uSurpInc>0</uSurpInc>\n+ <uC99>1</uC99>\n+ <useXO>0</useXO>\n+ <v6Lang>1</v6Lang>\n+ <v6LangP>1</v6LangP>\n+ <vShortEn>1</vShortEn>\n+ <vShortWch>1</vShortWch>\n+ <v6Lto>0</v6Lto>\n+ <v6WtE>0</v6WtE>\n+ <v6Rtti>0</v6Rtti>\n+ <VariousControls>\n+ <MiscControls></MiscControls>\n+ <Define></Define>\n+ <Undefine></Undefine>\n+ <IncludePath>..\\..\\..\\bsp\\boards;..\\..\\..\\bsp\\boards\\scum</IncludePath>\n+ </VariousControls>\n+ </Cads>\n+ <Aads>\n+ <interw>1</interw>\n+ <Ropi>0</Ropi>\n+ <Rwpi>0</Rwpi>\n+ <thumb>0</thumb>\n+ <SplitLS>0</SplitLS>\n+ <SwStkChk>0</SwStkChk>\n+ <NoWarn>0</NoWarn>\n+ <uSurpInc>0</uSurpInc>\n+ <useXO>0</useXO>\n+ <uClangAs>0</uClangAs>\n+ <VariousControls>\n+ <MiscControls></MiscControls>\n+ <Define></Define>\n+ <Undefine></Undefine>\n+ <IncludePath></IncludePath>\n+ </VariousControls>\n+ </Aads>\n+ <LDads>\n+ <umfTarg>1</umfTarg>\n+ <Ropi>0</Ropi>\n+ <Rwpi>0</Rwpi>\n+ <noStLib>0</noStLib>\n+ <RepFail>1</RepFail>\n+ <useFile>0</useFile>\n+ <TextAddressRange>0x00000000</TextAddressRange>\n+ <DataAddressRange>0x20000000</DataAddressRange>\n+ <pXoBase></pXoBase>\n+ <ScatterFile></ScatterFile>\n+ <IncludeLibs></IncludeLibs>\n+ <IncludeLibsPath></IncludeLibsPath>\n+ <Misc></Misc>\n+ <LinkerInputFile></LinkerInputFile>\n+ <DisabledWarnings></DisabledWarnings>\n+ </LDads>\n+ </TargetArmAds>\n+ </TargetOption>\n+ <Groups>\n+ <Group>\n+ <GroupName>application</GroupName>\n+ <Files>\n+ <File>\n+ <FileName>01bsp_multipletimer_radio.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>.\\01bsp_multipletimer_radio.c</FilePath>\n+ </File>\n+ </Files>\n+ </Group>\n+ <Group>\n+ <GroupName>startUp</GroupName>\n+ <Files>\n+ <File>\n+ <FileName>cm0dsasm.s</FileName>\n+ <FileType>2</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\cm0dsasm.s</FilePath>\n+ </File>\n+ </Files>\n+ </Group>\n+ <Group>\n+ <GroupName>boards</GroupName>\n+ <Files>\n+ <File>\n+ <FileName>board.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\board.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>debugpins.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\debugpins.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>eui64.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\eui64.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>leds.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\leds.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>radio.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\radio.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>sctimer.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\sctimer.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>uart.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\uart.h</FilePath>\n+ </File>\n+ </Files>\n+ </Group>\n+ <Group>\n+ <GroupName>scum</GroupName>\n+ <Files>\n+ <File>\n+ <FileName>board_info.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\board_info.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>memory_map.h</FileName>\n+ <FileType>5</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\memory_map.h</FilePath>\n+ </File>\n+ <File>\n+ <FileName>board.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\board.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>debugpins.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\debugpins.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>eui64.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\eui64.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>leds.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\leds.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>radio.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\radio.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>sctimer.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\sctimer.c</FilePath>\n+ </File>\n+ <File>\n+ <FileName>uart.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\bsp\\boards\\scum\\uart.c</FilePath>\n+ </File>\n+ </Files>\n+ </Group>\n+ </Groups>\n+ </Target>\n+ </Targets>\n+\n+ <RTE>\n+ <apis/>\n+ <components/>\n+ <files/>\n+ </RTE>\n+\n+</Project>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726. add bsp_multipletimer_radio project.
|
491,595 |
26.11.2017 23:51:35
| -3,600 |
85d8794fc028bcefbc5a6fb1249ccb4809626a99
|
tiny fixes.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/radio.c",
"new_path": "bsp/boards/scum/radio.c",
"diff": "@@ -248,6 +248,9 @@ void radio_getReceivedFrame(uint8_t* pBufRead,\nkick_scheduler_t radio_isr() {\nPORT_TIMER_WIDTH capturedTime;\n+\n+ debugpins_isr_set();\n+\nPORT_TIMER_WIDTH irq_status = RFCONTROLLER_REG__INT;\nPORT_TIMER_WIDTH irq_error = RFCONTROLLER_REG__ERROR;\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/sctimer.c",
"new_path": "bsp/boards/scum/sctimer.c",
"diff": "@@ -55,14 +55,19 @@ void sctimer_set_callback(sctimer_cbt cb){\n\\brief set compare interrupt\n*/\nvoid sctimer_setCompare(PORT_TIMER_WIDTH val){\n+\n+ PORT_TIMER_WIDTH currentTime;\n+\n+ currentTime = TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__COUNTER);\n+\nsctimer_enable();\n- if (TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__COUNTER) - val < TIMERLOOP_THRESHOLD){\n+ if (currentTime - val < TIMERLOOP_THRESHOLD){\n// the timer is already late, schedule the ISR right now manually\n// not sure how to do this in scum, just miss this ISR for now\n// don't clear the flag, so another interrupt will happen after exiting the ISR\nsctimer_vars.noNeedClearFlag = 1;\n} else {\n- if (val-TIMER_COUNTER_CONVERT_500K_TO_32K(RFTIMER_REG__COUNTER)<MINIMUM_COMPAREVALE_ADVANCE){\n+ if (val-currentTime<MINIMUM_COMPAREVALE_ADVANCE){\n// there is hardware limitation to schedule the timer within TIMERTHRESHOLD ticks\n// schedule ISR right now manually\n// don't clear the flag, so another interrupt will happen after exiting the ISR\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -179,7 +179,7 @@ enum ieee154e_atomicdurations_enum {\ndelayTx = PORT_delayTx, // between GO signal and SFD\ndelayRx = PORT_delayRx, // between GO signal and start listening\n// radio watchdog\n- wdRadioTx = 33, // 1000us (needs to be >delayTx)\n+ wdRadioTx = 33, // 1000us (needs to be >delayTx) (SCuM need a larger value, 43 is tested and works)\nwdDataDuration = 164, // 5000us (measured 4280us with max payload)\n#ifdef SLOTDURATION_10MS\nwdAckDuration = 80, // 2400us (measured 1000us)\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726. tiny fixes.
|
491,595 |
27.11.2017 00:07:50
| -3,600 |
fbf8b5b6fcfc0612041dfac84db5eda3557d6e94
|
add bsp_multipletimer_radio.c file.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "projects/scum/01bsp_multipletimer_radio/01bsp_multipletimer_radio.c",
"diff": "+/**\n+\\brief This is a project specifically for SCuM showsing the issue SCuM when\n+using multiple timers feature to schedule different radio actions.\n+\n+The main behaviours of this project is to mimic a RX slot. Three compare timers\n+are used for scheduling RX_ENABLE, ENABLE_TIMEOUT and LISTENING_GUARDTIME inside\n+a slot. Besides, UART is used in a while loop in main function for sending some\n+dummy text to show how it influence the TIMERS.\n+\n+The expected result of this project is:\n+1. The interrupt for RX_ENABLE fired all the time if don't use UART.\n+2. The interrupt for RX_ENABLE starts is missing occationally if the UART sends\n+data less often (controlled with a do-nothing for loop).\n+3. The interrupt for RX_ENABLE is missing all the time if UART is busying\n+sending always.\n+\n+\\author Tengfei Chang <tengfei.chang@inria.fr>, November 2017.\n+*/\n+\n+#include \"board.h\"\n+#include \"radio.h\"\n+#include \"leds.h\"\n+#include \"sctimer.h\"\n+#include \"debugpins.h\"\n+#include \"uart.h\"\n+#include \"memory_map.h\"\n+\n+//=========================== defines =========================================\n+\n+#define LENGTH_PACKET 125+LENGTH_CRC ///< maximum length is 127 bytes\n+#define CHANNEL 11 ///< 11 =2.405GHz\n+#define TIMER_PERIOD 491 ///< 491 = 15ms@32kHz\n+#define ID 0x99 ///< byte sent in the packets\n+\n+// FSM timer durations (combinations of atomic durations)\n+// TX\n+#define DURATION_tt1 131-PORT_delayTx-PORT_maxTxDataPrepare\n+#define DURATION_tt2 131-PORT_delayTx\n+#define DURATION_tt3 131-PORT_delayTx+33\n+#define DURATION_tt4 164\n+#define DURATION_tt5 151-16-delayRx-PORT_maxRxAckPrepare\n+#define DURATION_tt6 151-16-delayRx\n+#define DURATION_tt7 151+16\n+#define DURATION_tt8 PORT_maxTxAckPrepare\n+// RX\n+#define DURATION_rt1 131-36-PORT_maxRxDataPrepare\n+#define DURATION_rt2 131-36\n+#define DURATION_rt3 131+36\n+#define DURATION_rt4 164\n+#define DURATION_rt5 151-PORT_delayTx-PORT_maxTxAckPrepare\n+#define DURATION_rt6 151-PORT_delayTx\n+#define DURATION_rt7 151-PORT_delayTx+33\n+#define DURATION_rt8 PORT_maxTxAckPrepare\n+\n+//=========================== variables =======================================\n+\n+enum {\n+ APP_FLAG_START_FRAME = 0x01,\n+ APP_FLAG_END_FRAME = 0x02,\n+ APP_FLAG_TIMER = 0x04,\n+};\n+\n+typedef enum {\n+ APP_STATE_IDLE = 0x00,\n+ APP_STATE_RXDATAOFFSET = 0x01, // waiting to prepare for Tx data\n+ APP_STATE_RXDATAPREPARE = 0x02, // preparing for Tx data\n+ APP_STATE_RXDATAREADY = 0x03, // ready to Tx data, waiting for 'go'\n+ APP_STATE_RXDATALISTEN = 0x04, // 'go' signal given, waiting for SFD Tx data\n+} app_state_t;\n+\n+typedef struct {\n+ uint8_t flags;\n+ app_state_t state;\n+ uint8_t packet[LENGTH_PACKET];\n+ uint8_t packet_len;\n+ int8_t rxpk_rssi;\n+ uint8_t rxpk_lqi;\n+ bool rxpk_crc;\n+ uint32_t startOfSlotReference;\n+} app_vars_t;\n+\n+app_vars_t app_vars;\n+\n+//=========================== prototypes ======================================\n+\n+void cb_startFrame(PORT_TIMER_WIDTH timestamp);\n+void cb_endFrame(PORT_TIMER_WIDTH timestamp);\n+void cb_timer(void);\n+void cb_action_timer(void);\n+\n+//=========================== main ============================================\n+\n+/**\n+\\brief The program starts executing here.\n+*/\n+int mote_main(void) {\n+ uint8_t i;\n+\n+ // clear local variables\n+ memset(&app_vars,0,sizeof(app_vars_t));\n+\n+ // initialize board\n+ board_init();\n+\n+ // add callback functions radio\n+ radio_setStartFrameCb(cb_startFrame);\n+ radio_setEndFrameCb(cb_endFrame);\n+\n+ // prepare packet\n+ app_vars.packet_len = sizeof(app_vars.packet);\n+ for (i=0;i<app_vars.packet_len;i++) {\n+ app_vars.packet[i] = ID;\n+ }\n+\n+ // start bsp timer\n+ sctimer_set_callback(cb_timer);\n+ sctimer_setCompare(sctimer_readCounter()+TIMER_PERIOD);\n+ sctimer_enable();\n+\n+ sctimer_set_actionCallback(cb_action_timer);\n+\n+ // prepare radio\n+ radio_rfOff();\n+ radio_setFrequency(CHANNEL);\n+\n+ while(1){\n+ // send dummy text\n+ uart_writeByte('*');\n+ // reduce the usage of UART\n+// for (i=0;i<0xff;i++);\n+ }\n+}\n+\n+//=========================== callbacks =======================================\n+\n+void cb_startFrame(PORT_TIMER_WIDTH timestamp) {\n+ // set flag\n+ app_vars.flags |= APP_FLAG_START_FRAME;\n+}\n+\n+void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\n+ // set flag\n+ app_vars.flags |= APP_FLAG_END_FRAME;\n+}\n+\n+void cb_timer(void) {\n+\n+ debugpins_slot_toggle();\n+\n+ app_vars.startOfSlotReference = sctimer_readCounter();\n+\n+ sctimer_setCompare(app_vars.startOfSlotReference+TIMER_PERIOD);\n+\n+ if (app_vars.state != APP_STATE_IDLE){\n+ leds_error_toggle();\n+ }\n+ debugpins_fsm_clr();\n+\n+ // time slot starts, use the register here\n+ uart_writeByte('S');\n+ uart_writeByte('S');\n+ // change {0-9} to char\n+ uart_writeByte(0x30 + app_vars.state);\n+\n+ app_vars.state = APP_STATE_RXDATAOFFSET;\n+\n+ sctimer_scheduleActionIn(ACTION_RADIORX_ENABLE,app_vars.startOfSlotReference+DURATION_rt1);\n+ radio_rxPacket_prepare();\n+ // 2. schedule timer for starting\n+ sctimer_scheduleActionIn(ACTION_SET_TIMEOUT, app_vars.startOfSlotReference+DURATION_rt2);\n+}\n+\n+void cb_action_timer(void){\n+\n+ // change the state\n+ uart_writeByte('C');\n+ uart_writeByte('S');\n+ uart_writeByte(0x30 + app_vars.state);\n+\n+ debugpins_fsm_toggle();\n+\n+ switch(app_vars.state){\n+ case APP_STATE_IDLE:\n+ // error\n+ leds_error_toggle();\n+ break;\n+ case APP_STATE_RXDATAOFFSET:\n+ app_vars.state = APP_STATE_RXDATAPREPARE;\n+ break;\n+ case APP_STATE_RXDATAPREPARE:\n+ app_vars.state = APP_STATE_RXDATAREADY;\n+ sctimer_scheduleActionIn(ACTION_SET_TIMEOUT, app_vars.startOfSlotReference+DURATION_rt3);\n+ app_vars.state = APP_STATE_RXDATALISTEN;\n+ break;\n+ case APP_STATE_RXDATAREADY:\n+ // error\n+ leds_error_toggle();\n+ break;\n+ case APP_STATE_RXDATALISTEN:\n+ app_vars.state = APP_STATE_IDLE;\n+ break;\n+ }\n+}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-726. add bsp_multipletimer_radio.c file.
|
491,595 |
08.12.2017 17:44:25
| -3,600 |
57c7918bc849a6df4832ba3e715f826a3693f7ad
|
update mercator project.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_mercator/03oos_mercator.c",
"new_path": "projects/common/03oos_mercator/03oos_mercator.c",
"diff": "@@ -399,11 +399,11 @@ void isr_openserial_rx_mod(void) {\n//===== radiotimer\n-void cb_startFrame(uint16_t timestamp){\n+void cb_startFrame(PORT_TIMER_WIDTH timestamp){\n// nothing\n}\n-void cb_endFrame(uint16_t timestamp) {\n+void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\n// local vars\nRF_PACKET_ht* rx_temp;\nbool is_expected = TRUE;\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_mercator/03oos_mercator.h",
"new_path": "projects/common/03oos_mercator/03oos_mercator.h",
"diff": "@@ -184,7 +184,7 @@ void isr_openserial_rx_mod(void);\nuint16_t htons(uint16_t val);\n// initial radio\n-void cb_startFrame(uint16_t timestamp);\n-void cb_endFrame(uint16_t timestamp);\n+void cb_startFrame(PORT_TIMER_WIDTH timestamp);\n+void cb_endFrame(PORT_TIMER_WIDTH timestamp);\nvoid cb_sendPacket(opentimers_id_t id);\nvoid cb_finishTx(void);\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/iot-lab_M3/03oos_mercator/03oos_mercator.ewp",
"new_path": "projects/iot-lab_M3/03oos_mercator/03oos_mercator.ewp",
"diff": "</option>\n<option>\n<name>AOutputFile</name>\n- <state></state>\n+ <state>$FILE_BNAME$.o</state>\n</option>\n<option>\n<name>AMultibyteSupport</name>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\board.c</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\bsp_timer.c</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\debugpins.c</name>\n</file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\nvic.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\radiotimer.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\sctimer.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\spi.c</name>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\uart.c</name>\n</file>\n</group>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\board.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\cryptoengine.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\debugpins.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\eui64.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\leds.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\radio.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\sctimer.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\spi.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\uart.h</name>\n+ </file>\n</group>\n<group>\n<name>chips</name>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-730. update mercator project.
|
491,595 |
08.12.2017 17:55:49
| -3,600 |
40fd2562fb33070c5a2490deeee424d76464320a
|
fix all other projects.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_radio_tx/01bsp_radio_tx.c",
"new_path": "projects/common/01bsp_radio_tx/01bsp_radio_tx.c",
"diff": "@@ -68,8 +68,8 @@ int mote_main(void) {\n// add radio callback functions\nsctimer_set_callback(cb_radioTimerOverflows);\n- sctimer_setStartFrameCb(cb_startFrame);\n- sctimer_setEndFrameCb(cb_endFrame);\n+ radio_setStartFrameCb(cb_startFrame);\n+ radio_setEndFrameCb(cb_endFrame);\n// prepare radio\nradio_rfOn();\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/iot-lab_M3/01bsp_leds/01bsp_leds.ewp",
"new_path": "projects/iot-lab_M3/01bsp_leds/01bsp_leds.ewp",
"diff": "<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\board.c</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\bsp_timer.c</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\debugpins.c</name>\n</file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\nvic.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\radiotimer.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\sctimer.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\spi.c</name>\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/iot-lab_M3/01bsp_radio_tx/01bsp_radio_tx.ewp",
"new_path": "projects/iot-lab_M3/01bsp_radio_tx/01bsp_radio_tx.ewp",
"diff": "</option>\n<option>\n<name>IlinkIcfFile</name>\n- <state>$TOOLKIT_DIR$\\CONFIG\\generic_cortex.icf</state>\n+ <state>$TOOLKIT_DIR$\\config\\linker\\ST\\stm32f103xE.icf</state>\n</option>\n<option>\n<name>IlinkIcfFileSlave</name>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\board.c</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\bsp_timer.c</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\debugpins.c</name>\n</file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\nvic.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\radiotimer.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\sctimer.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\spi.c</name>\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/iot-lab_M3/01bsp_uart/01bsp_uart.ewp",
"new_path": "projects/iot-lab_M3/01bsp_uart/01bsp_uart.ewp",
"diff": "<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\board.c</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\bsp_timer.c</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\debugpins.c</name>\n</file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\nvic.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\radiotimer.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\sctimer.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\spi.c</name>\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/iot-lab_M3/02drv_opentimers/02drv_opentimers.ewp",
"new_path": "projects/iot-lab_M3/02drv_opentimers/02drv_opentimers.ewp",
"diff": "<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\board.c</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\bsp_timer.c</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\debugpins.c</name>\n</file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\nvic.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\radiotimer.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\sctimer.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\spi.c</name>\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/iot-lab_M3/03oos_openwsn/03oos_openwsn.ewp",
"new_path": "projects/iot-lab_M3/03oos_openwsn/03oos_openwsn.ewp",
"diff": "<state>$PROJ_DIR$\\..\\..\\..\\openapps\\cexample\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\cinfo\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\cleds\\</state>\n+ <state>$PROJ_DIR$\\..\\..\\..\\openapps\\cjoin\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\cstorm\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\cwellknown\\</state>\n- <state>$PROJ_DIR$\\..\\..\\..\\openapps\\techo\\</state>\n- <state>$PROJ_DIR$\\..\\..\\..\\openapps\\tohlone\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\uecho\\</state>\n+ <state>$PROJ_DIR$\\..\\..\\..\\openapps\\uexpiration\\</state>\n+ <state>$PROJ_DIR$\\..\\..\\..\\openapps\\uexpiration_monitor\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\rrt\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\uinject\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\userialbridge\\</state>\n+ <state>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\configure\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\library\\STM32F10x_StdPeriph_Lib_V3.5.0\\Libraries\\STM32F10x_StdPeriph_Driver\\inc\\</state>\n<group>\n<name>common</name>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\dummy_crypto_engine.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\openaes.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\openaes.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\openccms.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\openccms.h</name>\n</file>\n</group>\n<group>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\board.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\bsp_timer.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\cryptoengine.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\debugpins.c</name>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\nvic.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\radiotimer.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\rcc.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\sctimer.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\iot-lab_M3\\spi.c</name>\n</file>\n</group>\n<group>\n- <name>rtt</name>\n+ <name>opencoap</name>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openapps\\rrt\\rrt.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\cborencoder.c</name>\n</file>\n- </group>\n- <group>\n- <name>techo</name>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openapps\\techo\\techo.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\cborencoder.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\hkdf.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\hmac.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\opencoap.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\opencoap.h</name>\n</file>\n- </group>\n- <group>\n- <name>tohlone</name>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openapps\\tohlone\\tohlone.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\openoscoap.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openapps\\tohlone\\tohlone_webpages.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\openoscoap.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\sha-private.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\sha.h</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\sha224-256.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\opencoap\\usha.c</name>\n+ </file>\n+ </group>\n+ <group>\n+ <name>rtt</name>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\rrt\\rrt.c</name>\n</file>\n</group>\n<group>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154.c</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154_dummy_security.c</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154_security.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\neighbors.c</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\processIE.c</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\schedule.c</name>\n</file>\n</group>\n<group>\n<name>04-TRAN</name>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\04-TRAN\\opencoap.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\04-TRAN\\opentcp.c</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\04-TRAN\\openudp.c</name>\n</file>\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/iot-lab_M3/iot-lab_M3.eww",
"new_path": "projects/iot-lab_M3/iot-lab_M3.eww",
"diff": "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<workspace>\n- <project>\n- <path>$WS_DIR$\\01bsp_bsp_timer\\01bsp_bsp_timer.ewp</path>\n- </project>\n<project>\n<path>$WS_DIR$\\01bsp_leds\\01bsp_leds.ewp</path>\n</project>\n<project>\n<path>$WS_DIR$\\01bsp_radio_tx\\01bsp_radio_tx.ewp</path>\n</project>\n- <project>\n- <path>$WS_DIR$\\01bsp_radiotimer\\01bsp_radiotimer.ewp</path>\n- </project>\n<project>\n<path>$WS_DIR$\\01bsp_uart\\01bsp_uart.ewp</path>\n</project>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-730. fix all other projects.
|
491,595 |
17.12.2017 15:28:08
| -3,600 |
329d418863dfe5bdc5d2519a4fbdc5ed49cb219e
|
implement infrared app.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-cc2538/board.c",
"new_path": "bsp/boards/openmote-cc2538/board.c",
"diff": "#include \"sctimer.h\"\n#include \"uart.h\"\n#include \"cryptoengine.h\"\n+#include \"pwm.h\"\n//=========================== variables =======================================\n@@ -82,6 +83,7 @@ void board_init(void) {\ni2c_init();\nsensors_init();\ncryptoengine_init();\n+ pwm_init();\n}\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -177,6 +177,7 @@ enum {\nCOMPONENT_UMONITOR = 0x2a,\nCOMPONENT_CJOIN = 0x2b,\nCOMPONENT_OPENOSCOAP = 0x2c,\n+ COMPONENT_CINFRARED = 0x2d,\n};\n/**\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "openapps/cinfrared/cinfrared.c",
"diff": "+/**\n+\\brief CoAP infrared application.\n+\n+\\author Tengfei Chang <tengfei.chang@inria.fr>, December, 2017\n+*/\n+\n+#include \"opendefs.h\"\n+#include \"cinfrared.h\"\n+#include \"idmanager.h\"\n+#include \"openqueue.h\"\n+#include \"neighbors.h\"\n+#include \"pwm.h\"\n+#include \"opentimers.h\"\n+\n+//=========================== defines =========================================\n+\n+const uint8_t cinfrared_path0[] = \"ir\";\n+\n+//=========================== variables =======================================\n+\n+cinfrared_vars_t cinfrared_vars;\n+\n+//=========================== prototypes ======================================\n+\n+owerror_t cinfrared_receive(OpenQueueEntry_t* msg,\n+ coap_header_iht* coap_header,\n+ coap_option_iht* coap_incomingOptions,\n+ coap_option_iht* coap_outgoingOptions,\n+ uint8_t* coap_outgoingOptionsLen\n+);\n+void cinfrared_sendDone(\n+ OpenQueueEntry_t* msg,\n+ owerror_t error\n+);\n+\n+void cinrared_turnOnOrOff(uint8_t turnOnOrOff);\n+\n+//=========================== public ==========================================\n+\n+void cinfrared_init() {\n+ if(idmanager_getIsDAGroot()==TRUE) return;\n+\n+ // prepare the resource descriptor for the /6t path\n+ cinfrared_vars.desc.path0len = sizeof(cinfrared_path0)-1;\n+ cinfrared_vars.desc.path0val = (uint8_t*)(&cinfrared_path0);\n+ cinfrared_vars.desc.path1len = 0;\n+ cinfrared_vars.desc.path1val = NULL;\n+ cinfrared_vars.desc.componentID = COMPONENT_CINFRARED;\n+ cinfrared_vars.desc.securityContext = NULL;\n+ cinfrared_vars.desc.discoverable = TRUE;\n+ cinfrared_vars.desc.callbackRx = &cinfrared_receive;\n+ cinfrared_vars.desc.callbackSendDone = &cinfrared_sendDone;\n+\n+ opencoap_register(&cinfrared_vars.desc);\n+\n+ cinfrared_vars.timerId = opentimers_create();\n+}\n+\n+//=========================== private =========================================\n+\n+/**\n+\\brief Receives a command and a list of items to be used by the command.\n+\n+\\param[in] msg The received message. CoAP header and options already\n+ parsed.\n+\\param[in] coap_header The CoAP header contained in the message.\n+\\param[in] coap_options The CoAP options contained in the message.\n+\n+\\return Whether the response is prepared successfully.\n+*/\n+owerror_t cinfrared_receive(OpenQueueEntry_t* msg,\n+ coap_header_iht* coap_header,\n+ coap_option_iht* coap_incomingOptions,\n+ coap_option_iht* coap_outgoingOptions,\n+ uint8_t* coap_outgoingOptionsLen\n+) {\n+ owerror_t outcome;\n+\n+ switch (coap_header->Code) {\n+ case COAP_CODE_REQ_PUT:\n+\n+ cinfrared_vars.state = APP_STATE_START;\n+ // change the infrared's state\n+ cinrared_turnOnOrOff(msg->payload[0]);\n+\n+ // reset packet payload\n+ msg->payload = &(msg->packet[127]);\n+ msg->length = 0;\n+\n+ // set the CoAP header\n+ coap_header->Code = COAP_CODE_RESP_CHANGED;\n+\n+ outcome = E_SUCCESS;\n+ break;\n+ default:\n+ outcome = E_FAIL;\n+ break;\n+ }\n+ return outcome;\n+}\n+\n+void cinfrared_sendDone(OpenQueueEntry_t* msg, owerror_t error) {\n+ openqueue_freePacketBuffer(msg);\n+}\n+\n+void cinrared_turnOnOrOff(uint8_t turnOnOrOff){\n+ switch(cinfrared_vars.state){\n+ case APP_STATE_START:\n+ pwm_enable();\n+ cinfrared_vars.startOfSlot = opentimers_getCurrentTimeout();\n+ if (turnOnOrOff){\n+ opentimers_scheduleAbsolute(\n+ cinfrared_vars.timerId,\n+ TURNON_STATE_1,\n+ cinfrared_vars.startOfSlot,\n+ TIME_TICS,\n+ cinrared_turnOnOrOff\n+ );\n+ } else {\n+ opentimers_scheduleAbsolute(\n+ cinfrared_vars.timerId,\n+ TURNOFF_STATE_1,\n+ cinfrared_vars.startOfSlot,\n+ TIME_TICS,\n+ cinrared_turnOnOrOff\n+ );\n+ }\n+ break;\n+ case APP_STATE_1:\n+ pwm_disable();\n+ if (turnOnOrOff){\n+ opentimers_scheduleAbsolute(\n+ cinfrared_vars.timerId,\n+ TURNON_STATE_2,\n+ cinfrared_vars.startOfSlot,\n+ TIME_TICS,\n+ cinrared_turnOnOrOff\n+ );\n+ } else {\n+ opentimers_scheduleAbsolute(\n+ cinfrared_vars.timerId,\n+ TURNOFF_STATE_2,\n+ cinfrared_vars.startOfSlot,\n+ TIME_TICS,\n+ cinrared_turnOnOrOff\n+ );\n+ }\n+ break;\n+ case APP_STATE_2:\n+ pwm_enable();\n+ if (turnOnOrOff){\n+ opentimers_scheduleAbsolute(\n+ cinfrared_vars.timerId,\n+ TURNON_STATE_3,\n+ cinfrared_vars.startOfSlot,\n+ TIME_TICS,\n+ cinrared_turnOnOrOff\n+ );\n+ } else {\n+ opentimers_scheduleAbsolute(\n+ cinfrared_vars.timerId,\n+ TURNOFF_STATE_3,\n+ cinfrared_vars.startOfSlot,\n+ TIME_TICS,\n+ cinrared_turnOnOrOff\n+ );\n+ }\n+ break;\n+ case APP_STATE_3:\n+ pwm_disable();\n+ if (turnOnOrOff){\n+ opentimers_scheduleAbsolute(\n+ cinfrared_vars.timerId,\n+ TURNON_STATE_4,\n+ cinfrared_vars.startOfSlot,\n+ TIME_TICS,\n+ cinrared_turnOnOrOff\n+ );\n+ } else {\n+ opentimers_scheduleAbsolute(\n+ cinfrared_vars.timerId,\n+ TURNOFF_STATE_4,\n+ cinfrared_vars.startOfSlot,\n+ TIME_TICS,\n+ cinrared_turnOnOrOff\n+ );\n+ }\n+ break;\n+ case APP_STATE_4:\n+ pwm_enable();\n+ if (turnOnOrOff){\n+ opentimers_scheduleAbsolute(\n+ cinfrared_vars.timerId,\n+ TURNON_STATE_END,\n+ cinfrared_vars.startOfSlot,\n+ TIME_TICS,\n+ cinrared_turnOnOrOff\n+ );\n+ } else {\n+ opentimers_scheduleAbsolute(\n+ cinfrared_vars.timerId,\n+ TURNOFF_STATE_END,\n+ cinfrared_vars.startOfSlot,\n+ TIME_TICS,\n+ cinrared_turnOnOrOff\n+ );\n+ }\n+ break;\n+ case APP_STATE_END:\n+ pwm_disable();\n+ break;\n+ }\n+\n+ if (cinfrared_vars.state==APP_STATE_END){\n+ cinfrared_vars.state = APP_STATE_START;\n+ } else {\n+ cinfrared_vars.state++;\n+ }\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "openapps/cinfrared/cinfrared.h",
"diff": "+/**\n+\\brief CoAP infrared application\n+\n+\\author Tengfei Chang <tengfei.chang@inria.fr>, December, 2017\n+*/\n+\n+#ifndef __CINFRARED_H\n+#define __CINFRARED_H\n+\n+/**\n+\\addtogroup AppCoAP\n+\\{\n+\\addtogroup cinfrared\n+\\{\n+*/\n+\n+#include \"opendefs.h\"\n+#include \"opencoap.h\"\n+#include \"schedule.h\"\n+\n+//=========================== define ==========================================\n+\n+\n+// turnoff timing\n+typedef enum {\n+ TURNOFF_STATE_START = 0, // turn on at 0ms\n+ TURNOFF_STATE_1 = 490, // turn off at 15ms\n+ TURNOFF_STATE_2 = 599, // turn off for 18ms\n+ TURNOFF_STATE_3 = 926, // turn on for 28ms\n+ TURNOFF_STATE_4 = 981, // turn off for 30ms\n+ TURNOFF_STATE_END = 1035, // turn on for 31.5ms\n+} turnoff_timing_t;\n+\n+// turnon timing\n+typedef enum {\n+ TURNON_STATE_START = 0, // turn on at 0ms\n+ TURNON_STATE_1 = 490, // turn off at 15ms\n+ TURNON_STATE_2 = 599, // turn off for 18ms\n+ TURNON_STATE_3 = 754, // turn on for 23ms\n+ TURNON_STATE_4 = 819, // turn off for 25ms\n+ TURNON_STATE_END = 918, // turn on for 28ms\n+} turnon_timing_t;\n+\n+typedef enum {\n+ APP_STATE_START = 0x00,\n+ APP_STATE_1 = 0x01,\n+ APP_STATE_2 = 0x02,\n+ APP_STATE_3 = 0x03,\n+ APP_STATE_4 = 0x04,\n+ APP_STATE_END = 0x05,\n+} app_state_t;\n+\n+//=========================== typedef =========================================\n+\n+//=========================== variables =======================================\n+\n+typedef struct {\n+ coap_resource_desc_t desc;\n+ uint32_t startOfSlot; // the start time of a turnon/turnoff action\n+ app_state_t state; // state of turnon or turnoff timing\n+ uint8_t tunnOnOrOff; // 1: turn on, 0: turn off\n+ opentimers_id_t timerId;\n+} cinfrared_vars_t;\n+\n+//=========================== prototypes ======================================\n+\n+void cinfrared_init(void);\n+\n+/**\n+\\}\n+\\}\n+*/\n+\n+#endif\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "openapps/cinfrared/cinfrared.py",
"diff": "+import os\n+import sys\n+here = sys.path[0]\n+print here\n+sys.path.insert(0,os.path.join(here,'..','..','..','coap'))\n+\n+from coap import coap\n+import signal\n+\n+MOTE_IP = 'bbbb:0:0:0:12:4b00:60d:9f66'\n+UDPPORT = 61618 # can't be the port used in OV\n+\n+c = coap.coap(udpPort=UDPPORT)\n+\n+# infrared turnoff\n+p = c.PUT(\n+ 'coap://[{0}]/ir'.format(MOTE_IP),\n+ payload = [1],\n+)\n+\n+while True:\n+ input = raw_input(\"Done. Press q to close. \")\n+ if input=='q':\n+ print 'bye bye.'\n+ #c.close()\n+ os.kill(os.getpid(), signal.SIGTERM)\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/openapps.c",
"new_path": "openapps/openapps.c",
"diff": "#include \"cjoin.h\"\n#include \"cwellknown.h\"\n#include \"rrt.h\"\n+#include \"cinfrared.h\"\n// UDP\n#include \"uecho.h\"\n#include \"uinject.h\"\n@@ -40,6 +41,7 @@ void openapps_init(void) {\n//cjoin_init();\ncwellknown_init();\n//rrt_init();\n+ cinfrared_init();\n// UDP\n//uecho_init();\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/openmote-cc2538/01bsp_infrared/01bsp_infrared.c",
"new_path": "projects/openmote-cc2538/01bsp_infrared/01bsp_infrared.c",
"diff": "@@ -78,7 +78,6 @@ int mote_main(void) {\n// initialize board.\nboard_init();\n- pwm_init();\nsctimer_set_callback(cb_compare);\nsctimer_setCompare(sctimer_readCounter()+SCTIMER_PERIOD);\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/openmote-cc2538/03oos_openwsn/03oos_openwsn.ewp",
"new_path": "projects/openmote-cc2538/03oos_openwsn/03oos_openwsn.ewp",
"diff": "<state>$PROJ_DIR$\\..\\..\\..\\openstack\\cross-layers\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\c6t\\</state>\n+ <state>$PROJ_DIR$\\..\\..\\..\\openapps\\cinfrared\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\cexample\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\cinfo\\</state>\n<state>$PROJ_DIR$\\..\\..\\..\\openapps\\cjoin\\</state>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\leds.c</name>\n</file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\pwm.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\pwm.h</name>\n+ </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\radio.c</name>\n</file>\n<name>$PROJ_DIR$\\..\\..\\..\\openapps\\cinfo\\cinfo.h</name>\n</file>\n</group>\n+ <group>\n+ <name>cinfrared</name>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\cinfrared\\cinfrared.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openapps\\cinfrared\\cinfrared.h</name>\n+ </file>\n+ </group>\n<group>\n<name>cjoin</name>\n<file>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-732. implement infrared app.
|
491,595 |
17.12.2017 15:37:45
| -3,600 |
711e4f31133e9961b2642b1e6cbdffd2b03e74de
|
by default cinfrared is not presented in openapps.c
|
[
{
"change_type": "MODIFY",
"old_path": "openapps/openapps.c",
"new_path": "openapps/openapps.c",
"diff": "#include \"cjoin.h\"\n#include \"cwellknown.h\"\n#include \"rrt.h\"\n-#include \"cinfrared.h\"\n// UDP\n#include \"uecho.h\"\n#include \"uinject.h\"\n@@ -41,7 +40,6 @@ void openapps_init(void) {\n//cjoin_init();\ncwellknown_init();\n//rrt_init();\n- cinfrared_init();\n// UDP\n//uecho_init();\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-732. by default cinfrared is not presented in openapps.c
|
491,595 |
22.12.2017 14:33:29
| -3,600 |
fc759b09a7ab70194c6aa789afe71a2b249dbe11
|
revert the commit since the issue won't fix.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -2132,6 +2132,12 @@ port_INLINE void activity_ri9(PORT_TIMER_WIDTH capturedTime) {\n// clear local variable\nieee154e_vars.ackToSend = NULL;\n+ if ((idmanager_getIsDAGroot()==FALSE &&\n+ icmpv6rpl_isPreferredParent(&(ieee154e_vars.dataReceived->l2_nextORpreviousHop))) ||\n+ IEEE802154_security_isConfigured() == FALSE) {\n+ synchronizePacket(ieee154e_vars.syncCapturedTime);\n+ }\n+\n// inform upper layer of reception (after ACK sent)\nnotif_receive(ieee154e_vars.dataReceived);\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-719. revert the commit since the issue won't fix.
|
491,588 |
26.01.2018 13:23:03
| -3,600 |
3d25f0862d9b80ab96b06da86ba49d89dd8a6f8a
|
printf capabilities
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -46,6 +46,8 @@ if env['noadaptivesync']==1:\nenv.Append(CPPDEFINES = 'NOADAPTIVESYNC')\nif env['l2_security']==1:\nenv.Append(CPPDEFINES = 'L2_SECURITY_ACTIVE')\n+if env['printf']==1:\n+ env.Append(CPPDEFINES = 'OPENSERIAL_PRINTF')\nif env['deadline_option']==1:\nenv.Append(CPPDEFINES = 'DEADLINE_OPTION_ENABLED')\n"
},
{
"change_type": "MODIFY",
"old_path": "SConstruct",
"new_path": "SConstruct",
"diff": "@@ -79,6 +79,8 @@ project:\nnoadaptivesync Do not use adaptive synchronization.\nl2_security Use hop-by-hop encryption and authentication.\n0 (off), 1 (on)\n+ printf Sends the string messages to openvisualizer\n+ 0 (off ), 1 (on, default)\nide qtcreator\nCommon variables:\n@@ -138,6 +140,7 @@ command_line_options = {\n'debug': ['0','1'],\n'noadaptivesync': ['0','1'],\n'l2_security': ['0','1'],\n+ 'printf': ['1','0'], # 1=on (default), 0=off\n'deadline_option': ['0','1'],\n'ide': ['none','qtcreator'],\n'revision': ['']\n@@ -285,6 +288,13 @@ command_line_vars.AddVariables(\nvalidate_option, # validator\nint, # converter\n),\n+ (\n+ 'printf', # key\n+ '', # help\n+ command_line_options['printf'][0], # default\n+ validate_option, # validator\n+ int, # converter\n+ ),\n(\n'deadline_option', # key\n'', # help\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -245,6 +245,38 @@ owerror_t openserial_printSniffedPacket(uint8_t* buffer, uint8_t length, uint8_t\nreturn E_SUCCESS;\n}\n+owerror_t openserial_printf(uint8_t calling_component, char* buffer, uint8_t length) {\n+#ifdef OPENSERIAL_PRINTF\n+ uint8_t i;\n+ uint8_t asn[5];\n+ INTERRUPT_DECLARATION();\n+\n+ // retrieve ASN\n+ ieee154e_getAsn(asn);\n+\n+ DISABLE_INTERRUPTS();\n+ openserial_vars.outputBufFilled = TRUE;\n+ outputHdlcOpen();\n+ outputHdlcWrite(SERFRAME_MOTE2PC_PRINTF);\n+ outputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]);\n+ outputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[0]);\n+ outputHdlcWrite(calling_component);\n+ outputHdlcWrite(asn[0]);\n+ outputHdlcWrite(asn[1]);\n+ outputHdlcWrite(asn[2]);\n+ outputHdlcWrite(asn[3]);\n+ outputHdlcWrite(asn[4]);\n+ for (i=0;i<length;i++){\n+ outputHdlcWrite(buffer[i]);\n+ }\n+ outputHdlcClose();\n+ ENABLE_INTERRUPTS();\n+\n+#endif\n+\n+ return E_SUCCESS;\n+}\n+\n//===== retrieving inputBuffer\nuint8_t openserial_getInputBufferFilllevel() {\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.h",
"new_path": "drivers/common/openserial.h",
"diff": "@@ -51,6 +51,7 @@ enum {\n#define SERFRAME_MOTE2PC_CRITICAL ((uint8_t)'C')\n#define SERFRAME_MOTE2PC_REQUEST ((uint8_t)'R')\n#define SERFRAME_MOTE2PC_SNIFFED_PACKET ((uint8_t)'P')\n+#define SERFRAME_MOTE2PC_PRINTF ((uint8_t)'F')\n// frames sent PC->mote\n#define SERFRAME_PC2MOTE_SETROOT ((uint8_t)'R')\n@@ -150,6 +151,7 @@ owerror_t openserial_printCritical(\n);\nowerror_t openserial_printData(uint8_t* buffer, uint8_t length);\nowerror_t openserial_printSniffedPacket(uint8_t* buffer, uint8_t length, uint8_t channel);\n+owerror_t openserial_printf(uint8_t calling_component, char* buffer, uint8_t length);\n// retrieving inputBuffer\nuint8_t openserial_getInputBufferFilllevel(void);\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -404,6 +404,7 @@ functionsToChange = [\n'openserial_printInfo',\n'openserial_printError',\n'openserial_printCritical',\n+ 'openserial_printf',\n'openserial_board_reset_cb',\n'openserial_getInputBufferFilllevel',\n'openserial_getInputBuffer',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
printf capabilities
|
491,588 |
29.01.2018 14:40:24
| -3,600 |
1628823199cea286f23fa22a67e0f16ba4ea593f
|
function to push an int32 after a string (printf)
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "\\author Fabien Chraim <chraim@eecs.berkeley.edu>, March 2012.\n\\author Thomas Watteyne <thomas.watteyne@inria.fr>, August 2016.\n*/\n+#include <stdio.h>\n+#include <stdarg.h>\n+#include <string.h>\n#include \"opendefs.h\"\n#include \"openserial.h\"\n@@ -245,6 +248,37 @@ owerror_t openserial_printSniffedPacket(uint8_t* buffer, uint8_t length, uint8_t\nreturn E_SUCCESS;\n}\n+//append a uint32_t at the end of a string (without the non significant zeros)\n+char *openserial_ncat_uint32_t(char *str, uint32_t val, uint8_t length){\n+#ifdef OPENSERIAL_PRINTF\n+ uint8_t l = strlen(str);\n+\n+ if (l + 10 > length) //at most 10 digits\n+ return(str);\n+\n+ uint8_t digit, shift, i;\n+ uint32_t power;\n+ bool nonzero = FALSE;\n+\n+\n+ power = 1000000000;\n+ shift = 0; // to avoid non significant zeros\n+ for(i=0; i<10; i++){\n+ digit = val / power;\n+ if (digit != 0 || i == 9 || nonzero){\n+ nonzero = TRUE;\n+ str[l + shift] = '0' + digit;\n+ shift++;\n+ }\n+ val = val - power * digit;\n+ power = power / 10;\n+ }\n+ str[l+shift] = '\\0';\n+#endif\n+ return(str);\n+}\n+\n+\nowerror_t openserial_printf(uint8_t calling_component, char* buffer, uint8_t length) {\n#ifdef OPENSERIAL_PRINTF\nuint8_t i;\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.h",
"new_path": "drivers/common/openserial.h",
"diff": "#include \"opendefs.h\"\n+#include <stdio.h>\n+#include <stdarg.h>\n+#include <string.h>\n+\n/**\n\\addtogroup drivers\n\\{\n@@ -151,6 +155,7 @@ owerror_t openserial_printCritical(\n);\nowerror_t openserial_printData(uint8_t* buffer, uint8_t length);\nowerror_t openserial_printSniffedPacket(uint8_t* buffer, uint8_t length, uint8_t channel);\n+char *openserial_ncat_uint32_t(char *str, uint32_t val, uint8_t length);\nowerror_t openserial_printf(uint8_t calling_component, char* buffer, uint8_t length);\n// retrieving inputBuffer\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
function to push an int32 after a string (printf)
|
491,588 |
29.01.2018 14:50:58
| -3,600 |
5615bc4febf7d796e85fdd4d10715e8b3eeee705
|
the short address is txed in the correct order
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -211,8 +211,8 @@ owerror_t openserial_printData(uint8_t* buffer, uint8_t length) {\nopenserial_vars.outputBufFilled = TRUE;\noutputHdlcOpen();\noutputHdlcWrite(SERFRAME_MOTE2PC_DATA);\n- outputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]);\noutputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[0]);\n+ outputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]);\noutputHdlcWrite(asn[0]);\noutputHdlcWrite(asn[1]);\noutputHdlcWrite(asn[2]);\n@@ -235,8 +235,8 @@ owerror_t openserial_printSniffedPacket(uint8_t* buffer, uint8_t length, uint8_t\nopenserial_vars.outputBufFilled = TRUE;\noutputHdlcOpen();\noutputHdlcWrite(SERFRAME_MOTE2PC_SNIFFED_PACKET);\n- outputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]);\noutputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[0]);\n+ outputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]);\nfor (i=0;i<length;i++){\noutputHdlcWrite(buffer[i]);\n}\n@@ -292,17 +292,13 @@ owerror_t openserial_printf(uint8_t calling_component, char* buffer, uint8_t len\nopenserial_vars.outputBufFilled = TRUE;\noutputHdlcOpen();\noutputHdlcWrite(SERFRAME_MOTE2PC_PRINTF);\n- outputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]);\noutputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[0]);\n+ outputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]);\noutputHdlcWrite(calling_component);\n- outputHdlcWrite(asn[0]);\n- outputHdlcWrite(asn[1]);\n- outputHdlcWrite(asn[2]);\n- outputHdlcWrite(asn[3]);\n- outputHdlcWrite(asn[4]);\n- for (i=0;i<length;i++){\n+ for(i=0; i<5;i++)\n+ outputHdlcWrite(asn[i]);\n+ for (i=0;i<length;i++)\noutputHdlcWrite(buffer[i]);\n- }\noutputHdlcClose();\nENABLE_INTERRUPTS();\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
the short address is txed in the correct order
|
491,588 |
29.01.2018 17:26:56
| -3,600 |
c8b3df2ca4ef45055290c2b67d6bcec55e97a127
|
new printf functions (string vs. utin32_t)
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "#include \"icmpv6echo.h\"\n#include \"sf0.h\"\n+\n+\n//=========================== variables =======================================\nopenserial_vars_t openserial_vars;\n+enum{\n+ TYPE_STR = 0, //subtype for the printf message\n+ TYPE_INT = 1\n+};\n//=========================== prototypes ======================================\n// printing\n@@ -248,38 +254,29 @@ owerror_t openserial_printSniffedPacket(uint8_t* buffer, uint8_t length, uint8_t\nreturn E_SUCCESS;\n}\n-//append a uint32_t at the end of a string (without the non significant zeros)\n-char *openserial_ncat_uint32_t(char *str, uint32_t val, uint8_t length){\n+owerror_t openserial_print_uint32_t(uint32_t value) {\n#ifdef OPENSERIAL_PRINTF\n- uint8_t l = strlen(str);\n-\n- if (l + 10 > length) //at most 10 digits\n- return(str);\n-\n- uint8_t digit, shift, i;\n- uint32_t power;\n- bool nonzero = FALSE;\n+ uint8_t i;\n+ uint8_t pvalue[5];\n+ INTERRUPT_DECLARATION();\n+ DISABLE_INTERRUPTS();\n+ openserial_vars.outputBufFilled = TRUE;\n+ outputHdlcOpen();\n+ outputHdlcWrite(SERFRAME_MOTE2PC_PRINTF);\n+ outputHdlcWrite(TYPE_INT);\n+ pvalue = (uint8_t*)&value;\n+ for (i=0;i<4;i++)\n+ outputHdlcWrite(pvalue[i]);\n+ outputHdlcClose();\n+ ENABLE_INTERRUPTS();\n- power = 1000000000;\n- shift = 0; // to avoid non significant zeros\n- for(i=0; i<10; i++){\n- digit = val / power;\n- if (digit != 0 || i == 9 || nonzero){\n- nonzero = TRUE;\n- str[l + shift] = '0' + digit;\n- shift++;\n- }\n- val = val - power * digit;\n- power = power / 10;\n- }\n- str[l+shift] = '\\0';\n#endif\n- return(str);\n-}\n+ return E_SUCCESS;\n+}\n-owerror_t openserial_printf(uint8_t calling_component, char* buffer, uint8_t length) {\n+owerror_t openserial_print_str(char* buffer, uint8_t length) {\n#ifdef OPENSERIAL_PRINTF\nuint8_t i;\nuint8_t asn[5];\n@@ -292,9 +289,9 @@ owerror_t openserial_printf(uint8_t calling_component, char* buffer, uint8_t len\nopenserial_vars.outputBufFilled = TRUE;\noutputHdlcOpen();\noutputHdlcWrite(SERFRAME_MOTE2PC_PRINTF);\n+ outputHdlcWrite(TYPE_STR);\noutputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[0]);\noutputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]);\n- outputHdlcWrite(calling_component);\nfor(i=0; i<5;i++)\noutputHdlcWrite(asn[i]);\nfor (i=0;i<length;i++)\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.h",
"new_path": "drivers/common/openserial.h",
"diff": "@@ -155,8 +155,8 @@ owerror_t openserial_printCritical(\n);\nowerror_t openserial_printData(uint8_t* buffer, uint8_t length);\nowerror_t openserial_printSniffedPacket(uint8_t* buffer, uint8_t length, uint8_t channel);\n-char *openserial_ncat_uint32_t(char *str, uint32_t val, uint8_t length);\n-owerror_t openserial_printf(uint8_t calling_component, char* buffer, uint8_t length);\n+owerror_t openserial_print_str(char* buffer, uint8_t length);\n+owerror_t openserial_print_uint32_t(uint32_t value);\n// retrieving inputBuffer\nuint8_t openserial_getInputBufferFilllevel(void);\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -404,7 +404,8 @@ functionsToChange = [\n'openserial_printInfo',\n'openserial_printError',\n'openserial_printCritical',\n- 'openserial_printf',\n+ 'openserial_print_str',\n+ 'openserial_print_uint32_t',\n'openserial_board_reset_cb',\n'openserial_getInputBufferFilllevel',\n'openserial_getInputBuffer',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
new printf functions (string vs. utin32_t)
|
491,588 |
29.01.2018 17:35:25
| -3,600 |
ffc4c77f988ebfcc65a7a0a403b39ed650dc4728
|
correct conversion uint32_t -> array of uint8_t
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -257,7 +257,7 @@ owerror_t openserial_printSniffedPacket(uint8_t* buffer, uint8_t length, uint8_t\nowerror_t openserial_print_uint32_t(uint32_t value) {\n#ifdef OPENSERIAL_PRINTF\nuint8_t i;\n- uint8_t pvalue[5];\n+ uint8_t pvalue[4];\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\n@@ -265,7 +265,7 @@ owerror_t openserial_print_uint32_t(uint32_t value) {\noutputHdlcOpen();\noutputHdlcWrite(SERFRAME_MOTE2PC_PRINTF);\noutputHdlcWrite(TYPE_INT);\n- pvalue = (uint8_t*)&value;\n+ memcpy(pvalue, &value, 4);\nfor (i=0;i<4;i++)\noutputHdlcWrite(pvalue[i]);\noutputHdlcClose();\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
correct conversion uint32_t -> array of uint8_t
|
491,591 |
08.02.2018 09:55:58
| -3,600 |
a05debbafce7e7487e861e360fe5f3aebcbfaf59
|
MAChigh/sixtop: fix potential uninitialized variable
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -1061,9 +1061,9 @@ void sixtop_six2six_notifyReceive(\nuint8_t length,\nOpenQueueEntry_t* pkt\n){\n- uint8_t returnCode;\n- uint16_t metadata;\n- uint8_t cellOptions;\n+ uint8_t returnCode = -1;\n+ uint16_t metadata = -1;\n+ uint8_t cellOptions = -1;\nuint8_t cellOptions_transformed;\nuint16_t offset;\nuint16_t length_groupid_type;\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
MAChigh/sixtop: fix potential uninitialized variable
|
491,591 |
08.02.2018 11:16:44
| -3,600 |
e6cc0d5d7358c9a161bf0aad0f67aab0af28ce4d
|
MAClow/IEEE802154: fix potential uninitialized variable
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154.c",
"new_path": "openstack/02a-MAClow/IEEE802154.c",
"diff": "@@ -38,7 +38,7 @@ void ieee802154_prependHeader(OpenQueueEntry_t* msg,\nuint16_t timeSyncInfo;\nuint16_t length_elementid_type;\nbool headerIEPresent = FALSE;\n- uint8_t destAddrMode;\n+ uint8_t destAddrMode = -1;\nsecurityEnabled = msg->l2_securityLevel == IEEE154_ASH_SLF_TYPE_NOSEC ? 0 : 1;\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
MAClow/IEEE802154: fix potential uninitialized variable
|
491,591 |
08.02.2018 14:18:11
| -3,600 |
7221a3df11641583ceee23eca990aec4c549d2db
|
Bugfix introduced in Change back to default channel hopping.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -111,7 +111,7 @@ void ieee154e_init(void) {\nmemset(&ieee154e_vars,0,sizeof(ieee154e_vars_t));\nmemset(&ieee154e_dbg,0,sizeof(ieee154e_dbg_t));\n- ieee154e_vars.singleChannel = 26; // 0 means channel hopping\n+ ieee154e_vars.singleChannel = 0; // 0 means channel hopping\nieee154e_vars.isAckEnabled = TRUE;\nieee154e_vars.isSecurityEnabled = FALSE;\nieee154e_vars.slotDuration = TsSlotDuration;\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
Bugfix introduced in #411. Change back to default channel hopping.
|
491,595 |
08.03.2018 14:10:23
| -3,600 |
6bb7f3d965d661fee8d5a07374fadbf68a083df5
|
do not compile for telosb, wsn430v13b and wsn430v14 (microcontroller ROM size limited).
|
[
{
"change_type": "MODIFY",
"old_path": ".travis.yml",
"new_path": ".travis.yml",
"diff": "@@ -23,14 +23,14 @@ script:\n- scons board=z1 toolchain=mspgcc verbose=1 oos_macpong\n- scons board=iot-lab_M3 toolchain=armgcc verbose=1 oos_macpong\n- scons board=iot-lab_A8-M3 toolchain=armgcc verbose=1 oos_macpong\n-- scons board=telosb toolchain=mspgcc verbose=1 oos_openwsn\n-- scons board=telosb kernel=freertos toolchain=mspgcc verbose=1 oos_openwsn\n+# - scons board=telosb toolchain=mspgcc verbose=1 oos_openwsn\n+# - scons board=telosb kernel=freertos toolchain=mspgcc verbose=1 oos_openwsn\n- scons board=openmote-cc2538 toolchain=armgcc verbose=1 oos_openwsn\n- scons board=openmote-cc2538 goldenImage=sniffer toolchain=armgcc verbose=1 oos_sniffer\n- scons board=openmote-cc2538 goldenImage=root toolchain=armgcc verbose=1 oos_openwsn\n- scons board=openmote-b toolchain=armgcc verbose=1 oos_openwsn\n-- scons board=wsn430v14 toolchain=mspgcc verbose=1 oos_openwsn\n-- scons board=wsn430v13b toolchain=mspgcc verbose=1 oos_openwsn\n+# - scons board=wsn430v14 toolchain=mspgcc verbose=1 oos_openwsn\n+# - scons board=wsn430v13b toolchain=mspgcc verbose=1 oos_openwsn\n- scons board=gina toolchain=mspgcc verbose=1 oos_openwsn\n- scons board=z1 toolchain=mspgcc verbose=1 oos_openwsn\n- scons board=python toolchain=gcc verbose=1 oos_openwsn\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-613. do not compile for telosb, wsn430v13b and wsn430v14 (microcontroller ROM size limited).
|
491,595 |
12.03.2018 10:37:52
| -3,600 |
97073aa3369f9977e230c7609f242e308649290b
|
update sixtop return codes.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "@@ -120,8 +120,7 @@ void msf_handleRCError(uint8_t code, open_addr_t* address){\nif (\ncode==IANA_6TOP_RC_RESET ||\n- code==IANA_6TOP_RC_LOCKED ||\n- code==IANA_6TOP_RC_BUSY\n+ code==IANA_6TOP_RC_LOCKED\n){\n// waitretry\nmsf_vars.waitretry = TRUE;\n@@ -151,7 +150,7 @@ void msf_handleRCError(uint8_t code, open_addr_t* address){\nscheduler_push_task(msf_timer_clear_task,TASKPRIO_MSF);\n}\n- if (code==IANA_6TOP_RC_NORES){\n+ if (code==IANA_6TOP_RC_BUSY){\n// mark neighbor f6NORES\nneighbors_setNeighborNoResource(address);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -1306,7 +1306,7 @@ void sixtop_six2six_notifyReceive(\n// add command\nif (code == IANA_6TOP_CMD_ADD){\nif (schedule_getNumberOfFreeEntries() < numCells){\n- returnCode = IANA_6TOP_RC_NORES;\n+ returnCode = IANA_6TOP_RC_BUSY;\nbreak;\n}\n// retrieve cell list\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.h",
"new_path": "openstack/02b-MAChigh/sixtop.h",
"diff": "#define IANA_6TOP_CMD_CLEAR 0x06 // CMD_CLEAR | clear all cells\n// 6P return code\n#define IANA_6TOP_RC_SUCCESS 0x00 // RC_SUCCESS | operation succeeded\n-#define IANA_6TOP_RC_ERROR 0x01 // RC_ERROR | generic error\n-#define IANA_6TOP_RC_EOL 0x02 // RC_EOL | end of list\n+#define IANA_6TOP_RC_EOL 0x01 // RC_EOL | end of list\n+#define IANA_6TOP_RC_ERROR 0x02 // RC_ERROR | generic error\n#define IANA_6TOP_RC_RESET 0x03 // RC_RESET | critical error, reset\n#define IANA_6TOP_RC_VER_ERR 0x04 // RC_VER_ERR | unsupported 6P version\n#define IANA_6TOP_RC_SFID_ERR 0x05 // RC_SFID_ERR | unsupported SFID\n#define IANA_6TOP_RC_CELLLIST_ERR 0x07 // RC_CELLLIST_ERR | cellList error\n#define IANA_6TOP_RC_BUSY 0x08 // RC_BUSY | busy\n#define IANA_6TOP_RC_LOCKED 0x09 // RC_LOCKED | locked\n-#define IANA_6TOP_RC_NORES 0x0a // RC_NORES | not enough resources\n// SF ID\n#define SFID_SF0 0\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. update sixtop return codes.
|
491,595 |
12.03.2018 10:55:29
| -3,600 |
66e6cd495a617629c5e92f1546fc31a28609f11a
|
remove TCP based application.
|
[
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -154,29 +154,26 @@ enum {\nCOMPONENT_ICMPv6ROUTER = 0x15,\nCOMPONENT_ICMPv6RPL = 0x16,\n//TRAN\n- COMPONENT_OPENTCP = 0x17,\n- COMPONENT_OPENUDP = 0x18,\n- COMPONENT_OPENCOAP = 0x19,\n+ COMPONENT_OPENUDP = 0x17,\n+ COMPONENT_OPENCOAP = 0x18,\n// applications\n- COMPONENT_C6T = 0x1a,\n- COMPONENT_CEXAMPLE = 0x1b,\n- COMPONENT_CINFO = 0x1c,\n- COMPONENT_CLEDS = 0x1d,\n- COMPONENT_CSENSORS = 0x1e,\n- COMPONENT_CSTORM = 0x1f,\n- COMPONENT_CWELLKNOWN = 0x20,\n- COMPONENT_TECHO = 0x21,\n- COMPONENT_TOHLONE = 0x22,\n- COMPONENT_UECHO = 0x23,\n- COMPONENT_UINJECT = 0x24,\n- COMPONENT_RRT = 0x25,\n- COMPONENT_SECURITY = 0x26,\n- COMPONENT_USERIALBRIDGE = 0x27,\n- COMPONENT_UEXPIRATION = 0x28,\n- COMPONENT_UMONITOR = 0x29,\n- COMPONENT_CJOIN = 0x2a,\n- COMPONENT_OPENOSCOAP = 0x2b,\n- COMPONENT_CINFRARED = 0x2d,\n+ COMPONENT_C6T = 0x19,\n+ COMPONENT_CEXAMPLE = 0x1a,\n+ COMPONENT_CINFO = 0x1b,\n+ COMPONENT_CLEDS = 0x1c,\n+ COMPONENT_CSENSORS = 0x1d,\n+ COMPONENT_CSTORM = 0x1e,\n+ COMPONENT_CWELLKNOWN = 0x1f,\n+ COMPONENT_UECHO = 0x20,\n+ COMPONENT_UINJECT = 0x21,\n+ COMPONENT_RRT = 0x22,\n+ COMPONENT_SECURITY = 0x23,\n+ COMPONENT_USERIALBRIDGE = 0x24,\n+ COMPONENT_UEXPIRATION = 0x25,\n+ COMPONENT_UMONITOR = 0x26,\n+ COMPONENT_CJOIN = 0x27,\n+ COMPONENT_OPENOSCOAP = 0x28,\n+ COMPONENT_CINFRARED = 0x29,\n};\n/**\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. remove TCP based application.
|
491,606 |
20.03.2018 13:48:22
| -3,600 |
8eb34fa20d1fbaac280a3accc983352cd1feff0d
|
Update 01bsp_cryptoengine.c
when running CCMS_AUTH tests output is never compared because len_m is zero for both examples, use tag_len instead
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_cryptoengine/01bsp_cryptoengine.c",
"new_path": "projects/common/01bsp_cryptoengine/01bsp_cryptoengine.c",
"diff": "@@ -162,7 +162,7 @@ static owerror_t run_aes_ccms_auth_forward_suite(aes_ccms_auth_forward_suite_t*\nsuite[i].key,\nsuite[i].len_tag) == E_SUCCESS) {\n- if(memcmp(suite[i].m, suite[i].expected_ciphertext, suite[i].len_m) == 0) {\n+ if(memcmp(suite[i].m, suite[i].expected_ciphertext, suite[i].len_tag) == 0) {\nsuccess++;\n}\n}\n@@ -188,7 +188,7 @@ static owerror_t run_aes_ccms_auth_inverse_suite(aes_ccms_auth_forward_suite_t*\nsuite[i].key,\nsuite[i].len_tag) == E_SUCCESS) {\n- if(memcmp(suite[i].m, suite[i].expected_ciphertext, suite[i].len_m) == 0) {\n+ if(memcmp(suite[i].m, suite[i].expected_ciphertext, suite[i].len_tag) == 0) {\nsuccess++;\n}\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
Update 01bsp_cryptoengine.c
when running CCMS_AUTH tests output is never compared because len_m is zero for both examples, use tag_len instead
|
491,595 |
09.04.2018 19:04:33
| -7,200 |
71405cbd04ee8d9c5ddb0adb9d60ebacfaf1fc7f
|
update signal and clear commands value.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.h",
"new_path": "openstack/02b-MAChigh/sixtop.h",
"diff": "#define IANA_6TOP_CMD_RELOCATE 0x03 // CMD_RELOCATE | relocate one or more cells\n#define IANA_6TOP_CMD_COUNT 0x04 // CMD_COUNT | count scheduled cells\n#define IANA_6TOP_CMD_LIST 0x05 // CMD_LIST | list the scheduled cells\n-#define IANA_6TOP_CMD_CLEAR 0x06 // CMD_CLEAR | clear all cells\n+#define IANA_6TOP_CMD_SIGNAL 0x06 // CMD_SIGNAL | signal command\n+#define IANA_6TOP_CMD_CLEAR 0x07 // CMD_CLEAR | clear all cells\n// 6P return code\n#define IANA_6TOP_RC_SUCCESS 0x00 // RC_SUCCESS | operation succeeded\n#define IANA_6TOP_RC_EOL 0x01 // RC_EOL | end of list\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-548. update signal and clear commands value.
|
491,595 |
11.04.2018 16:22:05
| -7,200 |
e24b7fb6091ffc1b3174a002f844234741806377
|
use lower case name of OpenMote-CC2538
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -13,7 +13,7 @@ Build status\n| [OpenWSN builder](http://builder.openwsn.org/job/Firmware/board=wsn430v13b,label=master,project=oos_openwsn,toolchain=mspgcc/) | compile (wsn430v13b) | [](http://builder.openwsn.org/job/Firmware/board=wsn430v13b,label=master,project=oos_macpong,toolchain=mspgcc/)\n| [OpenWSN builder](http://builder.openwsn.org/job/Firmware/board=wsn430v14,label=master,project=oos_openwsn,toolchain=mspgcc/) | compile (wsn430v14) | [](http://builder.openwsn.org/job/Firmware/board=wsn430v14,label=master,project=oos_macpong,toolchain=mspgcc/)\n| [OpenWSN builder](http://builder.openwsn.org/job/Firmware/board=Z1,label=master,project=oos_openwsn,toolchain=mspgcc/) | compile (Z1) | [](http://builder.openwsn.org/job/Firmware/board=z1,label=master,project=oos_macpong,toolchain=mspgcc/)\n-| [OpenWSN builder](http://builder.openwsn.org/job/Firmware/board=OpenMote-CC2538,label=master,project=oos_openwsn,toolchain=armgcc/) | compile (OpenMote-CC2538) | [](http://builder.openwsn.org/job/Firmware/board=OpenMote-CC2538,label=master,project=oos_openwsn,toolchain=armgcc/)\n+| [OpenWSN builder](http://builder.openwsn.org/job/Firmware/board=openmote-cc2538,label=master,project=oos_openwsn,toolchain=armgcc/) | compile (OpenMote-CC2538) | [](http://builder.openwsn.org/job/Firmware/board=openmote-cc2538,label=master,project=oos_openwsn,toolchain=armgcc/)\n| [OpenWSN builder](http://builder.openwsn.org/job/Firmware/board=OpenMoteSTM,label=master,project=oos_openwsn,toolchain=armgcc/) | compile (OpenMoteSTM) | [](http://builder.openwsn.org/job/Firmware/board=openmotestm,label=master,project=oos_openwsn,toolchain=armgcc/)\n| [OpenWSN builder](http://builder.openwsn.org/job/Firmware/board=IoT-LAB_M3,label=master,project=oos_openwsn,toolchain=armgcc/) | compile (IoT-LAB_M3) | [](http://builder.openwsn.org/job/Firmware/board=iot-lab_M3,label=master,project=oos_openwsn,toolchain=armgcc/)\n| [OpenWSN builder](http://builder.openwsn.org/job/Firmware/board=Python,label=master,project=oos_openwsn,toolchain=gcc/) | compile (Python, simulation) | [](http://builder.openwsn.org/job/Firmware/board=python,label=master,project=oos_openwsn,toolchain=gcc/)\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
use lower case name of OpenMote-CC2538
|
491,595 |
12.04.2018 16:18:57
| -7,200 |
95946cc9b89628d158a811f99832beae620c5575
|
use the randomized period to send packets ensuring the packets spread on all channel evenly.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-cc2538/board_info.h",
"new_path": "bsp/boards/openmote-cc2538/board_info.h",
"diff": "//===== IEEE802154E timing\n-#define SLOTDURATION_10MS // by default, we use 10ms time slot\n+#define SLOTDURATION 10 // in miliseconds\n-#ifdef SLOTDURATION_10MS\n+#if SLOTDURATION==10\n// time-slot related\n#define PORT_TsSlotDuration 328 // counter counts one extra count, see datasheet\n// execution speed related\n#endif\n#define PORT_delayRx 0 // 0us (can not measure)\n// radio watchdog\n-#else\n+#endif\n+\n+#if SLOTDURATION==15\n// time-slot related\n#define PORT_TsSlotDuration 492 // counter counts one extra count, see datasheet\n// execution speed related\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/python/board_info.h",
"new_path": "bsp/boards/python/board_info.h",
"diff": "#define SCHEDULER_WAKEUP()\n#define SCHEDULER_ENABLE_INTERRUPT()\n-// this is a workaround from the fact that the interrupt pin for the GINA radio\n-// is not connected to a pin on the MSP which allows time capture.\n-#define CAPTURE_TIME() TACCTL2 |= CCIS0; \\\n- TACCTL2 &= ~CCIS0;\n-\n-//===== pinout\n-\n-// [P4.7] radio SLP_TR_CNTL\n-#define PORT_PIN_RADIO_SLP_TR_CNTL_HIGH() P4OUT |= 0x80;\n-#define PORT_PIN_RADIO_SLP_TR_CNTL_LOW() P4OUT &= ~0x80;\n-// radio reset line\n-// on GINA, the /RST line is not connected to the uC\n-#define PORT_PIN_RADIO_RESET_HIGH() // nothing\n-#define PORT_PIN_RADIO_RESET_LOW() // nothing\n+#define SLOTDURATION 10 // in miliseconds\n//===== IEEE802154E timing\n-#ifdef GOLDEN_IMAGE_ROOT\n// time-slot related\n#define PORT_TsSlotDuration 328 // counter counts one extra count, see datasheet\n// execution speed related\n// radio speed related\n#define PORT_delayTx 7 // 366us (measured xxxus)\n#define PORT_delayRx 0 // 0us (can not measure)\n-// radio watchdog\n-#else\n-// time-slot related\n-#define PORT_TsSlotDuration 491 // counter counts one extra count, see datasheet\n-// execution speed related\n-#define PORT_maxTxDataPrepare 66 // 2014us (measured 746us)\n-#define PORT_maxRxAckPrepare 10 // 305us (measured 83us)\n-#define PORT_maxRxDataPrepare 33 // 1007us (measured 84us)\n-#define PORT_maxTxAckPrepare 10 // 305us (measured 219us)\n-// radio speed related\n-#define PORT_delayTx 7 // 214us (measured 219us)\n-#define PORT_delayRx 0 // 0us (can not measure)\n-// radio watchdog\n-#endif\n//===== adaptive_sync accuracy\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -42,7 +42,7 @@ static const uint8_t ebIEsBytestream[] = {\n#define TX_POWER 31 // 1=-25dBm, 31=0dBm (max value)\n#define RESYNCHRONIZATIONGUARD 5 // in 32kHz ticks. min distance to the end of the slot to successfully synchronize\n#define US_PER_TICK 30 // number of us per 32kHz clock tick\n-#define EB_PORTION 6 // The portion of minimal cells that used for sending EB.\n+#define EB_PERIOD 2000 // in miliseconds: the period of sending EB\n#define MAXKAPERIOD 1000 // in slots: 2000@15ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n#define DESYNCTIMEOUT 2333 // in slots: 2333@15ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n#define LIMITLARGETIMECORRECTION 5 // threshold number of ticks to declare a timeCorrection \"large\"\n@@ -158,12 +158,13 @@ typedef enum {\n// - duration_in_seconds = ticks / 32768\nenum ieee154e_atomicdurations_enum {\n// time-slot related\n-#ifdef SLOTDURATION_10MS\n+#if SLOTDURATION==10\nTsTxOffset = 70, // 2120us\nTsLongGT = 36, // 1100us\nTsTxAckDelay = 33, // 1000us\nTsShortGT = 9, // 500us, The standardlized value for this is 400/2=200us(7ticks). Currectly 7 doesn't work for short packet, change it back to 7 when found the problem.\n-#else\n+#endif\n+#if SLOTDURATION==15\nTsTxOffset = 131, // 4000us\nTsLongGT = 43, // 1300us\nTsTxAckDelay = 151, // 4606us\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "@@ -46,9 +46,10 @@ void msf_init(void) {\n(sixtop_sf_handle_callback)msf_handleRCError\n);\nmsf_vars.housekeepingTimerId = opentimers_create();\n+ msf_vars.housekeepingPeriod = HOUSEKEEPING_PERIOD;\nopentimers_scheduleIn(\nmsf_vars.housekeepingTimerId,\n- 872 +(openrandom_get16b()&0xff),\n+ openrandom_getRandomizePeriod(msf_vars.housekeepingPeriod, msf_vars.housekeepingPeriod),\nTIME_MS,\nTIMER_ONESHOT,\nmsf_timer_housekeeping_cb\n@@ -165,7 +166,7 @@ void msf_timer_housekeeping_cb(opentimers_id_t id){\n// update the period\nopentimers_scheduleIn(\nmsf_vars.housekeepingTimerId,\n- 872 +(openrandom_get16b()&0xff),\n+ openrandom_getRandomizePeriod(msf_vars.housekeepingPeriod, msf_vars.housekeepingPeriod),\nTIME_MS,\nTIMER_ONESHOT,\nmsf_timer_housekeeping_cb\n@@ -173,14 +174,8 @@ void msf_timer_housekeeping_cb(opentimers_id_t id){\n}\nvoid msf_timer_housekeeping_task(void){\n- msf_vars.housekeepingTimerCounter = (msf_vars.housekeepingTimerCounter+1)%HOUSEKEEPING_PERIOD;\n- switch (msf_vars.housekeepingTimerCounter) {\n- case 0:\n+\nmsf_housekeeping();\n- break;\n- default:\n- break;\n- }\n}\nvoid msf_timer_clear_task(void){\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.h",
"new_path": "openstack/02b-MAChigh/msf.h",
"diff": "#define LIM_NUMCELLSUSED_HIGH 12\n#define LIM_NUMCELLSUSED_LOW 4\n-#define HOUSEKEEPING_PERIOD 60 // seconds\n+#define HOUSEKEEPING_PERIOD 30000 // miliseconds\n#define QUARANTINE_DURATION 300 // seconds\n#define WAITDURATION_MIN 30000 // miliseconds\n#define WAITDURATION_RANDOM_RANGE 30000 // miliseconds\n@@ -33,7 +33,7 @@ typedef struct {\nuint8_t numCellsPassed;\nuint8_t numCellsUsed;\nopentimers_id_t housekeepingTimerId;\n- uint8_t housekeepingTimerCounter;\n+ uint16_t housekeepingPeriod;\nopentimers_id_t waitretryTimerId;\nbool waitretry;\n} msf_vars_t;\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -104,14 +104,14 @@ void sixtop_init(void) {\nsixtop_vars.dsn = 0;\nsixtop_vars.mgtTaskCounter = 0;\nsixtop_vars.kaPeriod = MAXKAPERIOD;\n- sixtop_vars.ebPeriod = EB_PORTION*(neighbors_getNumNeighbors()+1);\n+ sixtop_vars.ebPeriod = EB_PERIOD;\nsixtop_vars.isResponseEnabled = TRUE;\nsixtop_vars.six2six_state = SIX_STATE_IDLE;\nsixtop_vars.ebSendingTimerId = opentimers_create();\nopentimers_scheduleIn(\nsixtop_vars.ebSendingTimerId,\n- sixtop_vars.periodMaintenance,\n+ openrandom_getRandomizePeriod(sixtop_vars.ebPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\nTIME_MS,\nTIMER_ONESHOT,\nsixtop_sendingEb_timer_cb\n@@ -632,10 +632,9 @@ owerror_t sixtop_send_internal(\nvoid sixtop_sendingEb_timer_cb(opentimers_id_t id){\nscheduler_push_task(timer_sixtop_sendEb_fired,TASKPRIO_SIXTOP);\n// update the period\n- sixtop_vars.periodMaintenance = 872 +(openrandom_get16b()&0xff);\nopentimers_scheduleIn(\nsixtop_vars.ebSendingTimerId,\n- sixtop_vars.periodMaintenance,\n+ openrandom_getRandomizePeriod(sixtop_vars.ebPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\nTIME_MS,\nTIMER_ONESHOT,\nsixtop_sendingEb_timer_cb\n@@ -654,27 +653,7 @@ void sixtop_timeout_timer_cb(opentimers_id_t id) {\nvoid timer_sixtop_sendEb_fired(void) {\n- uint16_t newPeriod;\n- // current period\n- newPeriod = EB_PORTION*(neighbors_getNumNeighbors()+1);\n- if (\n- sixtop_vars.ebPeriod < newPeriod &&\n- sixtop_vars.ebCounter > newPeriod\n- ){\n- sixtop_vars.ebCounter = 0;\n- sixtop_vars.ebPeriod = newPeriod;\nsixtop_sendEB();\n- } else {\n- sixtop_vars.ebPeriod = newPeriod;\n- sixtop_vars.ebCounter = (sixtop_vars.ebCounter+1)%sixtop_vars.ebPeriod;\n- switch (sixtop_vars.ebCounter) {\n- case 0:\n- sixtop_sendEB();\n- break;\n- default:\n- break;\n- }\n- }\n}\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.c",
"new_path": "openstack/03b-IPv6/icmpv6rpl.c",
"diff": "#include \"idmanager.h\"\n#include \"opentimers.h\"\n#include \"IEEE802154E.h\"\n+#include \"schedule.h\"\n#include \"msf.h\"\n//=========================== variables =======================================\n@@ -33,6 +34,7 @@ void sendDAO(void);\n\\brief Initialize this module.\n*/\nvoid icmpv6rpl_init(void) {\n+\nuint8_t dodagid[16];\n// retrieve my prefix and EUI64\n@@ -81,7 +83,7 @@ void icmpv6rpl_init(void) {\nicmpv6rpl_vars.dioDestination.type = ADDR_128B;\nmemcpy(&icmpv6rpl_vars.dioDestination.addr_128b[0],all_routers_multicast,sizeof(all_routers_multicast));\n- icmpv6rpl_vars.dioPeriod = DIO_PORTION*(neighbors_getNumNeighbors()+1);\n+ icmpv6rpl_vars.dioPeriod = DIO_PERIOD;\nicmpv6rpl_vars.timerIdDIO = opentimers_create();\n//initialize PIO -> move this to dagroot code\n@@ -121,7 +123,7 @@ void icmpv6rpl_init(void) {\nopentimers_scheduleIn(\nicmpv6rpl_vars.timerIdDIO,\n- 872 +(openrandom_get16b()&0xff),\n+ openrandom_getRandomizePeriod(icmpv6rpl_vars.dioPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\nTIME_MS,\nTIMER_ONESHOT,\nicmpv6rpl_timer_DIO_cb\n@@ -166,11 +168,11 @@ void icmpv6rpl_init(void) {\nicmpv6rpl_vars.dao_target.flags = 0;\nicmpv6rpl_vars.dao_target.prefixLength = 0;\n- icmpv6rpl_vars.daoPeriod = TIMER_DAO_TIMEOUT;\n+ icmpv6rpl_vars.daoPeriod = DAO_PERIOD;\nicmpv6rpl_vars.timerIdDAO = opentimers_create();\nopentimers_scheduleIn(\nicmpv6rpl_vars.timerIdDAO,\n- 872 +(openrandom_get16b()&0xff),\n+ openrandom_getRandomizePeriod(icmpv6rpl_vars.daoPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\nTIME_MS,\nTIMER_ONESHOT,\nicmpv6rpl_timer_DAO_cb\n@@ -610,11 +612,12 @@ void icmpv6rpl_killPreferredParent(void) {\ntask.\n*/\nvoid icmpv6rpl_timer_DIO_cb(opentimers_id_t id) {\n+\nscheduler_push_task(icmpv6rpl_timer_DIO_task,TASKPRIO_RPL);\n// update the period\nopentimers_scheduleIn(\nicmpv6rpl_vars.timerIdDIO,\n- 872 +(openrandom_get16b()&0xff),\n+ openrandom_getRandomizePeriod(icmpv6rpl_vars.dioPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\nTIME_MS,\nTIMER_ONESHOT,\nicmpv6rpl_timer_DIO_cb\n@@ -628,27 +631,7 @@ void icmpv6rpl_timer_DIO_cb(opentimers_id_t id) {\n*/\nvoid icmpv6rpl_timer_DIO_task(void) {\n- uint16_t newPeriod;\n- // current period\n- newPeriod = DIO_PORTION*(neighbors_getNumNeighbors()+1);\n- if (\n- icmpv6rpl_vars.dioPeriod < newPeriod &&\n- icmpv6rpl_vars.dioTimerCounter > newPeriod\n- ){\n- icmpv6rpl_vars.dioTimerCounter = 0;\n- icmpv6rpl_vars.dioPeriod = newPeriod;\nsendDIO();\n- } else {\n- icmpv6rpl_vars.dioPeriod = newPeriod;\n- icmpv6rpl_vars.dioTimerCounter = (icmpv6rpl_vars.dioTimerCounter+1)%icmpv6rpl_vars.dioPeriod;\n- switch (icmpv6rpl_vars.dioTimerCounter) {\n- case 0:\n- sendDIO();\n- break;\n- default:\n- break;\n- }\n- }\n}\n/**\n@@ -778,11 +761,12 @@ void sendDIO(void) {\ntask.\n*/\nvoid icmpv6rpl_timer_DAO_cb(opentimers_id_t id) {\n+\nscheduler_push_task(icmpv6rpl_timer_DAO_task,TASKPRIO_RPL);\n// update the period\nopentimers_scheduleIn(\nicmpv6rpl_vars.timerIdDAO,\n- 872 +(openrandom_get16b()&0xff),\n+ openrandom_getRandomizePeriod(icmpv6rpl_vars.daoPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\nTIME_MS,\nTIMER_ONESHOT,\nicmpv6rpl_timer_DAO_cb\n@@ -795,15 +779,8 @@ void icmpv6rpl_timer_DAO_cb(opentimers_id_t id) {\n\\note This function is executed in task context, called by the scheduler.\n*/\nvoid icmpv6rpl_timer_DAO_task(void) {\n- icmpv6rpl_vars.daoTimerCounter = (icmpv6rpl_vars.daoTimerCounter+1)%icmpv6rpl_vars.daoPeriod;\n- switch (icmpv6rpl_vars.daoTimerCounter) {\n- case 0:\n- // called every TIMER_DAO_TIMEOUT seconds\n+\nsendDAO();\n- break;\n- default:\n- break;\n- }\n}\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.h",
"new_path": "openstack/03b-IPv6/icmpv6rpl.h",
"diff": "//=========================== define ==========================================\n-#define DIO_PORTION 6 // The portion of minimal cells that used for sending DIO.\n-#define TIMER_DAO_TIMEOUT 60 // seconds\n+#define DIO_PERIOD 10000 // in miliseconds\n+#define DAO_PERIOD 60000 // in miliseconds\n// Non-Storing Mode of Operation (1)\n#define MOP_DIO_A 0<<5\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openrandom.c",
"new_path": "openstack/cross-layers/openrandom.c",
"diff": "@@ -31,4 +31,15 @@ uint16_t openrandom_get16b(void) {\nreturn random_value;\n}\n+uint16_t openrandom_getRandomizePeriod(uint16_t period, uint16_t range){\n+ uint16_t new_period;\n+ if (period<range){\n+ // randomly choose a new period from [period/2 ... period+period/2]\n+ new_period = period/2+openrandom_get16b()%period;\n+ } else {\n+ new_period = period-range/2+openrandom_get16b()%period;\n+ }\n+ return new_period;\n+}\n+\n//=========================== private =========================================\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openrandom.h",
"new_path": "openstack/cross-layers/openrandom.h",
"diff": "@@ -24,6 +24,7 @@ typedef struct {\nvoid openrandom_init(void);\nuint16_t openrandom_get16b(void);\n+uint16_t openrandom_getRandomizePeriod(uint16_t period, uint16_t range);\n/**\n\\}\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/openmote-cc2538/03oos_openwsn/03oos_openwsn.ewp",
"new_path": "projects/openmote-cc2538/03oos_openwsn/03oos_openwsn.ewp",
"diff": "<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154_security.h</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\ieee802154_security_driver.h</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154E.c</name>\n</file>\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -805,6 +805,7 @@ functionsToChange = [\n# openrandom\n'openrandom_init',\n'openrandom_get16b',\n+ 'openrandom_getRandomizePeriod',\n# packetfunctions\n'packetfunctions_ip128bToMac64b',\n'packetfunctions_mac64bToIp128b',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-743. use the randomized period to send packets ensuring the packets spread on all channel evenly.
|
491,595 |
12.04.2018 16:19:49
| -7,200 |
b5541b10ccb6935d5ff2fa5e595448f2348d5d39
|
use 11 slotframe length to speed up.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "The superframe reappears over time and can be arbitrarily long.\n*/\n-#define SLOTFRAME_LENGTH 101 //should be 101\n+#define SLOTFRAME_LENGTH 11 //should be 101\n//draft-ietf-6tisch-minimal-06\n#define SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS 1\n@@ -39,7 +39,7 @@ The superframe reappears over time and can be arbitrarily long.\nfor serial port to transmit data to dagroot.\n*/\n-#define NUMSLOTSOFF 30\n+#define NUMSLOTSOFF 10\n/**\n\\brief Maximum number of active slots in a superframe.\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-743. use 11 slotframe length to speed up.
|
491,595 |
12.04.2018 16:30:05
| -7,200 |
8204478a7d3dd27686cfeb0eace1f7f05d32ad37
|
update board_info for slotduration.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/gina/board_info.h",
"new_path": "bsp/boards/gina/board_info.h",
"diff": "@@ -61,6 +61,8 @@ to return the board's description.\n//===== IEEE802154E timing\n+#define SLOTDURATION 15 // in miliseconds\n+\n// time-slot related\n#define PORT_TsSlotDuration 492 // counter counts one extra count, see datasheet\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/iot-lab_A8-M3/board_info.h",
"new_path": "bsp/boards/iot-lab_A8-M3/board_info.h",
"diff": "@@ -50,6 +50,9 @@ to return the board's description.\n#define PORT_PIN_RADIO_RESET_LOW() //GPIOC->ODR &= ~0X0040;// nothing\n//===== IEEE802154E timing\n+\n+#define SLOTDURATION 15 // in miliseconds\n+\n// time-slot related\n#define PORT_TsSlotDuration 491 // counter counts one extra count, see datasheet\n// execution speed related\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/iot-lab_M3/board_info.h",
"new_path": "bsp/boards/iot-lab_M3/board_info.h",
"diff": "@@ -49,6 +49,9 @@ to return the board's description.\n//#define PORT_PIN_RADIO_RESET_LOW() GPIOC->ODR &= ~(1<<1);\n//===== IEEE802154E timing\n+\n+#define SLOTDURATION 15 // in miliseconds\n+\n// time-slot related\n#define PORT_TsSlotDuration 491 // counter counts one extra count, see datasheet\n// execution speed related\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b/board_info.h",
"new_path": "bsp/boards/openmote-b/board_info.h",
"diff": "#define PORT_PIN_RADIO_RESET_HIGH() // nothing\n#define PORT_PIN_RADIO_RESET_LOW() // nothing\n-//===== IEEE802154E timing\n+#define SLOTDURATION 10 // in miliseconds\n-#define SLOTDURATION_10MS // by default, we use 10ms time slot\n+//===== IEEE802154E timing\n-#ifdef SLOTDURATION_10MS\n+#if SLOTDURATION==10\n// time-slot related\n#define PORT_TsSlotDuration 328 // counter counts one extra count, see datasheet\n// execution speed related\n#endif\n#define PORT_delayRx 0 // 0us (can not measure)\n// radio watchdog\n-#else\n+#endif\n+\n+#if SLOTDURATION==15\n// time-slot related\n#define PORT_TsSlotDuration 492 // counter counts one extra count, see datasheet\n// execution speed related\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmotestm/board_info.h",
"new_path": "bsp/boards/openmotestm/board_info.h",
"diff": "@@ -54,6 +54,8 @@ to return the board's description.\n//===== IEEE802154E timing\n+#define SLOTDURATION 15 // in miliseconds\n+\n// time-slot related\n#define PORT_TsSlotDuration 491 // counter counts one extra count, see datasheet\n// execution speed related\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/samr21_xpro/board_info.h",
"new_path": "bsp/boards/samr21_xpro/board_info.h",
"diff": "@@ -73,6 +73,8 @@ typedef uint32_t irqflags_t;\n#define PORT_PIN_RADIO_RESET_HIGH() //RST_HIGH()\n#define PORT_PIN_RADIO_RESET_LOW() //RST_LOW()\n+#define SLOTDURATION 15 // in miliseconds\n+\n//===== IEEE802154E timing\n// time-slot related\n#define PORT_TsSlotDuration 491\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/board_info.h",
"new_path": "bsp/boards/scum/board_info.h",
"diff": "@@ -51,6 +51,8 @@ to return the board's description.\n//===== IEEE802154E timing\n+#define SLOTDURATION 15 // in miliseconds\n+\n//// time-slot related\n#define PORT_TsSlotDuration 491 // 491 ticks = 15ms @32768Hz\n#define PORT_maxTxDataPrepare 66 // 66 ticks = 2013us @32768Hz\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/telosb/board_info.h",
"new_path": "bsp/boards/telosb/board_info.h",
"diff": "@@ -54,6 +54,8 @@ to this board.\n//===== IEEE802154E timing\n+#define SLOTDURATION 15 // in miliseconds\n+\n// time-slot related\n#define PORT_TsSlotDuration 492 // counter counts one extra count, see datasheet\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/wsn430v13b/board_info.h",
"new_path": "bsp/boards/wsn430v13b/board_info.h",
"diff": "@@ -70,6 +70,8 @@ to this board.\n//===== IEEE802154E timing\n+#define SLOTDURATION 15 // in miliseconds\n+\n// time-slot related\n#define PORT_TsSlotDuration 491 // counter counts one extra count, see datasheet\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/wsn430v14/board_info.h",
"new_path": "bsp/boards/wsn430v14/board_info.h",
"diff": "@@ -55,6 +55,8 @@ to this board.\n//===== IEEE802154E timing\n+#define SLOTDURATION 15 // in miliseconds\n+\n// time-slot related\n#define PORT_TsSlotDuration 492 // counter counts one extra count, see datasheet\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/z1/board_info.h",
"new_path": "bsp/boards/z1/board_info.h",
"diff": "@@ -58,6 +58,8 @@ to return the board's description.\n//===== IEEE802154E timing\n+#define SLOTDURATION 15 // in miliseconds\n+\n// time-slot related\n#define PORT_TsSlotDuration 491 // counter counts one extra count, see datasheet\n// execution speed related\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-740. update board_info for slotduration.
|
491,595 |
12.04.2018 19:39:30
| -7,200 |
0529718a72cf846db88dfc21c0b2bb627d55034d
|
should be range.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openrandom.c",
"new_path": "openstack/cross-layers/openrandom.c",
"diff": "@@ -37,7 +37,7 @@ uint16_t openrandom_getRandomizePeriod(uint16_t period, uint16_t range){\n// randomly choose a new period from [period/2 ... period+period/2]\nnew_period = period/2+openrandom_get16b()%period;\n} else {\n- new_period = period-range/2+openrandom_get16b()%period;\n+ new_period = period-range/2+openrandom_get16b()%range;\n}\nreturn new_period;\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-743. should be range.
|
491,595 |
12.04.2018 22:12:03
| -7,200 |
ec4d7185ee6a7cc2e774532f8569c0bea39d8d2c
|
PD0 pin always high, choose PA2 as radio debugpins.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-cc2538/debugpins.c",
"new_path": "bsp/boards/openmote-cc2538/debugpins.c",
"diff": "#define BSP_PIND_3 GPIO_PIN_3 //!< PD3 -- slot -RF1.6\n#define BSP_PIND_2 GPIO_PIN_2 //!< PD2 -- fsm -RF1.8\n#define BSP_PIND_1 GPIO_PIN_1 //!< PD1 -- task -RF1.10\n-#define BSP_PIND_0 GPIO_PIN_0 //!< PD0 -- radio -RF1-12\n-\n+#define BSP_PINA_2 GPIO_PIN_2 //!< PA2 -- radio -RF1-12\n//=========================== variables =======================================\n//=========================== prototypes ======================================\n@@ -35,11 +34,11 @@ void bspDBpinToggle(uint32_t base,uint8_t ui8Pin);\n//=========================== public ==========================================\nvoid debugpins_init(void) {\n- GPIOPinTypeGPIOOutput(BSP_PINA_BASE, BSP_PINA_4 | BSP_PINA_5);\n- GPIOPinTypeGPIOOutput(BSP_PIND_BASE, BSP_PIND_3 | BSP_PIND_2 | BSP_PIND_1 | BSP_PIND_0);\n+ GPIOPinTypeGPIOOutput(BSP_PINA_BASE, BSP_PINA_2 | BSP_PINA_4 | BSP_PINA_5);\n+ GPIOPinTypeGPIOOutput(BSP_PIND_BASE, BSP_PIND_3 | BSP_PIND_2 | BSP_PIND_1);\n- GPIOPinWrite(BSP_PINA_BASE, (BSP_PINA_4 | BSP_PINA_5), 0x00);\n- GPIOPinWrite(BSP_PIND_BASE, (BSP_PIND_3 | BSP_PIND_2 | BSP_PIND_1 | BSP_PIND_0), 0);\n+ GPIOPinWrite(BSP_PINA_BASE, (BSP_PINA_2 | BSP_PINA_4 | BSP_PINA_5), 0x00);\n+ GPIOPinWrite(BSP_PIND_BASE, (BSP_PIND_3 | BSP_PIND_2 | BSP_PIND_1), 0);\n}\n// PA4\n@@ -99,13 +98,13 @@ void debugpins_isr_set(void) {\n// PD0\nvoid debugpins_radio_toggle(void) {\n- bspDBpinToggle(BSP_PIND_BASE, BSP_PIND_0);\n+ bspDBpinToggle(BSP_PINA_BASE, BSP_PINA_2);\n}\nvoid debugpins_radio_clr(void) {\n- GPIOPinWrite(BSP_PIND_BASE, BSP_PIND_0, 0);\n+ GPIOPinWrite(BSP_PINA_BASE, BSP_PINA_2, 0);\n}\nvoid debugpins_radio_set(void) {\n- GPIOPinWrite(BSP_PIND_BASE, BSP_PIND_0, BSP_PIND_0);\n+ GPIOPinWrite(BSP_PINA_BASE, BSP_PINA_2, BSP_PINA_2);\n}\n//------------ private ------------//\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-744. PD0 pin always high, choose PA2 as radio debugpins.
|
491,595 |
13.04.2018 12:22:52
| -7,200 |
d0dbc9579f0319f9b1ad5c92eff790aae48251fb
|
resolve the error after merging.
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -254,21 +254,21 @@ owerror_t openserial_print_uint32_t(uint32_t value) {\n#ifdef OPENSERIAL_PRINTF\nuint8_t i;\nuint8_t pvalue[4];\n- INTERRUPT_DECLARATION();\n- DISABLE_INTERRUPTS();\n- openserial_vars.outputBufFilled = TRUE;\noutputHdlcOpen();\noutputHdlcWrite(SERFRAME_MOTE2PC_PRINTF);\noutputHdlcWrite(TYPE_INT);\nmemcpy(pvalue, &value, 4);\n- for (i=0;i<4;i++)\n+ for (i=0;i<4;i++) {\noutputHdlcWrite(pvalue[i]);\n+ }\noutputHdlcClose();\n- ENABLE_INTERRUPTS();\n-#endif\n+ // start TX'ing\n+ openserial_flush();\n+ ENABLE_INTERRUPTS();\n+#endif\nreturn E_SUCCESS;\n}\n@@ -276,34 +276,33 @@ owerror_t openserial_print_str(char* buffer, uint8_t length) {\n#ifdef OPENSERIAL_PRINTF\nuint8_t i;\nuint8_t asn[5];\n- INTERRUPT_DECLARATION();\n// retrieve ASN\nieee154e_getAsn(asn);\n- DISABLE_INTERRUPTS();\n- openserial_vars.outputBufFilled = TRUE;\noutputHdlcOpen();\noutputHdlcWrite(SERFRAME_MOTE2PC_PRINTF);\noutputHdlcWrite(TYPE_STR);\noutputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[0]);\noutputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]);\n- for(i=0; i<5;i++)\n+ for(i=0; i<5;i++) {\noutputHdlcWrite(asn[i]);\n- for (i=0;i<length;i++)\n+ }\n+ for (i=0;i<length;i++){\noutputHdlcWrite(buffer[i]);\n+ }\noutputHdlcClose();\n- ENABLE_INTERRUPTS();\n-#endif\n+ // start TX'ing\n+ openserial_flush();\n+ ENABLE_INTERRUPTS();\n+#endif\nreturn E_SUCCESS;\n}\n//===== retrieving inputBuffer\n-uint8_t openserial_getInputBufferFilllevel(void) {\n- uint8_t inputBufFill;\nvoid openserial_triggerDebugprint() {\nuint8_t debugPrintCounter;\nINTERRUPT_DECLARATION();\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "#include \"packetfunctions.h\"\n#include \"IEEE802154E.h\"\n#include \"IEEE802154_security.h\"\n+#include \"sixtop.h\"\n//=========================== defination =====================================\n@@ -301,7 +302,7 @@ OpenQueueEntry_t* openqueue_macGetDedicatedPacket(open_addr_t* toNeighbor){\n(\ntoNeighbor->type==ADDR_64B &&\npacketfunctions_sameAddress(toNeighbor,&openqueue_vars.queue[i].l2_nextORpreviousHop)\n- ) && // sixtop response with SEQNUM_ERR shouldn't be send on dedicated cell\n+ ) && // sixtop response with SEQNUM_ERR will fail on dedicated cell since schedule inconsistency.\n(\nopenqueue_vars.queue[i].creator != COMPONENT_SIXTOP_RES ||\nopenqueue_vars.queue[i].l2_sixtop_returnCode != IANA_6TOP_RC_SEQNUM_ERR\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -493,6 +493,8 @@ functionsToChange = [\n'activity_synchronize_newSlot',\n'activity_synchronize_startOfFrame',\n'activity_synchronize_endOfFrame',\n+ 'activity_handleSerial_start',\n+ 'activity_handleSerial_stop',\n'activity_ti1ORri1',\n'activity_ti2',\n'activity_tie1',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. resolve the error after merging.
|
491,595 |
13.04.2018 12:30:57
| -7,200 |
f234c09d098345e3c38a06aa1749bf29a4f811b4
|
clean up openserial.c
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -266,8 +266,6 @@ owerror_t openserial_print_uint32_t(uint32_t value) {\n// start TX'ing\nopenserial_flush();\n-\n- ENABLE_INTERRUPTS();\n#endif\nreturn E_SUCCESS;\n}\n@@ -295,8 +293,6 @@ owerror_t openserial_print_str(char* buffer, uint8_t length) {\n// start TX'ing\nopenserial_flush();\n-\n- ENABLE_INTERRUPTS();\n#endif\nreturn E_SUCCESS;\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. clean up openserial.c
|
491,595 |
13.04.2018 19:26:18
| -7,200 |
21c69574dc36b146dcdabbbcaac75ae6948bc589
|
send EBs/DIOs on a portion of the minimal cells not exceeding 1/(3(N+1))
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -42,7 +42,6 @@ static const uint8_t ebIEsBytestream[] = {\n#define TX_POWER 31 // 1=-25dBm, 31=0dBm (max value)\n#define RESYNCHRONIZATIONGUARD 5 // in 32kHz ticks. min distance to the end of the slot to successfully synchronize\n#define US_PER_TICK 30 // number of us per 32kHz clock tick\n-#define EB_PERIOD 2000 // in miliseconds: the period of sending EB\n#define MAXKAPERIOD 1000 // in slots: 2000@15ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n#define DESYNCTIMEOUT 2333 // in slots: 2333@15ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n#define LIMITLARGETIMECORRECTION 5 // threshold number of ticks to declare a timeCorrection \"large\"\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -104,16 +104,15 @@ void sixtop_init(void) {\nsixtop_vars.dsn = 0;\nsixtop_vars.mgtTaskCounter = 0;\nsixtop_vars.kaPeriod = MAXKAPERIOD;\n- sixtop_vars.ebPeriod = EB_PERIOD;\nsixtop_vars.isResponseEnabled = TRUE;\nsixtop_vars.six2six_state = SIX_STATE_IDLE;\nsixtop_vars.ebSendingTimerId = opentimers_create();\nopentimers_scheduleIn(\nsixtop_vars.ebSendingTimerId,\n- openrandom_getRandomizePeriod(sixtop_vars.ebPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\n+ SLOTFRAME_LENGTH*SLOTDURATION,\nTIME_MS,\n- TIMER_ONESHOT,\n+ TIMER_PERIODIC,\nsixtop_sendingEb_timer_cb\n);\n@@ -631,14 +630,6 @@ owerror_t sixtop_send_internal(\n// timer interrupt callbacks\nvoid sixtop_sendingEb_timer_cb(opentimers_id_t id){\nscheduler_push_task(timer_sixtop_sendEb_fired,TASKPRIO_SIXTOP);\n- // update the period\n- opentimers_scheduleIn(\n- sixtop_vars.ebSendingTimerId,\n- openrandom_getRandomizePeriod(sixtop_vars.ebPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\n- TIME_MS,\n- TIMER_ONESHOT,\n- sixtop_sendingEb_timer_cb\n- );\n}\nvoid sixtop_maintenance_timer_cb(opentimers_id_t id) {\n@@ -652,9 +643,12 @@ void sixtop_timeout_timer_cb(opentimers_id_t id) {\n//======= EB/KA task\nvoid timer_sixtop_sendEb_fired(void) {\n-\n+ // send EBs on a portion of the minimal cells not exceeding 1/(3(N+1))\n+ // https://tools.ietf.org/html/draft-chang-6tisch-msf-01#section-2\n+ if(openrandom_get16b()<0xffff/(3*(neighbors_getNumNeighbors()+1))){\nsixtop_sendEB();\n}\n+}\n/**\n\\brief Timer handlers which triggers MAC management task.\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.c",
"new_path": "openstack/03b-IPv6/icmpv6rpl.c",
"diff": "@@ -123,9 +123,9 @@ void icmpv6rpl_init(void) {\nopentimers_scheduleIn(\nicmpv6rpl_vars.timerIdDIO,\n- openrandom_getRandomizePeriod(icmpv6rpl_vars.dioPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\n+ SLOTFRAME_LENGTH*SLOTDURATION,\nTIME_MS,\n- TIMER_ONESHOT,\n+ TIMER_PERIODIC,\nicmpv6rpl_timer_DIO_cb\n);\n@@ -612,16 +612,7 @@ void icmpv6rpl_killPreferredParent(void) {\ntask.\n*/\nvoid icmpv6rpl_timer_DIO_cb(opentimers_id_t id) {\n-\nscheduler_push_task(icmpv6rpl_timer_DIO_task,TASKPRIO_RPL);\n- // update the period\n- opentimers_scheduleIn(\n- icmpv6rpl_vars.timerIdDIO,\n- openrandom_getRandomizePeriod(icmpv6rpl_vars.dioPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\n- TIME_MS,\n- TIMER_ONESHOT,\n- icmpv6rpl_timer_DIO_cb\n- );\n}\n/**\n@@ -630,9 +621,12 @@ void icmpv6rpl_timer_DIO_cb(opentimers_id_t id) {\n\\note This function is executed in task context, called by the scheduler.\n*/\nvoid icmpv6rpl_timer_DIO_task(void) {\n-\n+ // send DIOs on a portion of the minimal cells not exceeding 1/(3(N+1))\n+ // https://tools.ietf.org/html/draft-chang-6tisch-msf-01#section-2\n+ if(openrandom_get16b()<0xffff/(3*(neighbors_getNumNeighbors()+1))){\nsendDIO();\n}\n+}\n/**\n\\brief Prepare and a send a RPL DIO.\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-746. send EBs/DIOs on a portion of the minimal cells not exceeding 1/(3(N+1))
|
491,595 |
13.04.2018 20:29:59
| -7,200 |
2d200af1aeb559b15d075e01a2833c5f81e44130
|
use slotframe 101.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "The superframe reappears over time and can be arbitrarily long.\n*/\n-#define SLOTFRAME_LENGTH 11 //should be 101\n+#define SLOTFRAME_LENGTH 101 //should be 101\n//draft-ietf-6tisch-minimal-06\n#define SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS 1\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-746. use slotframe 101.
|
491,595 |
15.04.2018 21:04:33
| -7,200 |
615828f49773377d5ce74525b0fe0aa5e9b04ffb
|
handle rxoverflow error interrupt/condition.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-cc2538/radio.c",
"new_path": "bsp/boards/openmote-cc2538/radio.c",
"diff": "@@ -514,18 +514,28 @@ void radio_isr_internal(void) {\n}\n}\ndebugpins_isr_clr();\n-\n- return;\n}\nvoid radio_error_isr(void){\n- uint8_t rferrm;\n- rferrm = (uint8_t)HWREG(RFCORE_XREG_RFERRM);\n+ uint8_t err_irq_status;\n+\n+ debugpins_isr_set();\n+\n+ // reading IRQ_STATUS\n+ err_irq_status = HWREG(RFCORE_SFR_RFERRF);\n+\n+ IntPendClear(INT_RFCOREERR);\n- if ((HWREG(RFCORE_XREG_RFERRM) & (((0x02)<<RFCORE_XREG_RFERRM_RFERRM_S)&RFCORE_XREG_RFERRM_RFERRM_M)) & ((uint32_t)rferrm))\n- {\n- HWREG(RFCORE_XREG_RFERRM) = ~(((0x02)<<RFCORE_XREG_RFERRM_RFERRM_S)&RFCORE_XREG_RFERRM_RFERRM_M);\n- //poipoi -- todo handle error\n+ //clear interrupt\n+ HWREG(RFCORE_SFR_RFERRF) = 0;\n+\n+ // STATUS0 Register\n+ // start of frame event\n+ if ((err_irq_status & RFCORE_SFR_RFERRF_RXOVERF) == RFCORE_SFR_RFERRF_RXOVERF) {\n+ //flush it\n+ CC2538_RF_CSP_ISFLUSHRX();\n}\n+\n+ debugpins_isr_clr();\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. handle rxoverflow error interrupt/condition.
|
491,595 |
16.04.2018 11:21:58
| -7,200 |
42e5a3c8a1c5ca651bc0f1e2620927667efcf09b
|
don't want to miss the EB because of wrong state caused by inhibit timer.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -615,7 +615,8 @@ port_INLINE void activity_synchronize_newSlot(void) {\nport_INLINE void activity_synchronize_startOfFrame(PORT_TIMER_WIDTH capturedTime) {\n// don't care about packet if I'm not listening\n- if (ieee154e_vars.state!=S_SYNCLISTEN) {\n+ // in case serial rx is started, we don't want to loss this packet because of wrong state machine, so capture the state here\n+ if (ieee154e_vars.state!=S_SYNCLISTEN && ieee154e_vars.state!=S_SYNCRXSERSTART) {\nreturn;\n}\n@@ -624,6 +625,8 @@ port_INLINE void activity_synchronize_startOfFrame(PORT_TIMER_WIDTH capturedTime\n// change state\nchangeState(S_SYNCRX);\n+ // there is no action when the timer fired at S_SYNCRX.\n+ // hence the inhibit timer scheduled at beginning of slot won't be effected.\n// record the captured time\nieee154e_vars.lastCapturedTime = capturedTime;\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. don't want to miss the EB because of wrong state caused by inhibit timer.
|
491,595 |
17.04.2018 11:09:42
| -7,200 |
b627f080d285cde0713e530eee77c3621e818a4a
|
FW0540. use the correct names.
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/opentimers.c",
"new_path": "drivers/common/opentimers.c",
"diff": "@@ -57,7 +57,7 @@ opentimers_id_t opentimers_create(void){\n}\n}\n// there is no available buffer for this timer\n- return TOO_MANY_TIMERS_ERROR;\n+ return ERROR_NO_AVAILABLE_ENTRIES;\n}\n/**\n@@ -355,11 +355,11 @@ void opentimers_timer_callback(void){\nPORT_TIMER_WIDTH tempTimerGap;\nPORT_TIMER_WIDTH tempLastTimeout = opentimers_vars.currentTimeout;\n// 1. find the expired timer\n- idToCallCB = TOO_MANY_TIMERS_ERROR;\n+ idToCallCB = MAX_NUM_TIMERS;\nfor (i=0;i<MAX_NUM_TIMERS;i++){\nif (opentimers_vars.timersBuf[i].isrunning==TRUE){\n// all timers in the past within TIMERTHRESHOLD ticks\n- // (probably with low priority) will mared as Expired.\n+ // (probably with low priority) will be marked as Expired.\nif (opentimers_vars.currentTimeout-opentimers_vars.timersBuf[i].currentCompareValue <= TIMERTHRESHOLD){\n// this timer expired, mark as expired\nopentimers_vars.timersBuf[i].hasExpired = TRUE;\n@@ -367,7 +367,7 @@ void opentimers_timer_callback(void){\nif (tempLastTimeout>opentimers_vars.timersBuf[i].currentCompareValue){\ntempLastTimeout = opentimers_vars.timersBuf[i].currentCompareValue;\n}\n- if (idToCallCB==TOO_MANY_TIMERS_ERROR){\n+ if (idToCallCB==MAX_NUM_TIMERS){\nidToCallCB = i;\n} else {\nif (opentimers_vars.timersBuf[i].priority<opentimers_vars.timersBuf[idToCallCB].priority){\n@@ -384,7 +384,7 @@ void opentimers_timer_callback(void){\n// 2. call the callback of expired timers\nopentimers_vars.insideISR = TRUE;\n- if (idToCallCB==TOO_MANY_TIMERS_ERROR){\n+ if (idToCallCB==MAX_NUM_TIMERS){\n// no more timer expired\n} else {\n// call all timers expired having the same priority with timer idToCallCB\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/opentimers.h",
"new_path": "drivers/common/opentimers.h",
"diff": "#define MAX_NUM_TIMERS 10\n#define MAX_TICKS_IN_SINGLE_CLOCK (uint32_t)(((PORT_TIMER_WIDTH)0xFFFFFFFF)>>1)\n//#define MAX_TICKS_IN_SINGLE_CLOCK 0x7FFF\n-#define TOO_MANY_TIMERS_ERROR 255\n+#define ERROR_NO_AVAILABLE_ENTRIES 255\n#define MAX_DURATION_ISR 33 // 33@32768Hz = 1ms\n#define opentimers_id_t uint8_t\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW0540. use the correct names.
|
491,595 |
17.04.2018 13:14:40
| -7,200 |
6c4c7d112ea760c45248b9a3203f68493d088c7e
|
update debugpins according to stenchil_telosb.pdf
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/telosb/debugpins.c",
"new_path": "bsp/boards/telosb/debugpins.c",
"diff": "@@ -19,10 +19,10 @@ void debugpins_init(void) {\nP6DIR |= 0x40; // frame [P6.6]\nP6DIR |= 0x80; // slot [P6.7]\nP2DIR |= 0x08; // fsm [P2.3]\n- P2DIR |= 0x40; // radio [P2.6]\n+ P2DIR |= 0x40; // task [P2.6]\n- P6DIR |= 0x01; // task [P6.0]\n- P6DIR |= 0x02; // isr [P6.1]\n+ P6DIR |= 0x01; // isr [P6.0]\n+ P6DIR |= 0x02; // radio [P6.1]\nP3DIR |= 0x20; // isruarttx [P3.5]\nP3DIR |= 0x10; // isruartrx [P3.4]\n@@ -59,35 +59,35 @@ void debugpins_fsm_clr(void) {\nvoid debugpins_fsm_set(void) {\nP2OUT |= 0x08;\n}\n-// radio [P2.6]\n-void debugpins_radio_toggle(void) {\n+// task [P2.6]\n+void debugpins_task_toggle(void) {\nP2OUT ^= 0x40;\n}\n-void debugpins_radio_clr(void) {\n+void debugpins_task_clr(void) {\nP2OUT &= ~0x40;\n}\n-void debugpins_radio_set(void) {\n+void debugpins_task_set(void) {\nP2OUT |= 0x40;\n}\n-// task [P6.0]\n-void debugpins_task_toggle(void) {\n+// isr [P6.0]\n+void debugpins_isr_toggle(void) {\nP6OUT ^= 0x01;\n}\n-void debugpins_task_clr(void) {\n+void debugpins_isr_clr(void) {\nP6OUT &= ~0x01;\n}\n-void debugpins_task_set(void) {\n+void debugpins_isr_set(void) {\nP6OUT |= 0x01;\n}\n-// isr [P6.1]\n-void debugpins_isr_toggle(void) {\n+// radio [P6.1]\n+void debugpins_radio_toggle(void) {\nP6OUT ^= 0x02;\n}\n-void debugpins_isr_clr(void) {\n+void debugpins_radio_clr(void) {\nP6OUT &= ~0x02;\n}\n-void debugpins_isr_set(void) {\n+void debugpins_radio_set(void) {\nP6OUT |= 0x02;\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. update debugpins according to stenchil_telosb.pdf
|
491,595 |
17.04.2018 13:17:32
| -7,200 |
8a595f12c02e94cfad5689497fd7c300971855f7
|
assign the priority to timer when created.
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -183,7 +183,7 @@ owerror_t openserial_printCritical(\nleds_error_blink();\n// schedule for the mote to reboot in 10s\n- id = opentimers_create();\n+ id = opentimers_create(DEFAULT_PRIORITY);\nreference = opentimers_getValue();\nopentimers_scheduleAbsolute(\nid, // timerId\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/opentimers.c",
"new_path": "drivers/common/opentimers.c",
"diff": "@@ -44,18 +44,28 @@ void opentimers_init(void){\n/**\n\\brief create a timer by assigning an entry from timer buffer.\n-create a timer by assigning an Id for the timer.\n+create a timer by assigning an Id and priority for the timer\n\\returns the id of the timer will be returned\n*/\n-opentimers_id_t opentimers_create(void){\n+opentimers_id_t opentimers_create(uint8_t priority){\nuint8_t id;\n- for (id=0;id<MAX_NUM_TIMERS;id++){\n+\n+ if (priority==0){\n+ if (opentimers_vars.timersBuf[0].isUsed == FALSE){\n+ opentimers_vars.timersBuf[0].isUsed = TRUE;\n+ opentimers_vars.timersBuf[0].priority = 0;\n+ return 0;\n+ }\n+ } else {\n+ for (id=1;id<MAX_NUM_TIMERS;id++){\nif (opentimers_vars.timersBuf[id].isUsed == FALSE){\nopentimers_vars.timersBuf[id].isUsed = TRUE;\n+ opentimers_vars.timersBuf[0].priority = priority;\nreturn id;\n}\n}\n+ }\n// there is no available buffer for this timer\nreturn ERROR_NO_AVAILABLE_ENTRIES;\n}\n@@ -322,25 +332,10 @@ bool opentimers_isRunning(opentimers_id_t id){\nreturn opentimers_vars.timersBuf[id].isrunning;\n}\n-\n-/**\n-\\brief set the priority of given timer\n-\n-\\param[in] id indicates the timer to be assigned.\n-\\param[in] priority indicates the priority of given timer.\n- */\n-void opentimers_setPriority(opentimers_id_t id, uint8_t priority){\n- if (opentimers_vars.timersBuf[id].isUsed == TRUE){\n- opentimers_vars.timersBuf[id].priority = priority;\n- } else {\n- // the given timer is not used, do nothing.\n- }\n-}\n-\n// ========================== callback ========================================\n/**\n-\\brief this is the callback function of opentimer2.\n+\\brief this is the callback function of opentimer.\nThis function is called when sctimer interrupt happens. The function looks the\nwhole timer buffer and find out the correct timer responding to the interrupt\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/opentimers.h",
"new_path": "drivers/common/opentimers.h",
"diff": "/// Maximum number of timers that can run concurrently\n#define MAX_NUM_TIMERS 10\n#define MAX_TICKS_IN_SINGLE_CLOCK (uint32_t)(((PORT_TIMER_WIDTH)0xFFFFFFFF)>>1)\n-//#define MAX_TICKS_IN_SINGLE_CLOCK 0x7FFF\n#define ERROR_NO_AVAILABLE_ENTRIES 255\n#define MAX_DURATION_ISR 33 // 33@32768Hz = 1ms\n#define opentimers_id_t uint8_t\n+#define HIGHEST_PRIORITY 0\n+#define DEFAULT_PRIORITY 255\n+\ntypedef void (*opentimers_cbt)(opentimers_id_t id);\n//=========================== typedef =========================================\n@@ -78,7 +80,7 @@ typedef struct {\n//=========================== prototypes ======================================\nvoid opentimers_init(void);\n-opentimers_id_t opentimers_create(void);\n+opentimers_id_t opentimers_create(uint8_t priority);\nvoid opentimers_scheduleIn(opentimers_id_t id,\nuint32_t duration,\ntime_type_t uint_type,\n@@ -95,7 +97,6 @@ bool opentimers_destroy(opentimers_id_t id);\nPORT_TIMER_WIDTH opentimers_getValue(void);\nPORT_TIMER_WIDTH opentimers_getCurrentTimeout(void);\nbool opentimers_isRunning(opentimers_id_t id);\n-void opentimers_setPriority(opentimers_id_t id, uint8_t priority);\n/**\n\\}\n\\}\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/cexample/cexample.c",
"new_path": "openapps/cexample/cexample.c",
"diff": "@@ -56,7 +56,7 @@ void cexample_init(void) {\nopencoap_register(&cexample_vars.desc);\n- cexample_vars.timerId = opentimers_create();\n+ cexample_vars.timerId = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn(\ncexample_vars.timerId,\nCEXAMPLEPERIOD,\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/cinfrared/cinfrared.c",
"new_path": "openapps/cinfrared/cinfrared.c",
"diff": "@@ -53,7 +53,7 @@ void cinfrared_init(void) {\nopencoap_register(&cinfrared_vars.desc);\n- cinfrared_vars.timerId = opentimers_create();\n+ cinfrared_vars.timerId = opentimers_create(DEFAULT_PRIORITY);\n}\n//=========================== private =========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/cjoin/cjoin.c",
"new_path": "openapps/cjoin/cjoin.c",
"diff": "@@ -74,7 +74,7 @@ void cjoin_init(void) {\nopencoap_register(&cjoin_vars.desc);\n- cjoin_vars.timerId = opentimers_create();\n+ cjoin_vars.timerId = opentimers_create(DEFAULT_PRIORITY);\nidmanager_setJoinKey((uint8_t *) masterSecret);\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/csensors/csensors.c",
"new_path": "openapps/csensors/csensors.c",
"diff": "@@ -408,7 +408,7 @@ void csensors_setPeriod(uint32_t period,\n);\n}\n} else {\n- csensors_vars.csensors_resource[id].timerId = opentimers_create();\n+ csensors_vars.csensors_resource[id].timerId = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn(\ncsensors_vars.csensors_resource[id].timerId,\n(uint32_t)((period*openrandom_get16b())/0xffff),\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/cstorm/cstorm.c",
"new_path": "openapps/cstorm/cstorm.c",
"diff": "@@ -57,7 +57,7 @@ void cstorm_init(void) {\n//comment : not running by default\ncstorm_vars.period = 6553;\n- cstorm_vars.timerId = opentimers_create();\n+ cstorm_vars.timerId = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn(\ncstorm_vars.timerId,\ncstorm_vars.period,\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/uexpiration/uexpiration.c",
"new_path": "openapps/uexpiration/uexpiration.c",
"diff": "@@ -70,7 +70,7 @@ void uexpiration_receive(OpenQueueEntry_t* request) {\nuexpiration_vars.period = pkt_interval;\n// start periodic timer\n- uexpiration_vars.timerId = opentimers_create();\n+ uexpiration_vars.timerId = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn(\nuexpiration_vars.timerId,\nuexpiration_vars.period,\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/uinject/uinject.c",
"new_path": "openapps/uinject/uinject.c",
"diff": "@@ -37,7 +37,7 @@ void uinject_init(void) {\nuinject_vars.period = UINJECT_PERIOD_MS;\n// start periodic timer\n- uinject_vars.timerId = opentimers_create();\n+ uinject_vars.timerId = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn(\nuinject_vars.timerId,\nUINJECT_PERIOD_MS,\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -152,10 +152,8 @@ void ieee154e_init(void) {\n#endif\nradio_setStartFrameCb(ieee154e_startOfFrame);\nradio_setEndFrameCb(ieee154e_endOfFrame);\n- // have the radio start its timer\n- ieee154e_vars.timerId = opentimers_create();\n- // assign ieee802154e timer with highest priority\n- opentimers_setPriority(ieee154e_vars.timerId,0);\n+ // have the radio start its timer and assign ieee802154e timer with highest priority\n+ ieee154e_vars.timerId = opentimers_create(HIGHEST_PRIORITY);\nopentimers_scheduleAbsolute(\nieee154e_vars.timerId, // timerId\nieee154e_vars.slotDuration, // duration\n@@ -165,7 +163,7 @@ void ieee154e_init(void) {\n);\n// radiotimer_start(ieee154e_vars.slotDuration);\nIEEE802154_security_init();\n- ieee154e_vars.serialInhibitTimerId = opentimers_create();\n+ ieee154e_vars.serialInhibitTimerId = opentimers_create(DEFAULT_PRIORITY);\n}\n//=========================== public ==========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "@@ -45,7 +45,7 @@ void msf_init(void) {\n(sixtop_sf_translatemetadata)msf_translateMetadata,\n(sixtop_sf_handle_callback)msf_handleRCError\n);\n- msf_vars.housekeepingTimerId = opentimers_create();\n+ msf_vars.housekeepingTimerId = opentimers_create(DEFAULT_PRIORITY);\nmsf_vars.housekeepingPeriod = HOUSEKEEPING_PERIOD;\nopentimers_scheduleIn(\nmsf_vars.housekeepingTimerId,\n@@ -54,7 +54,7 @@ void msf_init(void) {\nTIMER_ONESHOT,\nmsf_timer_housekeeping_cb\n);\n- msf_vars.waitretryTimerId = opentimers_create();\n+ msf_vars.waitretryTimerId = opentimers_create(DEFAULT_PRIORITY);\n}\n// called by schedule\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -108,7 +108,7 @@ void sixtop_init(void) {\nsixtop_vars.isResponseEnabled = TRUE;\nsixtop_vars.six2six_state = SIX_STATE_IDLE;\n- sixtop_vars.ebSendingTimerId = opentimers_create();\n+ sixtop_vars.ebSendingTimerId = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn(\nsixtop_vars.ebSendingTimerId,\nopenrandom_getRandomizePeriod(sixtop_vars.ebPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\n@@ -117,7 +117,7 @@ void sixtop_init(void) {\nsixtop_sendingEb_timer_cb\n);\n- sixtop_vars.maintenanceTimerId = opentimers_create();\n+ sixtop_vars.maintenanceTimerId = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn(\nsixtop_vars.maintenanceTimerId,\nsixtop_vars.periodMaintenance,\n@@ -126,7 +126,7 @@ void sixtop_init(void) {\nsixtop_maintenance_timer_cb\n);\n- sixtop_vars.timeoutTimerId = opentimers_create();\n+ sixtop_vars.timeoutTimerId = opentimers_create(DEFAULT_PRIORITY);\n}\nvoid sixtop_setKaPeriod(uint16_t kaPeriod) {\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.c",
"new_path": "openstack/03b-IPv6/icmpv6rpl.c",
"diff": "@@ -84,7 +84,7 @@ void icmpv6rpl_init(void) {\nmemcpy(&icmpv6rpl_vars.dioDestination.addr_128b[0],all_routers_multicast,sizeof(all_routers_multicast));\nicmpv6rpl_vars.dioPeriod = DIO_PERIOD;\n- icmpv6rpl_vars.timerIdDIO = opentimers_create();\n+ icmpv6rpl_vars.timerIdDIO = opentimers_create(DEFAULT_PRIORITY);\n//initialize PIO -> move this to dagroot code\nicmpv6rpl_vars.pio.type = RPL_OPTION_PIO;\n@@ -169,7 +169,7 @@ void icmpv6rpl_init(void) {\nicmpv6rpl_vars.dao_target.prefixLength = 0;\nicmpv6rpl_vars.daoPeriod = DAO_PERIOD;\n- icmpv6rpl_vars.timerIdDAO = opentimers_create();\n+ icmpv6rpl_vars.timerIdDAO = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn(\nicmpv6rpl_vars.timerIdDAO,\nopenrandom_getRandomizePeriod(icmpv6rpl_vars.daoPeriod, NUM_CHANNELS*SLOTFRAME_LENGTH*SLOTDURATION),\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. assign the priority to timer when created.
|
491,595 |
17.04.2018 13:19:18
| -7,200 |
e3b436fc457dce307f4a80c928ef5c74e39b6f41
|
add debugpins header since telosb use for indicating ISR activity.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.c",
"new_path": "openstack/02b-MAChigh/schedule.c",
"diff": "#include \"IEEE802154E.h\"\n#include \"icmpv6rpl.h\"\n#include \"neighbors.h\"\n+// telosb need debugpins to indicate the ISR activity\n+#include \"debugpins.h\"\n//=========================== definition ======================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/idmanager.c",
"new_path": "openstack/cross-layers/idmanager.c",
"diff": "#include \"neighbors.h\"\n#include \"schedule.h\"\n#include \"IEEE802154_security.h\"\n+// telosb needs debugpins to indicate the ISR activity\n+#include \"debugpins.h\"\n//=========================== variables =======================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "#include \"IEEE802154E.h\"\n#include \"IEEE802154_security.h\"\n#include \"sixtop.h\"\n+// telosb need debugpins to indicate ISR activity\n+#include \"debugpins.h\"\n//=========================== defination =====================================\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. add debugpins header since telosb use for indicating ISR activity.
|
491,595 |
17.04.2018 13:32:27
| -7,200 |
140ee3f46b97fb0af078a494bb698da526336760
|
update IAR projects.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/openmote-cc2538/03oos_macpong/03oos_macpong.ewp",
"new_path": "projects/openmote-cc2538/03oos_macpong/03oos_macpong.ewp",
"diff": "<group>\n<name>boards</name>\n<group>\n- <name>openmote-CC2538</name>\n+ <name>openmote-cc2538</name>\n<group>\n<name>headers</name>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_smwdthrosc.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_soc_adc.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_soc_adc.h</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_ssi.h</name>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\leds.c</name>\n</file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\pwm.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\pwm.h</name>\n+ </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\radio.c</name>\n</file>\n<name>02a-MAClow</name>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\adaptive_sync.c</name>\n+ <excluded>\n+ <configuration>Debug</configuration>\n+ </excluded>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\adaptive_sync.h</name>\n+ <excluded>\n+ <configuration>Debug</configuration>\n+ </excluded>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154.c</name>\n<group>\n<name>02b-MAChigh</name>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\neighbors.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\msf.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\neighbors.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\msf.h</name>\n</file>\n<file>\n-\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\schedule.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\neighbors.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\schedule.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\neighbors.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\msf.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\schedule.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\msf.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\schedule.h</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\sixtop.c</name>\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/openmote-cc2538/03oos_sniffer/03oos_sniffer.ewp",
"new_path": "projects/openmote-cc2538/03oos_sniffer/03oos_sniffer.ewp",
"diff": "<group>\n<name>boards</name>\n<group>\n- <name>openmote-CC2538</name>\n+ <name>openmote-cc2538</name>\n<group>\n<name>headers</name>\n<file>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\cryptoengine.c</name>\n-\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\debugpins.c</name>\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/telosb/03oos_macpong/03oos_macpong.ewp",
"new_path": "projects/telosb/03oos_macpong/03oos_macpong.ewp",
"diff": "<group>\n<name>common</name>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\abstimer.c</name>\n- <excluded>\n- <configuration>Debug</configuration>\n- </excluded>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\abstimers2.c</name>\n- <excluded>\n- <configuration>Debug</configuration>\n- </excluded>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\aes_cbc.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\aes_cbc.h</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\aes_ccms.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\aes_ccms.h</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\aes_ctr.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\aes_ctr.h</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\aes_ecb.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\aes_ecb.h</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\dummy_crypto_engine.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\openaes.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\dummy_crypto_engine.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\openaes.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\firmware_crypto_engine.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\openccms.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\firmware_crypto_engine.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\common\\openccms.h</name>\n</file>\n</group>\n<group>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\telosb\\board.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\telosb\\board_crypto_engine.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\telosb\\board_crypto_engine.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\telosb\\board_info.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\telosb\\board_info.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\telosb\\cryptoengine.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\telosb\\debugpins.c</name>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\cc2420\\cc2420.h</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\cc2420\\cc2420_crypto.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\cc2420\\cc2420_crypto.h</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\chips\\cc2420\\radio.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154.h</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154_dummy_security.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154_dummy_security.h</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154_security.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154_security.h</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\ieee802154_security_driver.h</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02a-MAClow\\IEEE802154E.c</name>\n</file>\n<group>\n<name>02b-MAChigh</name>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\neighbors.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\msf.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\neighbors.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\msf.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\processIE.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\neighbors.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\processIE.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\neighbors.h</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\schedule.c</name>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\schedule.h</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\msf.c</name>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\msf.h</name>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\openstack\\02b-MAChigh\\sixtop.c</name>\n</file>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. update IAR projects.
|
491,595 |
17.04.2018 18:38:59
| -7,200 |
ce14f8c2dcb01fd8e63f04bc0e3d48996360da4a
|
update the leds conventions according to
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b/leds.c",
"new_path": "bsp/boards/openmote-b/leds.c",
"diff": "@@ -59,34 +59,34 @@ uint8_t leds_error_isOn(void) {\nreturn (uint8_t)(ui32Toggle & BSP_LED_1)>>4;\n}\n-// orange\n+// green\nvoid leds_sync_on(void) {\n- bspLedSet(BSP_LED_2);\n+ bspLedSet(BSP_LED_4);\n}\nvoid leds_sync_off(void) {\n- bspLedClear(BSP_LED_2);\n+ bspLedClear(BSP_LED_4);\n}\nvoid leds_sync_toggle(void) {\n- bspLedToggle(BSP_LED_2);\n+ bspLedToggle(BSP_LED_4);\n}\nuint8_t leds_sync_isOn(void) {\n- uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_2);\n- return (uint8_t)(ui32Toggle & BSP_LED_2)>>5;\n+ uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_4);\n+ return (uint8_t)(ui32Toggle & BSP_LED_4)>>5;\n}\n-// green\n+// orange\nvoid leds_radio_on(void) {\n- bspLedSet(BSP_LED_4);\n+ bspLedSet(BSP_LED_2);\n}\nvoid leds_radio_off(void) {\n- bspLedClear(BSP_LED_4);\n+ bspLedClear(BSP_LED_2);\n}\nvoid leds_radio_toggle(void) {\n- bspLedToggle(BSP_LED_4);\n+ bspLedToggle(BSP_LED_2);\n}\nuint8_t leds_radio_isOn(void) {\n- uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_4);\n- return (uint8_t)(ui32Toggle & BSP_LED_4)>>7;\n+ uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_2);\n+ return (uint8_t)(ui32Toggle & BSP_LED_2)>>7;\n}\n// yellow\n@@ -177,25 +177,21 @@ void leds_increment(void) {\n//=========================== private =========================================\n-port_INLINE void bspLedSet(uint8_t ui8Leds)\n-{\n+port_INLINE void bspLedSet(uint8_t ui8Leds){\n//\n// Turn on specified LEDs\n//\nGPIOPinWrite(BSP_LED_BASE, ui8Leds, 0);\n-\n}\n-port_INLINE void bspLedClear(uint8_t ui8Leds)\n-{\n+port_INLINE void bspLedClear(uint8_t ui8Leds){\n//\n// Turn off specified LEDs\n//\nGPIOPinWrite(BSP_LED_BASE, ui8Leds, ui8Leds);\n}\n-port_INLINE void bspLedToggle(uint8_t ui8Leds)\n-{\n+port_INLINE void bspLedToggle(uint8_t ui8Leds){\n//\n// Get current pin values of selected bits\n//\n@@ -211,4 +207,3 @@ port_INLINE void bspLedToggle(uint8_t ui8Leds)\n//\nGPIOPinWrite(BSP_LED_BASE, ui8Leds, ui32Toggle);\n}\n\\ No newline at end of file\n-\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-cc2538/leds.c",
"new_path": "bsp/boards/openmote-cc2538/leds.c",
"diff": "@@ -59,34 +59,34 @@ uint8_t leds_error_isOn(void) {\nreturn (uint8_t)(ui32Toggle & BSP_LED_1)>>4;\n}\n-// orange\n+// green\nvoid leds_sync_on(void) {\n- bspLedSet(BSP_LED_2);\n+ bspLedSet(BSP_LED_4);\n}\nvoid leds_sync_off(void) {\n- bspLedClear(BSP_LED_2);\n+ bspLedClear(BSP_LED_4);\n}\nvoid leds_sync_toggle(void) {\n- bspLedToggle(BSP_LED_2);\n+ bspLedToggle(BSP_LED_4);\n}\nuint8_t leds_sync_isOn(void) {\n- uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_2);\n- return (uint8_t)(ui32Toggle & BSP_LED_2)>>5;\n+ uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_4);\n+ return (uint8_t)(ui32Toggle & BSP_LED_4)>>5;\n}\n-// green\n+// orange\nvoid leds_radio_on(void) {\n- bspLedSet(BSP_LED_4);\n+ bspLedSet(BSP_LED_2);\n}\nvoid leds_radio_off(void) {\n- bspLedClear(BSP_LED_4);\n+ bspLedClear(BSP_LED_2);\n}\nvoid leds_radio_toggle(void) {\n- bspLedToggle(BSP_LED_4);\n+ bspLedToggle(BSP_LED_2);\n}\nuint8_t leds_radio_isOn(void) {\n- uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_4);\n- return (uint8_t)(ui32Toggle & BSP_LED_4)>>7;\n+ uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_2);\n+ return (uint8_t)(ui32Toggle & BSP_LED_2)>>7;\n}\n// yellow\n@@ -177,24 +177,21 @@ void leds_increment(void) {\n//=========================== private =========================================\n-port_INLINE void bspLedSet(uint8_t ui8Leds)\n-{\n+port_INLINE void bspLedSet(uint8_t ui8Leds){\n//\n// Turn on specified LEDs\n//\nGPIOPinWrite(BSP_LED_BASE, ui8Leds, ui8Leds);\n}\n-port_INLINE void bspLedClear(uint8_t ui8Leds)\n-{\n+port_INLINE void bspLedClear(uint8_t ui8Leds){\n//\n// Turn off specified LEDs\n//\nGPIOPinWrite(BSP_LED_BASE, ui8Leds, 0);\n}\n-port_INLINE void bspLedToggle(uint8_t ui8Leds)\n-{\n+port_INLINE void bspLedToggle(uint8_t ui8Leds){\n//\n// Get current pin values of selected bits\n//\n@@ -210,4 +207,3 @@ port_INLINE void bspLedToggle(uint8_t ui8Leds)\n//\nGPIOPinWrite(BSP_LED_BASE, ui8Leds, ui32Toggle);\n}\n\\ No newline at end of file\n-\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
update the leds conventions according to https://openwsn.atlassian.net/wiki/spaces/OW/pages/688214/LED+Conventions
|
491,595 |
17.04.2018 18:44:03
| -7,200 |
630a7db9dab518e808920ae3696f69bc61d76d7f
|
Fix the leds conventions.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b/leds.c",
"new_path": "bsp/boards/openmote-b/leds.c",
"diff": "@@ -59,34 +59,34 @@ uint8_t leds_error_isOn(void) {\nreturn (uint8_t)(ui32Toggle & BSP_LED_1)>>4;\n}\n-// green\n+// orange\nvoid leds_sync_on(void) {\n- bspLedSet(BSP_LED_4);\n+ bspLedSet(BSP_LED_2);\n}\nvoid leds_sync_off(void) {\n- bspLedClear(BSP_LED_4);\n+ bspLedClear(BSP_LED_2);\n}\nvoid leds_sync_toggle(void) {\n- bspLedToggle(BSP_LED_4);\n+ bspLedToggle(BSP_LED_2);\n}\nuint8_t leds_sync_isOn(void) {\n- uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_4);\n- return (uint8_t)(ui32Toggle & BSP_LED_4)>>5;\n+ uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_2);\n+ return (uint8_t)(ui32Toggle & BSP_LED_2)>>5;\n}\n-// orange\n+// green\nvoid leds_radio_on(void) {\n- bspLedSet(BSP_LED_2);\n+ bspLedSet(BSP_LED_4);\n}\nvoid leds_radio_off(void) {\n- bspLedClear(BSP_LED_2);\n+ bspLedClear(BSP_LED_4);\n}\nvoid leds_radio_toggle(void) {\n- bspLedToggle(BSP_LED_2);\n+ bspLedToggle(BSP_LED_4);\n}\nuint8_t leds_radio_isOn(void) {\n- uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_2);\n- return (uint8_t)(ui32Toggle & BSP_LED_2)>>7;\n+ uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_4);\n+ return (uint8_t)(ui32Toggle & BSP_LED_4)>>7;\n}\n// yellow\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-cc2538/leds.c",
"new_path": "bsp/boards/openmote-cc2538/leds.c",
"diff": "@@ -59,34 +59,34 @@ uint8_t leds_error_isOn(void) {\nreturn (uint8_t)(ui32Toggle & BSP_LED_1)>>4;\n}\n-// green\n+// orange\nvoid leds_sync_on(void) {\n- bspLedSet(BSP_LED_4);\n+ bspLedSet(BSP_LED_2);\n}\nvoid leds_sync_off(void) {\n- bspLedClear(BSP_LED_4);\n+ bspLedClear(BSP_LED_2);\n}\nvoid leds_sync_toggle(void) {\n- bspLedToggle(BSP_LED_4);\n+ bspLedToggle(BSP_LED_2);\n}\nuint8_t leds_sync_isOn(void) {\n- uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_4);\n- return (uint8_t)(ui32Toggle & BSP_LED_4)>>5;\n+ uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_2);\n+ return (uint8_t)(ui32Toggle & BSP_LED_2)>>5;\n}\n-// orange\n+// green\nvoid leds_radio_on(void) {\n- bspLedSet(BSP_LED_2);\n+ bspLedSet(BSP_LED_4);\n}\nvoid leds_radio_off(void) {\n- bspLedClear(BSP_LED_2);\n+ bspLedClear(BSP_LED_4);\n}\nvoid leds_radio_toggle(void) {\n- bspLedToggle(BSP_LED_2);\n+ bspLedToggle(BSP_LED_4);\n}\nuint8_t leds_radio_isOn(void) {\n- uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_2);\n- return (uint8_t)(ui32Toggle & BSP_LED_2)>>7;\n+ uint32_t ui32Toggle = GPIOPinRead(BSP_LED_BASE, BSP_LED_4);\n+ return (uint8_t)(ui32Toggle & BSP_LED_4)>>7;\n}\n// yellow\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
Fix the leds conventions.
|
491,595 |
17.04.2018 20:07:49
| -7,200 |
f502445d2745b224eacd1389ddad5b1c81cd7ed7
|
update opentimers by pushing the non-TSCH state machine timer as a task.
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/opentimers.c",
"new_path": "drivers/common/opentimers.c",
"diff": "@@ -11,6 +11,7 @@ at most MAX_NUM_TIMERS timers.\n#include \"opentimers.h\"\n#include \"sctimer.h\"\n#include \"leds.h\"\n+#include \"scheduler.h\"\n//=========================== define ==========================================\n@@ -61,7 +62,7 @@ opentimers_id_t opentimers_create(uint8_t priority){\nfor (id=1;id<MAX_NUM_TIMERS;id++){\nif (opentimers_vars.timersBuf[id].isUsed == FALSE){\nopentimers_vars.timersBuf[id].isUsed = TRUE;\n- opentimers_vars.timersBuf[0].priority = priority;\n+ opentimers_vars.timersBuf[id].priority = priority;\nreturn id;\n}\n}\n@@ -129,40 +130,22 @@ void opentimers_scheduleIn(opentimers_id_t id,\n// only execute update the currenttimeout if I am not inside of ISR or the ISR itself will do this.\nif (opentimers_vars.insideISR==FALSE){\n- timerGap = opentimers_vars.timersBuf[0].currentCompareValue-opentimers_vars.lastTimeout;\n- idToSchedule = 0;\n- for (i=1;i<MAX_NUM_TIMERS;i++){\n+ i = 0;\n+ while (opentimers_vars.timersBuf[i].isrunning==FALSE){\n+ i++;\n+ }\n+ timerGap = opentimers_vars.timersBuf[i].currentCompareValue-opentimers_vars.lastTimeout;\n+ idToSchedule = i;\n+ for (i=idToSchedule+1;i<MAX_NUM_TIMERS;i++){\nif (opentimers_vars.timersBuf[i].isrunning){\ntempTimerGap = opentimers_vars.timersBuf[i].currentCompareValue-opentimers_vars.lastTimeout;\nif (tempTimerGap < timerGap){\n- // if a timer \"i\" has low priority but has compare value less than\n- // candidate timer \"idToSchedule\" more than TIMERTHRESHOLD ticks,\n- // replace candidate timer by this timer \"i\".\n- if (opentimers_vars.timersBuf[i].priority > opentimers_vars.timersBuf[idToSchedule].priority){\n- if (timerGap-tempTimerGap > TIMERTHRESHOLD){\n- timerGap = tempTimerGap;\n- idToSchedule = i;\n- }\n- } else {\n- // a timer \"i\" has higher priority than candidate timer \"idToSchedule\"\n- // and compare value less than candidate timer replace candidate\n- // timer by timer \"i\".\n- timerGap = tempTimerGap;\n- idToSchedule = i;\n- }\n- } else {\n- // if a timer \"i\" has higher priority than candidate timer \"idToSchedule\"\n- // and its compare value is larger than timer \"i\" no more than TIMERTHRESHOLD ticks,\n- // replace candidate timer by timer \"i\".\n- if (opentimers_vars.timersBuf[i].priority < opentimers_vars.timersBuf[idToSchedule].priority){\n- if (tempTimerGap - timerGap < TIMERTHRESHOLD){\n+ // timer \"i\" is more close to lastCompare value\ntimerGap = tempTimerGap;\nidToSchedule = i;\n}\n}\n}\n- }\n- }\n// if I got here, assign the next to be fired timer to given timer\nopentimers_vars.currentTimeout = opentimers_vars.timersBuf[idToSchedule].currentCompareValue;\n@@ -232,38 +215,20 @@ void opentimers_scheduleAbsolute(opentimers_id_t id,\n// only execute update the currenttimeout if I am not inside of ISR or the ISR itself will do this.\nif (opentimers_vars.insideISR==FALSE){\n- timerGap = opentimers_vars.timersBuf[0].currentCompareValue-opentimers_vars.lastTimeout;\n- idToSchedule = 0;\n- for (i=1;i<MAX_NUM_TIMERS;i++){\n+ i = 0;\n+ while (opentimers_vars.timersBuf[i].isrunning==FALSE){\n+ i++;\n+ }\n+ timerGap = opentimers_vars.timersBuf[i].currentCompareValue-opentimers_vars.lastTimeout;\n+ idToSchedule = i;\n+ for (i=idToSchedule+1;i<MAX_NUM_TIMERS;i++){\nif (opentimers_vars.timersBuf[i].isrunning){\ntempTimerGap = opentimers_vars.timersBuf[i].currentCompareValue-opentimers_vars.lastTimeout;\nif (tempTimerGap < timerGap){\n- // if a timer \"i\" has low priority but has compare value less than\n- // candidate timer \"idToSchedule\" more than TIMERTHRESHOLD ticks,\n- // replace candidate timer by this timer \"i\".\n- if (opentimers_vars.timersBuf[i].priority > opentimers_vars.timersBuf[idToSchedule].priority){\n- if (timerGap-tempTimerGap > TIMERTHRESHOLD){\n+ // timer \"i\" is more close to lastCompare value\ntimerGap = tempTimerGap;\nidToSchedule = i;\n}\n- } else {\n- // a timer \"i\" has higher priority than candidate timer \"idToSchedule\"\n- // and compare value less than candidate timer replace candidate\n- // timer by timer \"i\".\n- timerGap = tempTimerGap;\n- idToSchedule = i;\n- }\n- } else {\n- // if a timer \"i\" has higher priority than candidate timer \"idToSchedule\"\n- // and its compare value is larger than timer \"i\" no more than TIMERTHRESHOLD ticks,\n- // replace candidate timer by timer \"i\".\n- if (opentimers_vars.timersBuf[i].priority < opentimers_vars.timersBuf[idToSchedule].priority){\n- if (tempTimerGap - timerGap < TIMERTHRESHOLD){\n- timerGap = tempTimerGap;\n- idToSchedule = i;\n- }\n- }\n- }\n}\n}\n@@ -331,6 +296,7 @@ PORT_TIMER_WIDTH opentimers_getCurrentTimeout(void){\nbool opentimers_isRunning(opentimers_id_t id){\nreturn opentimers_vars.timersBuf[id].isrunning;\n}\n+// ========================== task ============================================\n// ========================== callback ========================================\n@@ -343,119 +309,72 @@ and call the callback recorded for that timer.\n*/\nvoid opentimers_timer_callback(void){\nuint8_t i;\n- uint8_t j;\n- uint8_t idToCallCB;\nuint8_t idToSchedule;\nPORT_TIMER_WIDTH timerGap;\nPORT_TIMER_WIDTH tempTimerGap;\n- PORT_TIMER_WIDTH tempLastTimeout = opentimers_vars.currentTimeout;\n- // 1. find the expired timer\n- idToCallCB = MAX_NUM_TIMERS;\n+\n+ opentimers_vars.insideISR = TRUE;\nfor (i=0;i<MAX_NUM_TIMERS;i++){\nif (opentimers_vars.timersBuf[i].isrunning==TRUE){\n- // all timers in the past within TIMERTHRESHOLD ticks\n- // (probably with low priority) will be marked as Expired.\n- if (opentimers_vars.currentTimeout-opentimers_vars.timersBuf[i].currentCompareValue <= TIMERTHRESHOLD){\n+ if (opentimers_vars.currentTimeout == opentimers_vars.timersBuf[i].currentCompareValue){\n// this timer expired, mark as expired\n- opentimers_vars.timersBuf[i].hasExpired = TRUE;\n- // find the fired timer who has the smallest currentTimeout as last Timeout\n- if (tempLastTimeout>opentimers_vars.timersBuf[i].currentCompareValue){\n- tempLastTimeout = opentimers_vars.timersBuf[i].currentCompareValue;\n- }\n- if (idToCallCB==MAX_NUM_TIMERS){\n- idToCallCB = i;\n+ opentimers_vars.timersBuf[i].lastCompareValue = opentimers_vars.timersBuf[i].currentCompareValue;\n+ if (opentimers_vars.timersBuf[i].wraps_remaining==0){\n+ opentimers_vars.timersBuf[i].isrunning = FALSE;\n+ opentimers_vars.timersBuf[i].hasExpired = FALSE;\n+ if (i==0){\n+ opentimers_vars.timersBuf[0].callback(0);\n} else {\n- if (opentimers_vars.timersBuf[i].priority<opentimers_vars.timersBuf[idToCallCB].priority){\n- idToCallCB = i;\n- }\n- }\n- }\n- }\n- }\n-\n- // update lastTimeout\n- opentimers_vars.lastTimeout = tempLastTimeout;\n-\n- // 2. call the callback of expired timers\n- opentimers_vars.insideISR = TRUE;\n-\n- if (idToCallCB==MAX_NUM_TIMERS){\n- // no more timer expired\n- } else {\n- // call all timers expired having the same priority with timer idToCallCB\n- for (j=0;j<MAX_NUM_TIMERS;j++){\n- if (\n- opentimers_vars.timersBuf[j].hasExpired == TRUE &&\n- opentimers_vars.timersBuf[j].priority == opentimers_vars.timersBuf[idToCallCB].priority\n- ){\n- opentimers_vars.timersBuf[j].lastCompareValue = opentimers_vars.timersBuf[j].currentCompareValue;\n- if (opentimers_vars.timersBuf[j].wraps_remaining==0){\n- opentimers_vars.timersBuf[j].isrunning = FALSE;\n- opentimers_vars.timersBuf[j].hasExpired = FALSE;\n- opentimers_vars.timersBuf[j].callback(j);\n- if (opentimers_vars.timersBuf[j].timerType==TIMER_PERIODIC){\n- opentimers_scheduleIn(j,\n- opentimers_vars.timersBuf[j].totalTimerPeriod,\n+ scheduler_push_task((task_cbt)(opentimers_vars.timersBuf[i].callback),TASKPRIO_OPENTIMERS);\n+ if (opentimers_vars.timersBuf[i].timerType==TIMER_PERIODIC){\n+ opentimers_scheduleIn(\n+ i,\n+ opentimers_vars.timersBuf[i].totalTimerPeriod,\nTIME_TICS,\nTIMER_PERIODIC,\n- opentimers_vars.timersBuf[j].callback\n+ opentimers_vars.timersBuf[i].callback\n);\n}\n+ }\n} else {\n- opentimers_vars.timersBuf[j].wraps_remaining--;\n- if (opentimers_vars.timersBuf[j].wraps_remaining == 0){\n- opentimers_vars.timersBuf[j].currentCompareValue = (opentimers_vars.timersBuf[j].totalTimerPeriod+opentimers_vars.timersBuf[j].lastCompareValue) & MAX_TICKS_IN_SINGLE_CLOCK;\n+ opentimers_vars.timersBuf[i].wraps_remaining--;\n+ if (opentimers_vars.timersBuf[i].wraps_remaining == 0){\n+ opentimers_vars.timersBuf[i].currentCompareValue = (opentimers_vars.timersBuf[i].totalTimerPeriod+opentimers_vars.timersBuf[i].lastCompareValue) & MAX_TICKS_IN_SINGLE_CLOCK;\n} else {\n- opentimers_vars.timersBuf[j].currentCompareValue = opentimers_vars.timersBuf[j].lastCompareValue + MAX_TICKS_IN_SINGLE_CLOCK;\n+ opentimers_vars.timersBuf[i].currentCompareValue = opentimers_vars.timersBuf[i].lastCompareValue + MAX_TICKS_IN_SINGLE_CLOCK;\n}\n- opentimers_vars.timersBuf[j].hasExpired = FALSE;\n}\n- break;\n}\n}\n}\n- opentimers_vars.insideISR = FALSE;\n+ opentimers_vars.lastTimeout = opentimers_vars.currentTimeout;\n- // 3. find the next timer to be fired\n- timerGap = opentimers_vars.timersBuf[0].currentCompareValue+opentimers_vars.timersBuf[0].wraps_remaining*MAX_TICKS_IN_SINGLE_CLOCK-opentimers_vars.lastTimeout;\n- idToSchedule = 0;\n- for (i=1;i<MAX_NUM_TIMERS;i++){\n+ // find the next timer to be fired\n+ i = 0;\n+ while (opentimers_vars.timersBuf[i].isrunning==FALSE && i<MAX_NUM_TIMERS){\n+ i++;\n+ }\n+ if(i<MAX_NUM_TIMERS){\n+ timerGap = opentimers_vars.timersBuf[i].currentCompareValue+opentimers_vars.timersBuf[i].wraps_remaining*MAX_TICKS_IN_SINGLE_CLOCK-opentimers_vars.lastTimeout;\n+ idToSchedule = i;\n+ for (i=idToSchedule+1;i<MAX_NUM_TIMERS;i++){\nif (opentimers_vars.timersBuf[i].isrunning){\ntempTimerGap = opentimers_vars.timersBuf[i].currentCompareValue-opentimers_vars.lastTimeout;\nif (tempTimerGap < timerGap){\n- // if a timer \"i\" has low priority but has compare value less than\n- // candidate timer \"idToSchedule\" more than TIMERTHRESHOLD ticks,\n- // replace candidate timer by this timer \"i\".\n- if (opentimers_vars.timersBuf[i].priority > opentimers_vars.timersBuf[idToSchedule].priority){\n- if (timerGap-tempTimerGap > TIMERTHRESHOLD){\ntimerGap = tempTimerGap;\nidToSchedule = i;\n}\n- } else {\n- // a timer \"i\" has higher priority than candidate timer \"idToSchedule\"\n- // and compare value less than candidate timer replace candidate\n- // timer by timer \"i\".\n- timerGap = tempTimerGap;\n- idToSchedule = i;\n- }\n- } else {\n- // if a timer \"i\" has higher priority than candidate timer \"idToSchedule\"\n- // and its compare value is larger than timer \"i\" no more than TIMERTHRESHOLD ticks,\n- // replace candidate timer by timer \"i\".\n- if (opentimers_vars.timersBuf[i].priority < opentimers_vars.timersBuf[idToSchedule].priority){\n- if (tempTimerGap - timerGap < TIMERTHRESHOLD){\n- timerGap = tempTimerGap;\n- idToSchedule = i;\n- }\n- }\n- }\n}\n}\n- // 4. reschedule the timer\n+ // reschedule the timer\nopentimers_vars.currentTimeout = opentimers_vars.timersBuf[idToSchedule].currentCompareValue;\nopentimers_vars.lastCompare[opentimers_vars.index] = opentimers_vars.currentTimeout;\nopentimers_vars.index = (opentimers_vars.index+1)&0x0F;\nsctimer_setCompare(opentimers_vars.currentTimeout);\nopentimers_vars.running = TRUE;\n+ } else {\n+ opentimers_vars.running = FALSE;\n+ }\n+ opentimers_vars.insideISR = FALSE;\n}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/opentimers.h",
"new_path": "drivers/common/opentimers.h",
"diff": "//=========================== define ==========================================\n-//===== sctimer scheduling\n-// the timer with higher priority can be scheduled in advance even if\n-// there is a timer being scheduled early than the higher priority timer\n-// but within TIMERTHRESHOLD.\n-// E.g if priority of timer0 > priority of timer1: if timer0 schedules timer at\n-// 100 and timer 1 schedules timer at 95 and current timer count is 80,\n-// then timer0 will be scheduled first than timer1.\n-#define TIMERTHRESHOLD 10\n-\n/// Maximum number of timers that can run concurrently\n#define MAX_NUM_TIMERS 10\n#define MAX_TICKS_IN_SINGLE_CLOCK (uint32_t)(((PORT_TIMER_WIDTH)0xFFFFFFFF)>>1)\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/02drv_opentimers/02drv_opentimers.c",
"new_path": "projects/common/02drv_opentimers/02drv_opentimers.c",
"diff": "@@ -21,6 +21,8 @@ When you run the application, you should see the LEDs \"counting\".\n#include \"leds.h\"\n// driver modules required\n#include \"opentimers.h\"\n+// kernel modules required\n+#include \"scheduler.h\"\n//=========================== defines =========================================\n@@ -54,18 +56,19 @@ int mote_main(void) {\nmemset(&app_vars,0,sizeof(app_vars_t));\nboard_init();\n+ scheduler_init();\nopentimers_init();\n- app_vars.timer0_id = opentimers_create();\n- opentimers_scheduleIn (\n+ app_vars.timer0_id = opentimers_create(HIGHEST_PRIORITY);\n+ opentimers_scheduleAbsolute (\napp_vars.timer0_id, // id\nTIMER0_PERIOD_MS, // duration\n+ opentimers_getCurrentTimeout(), // reference\nTIME_MS, // time_type\n- TIMER_PERIODIC, // timer_type\ntimer0_cb // callback\n);\n- app_vars.timer1_id = opentimers_create();\n+ app_vars.timer1_id = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn (\napp_vars.timer1_id, // id\nTIMER1_PERIOD_MS, // duration\n@@ -74,7 +77,7 @@ int mote_main(void) {\ntimer1_cb // callback\n);\n- app_vars.timer2_id = opentimers_create();\n+ app_vars.timer2_id = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn (\napp_vars.timer2_id, // id\nTIMER2_PERIOD_MS, // duration\n@@ -83,15 +86,22 @@ int mote_main(void) {\ntimer2_cb // callback\n);\n- while(1) {\n- board_sleep();\n- }\n+ scheduler_start();\n+\n+ return 0;\n}\n//=========================== callbacks =======================================\nvoid timer0_cb(opentimers_id_t id) {\nleds_error_toggle();\n+ opentimers_scheduleAbsolute (\n+ app_vars.timer0_id, // id\n+ TIMER0_PERIOD_MS, // duration\n+ opentimers_getCurrentTimeout(), // reference\n+ TIME_MS, // time_type\n+ timer0_cb // callback\n+ );\n}\nvoid timer1_cb(opentimers_id_t id) {\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_macpong/03oos_macpong.c",
"new_path": "projects/common/03oos_macpong/03oos_macpong.c",
"diff": "@@ -112,7 +112,7 @@ void macpong_send(uint8_t payloadCtr) {\n//===== IPHC\nvoid iphc_init(void) {\n- macpong_vars.timerId = opentimers_create();\n+ macpong_vars.timerId = opentimers_create(DEFAULT_PRIORITY);\nopentimers_scheduleIn(\nmacpong_vars.timerId, // timerId\n1000, // duration\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/openmote-cc2538/02drv_opentimers/02drv_opentimers.ewp",
"new_path": "projects/openmote-cc2538/02drv_opentimers/02drv_opentimers.ewp",
"diff": "<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\leds.c</name>\n</file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\pwm.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\pwm.h</name>\n+ </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\radio.c</name>\n</file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\board.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\bsp_timer.h</name>\n- <excluded>\n- <configuration>Debug</configuration>\n- </excluded>\n- </file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\crypto_engine.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\cryptoengine.h</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\debugpins.h</name>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\radio.h</name>\n</file>\n- <file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\radiotimer.h</name>\n- <excluded>\n- <configuration>Debug</configuration>\n- </excluded>\n- </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\sctimer.h</name>\n</file>\n<name>$PROJ_DIR$\\..\\..\\..\\inc\\opendefs.h</name>\n</file>\n</group>\n+ <group>\n+ <name>kernel</name>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\kernel\\openos\\scheduler.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\kernel\\scheduler.h</name>\n+ </file>\n+ </group>\n<group>\n<name>projects</name>\n<group>\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/openmote-cc2538/03oos_openwsn/03oos_openwsn.ewp",
"new_path": "projects/openmote-cc2538/03oos_openwsn/03oos_openwsn.ewp",
"diff": "<debug>1</debug>\n<option>\n<name>CCDefines</name>\n- <state></state>\n+ <state>DAGROOT</state>\n</option>\n<option>\n<name>CCPreprocFile</name>\n</file>\n</group>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\adc_sensor.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\adc_sensor.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\adc_sensor.h</name>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\cryptoengine.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\debugpins.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\debugpins.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\eui64.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\eui64.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\i2c.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\i2c.c</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\leds.c</name>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\sctimer.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\sensors.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\sensors.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\startup_iar.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\startup_iar.c</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\uart.c</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\uart.c</name>\n</file>\n</group>\n<file>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. update opentimers by pushing the non-TSCH state machine timer as a task.
|
491,595 |
17.04.2018 20:18:39
| -7,200 |
82cdbc0e4606cfef494c5d914aaa3bd2b83bea24
|
fix the oos_sniffer project.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_sniffer/03oos_sniffer.c",
"new_path": "projects/common/03oos_sniffer/03oos_sniffer.c",
"diff": "@@ -83,7 +83,7 @@ int mote_main(void) {\nradio_setEndFrameCb(cb_endFrame);\n// start timer\n- app_vars.timerId = opentimers_create();\n+ app_vars.timerId = opentimers_create(DEFAULT_PRIORITY);\nreference = opentimers_getValue();\nopentimers_scheduleAbsolute(\napp_vars.timerId, // timerId\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/openmote-cc2538/03oos_sniffer/03oos_sniffer.ewp",
"new_path": "projects/openmote-cc2538/03oos_sniffer/03oos_sniffer.ewp",
"diff": "<group>\n<name>headers</name>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_aes.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_aes.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_ana_regs.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_ana_regs.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_cctest.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_cctest.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_flash_ctrl.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_flash_ctrl.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_gpio.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_gpio.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_gptimer.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_gptimer.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_i2cm.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_i2cm.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_i2cs.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_i2cs.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_ints.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_ints.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_ioc.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_ioc.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_memmap.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_memmap.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_nvic.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_nvic.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_pka.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_pka.h</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_rfcore_ffsm.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_rfcore_sfr.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_rfcore_sfr.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_rfcore_xreg.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_rfcore_xreg.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_smwdthrosc.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_smwdthrosc.h</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_soc_adc.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_ssi.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_ssi.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_sys_ctrl.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_sys_ctrl.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_types.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_types.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_uart.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_uart.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_udma.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_udma.h</name>\n</file>\n<file>\n- <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\OpenMote-CC2538\\headers\\hw_udmachctl.h</name>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_udmachctl.h</name>\n</file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\headers\\hw_usb.h</name>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\leds.h</name>\n</file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\pwm.c</name>\n+ </file>\n+ <file>\n+ <name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\pwm.h</name>\n+ </file>\n<file>\n<name>$PROJ_DIR$\\..\\..\\..\\bsp\\boards\\openmote-cc2538\\radio.c</name>\n</file>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-540. fix the oos_sniffer project.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.