forked from usdot-jpo-ode/asn1_codec
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from iyourshaw/fix-vehicle-event-flags-jackknife
Fix VehicleEventFlaga Jackknife Event Extension
- Loading branch information
Showing
8 changed files
with
259 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
17 changes: 0 additions & 17 deletions
17
asn1c_combined/j2735-asn-files/2024/asn-edits/Common.patch
This file was deleted.
Oops, something went wrong.
95 changes: 95 additions & 0 deletions
95
asn1c_combined/j2735-asn-files/2024/overrides/VehicleEventFlags.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* | ||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c) | ||
* From ASN.1 module "Common" | ||
* found in "./j2735-asn-files/2024/J2735-Common-2024-rel-v1.1.2.asn" | ||
* `asn1c -fcompound-names -gen-OER -fincludes-quoted -no-gen-JER -pdu=all -D ./generated-files/2024` | ||
*/ | ||
|
||
#include "VehicleEventFlags.h" | ||
|
||
int | ||
VehicleEventFlags_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, | ||
asn_app_constraint_failed_f *ctfailcb, void *app_key) { | ||
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; | ||
size_t size; | ||
|
||
if(!sptr) { | ||
ASN__CTFAIL(app_key, td, sptr, | ||
"%s: value not given (%s:%d)", | ||
td->name, __FILE__, __LINE__); | ||
return -1; | ||
} | ||
|
||
if(st->size > 0) { | ||
/* Size in bits */ | ||
size = 8 * st->size - (st->bits_unused & 0x07); | ||
} else { | ||
size = 0; | ||
} | ||
|
||
/* | ||
* NOT edited. Keep the size constraint including extension in this check. | ||
*/ | ||
if((size >= 13UL && size <= 14UL)) { | ||
/* Constraint check succeeded */ | ||
return 0; | ||
} else { | ||
ASN__CTFAIL(app_key, td, sptr, | ||
"%s: constraint failed (%s:%d)", | ||
td->name, __FILE__, __LINE__); | ||
return -1; | ||
} | ||
} | ||
|
||
/* | ||
* This type is implemented using BIT_STRING, | ||
* so here we adjust the DEF accordingly. | ||
*/ | ||
#if !defined(ASN_DISABLE_OER_SUPPORT) | ||
static asn_oer_constraints_t asn_OER_type_VehicleEventFlags_constr_1 CC_NOTUSED = { | ||
{ 0, 0 }, | ||
-1 /* (SIZE(0..MAX)) */}; | ||
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ | ||
|
||
/* | ||
* EDITED PER size constraint | ||
* originally: (SIZE(13..14,...)) | ||
* changed to: (SIZE(13,...)) | ||
*/ | ||
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) | ||
asn_per_constraints_t asn_PER_type_VehicleEventFlags_constr_1 CC_NOTUSED = { | ||
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, | ||
{ APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 13, 13 }, | ||
0, 0 /* No PER value map */ | ||
}; | ||
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ | ||
|
||
static const ber_tlv_tag_t asn_DEF_VehicleEventFlags_tags_1[] = { | ||
(ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) | ||
}; | ||
asn_TYPE_descriptor_t asn_DEF_VehicleEventFlags = { | ||
"VehicleEventFlags", | ||
"VehicleEventFlags", | ||
&asn_OP_BIT_STRING, | ||
asn_DEF_VehicleEventFlags_tags_1, | ||
sizeof(asn_DEF_VehicleEventFlags_tags_1) | ||
/sizeof(asn_DEF_VehicleEventFlags_tags_1[0]), /* 1 */ | ||
asn_DEF_VehicleEventFlags_tags_1, /* Same as above */ | ||
sizeof(asn_DEF_VehicleEventFlags_tags_1) | ||
/sizeof(asn_DEF_VehicleEventFlags_tags_1[0]), /* 1 */ | ||
{ | ||
#if !defined(ASN_DISABLE_OER_SUPPORT) | ||
&asn_OER_type_VehicleEventFlags_constr_1, | ||
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ | ||
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) | ||
&asn_PER_type_VehicleEventFlags_constr_1, | ||
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ | ||
#if !defined(ASN_DISABLE_JER_SUPPORT) | ||
0, | ||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ | ||
VehicleEventFlags_constraint | ||
}, | ||
0, 0, /* Defined elsewhere */ | ||
&asn_SPC_BIT_STRING_specs /* Additional specs */ | ||
}; | ||
|
1 change: 1 addition & 0 deletions
1
data/InputData.decoding.bsm.with.VehicleEventFlags.eventJackKnife.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<OdeAsn1Data><metadata><bsmSource>RV</bsmSource><logFileName/><recordType>bsmTx</recordType><securityResultCode>success</securityResultCode><receivedMessageDetails><locationData><latitude/><longitude/><elevation/><speed/><heading/></locationData><rxSource>RV</rxSource></receivedMessageDetails><encodings><encodings><elementName>unsecuredData</elementName><elementType>MessageFrame</elementType><encodingRule>UPER</encodingRule></encodings></encodings><payloadType>us.dot.its.jpo.ode.model.OdeAsn1Payload</payloadType><serialId><streamId>bee2fd4f-f2e4-4a91-a35c-dabf83f22dec</streamId><bundleSize>1</bundleSize><bundleId>0</bundleId><recordId>0</recordId><serialNumber>0</serialNumber></serialId><odeReceivedAt>2023-02-21T21:08:03.588646Z</odeReceivedAt><schemaVersion>6</schemaVersion><maxDurationTime>0</maxDurationTime><recordGeneratedAt/><recordGeneratedBy/><sanitized>false</sanitized><odePacketID/><odeTimStartDateTime/><originIp>10.10.10.10</originIp></metadata><payload><dataType>us.dot.its.jpo.ode.model.OdeHexByteArray</dataType><data><bytes>0014515767567EDDDFA3E68037E116658105B0DA9414000070F402B0FD630FA1007F82800000000000A9D0E00040C227738206DF900A482429E82C7DF900F4C268B282DE5F7015602B18982B1DED82000D50F680</bytes></data></payload></OdeAsn1Data> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters