CANopen Master Documentation
Version 6.06.04
Loading...
Searching...
No Matches
com_object.h File Reference

Detailed Description

+ Include dependency graph for com_object.h:

Data Structures

struct  CoObject_s
 

Enumerations

enum  ComObjectMarker_e {
  eCOM_OBJECT_MARKER_USER_END = 200 ,
  eCOM_OBJECT_MARKER_NODE_GET_INFO ,
  eCOM_OBJECT_MARKER_NODE_SET_HEARTBEAT ,
  eCOM_OBJECT_MARKER_NODE_STORE ,
  eCOM_OBJECT_MARKER_NODE_RESTORE ,
  eCOM_OBJECT_MARKER_SRDO_GET_CONFIG ,
  eCOM_OBJECT_MARKER_SRDO_GET_SIGNATURE ,
  eCOM_OBJECT_MARKER_SRDO_SET_CONFIG ,
  eCOM_OBJECT_MARKER_SRDO_SET_SIGNATURE ,
  eCOM_OBJECT_MARKER_SRDO_SET_VALID
}
 

Functions

void ComObjectEventProgress (uint8_t ubNetV, uint8_t ubNodeIdV, CoObject_ts *ptsCoObjV, uint32_t ulByteCntV)
 
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)
 

Enumeration Type Documentation

◆ ComObjectMarker_e

SDO / USDO transfer marker.

The enumeration defines values for the marker field inside the CANopen object structure CoObject_ts. The marker field can be evaluated inside the ComObjectEventReady() function

Enumerator
eCOM_OBJECT_MARKER_USER_END 

Last possible value for user-defined marker

eCOM_OBJECT_MARKER_NODE_GET_INFO 

Marker for ComNodeGetInfo() function call

eCOM_OBJECT_MARKER_NODE_SET_HEARTBEAT 

Marker for ComNodeSetHbProdTime() function call

eCOM_OBJECT_MARKER_NODE_STORE 

Marker for ComNodeStore() function call

eCOM_OBJECT_MARKER_NODE_RESTORE 

Marker for ComNodeRestore() function call

eCOM_OBJECT_MARKER_SRDO_GET_CONFIG 

Marker for ComSafetyGetConfiguration() function call

eCOM_OBJECT_MARKER_SRDO_GET_SIGNATURE 

Marker for ComSafetyGetSignature() function call

eCOM_OBJECT_MARKER_SRDO_SET_CONFIG 

Marker for ComSafetySetConfiguration() function call

eCOM_OBJECT_MARKER_SRDO_SET_SIGNATURE 

Marker for ComSafetySetSignature() function call

eCOM_OBJECT_MARKER_SRDO_SET_VALID 

Marker for ComSafetySetConfigurationValid() function call

Function Documentation

◆ ComObjectEventProgress()

void ComObjectEventProgress ( uint8_t  ubNetV,
uint8_t  ubNodeIdV,
CoObject_ts ptsCoObjV,
uint32_t  ulByteCntV 
)
Parameters
[in]ubNetVCANopen Network channel
[in]ubNodeIdVnode-ID value
[in]ptsCoObjVPointer to object structure
[in]ulByteCntVByte counter value
Note
The code located in the file com_user.c provides an example and has to be adopted to the application.

This handler is called during a SDO / USDO segmented download or upload. The parameter ptsCoObjV defines the object which is accessed. The value ulByteCntV denotes the number of remaining bytes that still have to be transmitted.

◆ ComObjectEventReady()

void ComObjectEventReady ( uint8_t  ubNetV,
uint8_t  ubNodeIdV,
CoObject_ts ptsCoObjV,
uint32_t  ulAbortV 
)
Parameters
[in]ubNetVCANopen Network channel
[in]ubNodeIdVnode-ID value
[in]ptsCoObjVPointer to object structure
[in]ulAbortVSDO / USDO abort code
Note
The code located in the file com_user.c provides an example and has to be adopted to the application.

This handler is called after the SDO / USDO data transfer is completed. The parameter ptsCoObjV points to the last object which has been read or written. The user defined marker within the structure CoObject_ts can be used to track SDO / USDO operations, e.g. for an application state machine.

In case of a SDO / USDO abort, the value ulAbortV allows to identify the last abort code. The value of ulAbortV is 0 when no SDO / USDO error occurred.

◆ ComObjectEventTimeout()

void ComObjectEventTimeout ( uint8_t  ubNetV,
uint8_t  ubNodeIdV,
CoObject_ts ptsCoObjV 
)
Parameters
[in]ubNetVCANopen Network channel
[in]ubNodeIdVnode-ID value
[in]ptsCoObjVPointer to object structure
See also
ComSdoSetTimeout(), ComUsdoSetTimeout()
Note
The code located in the file com_user.c provides an example and has to be adopted to the application.

This handler is called if a SDO / USDO time-out condition occurred. The parameter ptsCoObjV defines the object which was accessed. The SDO communication timeout can be configured by the ComSdoSetTimeout() function, for USDO communication timeout the function ComUsdoSetTimeout() is used.