Преглед на файлове

change detection_chassis.

yuchuli преди 2 години
родител
ревизия
b2e22f6048

+ 59 - 4
src/controller/controller_changan_shenlan/main.cpp

@@ -119,6 +119,7 @@ void ExecSend();
 void executeDecition(const iv::brain::decition &decition)
 {
 
+    static int xieya = 0;
 //     std::cout<<"acc is "<<decition.torque()<<" ang is "<<decition.wheelangle()<<std::endl;
 //     std::cout<<"angle_mode is "<<decition.angle_mode()<<" angle_active is "<<decition.angle_active()<<std::endl;
 //     std::cout<<"brake_type is "<<decition.brake_type()<<" acc_active is "<<decition.acc_active()<<std::endl;
@@ -146,6 +147,51 @@ void executeDecition(const iv::brain::decition &decition)
     std::cout<<" type: "<<(int)_m144.ACC_ADCReqType<<std::endl;
 
 
+    /*制动过程用的减速度,加速用扭矩*/
+    _m24B.ACC_AccTrqReq = ECU_24B_ACC_AccTrqReq_toS(decition.torque());
+    _m24B.ACC_AccTrqReqActive = decition.acc_active();
+    if(decition.brake()<(-0.5))
+    {
+        _m24B.ACC_ACCTargetAcceleration = ECU_24B_ACC_ACCTargetAcceleration_toS(-0.5);
+    }
+    else
+        _m24B.ACC_ACCTargetAcceleration = ECU_24B_ACC_ACCTargetAcceleration_toS(decition.brake());
+
+
+    std::cout<<" brake : "<<decition.brake()<<std::endl;
+    std::cout<<"brake acctive. "<<decition.brake_active()<<std::endl;
+    if(decition.brake()>(-0.0000001))
+    {
+
+        if(xieya > 0)
+        {
+            _m24B.ACC_CDDActive = 1;
+            _m24B.ACC_ACCTargetAcceleration = ECU_24B_ACC_ACCTargetAcceleration_toS(0.5);
+            _m24B.ACC_AccTrqReq = ECU_24B_ACC_AccTrqReq_toS(0);
+            _m24B.ACC_Driveoff_Request = 1;
+
+            _m144.ACC_ADCReqType = 1;
+            _m24B.ADCReqMode = 1;
+             _m24B.ACC_DecToStop =1;
+            xieya--;
+        }
+        else
+        {
+            _m24B.ACC_CDDActive = 0;
+            _m24B.ACC_ACCTargetAcceleration = ECU_24B_ACC_ACCTargetAcceleration_toS(0);
+            _m24B.ACC_Driveoff_Request = 0;
+        }
+    }
+    else
+    {
+        _m24B.ACC_CDDActive = 1;
+
+        _m24B.ACC_Driveoff_Request = 0;
+        xieya = 50;
+    }
+ //       _m24B.ACC_CDDActive = decition.brake_active();
+
+
 
 //    std::cout<<" req mode: "<<_m144.ADS_Reqmode<<std::endl;
     byte_144[0] = ((_m144.ACC_LatAngReq >> 9) & (0x1FU)) | ((_m144.ADS_Reqmode & (0x07U)) << 5);
@@ -156,10 +202,6 @@ void executeDecition(const iv::brain::decition &decition)
     byte_144[4] = (_m144.ACC_MotorTorqueMinLimitRequest & (0xFFU));
     byte_144[5] = ((_m144.ACC_ADCReqType & (0x03U)) << 6);
 
-    /*制动过程用的减速度,加速用扭矩*/
-    _m24B.ACC_AccTrqReq = ECU_24B_ACC_AccTrqReq_toS(decition.torque());
-    _m24B.ACC_AccTrqReqActive = decition.acc_active();
-    _m24B.ACC_ACCTargetAcceleration = ECU_24B_ACC_ACCTargetAcceleration_toS(decition.brake());
     //    _m24B.ACC_AEBTargetDeceleration = 0;
     //    _m24B.ACC_AEBVehilceHoldReq = 0;
     //    _m24B.ADCReqMode = 0;
@@ -171,10 +213,23 @@ void executeDecition(const iv::brain::decition &decition)
     if(decition.brake()>(-0.0000001))
     {
         _m24B.ACC_CDDActive = 0;
+        _m24B.ACC_Driveoff_Request = 1;
+        if(xieya > 0)
+        {
+            _m24B.ACC_ACCTargetAcceleration = ECU_24B_ACC_ACCTargetAcceleration_toS(0.5);
+            xieya--;
+        }
+        else
+        {
+            _m24B.ACC_ACCTargetAcceleration = ECU_24B_ACC_ACCTargetAcceleration_toS(0);
+        }
     }
     else
     {
         _m24B.ACC_CDDActive = 1;
+
+        _m24B.ACC_Driveoff_Request = 0;
+        xieya = 50;
     }
  //       _m24B.ACC_CDDActive = decition.brake_active();
     _m24B.ACC_ACCMode = decition.auto_mode();

+ 68 - 0
src/detection/detection_chassis/decodechassis.cpp

@@ -4,6 +4,11 @@
 #include "ivlog.h"
 #include "ivfault.h"
 
+extern "C"
+{
+    #include "shenlan.h"
+}
+
 iv::Ivlog * mygivlog;
 iv::Ivfault * mygivfault;
 
@@ -394,3 +399,66 @@ int ProcYUHESENChassis(void * pa, iv::can::canmsg * pmsg)
     return nRtn;
 
 }
+
+int ProcShenLanChassis(void *pa, iv::can::canmsg *pmsg)
+{
+    int i;
+    static iv::chassis xchassis;
+    static bool bHave0x147 = false;
+    for(i=0;i<pmsg->rawmsg_size();i++)
+    {
+
+        const iv::can::canraw * praw = &(pmsg->rawmsg(i));
+//        unsigned char data[8];
+//        memcpy(data,praw->data().data(),8);
+        uint64_t rawdata;
+        memcpy(&rawdata,praw->data().data(),8);
+        can_obj_shenlan_h_t canobj;
+        unpack_message(&canobj, praw->id(),rawdata,8,0);
+        if(praw->id() == 0x147)
+        {
+            double vehspeed,wheelangle;
+            decode_can_0x147_EspVehSpd(&canobj,&vehspeed);
+            decode_can_0x147_EpsSasSteerAg(&canobj,&wheelangle);
+            xchassis.set_vel(static_cast<float>(vehspeed));
+            bHave0x147 = true;
+        }
+        if(praw->id() == 0x14A)
+        {
+
+        }
+        if(praw->id() == 0x250)
+        {
+
+
+        }
+        if(praw->id() == 0x358)
+        {
+
+
+        }
+        if(praw->id() == 0x3AA)
+        {
+
+
+        }
+
+        if(bHave0x147)
+        {
+            bHave0x147 = false;
+            ShareChassis(pa,&xchassis);
+        }
+
+//        if(ghave0x13&&ghave0x14&&ghave0x15)
+//        {
+//            ghave0x13 = false;
+//            ghave0x14 = false;
+//            ghave0x15 = false;
+//            ShareChassis(pa,&xchassis);
+//            nRtn = 1;
+//        }
+    }
+
+
+    return 0;
+}

+ 3 - 0
src/detection/detection_chassis/decodechassis.h

@@ -5,6 +5,7 @@
 
 #include "modulecomm.h"
 #include "canmsg.pb.h"
+#include "canraw.pb.h"
 #include "chassis.pb.h"
 
 int ProcGE3Chassis(void * pa, iv::can::canmsg * pmsg);
@@ -21,4 +22,6 @@ int ProcHAPOChassis(void * pa, iv::can::canmsg * pmsg);
 
 int ProcYUHESENChassis(void * pa, iv::can::canmsg * pmsg);
 
+int ProcShenLanChassis(void * pa, iv::can::canmsg * pmsg);
+
 #endif // DECODECHASSIS_H

+ 4 - 2
src/detection/detection_chassis/detection_chassis.pro

@@ -17,10 +17,12 @@ DEFINES += QT_DEPRECATED_WARNINGS
 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
 
 HEADERS += \
-    decodechassis.h
+    decodechassis.h \
+    shenlan.h
 
 SOURCES += main.cpp \
-    decodechassis.cpp
+    decodechassis.cpp \
+    shenlan.c
 
 !include(../../../include/common.pri ) {
     error( "Couldn't find the common.pri file!" )

+ 8 - 1
src/detection/detection_chassis/main.cpp

@@ -17,6 +17,7 @@ iv::Ivlog * givlog;
 iv::Ivfault * givfault;
 
 #include "canmsg.pb.h"
+#include "canraw.pb.h"
 #include "decodechassis.h"
 
 void * gpa ;
@@ -26,7 +27,7 @@ QTime gTime;
 
 namespace  iv {
 
-enum VehicleTypeDef {GE3,VV7,MIDCAR,PROBLUE,MIDBUS,HAPO,UNKNOWN, YUHESEN} gVehicleType;  //车辆类型
+enum VehicleTypeDef {GE3,VV7,MIDCAR,PROBLUE,MIDBUS,HAPO,UNKNOWN, YUHESEN,SHENLAN} gVehicleType;  //车辆类型
 
 
 }
@@ -83,6 +84,8 @@ void Listencan0(const char * strdata,const unsigned int nSize,const unsigned int
     case iv::YUHESEN:
         nRtn = ProcYUHESENChassis(gpa,&xmsg);
         break;
+    case iv::SHENLAN:
+        nRtn = ProcShenLanChassis(gpa,&xmsg);
     default:
         break;
     }
@@ -182,6 +185,10 @@ int main(int argc, char *argv[])
     {
         iv::gVehicleType = iv::YUHESEN;
     }
+   if(strncmp(strvehicletype.data(),"SHENLAN",255) == 0)
+    {
+        iv::gVehicleType = iv::SHENLAN;
+    }
 
 //iv::gVehicleType = iv::MIDBUS;
 

+ 1496 - 0
src/detection/detection_chassis/shenlan.c

@@ -0,0 +1,1496 @@
+/* Generated by DBCC, see <https://github.com/howerj/dbcc> */
+#include "shenlan.h"
+#include <inttypes.h>
+#include <assert.h>
+
+#define UNUSED(X) ((void)(X))
+
+static inline uint64_t reverse_byte_order(uint64_t x) {
+	x = (x & 0x00000000FFFFFFFF) << 32 | (x & 0xFFFFFFFF00000000) >> 32;
+	x = (x & 0x0000FFFF0000FFFF) << 16 | (x & 0xFFFF0000FFFF0000) >> 16;
+	x = (x & 0x00FF00FF00FF00FF) << 8  | (x & 0xFF00FF00FF00FF00) >> 8;
+	return x;
+}
+
+static inline int print_helper(int r, int print_return_value) {
+	return ((r >= 0) && (print_return_value >= 0)) ? r + print_return_value : -1;
+}
+
+static int pack_can_0x144_ECU_144(can_obj_shenlan_h_t *o, uint64_t *data) {
+	assert(o);
+	assert(data);
+	register uint64_t x;
+	register uint64_t m = 0;
+	/* ACC_LatAngReq: start-bit 4, length 14, endianess motorola, scaling 0.1, offset -720 */
+	x = ((uint16_t)(o->can_0x144_ECU_144.ACC_LatAngReq)) & 0x3fff;
+	x <<= 47; 
+	m |= x;
+	/* ACC_MotorTorqueMaxLimitRequest: start-bit 21, length 11, endianess motorola, scaling 0.02, offset -20.48 */
+	x = ((uint16_t)(o->can_0x144_ECU_144.ACC_MotorTorqueMaxLimitRequest)) & 0x7ff;
+	x <<= 35; 
+	m |= x;
+	/* ACC_MotorTorqueMinLimitRequest: start-bit 26, length 11, endianess motorola, scaling 0.02, offset -20.48 */
+	x = ((uint16_t)(o->can_0x144_ECU_144.ACC_MotorTorqueMinLimitRequest)) & 0x7ff;
+	x <<= 24; 
+	m |= x;
+	/* ADS_Reqmode: start-bit 7, length 3, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x144_ECU_144.ADS_Reqmode)) & 0x7;
+	x <<= 61; 
+	m |= x;
+	/* ACC_ADCReqType: start-bit 47, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x144_ECU_144.ACC_ADCReqType)) & 0x3;
+	x <<= 22; 
+	m |= x;
+	/* ACC_LatAngReqActive: start-bit 22, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x144_ECU_144.ACC_LatAngReqActive)) & 0x1;
+	x <<= 46; 
+	m |= x;
+	*data = reverse_byte_order(m);
+	o->can_0x144_ECU_144_tx = 1;
+	return 0;
+}
+
+static int unpack_can_0x144_ECU_144(can_obj_shenlan_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) {
+	assert(o);
+	assert(dlc <= 8);
+	register uint64_t x;
+	register uint64_t m = reverse_byte_order(data);
+	if (dlc < 8)
+		return -1;
+	/* ACC_LatAngReq: start-bit 4, length 14, endianess motorola, scaling 0.1, offset -720 */
+	x = (m >> 47) & 0x3fff;
+	o->can_0x144_ECU_144.ACC_LatAngReq = x;
+	/* ACC_MotorTorqueMaxLimitRequest: start-bit 21, length 11, endianess motorola, scaling 0.02, offset -20.48 */
+	x = (m >> 35) & 0x7ff;
+	o->can_0x144_ECU_144.ACC_MotorTorqueMaxLimitRequest = x;
+	/* ACC_MotorTorqueMinLimitRequest: start-bit 26, length 11, endianess motorola, scaling 0.02, offset -20.48 */
+	x = (m >> 24) & 0x7ff;
+	o->can_0x144_ECU_144.ACC_MotorTorqueMinLimitRequest = x;
+	/* ADS_Reqmode: start-bit 7, length 3, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 61) & 0x7;
+	o->can_0x144_ECU_144.ADS_Reqmode = x;
+	/* ACC_ADCReqType: start-bit 47, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 22) & 0x3;
+	o->can_0x144_ECU_144.ACC_ADCReqType = x;
+	/* ACC_LatAngReqActive: start-bit 22, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 46) & 0x1;
+	o->can_0x144_ECU_144.ACC_LatAngReqActive = x;
+	o->can_0x144_ECU_144_rx = 1;
+	o->can_0x144_ECU_144_time_stamp_rx = time_stamp;
+	return 0;
+}
+
+int decode_can_0x144_ACC_LatAngReq(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x144_ECU_144.ACC_LatAngReq);
+	rval *= 0.1;
+	rval += -720;
+	if (rval <= 720) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x144_ACC_LatAngReq(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x144_ECU_144.ACC_LatAngReq = 0;
+	if (in > 720)
+		return -1;
+	in += 720;
+	in *= 10;
+	o->can_0x144_ECU_144.ACC_LatAngReq = in;
+	return 0;
+}
+
+int decode_can_0x144_ACC_MotorTorqueMaxLimitRequest(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x144_ECU_144.ACC_MotorTorqueMaxLimitRequest);
+	rval *= 0.02;
+	rval += -20.48;
+	if (rval <= 20.44) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x144_ACC_MotorTorqueMaxLimitRequest(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x144_ECU_144.ACC_MotorTorqueMaxLimitRequest = 0;
+	if (in > 20.44)
+		return -1;
+	in += 20.48;
+	in *= 50;
+	o->can_0x144_ECU_144.ACC_MotorTorqueMaxLimitRequest = in;
+	return 0;
+}
+
+int decode_can_0x144_ACC_MotorTorqueMinLimitRequest(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x144_ECU_144.ACC_MotorTorqueMinLimitRequest);
+	rval *= 0.02;
+	rval += -20.48;
+	if (rval <= 20.44) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x144_ACC_MotorTorqueMinLimitRequest(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x144_ECU_144.ACC_MotorTorqueMinLimitRequest = 0;
+	if (in > 20.44)
+		return -1;
+	in += 20.48;
+	in *= 50;
+	o->can_0x144_ECU_144.ACC_MotorTorqueMinLimitRequest = in;
+	return 0;
+}
+
+int decode_can_0x144_ADS_Reqmode(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x144_ECU_144.ADS_Reqmode);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x144_ADS_Reqmode(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x144_ECU_144.ADS_Reqmode = in;
+	return 0;
+}
+
+int decode_can_0x144_ACC_ADCReqType(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x144_ECU_144.ACC_ADCReqType);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x144_ACC_ADCReqType(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x144_ECU_144.ACC_ADCReqType = in;
+	return 0;
+}
+
+int decode_can_0x144_ACC_LatAngReqActive(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x144_ECU_144.ACC_LatAngReqActive);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x144_ACC_LatAngReqActive(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x144_ECU_144.ACC_LatAngReqActive = in;
+	return 0;
+}
+
+int print_can_0x144_ECU_144(const can_obj_shenlan_h_t *o) {
+	assert(o);
+
+	int r = 0;
+	double ACC_LatAngReq = 0.0;
+	decode_can_0x144_ACC_LatAngReq(o,&ACC_LatAngReq);
+	printf("\tACC_LatAngReq = %f\r\n", ACC_LatAngReq);
+	double ACC_MotorTorqueMaxLimitRequest = 0.0;
+	decode_can_0x144_ACC_MotorTorqueMaxLimitRequest(o,&ACC_MotorTorqueMaxLimitRequest);
+	printf("\tACC_MotorTorqueMaxLimitRequest = %f\r\n", ACC_MotorTorqueMaxLimitRequest);
+	double ACC_MotorTorqueMinLimitRequest = 0.0;
+	decode_can_0x144_ACC_MotorTorqueMinLimitRequest(o,&ACC_MotorTorqueMinLimitRequest);
+	printf("\tACC_MotorTorqueMinLimitRequest = %f\r\n", ACC_MotorTorqueMinLimitRequest);
+	printf("\tADS_Reqmode = %d\r\n", (o->can_0x144_ECU_144.ADS_Reqmode));
+	printf("\tACC_ADCReqType = %d\r\n", (o->can_0x144_ECU_144.ACC_ADCReqType));
+	printf("\tACC_LatAngReqActive = %d\r\n", (o->can_0x144_ECU_144.ACC_LatAngReqActive));
+	return r;
+}
+
+static int pack_can_0x147_ADC_147(can_obj_shenlan_h_t *o, uint64_t *data) {
+	assert(o);
+	assert(data);
+	register uint64_t x;
+	register uint64_t m = 0;
+	/* EpsSasSteerAg: start-bit 9, length 16, endianess motorola, scaling 0.1, offset 0 */
+	x = ((uint16_t)(o->can_0x147_ADC_147.EpsSasSteerAg)) & 0xffff;
+	x <<= 34; 
+	m |= x;
+	/* EPS_Pinionang: start-bit 7, length 14, endianess motorola, scaling 0.1, offset -720 */
+	x = ((uint16_t)(o->can_0x147_ADC_147.EPS_Pinionang)) & 0x3fff;
+	x <<= 50; 
+	m |= x;
+	/* EspVehSpd: start-bit 41, length 13, endianess motorola, scaling 0.05625, offset 0 */
+	x = ((uint16_t)(o->can_0x147_ADC_147.EspVehSpd)) & 0x1fff;
+	x <<= 5; 
+	m |= x;
+	/* EpsSteerAgRate: start-bit 24, length 8, endianess motorola, scaling 4, offset 0 */
+	x = ((uint8_t)(o->can_0x147_ADC_147.EpsSteerAgRate)) & 0xff;
+	x <<= 25; 
+	m |= x;
+	/* EPS_ADS_Abortfeedback: start-bit 45, length 4, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x147_ADC_147.EPS_ADS_Abortfeedback)) & 0xf;
+	x <<= 18; 
+	m |= x;
+	/* EPS_LatCtrlAvailabilityStatus: start-bit 47, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x147_ADC_147.EPS_LatCtrlAvailabilityStatus)) & 0x3;
+	x <<= 22; 
+	m |= x;
+	/* EpsSasSteerAgVld: start-bit 25, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x147_ADC_147.EpsSasSteerAgVld)) & 0x1;
+	x <<= 33; 
+	m |= x;
+	/* EPS_LatCtrlActive: start-bit 32, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x147_ADC_147.EPS_LatCtrlActive)) & 0x1;
+	x <<= 24; 
+	m |= x;
+	/* EspVehSpdVld: start-bit 60, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x147_ADC_147.EspVehSpdVld)) & 0x1;
+	x <<= 4; 
+	m |= x;
+	*data = reverse_byte_order(m);
+	o->can_0x147_ADC_147_tx = 1;
+	return 0;
+}
+
+static int unpack_can_0x147_ADC_147(can_obj_shenlan_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) {
+	assert(o);
+	assert(dlc <= 8);
+	register uint64_t x;
+	register uint64_t m = reverse_byte_order(data);
+	if (dlc < 8)
+		return -1;
+	/* EpsSasSteerAg: start-bit 9, length 16, endianess motorola, scaling 0.1, offset 0 */
+	x = (m >> 34) & 0xffff;
+	o->can_0x147_ADC_147.EpsSasSteerAg = x;
+	/* EPS_Pinionang: start-bit 7, length 14, endianess motorola, scaling 0.1, offset -720 */
+	x = (m >> 50) & 0x3fff;
+	o->can_0x147_ADC_147.EPS_Pinionang = x;
+	/* EspVehSpd: start-bit 41, length 13, endianess motorola, scaling 0.05625, offset 0 */
+	x = (m >> 5) & 0x1fff;
+	o->can_0x147_ADC_147.EspVehSpd = x;
+	/* EpsSteerAgRate: start-bit 24, length 8, endianess motorola, scaling 4, offset 0 */
+	x = (m >> 25) & 0xff;
+	o->can_0x147_ADC_147.EpsSteerAgRate = x;
+	/* EPS_ADS_Abortfeedback: start-bit 45, length 4, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 18) & 0xf;
+	o->can_0x147_ADC_147.EPS_ADS_Abortfeedback = x;
+	/* EPS_LatCtrlAvailabilityStatus: start-bit 47, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 22) & 0x3;
+	o->can_0x147_ADC_147.EPS_LatCtrlAvailabilityStatus = x;
+	/* EpsSasSteerAgVld: start-bit 25, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 33) & 0x1;
+	o->can_0x147_ADC_147.EpsSasSteerAgVld = x;
+	/* EPS_LatCtrlActive: start-bit 32, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 24) & 0x1;
+	o->can_0x147_ADC_147.EPS_LatCtrlActive = x;
+	/* EspVehSpdVld: start-bit 60, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 4) & 0x1;
+	o->can_0x147_ADC_147.EspVehSpdVld = x;
+	o->can_0x147_ADC_147_rx = 1;
+	o->can_0x147_ADC_147_time_stamp_rx = time_stamp;
+	return 0;
+}
+
+int decode_can_0x147_EpsSasSteerAg(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x147_ADC_147.EpsSasSteerAg);
+	rval *= 0.1;
+	if ((rval >= -780) && (rval <= 780)) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x147_EpsSasSteerAg(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x147_ADC_147.EpsSasSteerAg = 0;
+	if (in < -780)
+		return -1;
+	if (in > 780)
+		return -1;
+	in *= 10;
+	o->can_0x147_ADC_147.EpsSasSteerAg = in;
+	return 0;
+}
+
+int decode_can_0x147_EPS_Pinionang(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x147_ADC_147.EPS_Pinionang);
+	rval *= 0.1;
+	rval += -720;
+	if (rval <= 720) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x147_EPS_Pinionang(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x147_ADC_147.EPS_Pinionang = 0;
+	if (in > 720)
+		return -1;
+	in += 720;
+	in *= 10;
+	o->can_0x147_ADC_147.EPS_Pinionang = in;
+	return 0;
+}
+
+int decode_can_0x147_EspVehSpd(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x147_ADC_147.EspVehSpd);
+	rval *= 0.05625;
+	if (rval <= 460.744) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x147_EspVehSpd(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x147_ADC_147.EspVehSpd = 0;
+	if (in > 460.744)
+		return -1;
+	in *= 17.7778;
+	o->can_0x147_ADC_147.EspVehSpd = in;
+	return 0;
+}
+
+int decode_can_0x147_EpsSteerAgRate(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x147_ADC_147.EpsSteerAgRate);
+	rval *= 4;
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x147_EpsSteerAgRate(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	in *= 0.25;
+	o->can_0x147_ADC_147.EpsSteerAgRate = in;
+	return 0;
+}
+
+int decode_can_0x147_EPS_ADS_Abortfeedback(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x147_ADC_147.EPS_ADS_Abortfeedback);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x147_EPS_ADS_Abortfeedback(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x147_ADC_147.EPS_ADS_Abortfeedback = in;
+	return 0;
+}
+
+int decode_can_0x147_EPS_LatCtrlAvailabilityStatus(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x147_ADC_147.EPS_LatCtrlAvailabilityStatus);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x147_EPS_LatCtrlAvailabilityStatus(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x147_ADC_147.EPS_LatCtrlAvailabilityStatus = in;
+	return 0;
+}
+
+int decode_can_0x147_EpsSasSteerAgVld(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x147_ADC_147.EpsSasSteerAgVld);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x147_EpsSasSteerAgVld(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x147_ADC_147.EpsSasSteerAgVld = in;
+	return 0;
+}
+
+int decode_can_0x147_EPS_LatCtrlActive(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x147_ADC_147.EPS_LatCtrlActive);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x147_EPS_LatCtrlActive(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x147_ADC_147.EPS_LatCtrlActive = in;
+	return 0;
+}
+
+int decode_can_0x147_EspVehSpdVld(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x147_ADC_147.EspVehSpdVld);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x147_EspVehSpdVld(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x147_ADC_147.EspVehSpdVld = in;
+	return 0;
+}
+
+int print_can_0x147_ADC_147(const can_obj_shenlan_h_t *o) {
+	assert(o);
+
+	int r = 0;
+	double EpsSasSteerAg = 0.0;
+	decode_can_0x147_EpsSasSteerAg(o,&EpsSasSteerAg);
+	printf("\tEpsSasSteerAg = %f\r\n", EpsSasSteerAg);
+	double EPS_Pinionang = 0.0;
+	decode_can_0x147_EPS_Pinionang(o,&EPS_Pinionang);
+	printf("\tEPS_Pinionang = %f\r\n", EPS_Pinionang);
+	double EspVehSpd = 0.0;
+	decode_can_0x147_EspVehSpd(o,&EspVehSpd);
+	printf("\tEspVehSpd = %f\r\n", EspVehSpd);
+	double EpsSteerAgRate = 0.0;
+	decode_can_0x147_EpsSteerAgRate(o,&EpsSteerAgRate);
+	printf("\tEpsSteerAgRate = %f\r\n", EpsSteerAgRate);
+	printf("\tEPS_ADS_Abortfeedback = %d\r\n", (o->can_0x147_ADC_147.EPS_ADS_Abortfeedback));
+	printf("\tEPS_LatCtrlAvailabilityStatus = %d\r\n", (o->can_0x147_ADC_147.EPS_LatCtrlAvailabilityStatus));
+	printf("\tEpsSasSteerAgVld = %d\r\n", (o->can_0x147_ADC_147.EpsSasSteerAgVld));
+	printf("\tEPS_LatCtrlActive = %d\r\n", (o->can_0x147_ADC_147.EPS_LatCtrlActive));
+	printf("\tEspVehSpdVld = %d\r\n", (o->can_0x147_ADC_147.EspVehSpdVld));
+	return r;
+}
+
+static int pack_can_0x14a_ADC_14A(can_obj_shenlan_h_t *o, uint64_t *data) {
+	assert(o);
+	assert(data);
+	register uint64_t x;
+	register uint64_t m = 0;
+	/* VcuPtTqLimMax: start-bit 7, length 16, endianess motorola, scaling 1, offset -32768 */
+	x = ((uint16_t)(o->can_0x14a_ADC_14A.VcuPtTqLimMax)) & 0xffff;
+	x <<= 48; 
+	m |= x;
+	/* VcuPtTqLimMin: start-bit 23, length 16, endianess motorola, scaling 1, offset -32768 */
+	x = ((uint16_t)(o->can_0x14a_ADC_14A.VcuPtTqLimMin)) & 0xffff;
+	x <<= 32; 
+	m |= x;
+	/* VcuPtTqReal: start-bit 39, length 16, endianess motorola, scaling 1, offset -32768 */
+	x = ((uint16_t)(o->can_0x14a_ADC_14A.VcuPtTqReal)) & 0xffff;
+	x <<= 16; 
+	m |= x;
+	/* VcuShiftLvlPosn: start-bit 50, length 4, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x14a_ADC_14A.VcuShiftLvlPosn)) & 0xf;
+	x <<= 7; 
+	m |= x;
+	/* IBCU_ReduceFuncAvail: start-bit 52, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x14a_ADC_14A.IBCU_ReduceFuncAvail)) & 0x3;
+	x <<= 11; 
+	m |= x;
+	/* IBCU_FullFuncAvail: start-bit 54, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x14a_ADC_14A.IBCU_FullFuncAvail)) & 0x3;
+	x <<= 13; 
+	m |= x;
+	/* ESP_BrakeForce: start-bit 55, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x14a_ADC_14A.ESP_BrakeForce)) & 0x1;
+	x <<= 15; 
+	m |= x;
+	*data = reverse_byte_order(m);
+	o->can_0x14a_ADC_14A_tx = 1;
+	return 0;
+}
+
+static int unpack_can_0x14a_ADC_14A(can_obj_shenlan_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) {
+	assert(o);
+	assert(dlc <= 8);
+	register uint64_t x;
+	register uint64_t m = reverse_byte_order(data);
+	if (dlc < 8)
+		return -1;
+	/* VcuPtTqLimMax: start-bit 7, length 16, endianess motorola, scaling 1, offset -32768 */
+	x = (m >> 48) & 0xffff;
+	o->can_0x14a_ADC_14A.VcuPtTqLimMax = x;
+	/* VcuPtTqLimMin: start-bit 23, length 16, endianess motorola, scaling 1, offset -32768 */
+	x = (m >> 32) & 0xffff;
+	o->can_0x14a_ADC_14A.VcuPtTqLimMin = x;
+	/* VcuPtTqReal: start-bit 39, length 16, endianess motorola, scaling 1, offset -32768 */
+	x = (m >> 16) & 0xffff;
+	o->can_0x14a_ADC_14A.VcuPtTqReal = x;
+	/* VcuShiftLvlPosn: start-bit 50, length 4, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 7) & 0xf;
+	o->can_0x14a_ADC_14A.VcuShiftLvlPosn = x;
+	/* IBCU_ReduceFuncAvail: start-bit 52, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 11) & 0x3;
+	o->can_0x14a_ADC_14A.IBCU_ReduceFuncAvail = x;
+	/* IBCU_FullFuncAvail: start-bit 54, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 13) & 0x3;
+	o->can_0x14a_ADC_14A.IBCU_FullFuncAvail = x;
+	/* ESP_BrakeForce: start-bit 55, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 15) & 0x1;
+	o->can_0x14a_ADC_14A.ESP_BrakeForce = x;
+	o->can_0x14a_ADC_14A_rx = 1;
+	o->can_0x14a_ADC_14A_time_stamp_rx = time_stamp;
+	return 0;
+}
+
+int decode_can_0x14a_VcuPtTqLimMax(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x14a_ADC_14A.VcuPtTqLimMax);
+	rval += -32768;
+	if (rval <= 32767) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x14a_VcuPtTqLimMax(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x14a_ADC_14A.VcuPtTqLimMax = 0;
+	if (in > 32767)
+		return -1;
+	in += 32768;
+	o->can_0x14a_ADC_14A.VcuPtTqLimMax = in;
+	return 0;
+}
+
+int decode_can_0x14a_VcuPtTqLimMin(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x14a_ADC_14A.VcuPtTqLimMin);
+	rval += -32768;
+	if (rval <= 32767) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x14a_VcuPtTqLimMin(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x14a_ADC_14A.VcuPtTqLimMin = 0;
+	if (in > 32767)
+		return -1;
+	in += 32768;
+	o->can_0x14a_ADC_14A.VcuPtTqLimMin = in;
+	return 0;
+}
+
+int decode_can_0x14a_VcuPtTqReal(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x14a_ADC_14A.VcuPtTqReal);
+	rval += -32768;
+	if (rval <= 32767) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x14a_VcuPtTqReal(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x14a_ADC_14A.VcuPtTqReal = 0;
+	if (in > 32767)
+		return -1;
+	in += 32768;
+	o->can_0x14a_ADC_14A.VcuPtTqReal = in;
+	return 0;
+}
+
+int decode_can_0x14a_VcuShiftLvlPosn(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x14a_ADC_14A.VcuShiftLvlPosn);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x14a_VcuShiftLvlPosn(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x14a_ADC_14A.VcuShiftLvlPosn = in;
+	return 0;
+}
+
+int decode_can_0x14a_IBCU_ReduceFuncAvail(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x14a_ADC_14A.IBCU_ReduceFuncAvail);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x14a_IBCU_ReduceFuncAvail(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x14a_ADC_14A.IBCU_ReduceFuncAvail = in;
+	return 0;
+}
+
+int decode_can_0x14a_IBCU_FullFuncAvail(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x14a_ADC_14A.IBCU_FullFuncAvail);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x14a_IBCU_FullFuncAvail(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x14a_ADC_14A.IBCU_FullFuncAvail = in;
+	return 0;
+}
+
+int decode_can_0x14a_ESP_BrakeForce(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x14a_ADC_14A.ESP_BrakeForce);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x14a_ESP_BrakeForce(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x14a_ADC_14A.ESP_BrakeForce = in;
+	return 0;
+}
+
+int print_can_0x14a_ADC_14A(const can_obj_shenlan_h_t *o) {
+	assert(o);
+
+	int r = 0;
+	double VcuPtTqLimMax = 0.0;
+	decode_can_0x14a_VcuPtTqLimMax(o,&VcuPtTqLimMax);
+	printf("\tVcuPtTqLimMax = %f\r\n", VcuPtTqLimMax);
+	double VcuPtTqLimMin = 0.0;
+	decode_can_0x14a_VcuPtTqLimMin(o,&VcuPtTqLimMin);
+	printf("\tVcuPtTqLimMin = %f\r\n", VcuPtTqLimMin);
+	double VcuPtTqReal = 0.0;
+	decode_can_0x14a_VcuPtTqReal(o,&VcuPtTqReal);
+	printf("\tVcuPtTqReal = %f\r\n", VcuPtTqReal);
+	printf("\tVcuShiftLvlPosn = %d\r\n", (o->can_0x14a_ADC_14A.VcuShiftLvlPosn));
+	printf("\tIBCU_ReduceFuncAvail = %d\r\n", (o->can_0x14a_ADC_14A.IBCU_ReduceFuncAvail));
+	printf("\tIBCU_FullFuncAvail = %d\r\n", (o->can_0x14a_ADC_14A.IBCU_FullFuncAvail));
+	printf("\tESP_BrakeForce = %d\r\n", (o->can_0x14a_ADC_14A.ESP_BrakeForce));
+	return r;
+}
+
+static int pack_can_0x24b_ECU_24B(can_obj_shenlan_h_t *o, uint64_t *data) {
+	assert(o);
+	assert(data);
+	register uint64_t x;
+	register uint64_t m = 0;
+	/* ACC_AEBTargetDeceleration: start-bit 24, length 16, endianess motorola, scaling 0.0005, offset -16 */
+	x = ((uint16_t)(o->can_0x24b_ECU_24B.ACC_AEBTargetDeceleration)) & 0xffff;
+	x <<= 17; 
+	m |= x;
+	/* ACC_AccTrqReq: start-bit 7, length 15, endianess motorola, scaling 1, offset -16384 */
+	x = ((uint16_t)(o->can_0x24b_ECU_24B.ACC_AccTrqReq)) & 0x7fff;
+	x <<= 49; 
+	m |= x;
+	/* ACC_ACCTargetAcceleration: start-bit 20, length 8, endianess motorola, scaling 0.05, offset -10 */
+	x = ((uint8_t)(o->can_0x24b_ECU_24B.ACC_ACCTargetAcceleration)) & 0xff;
+	x <<= 37; 
+	m |= x;
+	/* ACC_ACCMode: start-bit 58, length 3, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x24b_ECU_24B.ACC_ACCMode)) & 0x7;
+	m |= x;
+	/* ADCReqMode: start-bit 50, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x24b_ECU_24B.ADCReqMode)) & 0x3;
+	x <<= 9; 
+	m |= x;
+	/* ACC_AccTrqReqActive: start-bit 8, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x24b_ECU_24B.ACC_AccTrqReqActive)) & 0x1;
+	x <<= 48; 
+	m |= x;
+	/* ACC_AEBVehilceHoldReq: start-bit 40, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x24b_ECU_24B.ACC_AEBVehilceHoldReq)) & 0x1;
+	x <<= 16; 
+	m |= x;
+	/* ACC_AEBActive: start-bit 51, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x24b_ECU_24B.ACC_AEBActive)) & 0x1;
+	x <<= 11; 
+	m |= x;
+	/* ACC_Driveoff_Request: start-bit 53, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x24b_ECU_24B.ACC_Driveoff_Request)) & 0x1;
+	x <<= 13; 
+	m |= x;
+	/* ACC_DecToStop: start-bit 54, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x24b_ECU_24B.ACC_DecToStop)) & 0x1;
+	x <<= 14; 
+	m |= x;
+	/* ACC_CDDActive: start-bit 55, length 1, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x24b_ECU_24B.ACC_CDDActive)) & 0x1;
+	x <<= 15; 
+	m |= x;
+	*data = reverse_byte_order(m);
+	o->can_0x24b_ECU_24B_tx = 1;
+	return 0;
+}
+
+static int unpack_can_0x24b_ECU_24B(can_obj_shenlan_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) {
+	assert(o);
+	assert(dlc <= 8);
+	register uint64_t x;
+	register uint64_t m = reverse_byte_order(data);
+	if (dlc < 8)
+		return -1;
+	/* ACC_AEBTargetDeceleration: start-bit 24, length 16, endianess motorola, scaling 0.0005, offset -16 */
+	x = (m >> 17) & 0xffff;
+	o->can_0x24b_ECU_24B.ACC_AEBTargetDeceleration = x;
+	/* ACC_AccTrqReq: start-bit 7, length 15, endianess motorola, scaling 1, offset -16384 */
+	x = (m >> 49) & 0x7fff;
+	o->can_0x24b_ECU_24B.ACC_AccTrqReq = x;
+	/* ACC_ACCTargetAcceleration: start-bit 20, length 8, endianess motorola, scaling 0.05, offset -10 */
+	x = (m >> 37) & 0xff;
+	o->can_0x24b_ECU_24B.ACC_ACCTargetAcceleration = x;
+	/* ACC_ACCMode: start-bit 58, length 3, endianess motorola, scaling 1, offset 0 */
+	x = m & 0x7;
+	o->can_0x24b_ECU_24B.ACC_ACCMode = x;
+	/* ADCReqMode: start-bit 50, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 9) & 0x3;
+	o->can_0x24b_ECU_24B.ADCReqMode = x;
+	/* ACC_AccTrqReqActive: start-bit 8, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 48) & 0x1;
+	o->can_0x24b_ECU_24B.ACC_AccTrqReqActive = x;
+	/* ACC_AEBVehilceHoldReq: start-bit 40, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 16) & 0x1;
+	o->can_0x24b_ECU_24B.ACC_AEBVehilceHoldReq = x;
+	/* ACC_AEBActive: start-bit 51, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 11) & 0x1;
+	o->can_0x24b_ECU_24B.ACC_AEBActive = x;
+	/* ACC_Driveoff_Request: start-bit 53, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 13) & 0x1;
+	o->can_0x24b_ECU_24B.ACC_Driveoff_Request = x;
+	/* ACC_DecToStop: start-bit 54, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 14) & 0x1;
+	o->can_0x24b_ECU_24B.ACC_DecToStop = x;
+	/* ACC_CDDActive: start-bit 55, length 1, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 15) & 0x1;
+	o->can_0x24b_ECU_24B.ACC_CDDActive = x;
+	o->can_0x24b_ECU_24B_rx = 1;
+	o->can_0x24b_ECU_24B_time_stamp_rx = time_stamp;
+	return 0;
+}
+
+int decode_can_0x24b_ACC_AEBTargetDeceleration(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x24b_ECU_24B.ACC_AEBTargetDeceleration);
+	rval *= 0.0005;
+	rval += -16;
+	if (rval <= 16) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x24b_ACC_AEBTargetDeceleration(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ACC_AEBTargetDeceleration = 0;
+	if (in > 16)
+		return -1;
+	in += 16;
+	in *= 2000;
+	o->can_0x24b_ECU_24B.ACC_AEBTargetDeceleration = in;
+	return 0;
+}
+
+int decode_can_0x24b_ACC_AccTrqReq(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x24b_ECU_24B.ACC_AccTrqReq);
+	rval += -16384;
+	if (rval <= 16383) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x24b_ACC_AccTrqReq(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ACC_AccTrqReq = 0;
+	if (in > 16383)
+		return -1;
+	in += 16384;
+	o->can_0x24b_ECU_24B.ACC_AccTrqReq = in;
+	return 0;
+}
+
+int decode_can_0x24b_ACC_ACCTargetAcceleration(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x24b_ECU_24B.ACC_ACCTargetAcceleration);
+	rval *= 0.05;
+	rval += -10;
+	if (rval <= 2.75) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x24b_ACC_ACCTargetAcceleration(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ACC_ACCTargetAcceleration = 0;
+	if (in > 2.75)
+		return -1;
+	in += 10;
+	in *= 20;
+	o->can_0x24b_ECU_24B.ACC_ACCTargetAcceleration = in;
+	return 0;
+}
+
+int decode_can_0x24b_ACC_ACCMode(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x24b_ECU_24B.ACC_ACCMode);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x24b_ACC_ACCMode(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ACC_ACCMode = in;
+	return 0;
+}
+
+int decode_can_0x24b_ADCReqMode(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x24b_ECU_24B.ADCReqMode);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x24b_ADCReqMode(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ADCReqMode = in;
+	return 0;
+}
+
+int decode_can_0x24b_ACC_AccTrqReqActive(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x24b_ECU_24B.ACC_AccTrqReqActive);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x24b_ACC_AccTrqReqActive(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ACC_AccTrqReqActive = in;
+	return 0;
+}
+
+int decode_can_0x24b_ACC_AEBVehilceHoldReq(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x24b_ECU_24B.ACC_AEBVehilceHoldReq);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x24b_ACC_AEBVehilceHoldReq(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ACC_AEBVehilceHoldReq = in;
+	return 0;
+}
+
+int decode_can_0x24b_ACC_AEBActive(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x24b_ECU_24B.ACC_AEBActive);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x24b_ACC_AEBActive(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ACC_AEBActive = in;
+	return 0;
+}
+
+int decode_can_0x24b_ACC_Driveoff_Request(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x24b_ECU_24B.ACC_Driveoff_Request);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x24b_ACC_Driveoff_Request(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ACC_Driveoff_Request = in;
+	return 0;
+}
+
+int decode_can_0x24b_ACC_DecToStop(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x24b_ECU_24B.ACC_DecToStop);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x24b_ACC_DecToStop(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ACC_DecToStop = in;
+	return 0;
+}
+
+int decode_can_0x24b_ACC_CDDActive(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x24b_ECU_24B.ACC_CDDActive);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x24b_ACC_CDDActive(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x24b_ECU_24B.ACC_CDDActive = in;
+	return 0;
+}
+
+int print_can_0x24b_ECU_24B(const can_obj_shenlan_h_t *o) {
+	assert(o);
+
+	int r = 0;
+	double ACC_AEBTargetDeceleration = 0.0;
+	decode_can_0x24b_ACC_AEBTargetDeceleration(o,&ACC_AEBTargetDeceleration);
+	printf("\tACC_AEBTargetDeceleration = %f\r\n", ACC_AEBTargetDeceleration);
+	double ACC_AccTrqReq = 0.0;
+	decode_can_0x24b_ACC_AccTrqReq(o,&ACC_AccTrqReq);
+	printf("\tACC_AccTrqReq = %f\r\n", ACC_AccTrqReq);
+	double ACC_ACCTargetAcceleration = 0.0;
+	decode_can_0x24b_ACC_ACCTargetAcceleration(o,&ACC_ACCTargetAcceleration);
+	printf("\tACC_ACCTargetAcceleration = %f\r\n", ACC_ACCTargetAcceleration);
+	printf("\tACC_ACCMode = %d\r\n", (o->can_0x24b_ECU_24B.ACC_ACCMode));
+	printf("\tADCReqMode = %d\r\n", (o->can_0x24b_ECU_24B.ADCReqMode));
+	printf("\tACC_AccTrqReqActive = %d\r\n", (o->can_0x24b_ECU_24B.ACC_AccTrqReqActive));
+	printf("\tACC_AEBVehilceHoldReq = %d\r\n", (o->can_0x24b_ECU_24B.ACC_AEBVehilceHoldReq));
+	printf("\tACC_AEBActive = %d\r\n", (o->can_0x24b_ECU_24B.ACC_AEBActive));
+	printf("\tACC_Driveoff_Request = %d\r\n", (o->can_0x24b_ECU_24B.ACC_Driveoff_Request));
+	printf("\tACC_DecToStop = %d\r\n", (o->can_0x24b_ECU_24B.ACC_DecToStop));
+	printf("\tACC_CDDActive = %d\r\n", (o->can_0x24b_ECU_24B.ACC_CDDActive));
+	return r;
+}
+
+static int pack_can_0x250_ADC_250(can_obj_shenlan_h_t *o, uint64_t *data) {
+	assert(o);
+	assert(data);
+	register uint64_t x;
+	register uint64_t m = 0;
+	/* ESP_YawRate: start-bit 2, length 14, endianess motorola, scaling 0.01, offset -81.91 */
+	x = ((uint16_t)(o->can_0x250_ADC_250.ESP_YawRate)) & 0x3fff;
+	x <<= 45; 
+	m |= x;
+	/* ESP_LongAccel: start-bit 20, length 10, endianess motorola, scaling 0.03125, offset -16 */
+	x = ((uint16_t)(o->can_0x250_ADC_250.ESP_LongAccel)) & 0x3ff;
+	x <<= 35; 
+	m |= x;
+	/* ESP_LatAccel: start-bit 24, length 8, endianess motorola, scaling 0.1, offset -12.7 */
+	x = ((uint8_t)(o->can_0x250_ADC_250.ESP_LatAccel)) & 0xff;
+	x <<= 25; 
+	m |= x;
+	/* EPS_ADS_ControlFeedback: start-bit 7, length 3, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x250_ADC_250.EPS_ADS_ControlFeedback)) & 0x7;
+	x <<= 61; 
+	m |= x;
+	/* ESP_YawRateValid: start-bit 4, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x250_ADC_250.ESP_YawRateValid)) & 0x3;
+	x <<= 59; 
+	m |= x;
+	/* ESP_LongAccelValid: start-bit 26, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x250_ADC_250.ESP_LongAccelValid)) & 0x3;
+	x <<= 33; 
+	m |= x;
+	/* ESP_LatAccelValid: start-bit 32, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x250_ADC_250.ESP_LatAccelValid)) & 0x3;
+	x <<= 23; 
+	m |= x;
+	*data = reverse_byte_order(m);
+	o->can_0x250_ADC_250_tx = 1;
+	return 0;
+}
+
+static int unpack_can_0x250_ADC_250(can_obj_shenlan_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) {
+	assert(o);
+	assert(dlc <= 8);
+	register uint64_t x;
+	register uint64_t m = reverse_byte_order(data);
+	if (dlc < 8)
+		return -1;
+	/* ESP_YawRate: start-bit 2, length 14, endianess motorola, scaling 0.01, offset -81.91 */
+	x = (m >> 45) & 0x3fff;
+	o->can_0x250_ADC_250.ESP_YawRate = x;
+	/* ESP_LongAccel: start-bit 20, length 10, endianess motorola, scaling 0.03125, offset -16 */
+	x = (m >> 35) & 0x3ff;
+	o->can_0x250_ADC_250.ESP_LongAccel = x;
+	/* ESP_LatAccel: start-bit 24, length 8, endianess motorola, scaling 0.1, offset -12.7 */
+	x = (m >> 25) & 0xff;
+	o->can_0x250_ADC_250.ESP_LatAccel = x;
+	/* EPS_ADS_ControlFeedback: start-bit 7, length 3, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 61) & 0x7;
+	o->can_0x250_ADC_250.EPS_ADS_ControlFeedback = x;
+	/* ESP_YawRateValid: start-bit 4, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 59) & 0x3;
+	o->can_0x250_ADC_250.ESP_YawRateValid = x;
+	/* ESP_LongAccelValid: start-bit 26, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 33) & 0x3;
+	o->can_0x250_ADC_250.ESP_LongAccelValid = x;
+	/* ESP_LatAccelValid: start-bit 32, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 23) & 0x3;
+	o->can_0x250_ADC_250.ESP_LatAccelValid = x;
+	o->can_0x250_ADC_250_rx = 1;
+	o->can_0x250_ADC_250_time_stamp_rx = time_stamp;
+	return 0;
+}
+
+int decode_can_0x250_ESP_YawRate(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x250_ADC_250.ESP_YawRate);
+	rval *= 0.01;
+	rval += -81.91;
+	if (rval <= 81.92) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x250_ESP_YawRate(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x250_ADC_250.ESP_YawRate = 0;
+	if (in > 81.92)
+		return -1;
+	in += 81.91;
+	in *= 100;
+	o->can_0x250_ADC_250.ESP_YawRate = in;
+	return 0;
+}
+
+int decode_can_0x250_ESP_LongAccel(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x250_ADC_250.ESP_LongAccel);
+	rval *= 0.03125;
+	rval += -16;
+	if (rval <= 15.9062) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x250_ESP_LongAccel(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x250_ADC_250.ESP_LongAccel = 0;
+	if (in > 15.9062)
+		return -1;
+	in += 16;
+	in *= 32;
+	o->can_0x250_ADC_250.ESP_LongAccel = in;
+	return 0;
+}
+
+int decode_can_0x250_ESP_LatAccel(const can_obj_shenlan_h_t *o, double *out) {
+	assert(o);
+	assert(out);
+	double rval = (double)(o->can_0x250_ADC_250.ESP_LatAccel);
+	rval *= 0.1;
+	rval += -12.7;
+	if (rval <= 12.7) {
+		*out = rval;
+		return 0;
+	} else {
+		*out = (double)0;
+		return -1;
+	}
+}
+
+int encode_can_0x250_ESP_LatAccel(can_obj_shenlan_h_t *o, double in) {
+	assert(o);
+	o->can_0x250_ADC_250.ESP_LatAccel = 0;
+	if (in > 12.7)
+		return -1;
+	in += 12.7;
+	in *= 10;
+	o->can_0x250_ADC_250.ESP_LatAccel = in;
+	return 0;
+}
+
+int decode_can_0x250_EPS_ADS_ControlFeedback(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x250_ADC_250.EPS_ADS_ControlFeedback);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x250_EPS_ADS_ControlFeedback(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x250_ADC_250.EPS_ADS_ControlFeedback = in;
+	return 0;
+}
+
+int decode_can_0x250_ESP_YawRateValid(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x250_ADC_250.ESP_YawRateValid);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x250_ESP_YawRateValid(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x250_ADC_250.ESP_YawRateValid = in;
+	return 0;
+}
+
+int decode_can_0x250_ESP_LongAccelValid(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x250_ADC_250.ESP_LongAccelValid);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x250_ESP_LongAccelValid(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x250_ADC_250.ESP_LongAccelValid = in;
+	return 0;
+}
+
+int decode_can_0x250_ESP_LatAccelValid(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x250_ADC_250.ESP_LatAccelValid);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x250_ESP_LatAccelValid(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x250_ADC_250.ESP_LatAccelValid = in;
+	return 0;
+}
+
+int print_can_0x250_ADC_250(const can_obj_shenlan_h_t *o) {
+	assert(o);
+
+	int r = 0;
+	double ESP_YawRate = 0.0;
+	decode_can_0x250_ESP_YawRate(o,&ESP_YawRate);
+	printf("\tESP_YawRate = %f\r\n", ESP_YawRate);
+	double ESP_LongAccel = 0.0;
+	decode_can_0x250_ESP_LongAccel(o,&ESP_LongAccel);
+	printf("\tESP_LongAccel = %f\r\n", ESP_LongAccel);
+	double ESP_LatAccel = 0.0;
+	decode_can_0x250_ESP_LatAccel(o,&ESP_LatAccel);
+	printf("\tESP_LatAccel = %f\r\n", ESP_LatAccel);
+	printf("\tEPS_ADS_ControlFeedback = %d\r\n", (o->can_0x250_ADC_250.EPS_ADS_ControlFeedback));
+	printf("\tESP_YawRateValid = %d\r\n", (o->can_0x250_ADC_250.ESP_YawRateValid));
+	printf("\tESP_LongAccelValid = %d\r\n", (o->can_0x250_ADC_250.ESP_LongAccelValid));
+	printf("\tESP_LatAccelValid = %d\r\n", (o->can_0x250_ADC_250.ESP_LatAccelValid));
+	return r;
+}
+
+static int pack_can_0x358_ADC_358(can_obj_shenlan_h_t *o, uint64_t *data) {
+	assert(o);
+	assert(data);
+	register uint64_t x;
+	register uint64_t m = 0;
+	/* ADS_UDLCTurnLightReq: start-bit 26, length 3, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x358_ADC_358.ADS_UDLCTurnLightReq)) & 0x7;
+	x <<= 32; 
+	m |= x;
+	*data = reverse_byte_order(m);
+	o->can_0x358_ADC_358_tx = 1;
+	return 0;
+}
+
+static int unpack_can_0x358_ADC_358(can_obj_shenlan_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) {
+	assert(o);
+	assert(dlc <= 8);
+	register uint64_t x;
+	register uint64_t m = reverse_byte_order(data);
+	if (dlc < 8)
+		return -1;
+	/* ADS_UDLCTurnLightReq: start-bit 26, length 3, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 32) & 0x7;
+	o->can_0x358_ADC_358.ADS_UDLCTurnLightReq = x;
+	o->can_0x358_ADC_358_rx = 1;
+	o->can_0x358_ADC_358_time_stamp_rx = time_stamp;
+	return 0;
+}
+
+int decode_can_0x358_ADS_UDLCTurnLightReq(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x358_ADC_358.ADS_UDLCTurnLightReq);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x358_ADS_UDLCTurnLightReq(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x358_ADC_358.ADS_UDLCTurnLightReq = in;
+	return 0;
+}
+
+int print_can_0x358_ADC_358(const can_obj_shenlan_h_t *o) {
+	assert(o);
+
+	int r = 0;
+	printf("\tADS_UDLCTurnLightReq = %d\r\n", (o->can_0x358_ADC_358.ADS_UDLCTurnLightReq));
+	return r;
+}
+
+static int pack_can_0x36e_ECU_36E(can_obj_shenlan_h_t *o, uint64_t *data) {
+	assert(o);
+	assert(data);
+	register uint64_t x;
+	register uint64_t m = 0;
+	/* ADS_UDLCTurnLightReq: start-bit 7, length 3, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x36e_ECU_36E.ADS_UDLCTurnLightReq)) & 0x7;
+	x <<= 61; 
+	m |= x;
+	*data = reverse_byte_order(m);
+	o->can_0x36e_ECU_36E_tx = 1;
+	return 0;
+}
+
+static int unpack_can_0x36e_ECU_36E(can_obj_shenlan_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) {
+	assert(o);
+	assert(dlc <= 8);
+	register uint64_t x;
+	register uint64_t m = reverse_byte_order(data);
+	if (dlc < 8)
+		return -1;
+	/* ADS_UDLCTurnLightReq: start-bit 7, length 3, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 61) & 0x7;
+	o->can_0x36e_ECU_36E.ADS_UDLCTurnLightReq = x;
+	o->can_0x36e_ECU_36E_rx = 1;
+	o->can_0x36e_ECU_36E_time_stamp_rx = time_stamp;
+	return 0;
+}
+
+int decode_can_0x36e_ADS_UDLCTurnLightReq(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x36e_ECU_36E.ADS_UDLCTurnLightReq);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x36e_ADS_UDLCTurnLightReq(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x36e_ECU_36E.ADS_UDLCTurnLightReq = in;
+	return 0;
+}
+
+int print_can_0x36e_ECU_36E(const can_obj_shenlan_h_t *o) {
+	assert(o);
+
+	int r = 0;
+	printf("\tADS_UDLCTurnLightReq = %d\r\n", (o->can_0x36e_ECU_36E.ADS_UDLCTurnLightReq));
+	return r;
+}
+
+static int pack_can_0x3aa_ADC_3AA(can_obj_shenlan_h_t *o, uint64_t *data) {
+	assert(o);
+	assert(data);
+	register uint64_t x;
+	register uint64_t m = 0;
+	/* VcuCrsSetSwtSts: start-bit 3, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x3aa_ADC_3AA.VcuCrsSetSwtSts)) & 0x3;
+	x <<= 58; 
+	m |= x;
+	/* VcuCrsResuSwtSts: start-bit 5, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x3aa_ADC_3AA.VcuCrsResuSwtSts)) & 0x3;
+	x <<= 60; 
+	m |= x;
+	/* VcuCrsDstSwtPlusSts: start-bit 7, length 2, endianess motorola, scaling 1, offset 0 */
+	x = ((uint8_t)(o->can_0x3aa_ADC_3AA.VcuCrsDstSwtPlusSts)) & 0x3;
+	x <<= 62; 
+	m |= x;
+	*data = reverse_byte_order(m);
+	o->can_0x3aa_ADC_3AA_tx = 1;
+	return 0;
+}
+
+static int unpack_can_0x3aa_ADC_3AA(can_obj_shenlan_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) {
+	assert(o);
+	assert(dlc <= 8);
+	register uint64_t x;
+	register uint64_t m = reverse_byte_order(data);
+	if (dlc < 8)
+		return -1;
+	/* VcuCrsSetSwtSts: start-bit 3, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 58) & 0x3;
+	o->can_0x3aa_ADC_3AA.VcuCrsSetSwtSts = x;
+	/* VcuCrsResuSwtSts: start-bit 5, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 60) & 0x3;
+	o->can_0x3aa_ADC_3AA.VcuCrsResuSwtSts = x;
+	/* VcuCrsDstSwtPlusSts: start-bit 7, length 2, endianess motorola, scaling 1, offset 0 */
+	x = (m >> 62) & 0x3;
+	o->can_0x3aa_ADC_3AA.VcuCrsDstSwtPlusSts = x;
+	o->can_0x3aa_ADC_3AA_rx = 1;
+	o->can_0x3aa_ADC_3AA_time_stamp_rx = time_stamp;
+	return 0;
+}
+
+int decode_can_0x3aa_VcuCrsSetSwtSts(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x3aa_ADC_3AA.VcuCrsSetSwtSts);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x3aa_VcuCrsSetSwtSts(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x3aa_ADC_3AA.VcuCrsSetSwtSts = in;
+	return 0;
+}
+
+int decode_can_0x3aa_VcuCrsResuSwtSts(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x3aa_ADC_3AA.VcuCrsResuSwtSts);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x3aa_VcuCrsResuSwtSts(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x3aa_ADC_3AA.VcuCrsResuSwtSts = in;
+	return 0;
+}
+
+int decode_can_0x3aa_VcuCrsDstSwtPlusSts(const can_obj_shenlan_h_t *o, uint8_t *out) {
+	assert(o);
+	assert(out);
+	uint8_t rval = (uint8_t)(o->can_0x3aa_ADC_3AA.VcuCrsDstSwtPlusSts);
+	*out = rval;
+	return 0;
+}
+
+int encode_can_0x3aa_VcuCrsDstSwtPlusSts(can_obj_shenlan_h_t *o, uint8_t in) {
+	assert(o);
+	o->can_0x3aa_ADC_3AA.VcuCrsDstSwtPlusSts = in;
+	return 0;
+}
+
+int print_can_0x3aa_ADC_3AA(const can_obj_shenlan_h_t *o) {
+	assert(o);
+
+	int r = 0;
+	printf("\tVcuCrsSetSwtSts = %d\r\n", (o->can_0x3aa_ADC_3AA.VcuCrsSetSwtSts));
+	printf("\tVcuCrsResuSwtSts = %d\r\n", (o->can_0x3aa_ADC_3AA.VcuCrsResuSwtSts));
+	printf("\tVcuCrsDstSwtPlusSts = %d\r\n", (o->can_0x3aa_ADC_3AA.VcuCrsDstSwtPlusSts));
+	return r;
+}
+
+int unpack_message(can_obj_shenlan_h_t *o, const unsigned long id, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) {
+	assert(o);
+	assert(id < (1ul << 29)); /* 29-bit CAN ID is largest possible */
+	assert(dlc <= 8);         /* Maximum of 8 bytes in a CAN packet */
+	switch (id) {
+	case 0x144: return unpack_can_0x144_ECU_144(o, data, dlc, time_stamp);
+	case 0x147: return unpack_can_0x147_ADC_147(o, data, dlc, time_stamp);
+	case 0x14a: return unpack_can_0x14a_ADC_14A(o, data, dlc, time_stamp);
+	case 0x24b: return unpack_can_0x24b_ECU_24B(o, data, dlc, time_stamp);
+	case 0x250: return unpack_can_0x250_ADC_250(o, data, dlc, time_stamp);
+	case 0x358: return unpack_can_0x358_ADC_358(o, data, dlc, time_stamp);
+	case 0x36e: return unpack_can_0x36e_ECU_36E(o, data, dlc, time_stamp);
+	case 0x3aa: return unpack_can_0x3aa_ADC_3AA(o, data, dlc, time_stamp);
+	default: break; 
+	}
+	return -1; 
+}
+
+int pack_message(can_obj_shenlan_h_t *o, const unsigned long id, uint64_t *data) {
+	assert(o);
+	assert(id < (1ul << 29)); /* 29-bit CAN ID is largest possible */
+	switch (id) {
+	case 0x144: return pack_can_0x144_ECU_144(o, data);
+	case 0x147: return pack_can_0x147_ADC_147(o, data);
+	case 0x14a: return pack_can_0x14a_ADC_14A(o, data);
+	case 0x24b: return pack_can_0x24b_ECU_24B(o, data);
+	case 0x250: return pack_can_0x250_ADC_250(o, data);
+	case 0x358: return pack_can_0x358_ADC_358(o, data);
+	case 0x36e: return pack_can_0x36e_ECU_36E(o, data);
+	case 0x3aa: return pack_can_0x3aa_ADC_3AA(o, data);
+	default: break; 
+	}
+	return -1; 
+}
+
+int print_message(const can_obj_shenlan_h_t *o, const unsigned long id) {
+	assert(o);
+	assert(id < (1ul << 29)); /* 29-bit CAN ID is largest possible */
+
+	switch (id) {
+	case 0x144: return print_can_0x144_ECU_144(o);
+	case 0x147: return print_can_0x147_ADC_147(o);
+	case 0x14a: return print_can_0x14a_ADC_14A(o);
+	case 0x24b: return print_can_0x24b_ECU_24B(o);
+	case 0x250: return print_can_0x250_ADC_250(o);
+	case 0x358: return print_can_0x358_ADC_358(o);
+	case 0x36e: return print_can_0x36e_ECU_36E(o);
+	case 0x3aa: return print_can_0x3aa_ADC_3AA(o);
+	default: break; 
+	}
+	return -1; 
+}
+

+ 261 - 0
src/detection/detection_chassis/shenlan.h

@@ -0,0 +1,261 @@
+/** CAN message encoder/decoder: automatically generated - do not edit
+  * Generated by dbcc: See https://github.com/howerj/dbcc */
+#ifndef SHENLAN_H
+#define SHENLAN_H
+
+#include <stdint.h>
+
+
+#ifdef __cplusplus
+extern "C" { 
+#endif
+
+#ifndef PREPACK
+#define PREPACK
+#endif
+
+#ifndef POSTPACK
+#define POSTPACK
+#endif
+
+#ifndef DBCC_TIME_STAMP
+#define DBCC_TIME_STAMP
+typedef uint32_t dbcc_time_stamp_t; /* Time stamp for message; you decide on units */
+#endif
+
+#ifndef DBCC_STATUS_ENUM
+#define DBCC_STATUS_ENUM
+typedef enum {
+	DBCC_SIG_STAT_UNINITIALIZED_E = 0, /* Message never sent/received */
+	DBCC_SIG_STAT_OK_E            = 1, /* Message ok */
+	DBCC_SIG_STAT_ERROR_E         = 2, /* Encode/Decode/Timestamp/Any error */
+} dbcc_signal_status_e;
+#endif
+
+typedef PREPACK struct {
+	uint16_t ACC_LatAngReq; /* scaling 0.1, offset -720.0, units degree  */
+	uint16_t ACC_MotorTorqueMaxLimitRequest; /* scaling 0.0, offset -20.5, units Nm  */
+	uint16_t ACC_MotorTorqueMinLimitRequest; /* scaling 0.0, offset -20.5, units Nm  */
+	uint8_t ADS_Reqmode; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ACC_ADCReqType; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ACC_LatAngReqActive; /* scaling 1.0, offset 0.0, units none  */
+} POSTPACK can_0x144_ECU_144_t;
+
+typedef PREPACK struct {
+	int16_t EpsSasSteerAg; /* scaling 0.1, offset 0.0, units degree  */
+	uint16_t EPS_Pinionang; /* scaling 0.1, offset -720.0, units degree  */
+	uint16_t EspVehSpd; /* scaling 0.1, offset 0.0, units km/h  */
+	uint8_t EpsSteerAgRate; /* scaling 4.0, offset 0.0, units deg/s  */
+	uint8_t EPS_ADS_Abortfeedback; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t EPS_LatCtrlAvailabilityStatus; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t EpsSasSteerAgVld; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t EPS_LatCtrlActive; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t EspVehSpdVld; /* scaling 1.0, offset 0.0, units none  */
+} POSTPACK can_0x147_ADC_147_t;
+
+typedef PREPACK struct {
+	uint16_t VcuPtTqLimMax; /* scaling 1.0, offset -32768.0, units Nm  */
+	uint16_t VcuPtTqLimMin; /* scaling 1.0, offset -32768.0, units Nm  */
+	uint16_t VcuPtTqReal; /* scaling 1.0, offset -32768.0, units Nm  */
+	uint8_t VcuShiftLvlPosn; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t IBCU_ReduceFuncAvail; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t IBCU_FullFuncAvail; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ESP_BrakeForce; /* scaling 1.0, offset 0.0, units none  */
+} POSTPACK can_0x14a_ADC_14A_t;
+
+typedef PREPACK struct {
+	uint16_t ACC_AEBTargetDeceleration; /* scaling 0.0, offset -16.0, units m/s2  */
+	uint16_t ACC_AccTrqReq; /* scaling 1.0, offset -16384.0, units Nm  */
+	uint8_t ACC_ACCTargetAcceleration; /* scaling 0.1, offset -10.0, units m/s2  */
+	uint8_t ACC_ACCMode; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ADCReqMode; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ACC_AccTrqReqActive; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ACC_AEBVehilceHoldReq; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ACC_AEBActive; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ACC_Driveoff_Request; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ACC_DecToStop; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ACC_CDDActive; /* scaling 1.0, offset 0.0, units none  */
+} POSTPACK can_0x24b_ECU_24B_t;
+
+typedef PREPACK struct {
+	uint16_t ESP_YawRate; /* scaling 0.0, offset -81.9, units degree/s  */
+	uint16_t ESP_LongAccel; /* scaling 0.0, offset -16.0, units m/s2  */
+	uint8_t ESP_LatAccel; /* scaling 0.1, offset -12.7, units m/s2  */
+	uint8_t EPS_ADS_ControlFeedback; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ESP_YawRateValid; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ESP_LongAccelValid; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t ESP_LatAccelValid; /* scaling 1.0, offset 0.0, units none  */
+} POSTPACK can_0x250_ADC_250_t;
+
+typedef PREPACK struct {
+	uint8_t ADS_UDLCTurnLightReq; /* scaling 1.0, offset 0.0, units none  */
+} POSTPACK can_0x358_ADC_358_t;
+
+typedef PREPACK struct {
+	uint8_t ADS_UDLCTurnLightReq; /* scaling 1.0, offset 0.0, units none  */
+} POSTPACK can_0x36e_ECU_36E_t;
+
+typedef PREPACK struct {
+	uint8_t VcuCrsSetSwtSts; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t VcuCrsResuSwtSts; /* scaling 1.0, offset 0.0, units none  */
+	uint8_t VcuCrsDstSwtPlusSts; /* scaling 1.0, offset 0.0, units none  */
+} POSTPACK can_0x3aa_ADC_3AA_t;
+
+typedef PREPACK struct {
+	dbcc_time_stamp_t can_0x144_ECU_144_time_stamp_rx;
+	dbcc_time_stamp_t can_0x147_ADC_147_time_stamp_rx;
+	dbcc_time_stamp_t can_0x14a_ADC_14A_time_stamp_rx;
+	dbcc_time_stamp_t can_0x24b_ECU_24B_time_stamp_rx;
+	dbcc_time_stamp_t can_0x250_ADC_250_time_stamp_rx;
+	dbcc_time_stamp_t can_0x358_ADC_358_time_stamp_rx;
+	dbcc_time_stamp_t can_0x36e_ECU_36E_time_stamp_rx;
+	dbcc_time_stamp_t can_0x3aa_ADC_3AA_time_stamp_rx;
+	unsigned can_0x144_ECU_144_status : 2;
+	unsigned can_0x144_ECU_144_tx : 1;
+	unsigned can_0x144_ECU_144_rx : 1;
+	unsigned can_0x147_ADC_147_status : 2;
+	unsigned can_0x147_ADC_147_tx : 1;
+	unsigned can_0x147_ADC_147_rx : 1;
+	unsigned can_0x14a_ADC_14A_status : 2;
+	unsigned can_0x14a_ADC_14A_tx : 1;
+	unsigned can_0x14a_ADC_14A_rx : 1;
+	unsigned can_0x24b_ECU_24B_status : 2;
+	unsigned can_0x24b_ECU_24B_tx : 1;
+	unsigned can_0x24b_ECU_24B_rx : 1;
+	unsigned can_0x250_ADC_250_status : 2;
+	unsigned can_0x250_ADC_250_tx : 1;
+	unsigned can_0x250_ADC_250_rx : 1;
+	unsigned can_0x358_ADC_358_status : 2;
+	unsigned can_0x358_ADC_358_tx : 1;
+	unsigned can_0x358_ADC_358_rx : 1;
+	unsigned can_0x36e_ECU_36E_status : 2;
+	unsigned can_0x36e_ECU_36E_tx : 1;
+	unsigned can_0x36e_ECU_36E_rx : 1;
+	unsigned can_0x3aa_ADC_3AA_status : 2;
+	unsigned can_0x3aa_ADC_3AA_tx : 1;
+	unsigned can_0x3aa_ADC_3AA_rx : 1;
+	can_0x144_ECU_144_t can_0x144_ECU_144;
+	can_0x147_ADC_147_t can_0x147_ADC_147;
+	can_0x14a_ADC_14A_t can_0x14a_ADC_14A;
+	can_0x24b_ECU_24B_t can_0x24b_ECU_24B;
+	can_0x250_ADC_250_t can_0x250_ADC_250;
+	can_0x358_ADC_358_t can_0x358_ADC_358;
+	can_0x36e_ECU_36E_t can_0x36e_ECU_36E;
+	can_0x3aa_ADC_3AA_t can_0x3aa_ADC_3AA;
+} POSTPACK can_obj_shenlan_h_t;
+
+int unpack_message(can_obj_shenlan_h_t *o, const unsigned long id, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp);
+int pack_message(can_obj_shenlan_h_t *o, const unsigned long id, uint64_t *data);
+int print_message(const can_obj_shenlan_h_t *o, const unsigned long id);
+
+int decode_can_0x144_ACC_LatAngReq(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x144_ACC_LatAngReq(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x144_ACC_MotorTorqueMaxLimitRequest(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x144_ACC_MotorTorqueMaxLimitRequest(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x144_ACC_MotorTorqueMinLimitRequest(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x144_ACC_MotorTorqueMinLimitRequest(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x144_ADS_Reqmode(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x144_ADS_Reqmode(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x144_ACC_ADCReqType(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x144_ACC_ADCReqType(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x144_ACC_LatAngReqActive(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x144_ACC_LatAngReqActive(can_obj_shenlan_h_t *o, uint8_t in);
+
+
+int decode_can_0x147_EpsSasSteerAg(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x147_EpsSasSteerAg(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x147_EPS_Pinionang(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x147_EPS_Pinionang(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x147_EspVehSpd(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x147_EspVehSpd(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x147_EpsSteerAgRate(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x147_EpsSteerAgRate(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x147_EPS_ADS_Abortfeedback(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x147_EPS_ADS_Abortfeedback(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x147_EPS_LatCtrlAvailabilityStatus(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x147_EPS_LatCtrlAvailabilityStatus(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x147_EpsSasSteerAgVld(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x147_EpsSasSteerAgVld(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x147_EPS_LatCtrlActive(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x147_EPS_LatCtrlActive(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x147_EspVehSpdVld(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x147_EspVehSpdVld(can_obj_shenlan_h_t *o, uint8_t in);
+
+
+int decode_can_0x14a_VcuPtTqLimMax(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x14a_VcuPtTqLimMax(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x14a_VcuPtTqLimMin(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x14a_VcuPtTqLimMin(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x14a_VcuPtTqReal(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x14a_VcuPtTqReal(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x14a_VcuShiftLvlPosn(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x14a_VcuShiftLvlPosn(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x14a_IBCU_ReduceFuncAvail(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x14a_IBCU_ReduceFuncAvail(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x14a_IBCU_FullFuncAvail(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x14a_IBCU_FullFuncAvail(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x14a_ESP_BrakeForce(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x14a_ESP_BrakeForce(can_obj_shenlan_h_t *o, uint8_t in);
+
+
+int decode_can_0x24b_ACC_AEBTargetDeceleration(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x24b_ACC_AEBTargetDeceleration(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x24b_ACC_AccTrqReq(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x24b_ACC_AccTrqReq(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x24b_ACC_ACCTargetAcceleration(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x24b_ACC_ACCTargetAcceleration(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x24b_ACC_ACCMode(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x24b_ACC_ACCMode(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x24b_ADCReqMode(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x24b_ADCReqMode(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x24b_ACC_AccTrqReqActive(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x24b_ACC_AccTrqReqActive(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x24b_ACC_AEBVehilceHoldReq(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x24b_ACC_AEBVehilceHoldReq(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x24b_ACC_AEBActive(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x24b_ACC_AEBActive(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x24b_ACC_Driveoff_Request(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x24b_ACC_Driveoff_Request(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x24b_ACC_DecToStop(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x24b_ACC_DecToStop(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x24b_ACC_CDDActive(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x24b_ACC_CDDActive(can_obj_shenlan_h_t *o, uint8_t in);
+
+
+int decode_can_0x250_ESP_YawRate(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x250_ESP_YawRate(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x250_ESP_LongAccel(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x250_ESP_LongAccel(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x250_ESP_LatAccel(const can_obj_shenlan_h_t *o, double *out);
+int encode_can_0x250_ESP_LatAccel(can_obj_shenlan_h_t *o, double in);
+int decode_can_0x250_EPS_ADS_ControlFeedback(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x250_EPS_ADS_ControlFeedback(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x250_ESP_YawRateValid(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x250_ESP_YawRateValid(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x250_ESP_LongAccelValid(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x250_ESP_LongAccelValid(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x250_ESP_LatAccelValid(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x250_ESP_LatAccelValid(can_obj_shenlan_h_t *o, uint8_t in);
+
+
+int decode_can_0x358_ADS_UDLCTurnLightReq(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x358_ADS_UDLCTurnLightReq(can_obj_shenlan_h_t *o, uint8_t in);
+
+
+int decode_can_0x36e_ADS_UDLCTurnLightReq(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x36e_ADS_UDLCTurnLightReq(can_obj_shenlan_h_t *o, uint8_t in);
+
+
+int decode_can_0x3aa_VcuCrsSetSwtSts(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x3aa_VcuCrsSetSwtSts(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x3aa_VcuCrsResuSwtSts(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x3aa_VcuCrsResuSwtSts(can_obj_shenlan_h_t *o, uint8_t in);
+int decode_can_0x3aa_VcuCrsDstSwtPlusSts(const can_obj_shenlan_h_t *o, uint8_t *out);
+int encode_can_0x3aa_VcuCrsDstSwtPlusSts(can_obj_shenlan_h_t *o, uint8_t in);
+
+
+#ifdef __cplusplus
+} 
+#endif
+
+#endif

+ 1 - 1
src/driver/driver_map_xodrload/globalplan.cpp

@@ -782,7 +782,7 @@ int GetNearPointWithHead(const double x,const double y,const double hdg,OpenDriv
             xnear.fdis = localdismin;
             xnear.nearhead = localnearhead;
             xnear.frels = localfrels;
-            if(xnear.fdis>0)
+            if((xnear.fdis>0)&&(xnear.frels>0.00001)&&(xnear.frels<(proad->GetRoadLength()-0.00001)))
             {
                 double fcalhdg = xodrfunc::CalcHdg(QPointF(xnear.nearx,xnear.neary),QPointF(x,y));
                 double fhdgdiff = fcalhdg - xnear.nearhead;