实例介绍
1. 包含消息集BSM/RSM/RSI/MAP/SPAT的XPER编解码接口 2. libasn1c库 安装asn1c-0.9.28开源工具,使用 asn1c -pdu=all -fcompound-names -gen-PER LTEV2X.asn命令 生成对应.c和.h文件,再连接成libasn1c库 3. 编译命令,详见Makefile 第一次编译: source ./build_project.sh 编译模块: mm 清除模块: mc 4. 生成可执行文件 v2x_msg ./v2x_msg 运行编解码库 会保存消息集的二进制文件: asn1c_bsm asn1c_map asn1c_rsi asn1c_rsm asn1c_spat 5. log xzb@ubuntu:/home/myshare/code/asn1c_v2x_app$ ./v2x_msg [bsm_msg_test][549] begin [main.c,bsm_msg_fill:338]fill bsm end [main.c,bsm_msg_test:563]----------bsm encode--------- 10 10 20 30 00 00 00 00 00 1234 12 23 1234 456 12 34 56 78 90 100 20 [main.c,bsm_msg_test:566]----------bsm decode--------- 10 10 20 30 00 00 00 00 00 1234 12 23 1234 456 12 34 56 78
【实例截图】
【核心代码】
asn1c_v2x_app.rar
└── asn1c_v2x_app
├── build_project.sh
├── include
│ ├── Acceleration.h
│ ├── AccelerationSet4Way.h
│ ├── AlertType.h
│ ├── AllowedManeuvers.h
│ ├── AntiLockBrakeStatus.h
│ ├── asn_application.h
│ ├── asn_codecs.h
│ ├── asn_codecs_prim.h
│ ├── asn_internal.h
│ ├── asn_SEQUENCE_OF.h
│ ├── asn_SET_OF.h
│ ├── asn_system.h
│ ├── AuxiliaryBrakeStatus.h
│ ├── BasicVehicleClass.h
│ ├── ber_decoder.h
│ ├── ber_tlv_length.h
│ ├── ber_tlv_tag.h
│ ├── BIT_STRING.h
│ ├── BrakeAppliedStatus.h
│ ├── BrakeBoostApplied.h
│ ├── BrakePedalStatus.h
│ ├── BrakeSystemStatus.h
│ ├── BSM.h
│ ├── CoarseHeading.h
│ ├── Confidence.h
│ ├── ConnectingLane.h
│ ├── Connection.h
│ ├── ConnectsToList.h
│ ├── constraints.h
│ ├── constr_CHOICE.h
│ ├── constr_SEQUENCE.h
│ ├── constr_SEQUENCE_OF.h
│ ├── constr_SET_OF.h
│ ├── constr_TYPE.h
│ ├── DDateTime.h
│ ├── DDay.h
│ ├── der_encoder.h
│ ├── DescriptiveName.h
│ ├── DHour.h
│ ├── DMinute.h
│ ├── DMonth.h
│ ├── DSecond.h
│ ├── DTimeOffset.h
│ ├── DYear.h
│ ├── ElevationConfidence.h
│ ├── Elevation.h
│ ├── ExteriorLights.h
│ ├── FullPositionVector.h
│ ├── GNSSstatus.h
│ ├── HeadingConfidence.h
│ ├── Heading.h
│ ├── IA5String.h
│ ├── INTEGER.h
│ ├── IntersectionState.h
│ ├── IntersectionStateList.h
│ ├── IntersectionStatusObject.h
│ ├── LaneAttributes-Barrier.h
│ ├── LaneAttributes-Bike.h
│ ├── LaneAttributes-Crosswalk.h
│ ├── LaneAttributes.h
│ ├── LaneAttributes-Parking.h
│ ├── LaneAttributes-Sidewalk.h
│ ├── LaneAttributes-Striping.h
│ ├── LaneAttributes-TrackedVehicle.h
│ ├── LaneAttributes-Vehicle.h
│ ├── Lane.h
│ ├── LaneID.h
│ ├── LaneList.h
│ ├── LaneSharing.h
│ ├── LaneTypeAttributes.h
│ ├── LaneWidth.h
│ ├── Latitude.h
│ ├── LightState.h
│ ├── Link.h
│ ├── LinkList.h
│ ├── Longitude.h
│ ├── MAP.h
│ ├── MessageFrame.h
│ ├── MinuteOfTheYear.h
│ ├── MotionConfidenceSet.h
│ ├── Movement.h
│ ├── MovementList.h
│ ├── MsgCount.h
│ ├── NativeEnumerated.h
│ ├── NativeInteger.h
│ ├── Node.h
│ ├── NodeID.h
│ ├── NodeList.h
│ ├── NodeReferenceID.h
│ ├── OCTET_STRING.h
│ ├── OffsetLL-B12.h
│ ├── OffsetLL-B14.h
│ ├── OffsetLL-B16.h
│ ├── OffsetLL-B18.h
│ ├── OffsetLL-B22.h
│ ├── OffsetLL-B24.h
│ ├── ParticipantData.h
│ ├── ParticipantList.h
│ ├── ParticipantType.h
│ ├── PathHistory.h
│ ├── PathHistoryPoint.h
│ ├── PathHistoryPointList.h
│ ├── PathPointList.h
│ ├── PathPrediction.h
│ ├── per_decoder.h
│ ├── per_encoder.h
│ ├── per_opentype.h
│ ├── per_support.h
│ ├── Phase.h
│ ├── PhaseID.h
│ ├── PhaseList.h
│ ├── PhaseState.h
│ ├── PhaseStateList.h
│ ├── PointList.h
│ ├── Position3D.h
│ ├── PositionConfidence.h
│ ├── PositionConfidenceSet.h
│ ├── Position-LL-24B.h
│ ├── Position-LL-28B.h
│ ├── Position-LL-32B.h
│ ├── Position-LL-36B.h
│ ├── Position-LL-44B.h
│ ├── Position-LL-48B.h
│ ├── Position-LLmD-64b.h
│ ├── PositionOffsetLL.h
│ ├── PositionOffsetLLV.h
│ ├── Priority.h
│ ├── Radius.h
│ ├── RadiusOfCurvature.h
│ ├── RegulatorySpeedLimit.h
│ ├── RoadPoint.h
│ ├── RoadRegulatorID.h
│ ├── RSI.h
│ ├── RSM.h
│ ├── SourceType.h
│ ├── SPAT.h
│ ├── SpeedConfidence.h
│ ├── Speed.h
│ ├── SpeedLimitList.h
│ ├── SpeedLimitType.h
│ ├── StabilityControlStatus.h
│ ├── SteeringWheelAngleConfidence.h
│ ├── SteeringWheelAngle.h
│ ├── TimeChangeDetails.h
│ ├── TimeConfidence.h
│ ├── TimeMark.h
│ ├── TimeOffset.h
│ ├── TractionControlStatus.h
│ ├── TransmissionState.h
│ ├── VehicleClassification.h
│ ├── VehicleEventFlags.h
│ ├── VehicleHeight.h
│ ├── VehicleLength.h
│ ├── VehicleSafetyExtensions.h
│ ├── VehicleSize.h
│ ├── VehicleWidth.h
│ ├── VerticalAcceleration.h
│ ├── VerticalOffset.h
│ ├── VertOffset-B07.h
│ ├── VertOffset-B08.h
│ ├── VertOffset-B09.h
│ ├── VertOffset-B10.h
│ ├── VertOffset-B11.h
│ ├── VertOffset-B12.h
│ ├── xer_decoder.h
│ ├── xer_encoder.h
│ ├── xer_support.h
│ └── YawRate.h
├── libasn1c_debug.a
├── libasn1c_release.a
├── main.c
├── Makefile
├── Readme.txt
├── V2xLog.h
├── V2xMessageDecode.c
├── V2xMessageDecode.h
├── V2xMessageEncode.c
└── V2xMessageEncode.h
2 directories, 179 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论