Skip to content

Commit

Permalink
modified: src/tmx/Asn_J2735/src/r2020/MessageFrame.c
Browse files Browse the repository at this point in the history
	modified:   src/tmx/TmxUtils/test/J2735MessageTest.cpp
  • Loading branch information
jwillmartin committed Dec 1, 2023
1 parent 39ae4ce commit 09f9461
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 36 deletions.
83 changes: 48 additions & 35 deletions src/tmx/Asn_J2735/src/r2020/MessageFrame.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ static const long asn_VAL_28_testMessage12 = 252;
static const long asn_VAL_29_testMessage13 = 253;
static const long asn_VAL_30_testMessage14 = 254;
static const long asn_VAL_31_testMessage15 = 255;
static const long asn_VAL_32_sensorDataSharingMessage = 41;
static const asn_ioc_cell_t asn_IOS_MessageTypes_1_rows[] = {
{ "&id", aioc__value, &asn_DEF_DSRCmsgID, &asn_VAL_1_basicSafetyMessage },
{ "&Type", aioc__type, &asn_DEF_BasicSafetyMessage },
Expand Down Expand Up @@ -100,10 +101,12 @@ static const asn_ioc_cell_t asn_IOS_MessageTypes_1_rows[] = {
{ "&id", aioc__value, &asn_DEF_DSRCmsgID, &asn_VAL_30_testMessage14 },
{ "&Type", aioc__type, &asn_DEF_TestMessage14 },
{ "&id", aioc__value, &asn_DEF_DSRCmsgID, &asn_VAL_31_testMessage15 },
{ "&Type", aioc__type, &asn_DEF_TestMessage15 }
{ "&Type", aioc__type, &asn_DEF_TestMessage15 },
{ "&id", aioc__value, &asn_DEF_DSRCmsgID, &asn_VAL_32_sensorDataSharingMessage },
{ "&Type", aioc__type, &asn_DEF_SensorDataSharingMessage }
};
static const asn_ioc_set_t asn_IOS_MessageTypes_1[] = {
{ 31, 2, asn_IOS_MessageTypes_1_rows }
{ 32, 2, asn_IOS_MessageTypes_1_rows }
};
static int
memb_messageId_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Expand Down Expand Up @@ -728,47 +731,57 @@ static asn_TYPE_member_t asn_MBR_value_3[] = {
0, 0, /* No default value */
"TestMessage15"
},
{ ATF_NOFLAGS, 0, offsetof(struct MessageFrame__value, choice.SensorDataSharingMessage),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_SensorDataSharingMessage,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"SensorDataSharingMessage"
},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 30 }, /* BasicSafetyMessage */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 29 }, /* MapData */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 28 }, /* SPAT */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 27 }, /* CommonSafetyRequest */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 26 }, /* EmergencyVehicleAlert */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 25 }, /* IntersectionCollision */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 24 }, /* NMEAcorrections */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 23 }, /* ProbeDataManagement */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 22 }, /* ProbeVehicleData */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, -9, 21 }, /* RoadSideAlert */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 10, -10, 20 }, /* RTCMcorrections */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 11, -11, 19 }, /* SignalRequestMessage */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 12, -12, 18 }, /* SignalStatusMessage */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 13, -13, 17 }, /* TravelerInformation */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 14, -14, 16 }, /* PersonalSafetyMessage */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 15, -15, 15 }, /* TestMessage00 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 16, -16, 14 }, /* TestMessage01 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 17, -17, 13 }, /* TestMessage02 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 18, -18, 12 }, /* TestMessage03 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 19, -19, 11 }, /* TestMessage04 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 20, -20, 10 }, /* TestMessage05 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 21, -21, 9 }, /* TestMessage06 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 22, -22, 8 }, /* TestMessage07 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 23, -23, 7 }, /* TestMessage08 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 24, -24, 6 }, /* TestMessage09 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 25, -25, 5 }, /* TestMessage10 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 26, -26, 4 }, /* TestMessage11 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 27, -27, 3 }, /* TestMessage12 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 28, -28, 2 }, /* TestMessage13 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 29, -29, 1 }, /* TestMessage14 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 30, -30, 0 } /* TestMessage15 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 31 }, /* BasicSafetyMessage */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 30 }, /* MapData */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 29 }, /* SPAT */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 28 }, /* CommonSafetyRequest */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 27 }, /* EmergencyVehicleAlert */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 26 }, /* IntersectionCollision */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 25 }, /* NMEAcorrections */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 24 }, /* ProbeDataManagement */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 23 }, /* ProbeVehicleData */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, -9, 22 }, /* RoadSideAlert */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 10, -10, 21 }, /* RTCMcorrections */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 11, -11, 20 }, /* SignalRequestMessage */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 12, -12, 19 }, /* SignalStatusMessage */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 13, -13, 18 }, /* TravelerInformation */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 14, -14, 17 }, /* PersonalSafetyMessage */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 15, -15, 16 }, /* TestMessage00 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 16, -16, 15 }, /* TestMessage01 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 17, -17, 14 }, /* TestMessage02 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 18, -18, 13 }, /* TestMessage03 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 19, -19, 12 }, /* TestMessage04 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 20, -20, 11 }, /* TestMessage05 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 21, -21, 10 }, /* TestMessage06 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 22, -22, 9 }, /* TestMessage07 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 23, -23, 8 }, /* TestMessage08 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 24, -24, 7 }, /* TestMessage09 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 25, -25, 6 }, /* TestMessage10 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 26, -26, 5 }, /* TestMessage11 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 27, -27, 4 }, /* TestMessage12 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 28, -28, 3 }, /* TestMessage13 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 29, -29, 2 }, /* TestMessage14 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 30, -30, 1 }, /* TestMessage15 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 31, -31, 0 } /* SensorDataSharingMessage */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = {
sizeof(struct MessageFrame__value),
offsetof(struct MessageFrame__value, _asn_ctx),
offsetof(struct MessageFrame__value, present),
sizeof(((struct MessageFrame__value *)0)->present),
asn_MAP_value_tag2el_3,
31, /* Count of tags in the map */
32, /* Count of tags in the map */
0, 0,
-1 /* Extensions start */
};
Expand All @@ -791,7 +804,7 @@ asn_TYPE_descriptor_t asn_DEF_value_3 = {
OPEN_TYPE_constraint
},
asn_MBR_value_3,
31, /* Elements count */
32, /* Elements count */
&asn_SPC_value_specs_3 /* Additional specs */
};

Expand Down
2 changes: 1 addition & 1 deletion src/tmx/TmxUtils/test/J2735MessageTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ TEST_F(J2735MessageTest, EncodeSDSM)
free(message);
free(frame_msg.get_j2735_data().get());
ASSERT_EQ(41, SdsmEncodeMessage.get_msgId());
std::string expectedSDSMEncHex = "0029250a010c0c0a101f9c35a4e9266b49d1b20c34000a00000020000bba0a000200004400240009";
std::string expectedSDSMEncHex = "0029250a010c0c0a101f9c37ea97fc66b10b430c34000a00000020002bba0a000200004400240009";
ASSERT_EQ(expectedSDSMEncHex, SdsmEncodeMessage.get_payload_str());

//Decode SDSM
Expand Down

0 comments on commit 09f9461

Please sign in to comment.