Skip to content

Commit b5d7ff0

Browse files
committed
Added DeviceTimeReq certification protocol handling to ClassA and ClassC examples.
1 parent 49edc04 commit b5d7ff0

File tree

18 files changed

+198
-0
lines changed

18 files changed

+198
-0
lines changed

src/apps/LoRaMac/classA/B-L072Z-LRWAN1/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,17 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
795795
ComplianceTest.State = 1;
796796
}
797797
break;
798+
case 8: // Send DeviceTimeReq
799+
{
800+
MlmeReq_t mlmeReq;
801+
802+
mlmeReq.Type = MLME_DEVICE_TIME;
803+
804+
LoRaMacStatus_t status = LoRaMacMlmeRequest( &mlmeReq );
805+
printf( "\r\n###### ===== MLME-Request - MLME_DEVICE_TIME ==== ######\r\n" );
806+
printf( "STATUS : %s\r\n", MacStatusStrings[status] );
807+
}
808+
break;
798809
default:
799810
break;
800811
}

src/apps/LoRaMac/classA/NAMote72/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,17 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
888888
ComplianceTest.State = 1;
889889
}
890890
break;
891+
case 8: // Send DeviceTimeReq
892+
{
893+
MlmeReq_t mlmeReq;
894+
895+
mlmeReq.Type = MLME_DEVICE_TIME;
896+
897+
LoRaMacStatus_t status = LoRaMacMlmeRequest( &mlmeReq );
898+
printf( "\r\n###### ===== MLME-Request - MLME_DEVICE_TIME ==== ######\r\n" );
899+
printf( "STATUS : %s\r\n", MacStatusStrings[status] );
900+
}
901+
break;
891902
default:
892903
break;
893904
}

src/apps/LoRaMac/classA/NucleoL073/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,17 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
793793
ComplianceTest.State = 1;
794794
}
795795
break;
796+
case 8: // Send DeviceTimeReq
797+
{
798+
MlmeReq_t mlmeReq;
799+
800+
mlmeReq.Type = MLME_DEVICE_TIME;
801+
802+
LoRaMacStatus_t status = LoRaMacMlmeRequest( &mlmeReq );
803+
printf( "\r\n###### ===== MLME-Request - MLME_DEVICE_TIME ==== ######\r\n" );
804+
printf( "STATUS : %s\r\n", MacStatusStrings[status] );
805+
}
806+
break;
796807
default:
797808
break;
798809
}

src/apps/LoRaMac/classA/NucleoL152/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,17 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
793793
ComplianceTest.State = 1;
794794
}
795795
break;
796+
case 8: // Send DeviceTimeReq
797+
{
798+
MlmeReq_t mlmeReq;
799+
800+
mlmeReq.Type = MLME_DEVICE_TIME;
801+
802+
LoRaMacStatus_t status = LoRaMacMlmeRequest( &mlmeReq );
803+
printf( "\r\n###### ===== MLME-Request - MLME_DEVICE_TIME ==== ######\r\n" );
804+
printf( "STATUS : %s\r\n", MacStatusStrings[status] );
805+
}
806+
break;
796807
default:
797808
break;
798809
}

src/apps/LoRaMac/classA/NucleoL476/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,17 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
793793
ComplianceTest.State = 1;
794794
}
795795
break;
796+
case 8: // Send DeviceTimeReq
797+
{
798+
MlmeReq_t mlmeReq;
799+
800+
mlmeReq.Type = MLME_DEVICE_TIME;
801+
802+
LoRaMacStatus_t status = LoRaMacMlmeRequest( &mlmeReq );
803+
printf( "\r\n###### ===== MLME-Request - MLME_DEVICE_TIME ==== ######\r\n" );
804+
printf( "STATUS : %s\r\n", MacStatusStrings[status] );
805+
}
806+
break;
796807
default:
797808
break;
798809
}

src/apps/LoRaMac/classA/SAML21/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,17 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
799799
ComplianceTest.State = 1;
800800
}
801801
break;
802+
case 8: // Send DeviceTimeReq
803+
{
804+
MlmeReq_t mlmeReq;
805+
806+
mlmeReq.Type = MLME_DEVICE_TIME;
807+
808+
LoRaMacStatus_t status = LoRaMacMlmeRequest( &mlmeReq );
809+
printf( "\r\n###### ===== MLME-Request - MLME_DEVICE_TIME ==== ######\r\n" );
810+
printf( "STATUS : %s\r\n", MacStatusStrings[status] );
811+
}
812+
break;
802813
default:
803814
break;
804815
}

src/apps/LoRaMac/classA/SKiM880B/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,17 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
809809
ComplianceTest.State = 1;
810810
}
811811
break;
812+
case 8: // Send DeviceTimeReq
813+
{
814+
MlmeReq_t mlmeReq;
815+
816+
mlmeReq.Type = MLME_DEVICE_TIME;
817+
818+
LoRaMacStatus_t status = LoRaMacMlmeRequest( &mlmeReq );
819+
printf( "\r\n###### ===== MLME-Request - MLME_DEVICE_TIME ==== ######\r\n" );
820+
printf( "STATUS : %s\r\n", MacStatusStrings[status] );
821+
}
822+
break;
812823
default:
813824
break;
814825
}

src/apps/LoRaMac/classA/SKiM881AXL/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,17 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
809809
ComplianceTest.State = 1;
810810
}
811811
break;
812+
case 8: // Send DeviceTimeReq
813+
{
814+
MlmeReq_t mlmeReq;
815+
816+
mlmeReq.Type = MLME_DEVICE_TIME;
817+
818+
LoRaMacStatus_t status = LoRaMacMlmeRequest( &mlmeReq );
819+
printf( "\r\n###### ===== MLME-Request - MLME_DEVICE_TIME ==== ######\r\n" );
820+
printf( "STATUS : %s\r\n", MacStatusStrings[status] );
821+
}
822+
break;
812823
default:
813824
break;
814825
}

src/apps/LoRaMac/classA/SKiM980A/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,17 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
809809
ComplianceTest.State = 1;
810810
}
811811
break;
812+
case 8: // Send DeviceTimeReq
813+
{
814+
MlmeReq_t mlmeReq;
815+
816+
mlmeReq.Type = MLME_DEVICE_TIME;
817+
818+
LoRaMacStatus_t status = LoRaMacMlmeRequest( &mlmeReq );
819+
printf( "\r\n###### ===== MLME-Request - MLME_DEVICE_TIME ==== ######\r\n" );
820+
printf( "STATUS : %s\r\n", MacStatusStrings[status] );
821+
}
822+
break;
812823
default:
813824
break;
814825
}

src/apps/LoRaMac/classC/B-L072Z-LRWAN1/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,17 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
795795
ComplianceTest.State = 1;
796796
}
797797
break;
798+
case 8: // Send DeviceTimeReq
799+
{
800+
MlmeReq_t mlmeReq;
801+
802+
mlmeReq.Type = MLME_DEVICE_TIME;
803+
804+
LoRaMacStatus_t status = LoRaMacMlmeRequest( &mlmeReq );
805+
printf( "\r\n###### ===== MLME-Request - MLME_DEVICE_TIME ==== ######\r\n" );
806+
printf( "STATUS : %s\r\n", MacStatusStrings[status] );
807+
}
808+
break;
798809
default:
799810
break;
800811
}

0 commit comments

Comments
 (0)