个人资料
个人介绍
这个人很懒,什么都没有留下
感兴趣或擅长的领域
暂无数据
达成规则
以上满足项可达成此勋章
他的回复:
canfdbus_config.json:[ { "key" : "ConfigurationSummary", "value" : { "object[]" : [ { "key" : "Version", "value" : { "uint32" : 112 } }, { "key" : "TimeStamp", "value" : { "object[]" : [ { "key" : "Second", "value" : { "uint32" : 65 } }, { "key" : "Nsecond", "value" : { "uint32" : 60 } } ] } }, { "key" : "CheckSum", "value" : { "uint32" : 222 } }, { "key" : "UsrReserved", "value" : { "uint32" : 12 } } ] } }, { "key" : "CanBusConfigFunListParam", "value" : { "object[]" : [ { "key" : "ValidSize", "value" : { "uint8" : 12 } }, { "key" : "CanFdBusConfigFunParam", "value" : { "object[]" : [ { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } }, { "key" : "", "value" : { "object[]" : [ { "key" : "FunctionSwitch", "value" : { "uint8" : 1 } }, { "key" : "BusType", "value" : { "uint8" : 1 } }, { "key" : "BaudRateParam", "value" : { "object[]" : [ { "key" : "BaudRate", "value" : { "uint16" : 500 } }, { "key" : "SamplingPoint", "value" : { "uint8" : 75 } }, { "key" : "BaudRateFD", "value" : { "uint16" : 2000 } }, { "key" : "SamplingPointFD", "value" : { "uint8" : 75 } }, { "key" : "UsrReserved", "value" : { "uint32" : 14 } } ] } } ] } } ] } } ] } }, { "key" : "RxFilterFunListParam", "value" : { "object[]" : [ { "key" : "ValidSize", "value" : { "uint8" : 0 } } ] } }, { "key" : "McuSendMsgListFunParam", "value" : { "object[]" : [ { "key" : "ValidSize", "value" : { "uint8" : 0 } } ] } }, { "key" : "SignalFillingFunListParam", "value" : { "object[]" : [ { "key" : "ValidSize", "value" : { "uint8" : 0 } } ] } }, { "key" : "CompensationFunListParam", "value" : { "object[]" : [ { "key" : "ValidSize", "value" : { "uint8" : 0 } } ] } }, { "key" : "UsrReserved", "value" : { "string" : "0x12,0x31,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00" } }, { "key" : "version", "value" : { "string" : "1.0.0" } }]
他的回复:
json文件如下: { "key": "object", "value": { "object[]": [ { "key": "ChannelId", "value": { "uint64": 2 }, "checksum": 2704349418 }, { "key": "BaudRate", "value": { "uint16": 250 }, "checksum": 2704349418 }, { "key": "Prescale", "value": { "uint64": 2032128 }, "checksum": 2704349418 }, { "key": "RxFilterSwitch", "value": { "uint8": 0 }, "checksum": 2704349418 }, { "key": "InitCycleSwitch", "value": { "uint8": 1 }, "checksum": 2704349418 }, { "key": "RxIdList", "value": { "object[]": [ { "key": "object", "value": { "object[]": [ { "key": "CanId", "value": { "uint32": 97 }, "checksum": 271143104 }, { "key": "DataLength", "value": { "uint8": 8 }, "checksum": 2704349418 } ] }, "checksum": 264756932 }, { "key": "object", "value": { "object[]": [ { "key": "CanId", "value": { "uint32": 116 }, "checksum": 271143104 }, { "key": "DataLength", "value": { "uint8": 8 }, "checksum": 2704349418 } ] }, "checksum": 264756932 }, { "key": "object", "value": { "object[]": [ { "key": "CanId", "value": { "uint32": 117 }, "checksum": 271143104 }, { "key": "DataLength", "value": { "uint8": 8 }, "checksum": 2704349418 } ] }, "checksum": 264756932 } ] }, "checksum": 572302646 }, { "key": "TxIdList", "value": { "object[]": [ { "key": "object", "value": { "object[]": [ { "key": "CanId", "value": { "uint32": 218043130 }, "checksum": 4213107651 }, { "key": "DataLength", "value": { "uint8": 8 }, "checksum": 264756932 }, { "key": "Cycle", "value": { "uint16": 50 }, "checksum": 1103247409 } ] }, "checksum": 1360879489 }, { "key": "object", "value": { "object[]": [ { "key": "CanId", "value": { "uint32": 218054907 }, "checksum": 4213107651 }, { "key": "DataLength", "value": { "uint8": 8 }, "checksum": 2704349418 }, { "key": "Cycle", "value": { "uint16": 100 }, "checksum": 1103247409 } ] }, "checksum": 1360879489 }, { "key": "object", "value": { "object[]": [ { "key": "CanId", "value": { "uint32": 218055420 }, "checksum": 271143104 }, { "key": "DataLength", "value": { "uint8": 8 }, "checksum": 2704349418 }, { "key": "Cycle", "value": { "uint16": 500 }, "checksum": 1103247409 } ] }, "checksum": 264756932 }, { "key": "object", "value": { "object[]": [ { "key": "CanId", "value": { "uint32": 212669212 }, "checksum": 271143104 }, { "key": "DataLength", "value": { "uint8": 8 }, "checksum": 2704349418 }, { "key": "Cycle", "value": { "uint16": 100 }, "checksum": 1103247409 } ] }, "checksum": 264756932 }, { "key": "object", "value": { "object[]": [ { "key": "CanId", "value": { "uint32": 4194303 }, "checksum": 271143104 }, { "key": "DataLength", "value": { "uint8": 8 }, "checksum": 2704349418 }, { "key": "Cycle", "value": { "uint16": 50 }, "checksum": 1103247409 } ] }, "checksum": 264756932 }, { "key": "object", "value": { "object[]": [ { "key": "CanId", "value": { "uint32": 419373146 }, "checksum": 271143104 }, { "key": "DataLength", "value": { "uint8": 8 }, "checksum": 2704349418 }, { "key": "Cycle", "value": { "uint16": 50 }, "checksum": 1103247409 } ] }, "checksum": 264756932 } ] }, "checksum": 572302646 }, { "key": "UsrReserved", "value": { "object[]": [ { "key": "object", "value": { "uint8": 1 }, "checksum": 1360879489 }, { "key": "object", "value": { "uint8": 2 }, "checksum": 264756932 }, { "key": "object", "value": { "uint8": 3 }, "checksum": 264756932 } ] }, "checksum": 572302646 } ] }, "checksum": 264756932 },配置文件中,mcu接收can总线上的数据应该是可以的,但是没有进入Gp1CanRxIndicator方法 { "key": "RxFilterSwitch", "value": { "uint8": 0 }, "checksum": 2704349418 },419373146的16进制是18FF205A,所以向can总线上发应该也是通的请专家看下怎么会无法接收can报文的 谢谢
他的回复:
您好 按您的写法 我做了一个打印如下:void printArray(SDK_U8Array512Type array){ SDK_SHOWLOG(SDK_LOG_LV_INFO, "enter function printArray: \n"); unsigned char str[80]; for(int i=0;i10;i++) { //snprintf(&str[i], 1, "%x", array[i]); //snprintf(str, 1, "%s", "="); snprintf(&str[i], 1, "="); } SDK_SHOWLOG(SDK_LOG_LV_INFO, str); SDK_SHOWLOG(SDK_LOG_LV_INFO, "\n");}void Gp1Task0(void){ SDK_SHOWLOG(SDK_LOG_LV_INFO, "enter function Gp1Task0: \n"); uint8 breakSignal = 0; g_timesCountGp1Task0++; if (g_timesCountGp1Task0 % RUN_PER_100MS == 0) { SDK_SHOWLOG(SDK_LOG_LV_INFO, "enter function Gp1Task0 --> RUN_PER_100MS: \n"); //该接口读到的数据是抽象层返回的以50ms周期轮询Host发来的数据 SDK_ReadHostData(g_gp1DataFromHost); printArray(g_gp1DataFromHost); //0xAA if (g_gp1DataFromHost[0] == FIRST_FLAG_DATA) { SDK_SHOWLOG(SDK_LOG_LV_INFO, "enter FIRST_FLAG_DATA 0xAA before SDK_SendHostData\n"); SDK_SendHostData(g_gp1DataFromHost); SDK_SHOWLOG(SDK_LOG_LV_INFO, "enter FIRST_FLAG_DATA 0xAA after SDK_SendHostData\n"); } } //每10ms检查一次 if (g_timesCountGp1Task0 % RUN_PER_10MS == 0) { SDK_SHOWLOG(SDK_LOG_LV_INFO, "enter function Gp1Task0 --> RUN_PER_10MS: \n"); if (g_faultSignal == 1) { breakSignal = 1; } g_canBrakeMsg.data[0] = breakSignal; SDK_CanTransmit(SDK_CAN_CHL00, &g_canBrakeMsg); }}在日志中还是没有看到相应的输出内容:不太清楚华为内部的打印方法,我看网上的例子就是这样写的,所以参考写了一下,麻烦看下,另外为什么总有一个右中括号呢?我的文件里从来没有打印过谢谢