#if COM_SAFETY_SUPPORT == 1
#endif
#if COM_NRL_SUPPORT > 0
#include "com_nrl.h"
#endif
uint8_t ComDemoLssState(uint8_t ubNetV)
{
uint8_t ubResultT = aubLssStateMachineS[ubNetV];
if (aubLssStateMachineS[ubNetV] > eCOM_LSS_PROT_NONE)
{
aubLssStateMachineS[ubNetV] = eCOM_LSS_PROT_NONE;
}
return (ubResultT);
}
#if COM_EMCY_CONS_SUPPORT >0
{
uint16_t uwEmcyConsCountT = 0;
(void) ubNodeIdV;
while (uwEmcyConsCountT > 0)
{
uwEmcyConsCountT--;
{
}
}
}
#endif
#if COM_LSS_SUPPORT > 0
{
uint8_t ubLssStatusT;
{
switch (ubLssProtocolV)
{
break;
break;
break;
default:
break;
}
}
else
{
aubLssStateMachineS[ubNetV] = eCOM_LSS_PROT_NONE;
}
}
#endif
{
{
if (ptsBusStateV != 0L)
{
}
}
}
{
(void) ubNetV;
}
{
aubLssStateMachineS[ubNetV] = 0;
}
{
{
if (ubPriorityV == 0)
{
(void) ubNodeIdV;
}
}
}
#if COM_NMT_GUARDING > 0
{
{
if(ubNodeIdV == 3)
{
}
}
}
#endif
{
}
{
{
}
}
{
if (ubResultV == eCOM_NMT_DETECT_TIMEOUT)
{
#if COM_SYNC_SUPPORT > 0
#endif
}
}
{
{
}
}
{
{
}
}
{
{
ComDemoNmtQueueStateChange(ubNetV, ubNodeIdV, ubNmtEventV);
}
}
#if COM_NRL_SUPPORT > 0
void ComNrlEventHandler(uint8_t ubNetV, uint8_t ubNrlStateV)
{
switch (ubNrlStateV)
{
case eCP_NRL_STATE_ACTIVE:
break;
case eCP_NRL_STATE_PASSIVE:
break;
case eCP_NRL_STATE_DISCONNECTED:
break;
default:
break;
}
}
#endif
{
(void) ulByteCntV;
{
if (ubNodeIdV == 1)
{
{
}
}
}
}
{
(void) ulAbortV;
{
{
break;
ComDemoNmtConfigurationDone(ubNetV, ubNodeIdV);
break;
default:
break;
}
}
}
{
{
if (ubNodeIdV == 1)
{
{
}
}
}
ComDemoNmtConfigurationDone(ubNetV, ubNodeIdV);
}
#if COM_PDO_RCV_MAX > 0
{
uint16_t uwRcvPdoCountT = 0;
(void) uwPdoNumV;
while (uwRcvPdoCountT > 0)
{
uwRcvPdoCountT--;
{
}
}
}
#endif
{
{
if (uwPdoNumV == 1)
{
}
}
}
#if COM_SAFETY_SUPPORT == 1
{
}
#endif
#if COM_SAFETY_SUPPORT == 1
{
}
#endif
{
uint32_t ulObjSizeT = 0;
{
if( (uwIndexV == 0x2000) && (ubSubIndexV) == 1 )
{
ulObjSizeT = 100;
}
}
return ulObjSizeT;
}
{
(void) ptsTimeStampV;
{
}
}
@ eCP_BITRATE_2M
Definition canpie.h:692
#define COM_NET_MAX
Definition com_conf.h:51
@ eCOM_NET_1
Definition com_defs.h:723
@ eCOM_ERR_NONE
Definition com_defs.h:155
int32_t ComStatus_tv
Definition com_defs.h:116
Demo functions for CANopen Master protocol stack services .
Generic demo functions for CANopen Master protocol stack .
void ComDemoAppConsoleLog(const char *szMessageV)
CANopen Master EMCY service .
ComStatus_tv ComEmcyConsQueueCount(uint8_t ubNetV, uint16_t *puwCountV)
ComStatus_tv ComEmcyConsQueueFetch(uint8_t ubNetV, CpCanMsg_ts *ptsCanMsgV)
void ComEmcyConsEventReceive(uint8_t ubNetV, uint8_t ubNodeIdV)
CANopen Master LED Management .
CANopen Master Layer Setting Services (LSS) .
ComStatus_tv ComLssGetStatus(uint8_t ubNetV, uint8_t *pubStatusV)
@ eCOM_LSS_PROT_CONF_ID
Definition com_lss.h:142
@ eCOM_LSS_PROT_SWI_GLB
Definition com_lss.h:99
@ eCOM_LSS_PROT_IDENTIFY
Definition com_lss.h:151
@ eCOM_LSS_PROT_FASTSCAN
Definition com_lss.h:148
@ eCOM_LSS_STAT_SUCCESS
Definition com_lss.h:168
void ComLssEventReceive(uint8_t ubNetV, uint8_t ubLssProtocolV)
CANopen Master management functions .
ComStatus_tv ComMgrUserInit(uint8_t ubNetV)
Change CANopen Master settings.
int32_t ComMgrGetDataBitrate(uint8_t ubNetV)
void ComMgrEventBus(uint8_t ubNetV, CpState_ts *ptsBusStateV)
CANopen Master NMT service .
ComStatus_tv ComNmtSetHbConsTime(uint8_t ubNetV, uint8_t ubNodeIdV, uint16_t uwTimeV)
Set consumer heartbeat time.
void ComNmtEventActiveMaster(uint8_t ubNetV, uint8_t ubPriorityV, uint8_t ubNodeIdV)
void ComNmtEventHeartbeat(uint8_t ubNetV, uint8_t ubNodeIdV)
void ComNmtEventStateChange(uint8_t ubNetV, uint8_t ubNodeIdV, uint8_t ubNmtStateV)
void ComNmtEventGuarding(uint8_t ubNetV, uint8_t ubNodeIdV, uint8_t ubReasonV)
void ComNmtEventResetNode(uint8_t ubNetV)
NMT reset event callback.
@ eCOM_NMT_STATE_RESET_NODE
Definition com_nmt.h:92
@ eCOM_NMT_STATE_UNKNOWN
Definition com_nmt.h:80
@ eCOM_NMT_STATE_RESET_COM
Definition com_nmt.h:95
void ComNmtEventResetCommunication(uint8_t ubNetV)
ComStatus_tv ComNmtSetNodeState(uint8_t ubNetV, uint8_t ubNodeIdV, uint8_t ubStateV)
Set NMT state of CANopen device.
void ComNmtEventIdCollision(uint8_t ubNetV)
void ComNmtEventMasterDetection(uint8_t ubNetV, uint8_t ubResultV)
NMT master detection callback.
ComStatus_tv ComNodeSetHbProdTime(uint8_t ubNetV, uint8_t ubNodeIdV, uint16_t uwHeartbeatV)
void ComObjectEventReady(uint8_t ubNetV, uint8_t ubNodeIdV, CoObject_ts *ptsCoObjV, uint32_t ulAbortV)
void ComObjectEventTimeout(uint8_t ubNetV, uint8_t ubNodeIdV, CoObject_ts *ptsCoObjV)
@ eCOM_OBJECT_MARKER_NODE_GET_INFO
Definition com_object.h:77
@ eCOM_OBJECT_MARKER_NODE_SET_HEARTBEAT
Definition com_object.h:80
void ComObjectEventProgress(uint8_t ubNetV, uint8_t ubNodeIdV, CoObject_ts *ptsCoObjV, uint32_t ulByteCntV)
CANopen Master PDO service .
void ComPdoEventReceive(uint8_t ubNetV, uint16_t uwPdoNumV)
ComStatus_tv ComPdoRcvQueueCount(uint8_t ubNetV, uint16_t *puwCountV)
void ComPdoEventTimeout(uint8_t ubNetV, uint16_t uwPdoNumV)
ComStatus_tv ComPdoRcvQueueFetch(uint8_t ubNetV, CpCanMsg_ts *ptsCanMsgV)
CANopen Master Functional Safety .
void ComSafetySrdoRcvDataUpdate(uint8_t ubNetV, uint8_t ubNodeIdV, uint8_t ubSrdoNumberV)
void ComSafetySrdoTrmDataUpdate(uint8_t ubNetV, uint8_t ubNodeIdV, uint8_t ubSrdoNumberV)
CANopen Master SDO client .
CANopen Master SDO server .
uint32_t ComSdoSrvBlkUpObjectSize(uint8_t ubNetV, uint16_t uwIndexV, uint8_t ubSubIndexV)
ComStatus_tv ComSyncEnable(uint8_t ubNetV, uint8_t ubEnableV)
CANopen Master Stack - TIME service (TIME) .
void ComTimeEventConsume(uint8_t ubNetV, ComTimeOfDay_ts *ptsTimeStampV)
void CpMsgInit(CpCanMsg_ts *ptsCanMsgV, uint8_t ubFormatV)
Initialise message structure.
uint32_t CpMsgGetIdentifier(const CpCanMsg_ts *ptsCanMsgV)
Get Identifier Value.
#define CP_MSG_FORMAT_CBFF
Definition canpie.h:415
#define CPP_SECTION
Definition mc_compiler.h:1187
Object structure.
Definition com_object.h:122
uint16_t uwIndex
Definition com_object.h:125
uint8_t ubMarker
Definition com_object.h:131
uint8_t ubSubIndex
Definition com_object.h:128
Time of day.
Definition com_time.h:109
CAN message structure.
Definition canpie.h:1005
CAN state structure.
Definition canpie.h:1246