@@ -952,39 +952,36 @@ port_INLINE void activity_ti1ORri1(void) {
952
952
// check whether we can send
953
953
if (schedule_getOkToSend ()) {
954
954
if (packetfunctions_isBroadcastMulticast (& neighbor )== FALSE){
955
- // this is a dedicated cell
956
- ieee154e_vars .dataToSend = openqueue_macGetDedicatedPacket (& neighbor );
957
- // update numcellpassed and numcellused on dedicated cell
958
- if (ieee154e_vars .dataToSend != NULL ) {
959
- msf_updateCellsUsed (& neighbor );
955
+
956
+ if (schedule_getShared ()){
957
+ // this is an autonomous TxRx cell (unicast)
958
+ ieee154e_vars .dataToSend = openqueue_macGet6PandJoinPacket (& neighbor );
959
+ } else {
960
+ // this is a managed Tx cell
961
+ ieee154e_vars .dataToSend = openqueue_macGetNonJoinIPv6Packet (& neighbor );
962
+
963
+ if (ieee154e_vars .dataToSend == NULL ){
964
+ ieee154e_vars .dataToSend = openqueue_macGetKaPacket (& neighbor );
965
+ }
966
+
967
+ // update numcellpassed and numcellused on managed Tx cell
968
+ if (ieee154e_vars .dataToSend != NULL ) {
969
+ msf_updateCellsUsed (& neighbor );
970
+ }
971
+ msf_updateCellsPassed (& neighbor );
960
972
}
961
- msf_updateCellsPassed (& neighbor );
962
973
} else {
963
- // this is minimal cell
964
- ieee154e_vars .dataToSend = openqueue_macGetDataPacket (& neighbor );
965
- if ((ieee154e_vars .dataToSend == NULL ) && (cellType == CELLTYPE_TXRX )) {
966
- couldSendEB = TRUE;
967
- // look for an EB packet in the queue
968
- ieee154e_vars .dataToSend = openqueue_macGetEBPacket ();
969
- } else {
970
- // there is a packet to send
971
- if (
972
- schedule_hasDedicatedCellToNeighbor (& ieee154e_vars .dataToSend -> l2_nextORpreviousHop )
973
- ) {
974
- // allow sixtop response with SEQNUM_ERR return code send on minimal cell
975
- if (
976
- ieee154e_vars .dataToSend -> creator != COMPONENT_SIXTOP_RES ||
977
- ieee154e_vars .dataToSend -> l2_sixtop_returnCode != IANA_6TOP_RC_SEQNUM_ERR
978
- ) {
979
- // leave the packet to be sent on dedicated cell and pick up a broadcast packet.
980
- ieee154e_vars .dataToSend = openqueue_macGetDIOPacket ();
981
- if (ieee154e_vars .dataToSend == NULL ){
982
- couldSendEB = TRUE;
983
- // look for an EB packet in the queue
984
- ieee154e_vars .dataToSend = openqueue_macGetEBPacket ();
985
- }
986
- }
974
+ if (schedule_getShared ()) {
975
+ // this is minimal cell
976
+ ieee154e_vars .dataToSend = openqueue_macGetDIOPacket ();
977
+ if (ieee154e_vars .dataToSend == NULL ){
978
+ couldSendEB = TRUE;
979
+ // look for an EB packet in the queue
980
+ ieee154e_vars .dataToSend = openqueue_macGetEBPacket ();
987
981
}
982
+ } else {
983
+ // this is autonomous TXRX cell (anycast)
984
+ ieee154e_vars .dataToSend = openqueue_macGetDownStreamPacket (& neighbor );
988
985
}
989
986
}
990
987
}
@@ -1920,7 +1917,7 @@ port_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {
1920
1917
} else {
1921
1918
// synchronize to the received packet if I'm not a DAGroot and this is my preferred parent
1922
1919
// or in case I'm in the middle of the join process when parent is not yet selected
1923
- // or in case I don't have a dedicated cell to my parent yet
1920
+ // or in case I don't have an autonomous Tx cell cell to my parent yet
1924
1921
if (
1925
1922
idmanager_getIsDAGroot () == FALSE &&
1926
1923
(
@@ -1929,7 +1926,7 @@ port_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {
1929
1926
icmpv6rpl_getPreferredParentEui64 (& addressToWrite ) == FALSE ||
1930
1927
(
1931
1928
icmpv6rpl_getPreferredParentEui64 (& addressToWrite ) &&
1932
- schedule_hasDedicatedCellToNeighbor (& addressToWrite )== FALSE
1929
+ schedule_hasManagedTxCellToNeighbor (& addressToWrite )== FALSE
1933
1930
)
1934
1931
)
1935
1932
) {
0 commit comments