You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to simulate the reception of nmt and sdo messages in CO Node using the functions:
static void CO_NMT_receive(void *object, void *msg);
static void CO_SDO_receive(void object, void msg);
I'm trying to do it like this:
if (tx_hdr.StdId == 0 && buffer->data[1] == CO_NODE_ID && buffer->DLC == 2){
CO_CANrxMsg_t rcvMsg;
CO_CANrx_t nmt_command = CANModule_local->rxArray;
memcpy(rcvMsg.data, buffer->data, NMT_LEN);
rcvMsg.ident = 0;
rcvMsg.dlc = NMT_LEN;
nmtReceiveInterface(&nmt_command, &rcvMsg);
}
else if (tx_hdr.StdId == SDO_START_ADRESS + CO_NODE_ID){
CO_CANrxMsg_t rcvMsg;
CO_CANrx_t sdo_command = CANModule_local->rxArray;
memcpy(rcvMsg.data, buffer->data, SDO_LEN);
rcvMsg.ident = tx_hdr.StdId;
rcvMsg.dlc = SDO_LEN;
sdoReceiveInterface(&sdo_command, &rcvMsg);
}
Will I be able to do this?
The text was updated successfully, but these errors were encountered:
Is it possible to simulate the reception of nmt and sdo messages in CO Node using the functions:
static void CO_NMT_receive(void *object, void *msg);
static void CO_SDO_receive(void object, void msg);
I'm trying to do it like this:
if (tx_hdr.StdId == 0 && buffer->data[1] == CO_NODE_ID && buffer->DLC == 2){
CO_CANrxMsg_t rcvMsg;
CO_CANrx_t nmt_command = CANModule_local->rxArray;
memcpy(rcvMsg.data, buffer->data, NMT_LEN);
rcvMsg.ident = 0;
rcvMsg.dlc = NMT_LEN;
nmtReceiveInterface(&nmt_command, &rcvMsg);
}
else if (tx_hdr.StdId == SDO_START_ADRESS + CO_NODE_ID){
CO_CANrxMsg_t rcvMsg;
CO_CANrx_t sdo_command = CANModule_local->rxArray;
memcpy(rcvMsg.data, buffer->data, SDO_LEN);
rcvMsg.ident = tx_hdr.StdId;
rcvMsg.dlc = SDO_LEN;
sdoReceiveInterface(&sdo_command, &rcvMsg);
}
Will I be able to do this?
The text was updated successfully, but these errors were encountered: