CO_SDOserver.h
Go to the documentation of this file.
#ifndef CO_SDO_SERVER_H
#define CO_SDO_SERVER_H
#include "301/CO_driver.h"
#include "301/CO_ODinterface.h"
/* default configuration, see CO_config.h */
#ifndef CO_CONFIG_SDO_SRV
#define CO_CONFIG_SDO_SRV (CO_CONFIG_SDO_SRV_SEGMENTED)
#endif
#ifndef CO_CONFIG_SDO_SRV_BUFFER_SIZE
#define CO_CONFIG_SDO_SRV_BUFFER_SIZE 32
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define CO_SDO_ST_FLAG_DOWNLOAD 0x10U
#define CO_SDO_ST_FLAG_UPLOAD 0x20U
#define CO_SDO_ST_FLAG_BLOCK 0x40U
typedef enum {
CO_SDO_ST_IDLE = 0x00U,
CO_SDO_ST_ABORT = 0x01U,
CO_SDO_ST_DOWNLOAD_LOCAL_TRANSFER = 0x10U,
CO_SDO_ST_DOWNLOAD_INITIATE_REQ = 0x11U,
CO_SDO_ST_DOWNLOAD_INITIATE_RSP = 0x12U,
CO_SDO_ST_DOWNLOAD_SEGMENT_REQ = 0x13U,
CO_SDO_ST_DOWNLOAD_SEGMENT_RSP = 0x14U,
CO_SDO_ST_UPLOAD_LOCAL_TRANSFER = 0x20U,
CO_SDO_ST_UPLOAD_INITIATE_REQ = 0x21U,
CO_SDO_ST_UPLOAD_INITIATE_RSP = 0x22U,
CO_SDO_ST_UPLOAD_SEGMENT_REQ = 0x23U,
CO_SDO_ST_UPLOAD_SEGMENT_RSP = 0x24U,
CO_SDO_ST_DOWNLOAD_BLK_INITIATE_REQ = 0x51U,
CO_SDO_ST_DOWNLOAD_BLK_INITIATE_RSP = 0x52U,
CO_SDO_ST_DOWNLOAD_BLK_SUBBLOCK_REQ = 0x53U,
CO_SDO_ST_DOWNLOAD_BLK_SUBBLOCK_RSP = 0x54U,
CO_SDO_ST_DOWNLOAD_BLK_END_REQ = 0x55U,
CO_SDO_ST_DOWNLOAD_BLK_END_RSP = 0x56U,
CO_SDO_ST_UPLOAD_BLK_INITIATE_REQ = 0x61U,
CO_SDO_ST_UPLOAD_BLK_INITIATE_RSP = 0x62U,
CO_SDO_ST_UPLOAD_BLK_INITIATE_REQ2 = 0x63U,
CO_SDO_ST_UPLOAD_BLK_SUBBLOCK_SREQ = 0x64U,
CO_SDO_ST_UPLOAD_BLK_SUBBLOCK_CRSP = 0x65U,
CO_SDO_ST_UPLOAD_BLK_END_SREQ = 0x66U,
CO_SDO_ST_UPLOAD_BLK_END_CRSP = 0x67U,
} CO_SDO_state_t;
typedef enum {
CO_SDO_AB_NONE = 0x00000000UL,
CO_SDO_AB_TOGGLE_BIT = 0x05030000UL,
CO_SDO_AB_TIMEOUT = 0x05040000UL,
CO_SDO_AB_CMD = 0x05040001UL,
CO_SDO_AB_BLOCK_SIZE = 0x05040002UL,
CO_SDO_AB_SEQ_NUM = 0x05040003UL,
CO_SDO_AB_CRC = 0x05040004UL,
CO_SDO_AB_OUT_OF_MEM = 0x05040005UL,
CO_SDO_AB_UNSUPPORTED_ACCESS = 0x06010000UL,
CO_SDO_AB_WRITEONLY = 0x06010001UL,
CO_SDO_AB_READONLY = 0x06010002UL,
CO_SDO_AB_NOT_EXIST = 0x06020000UL,
CO_SDO_AB_NO_MAP = 0x06040041UL,
CO_SDO_AB_MAP_LEN = 0x06040042UL,
CO_SDO_AB_PRAM_INCOMPAT = 0x06040043UL,
CO_SDO_AB_DEVICE_INCOMPAT = 0x06040047UL,
CO_SDO_AB_HW = 0x06060000UL,
CO_SDO_AB_TYPE_MISMATCH = 0x06070010UL,
CO_SDO_AB_DATA_LONG = 0x06070012UL,
CO_SDO_AB_DATA_SHORT = 0x06070013UL,
CO_SDO_AB_SUB_UNKNOWN = 0x06090011UL,
CO_SDO_AB_INVALID_VALUE = 0x06090030UL,
CO_SDO_AB_VALUE_HIGH = 0x06090031UL,
CO_SDO_AB_VALUE_LOW = 0x06090032UL,
CO_SDO_AB_MAX_LESS_MIN = 0x06090036UL,
CO_SDO_AB_NO_RESOURCE = 0x060A0023UL,
CO_SDO_AB_GENERAL = 0x08000000UL,
CO_SDO_AB_DATA_TRANSF = 0x08000020UL,
CO_SDO_AB_DATA_LOC_CTRL = 0x08000021UL,
CO_SDO_AB_DATA_DEV_STATE = 0x08000022UL,
CO_SDO_AB_DATA_OD = 0x08000023UL,
CO_SDO_AB_NO_DATA = 0x08000024UL
} CO_SDO_abortCode_t;
typedef enum {
CO_SDO_RT_waitingLocalTransfer = 6,
CO_SDO_RT_uploadDataBufferFull = 5,
CO_SDO_RT_transmittBufferFull = 4,
CO_SDO_RT_blockDownldInProgress = 3,
CO_SDO_RT_blockUploadInProgress = 2,
CO_SDO_RT_waitingResponse = 1,
CO_SDO_RT_ok_communicationEnd = 0,
CO_SDO_RT_wrongArguments = -2,
CO_SDO_RT_endedWithClientAbort = -9,
CO_SDO_RT_endedWithServerAbort = -10,
} CO_SDO_return_t;
typedef struct {
CO_CANmodule_t *CANdevTx;
CO_CANtx_t *CANtxBuff;
const OD_t *OD;
uint8_t nodeId;
/* If true, SDO channel is valid */
bool_t valid;
volatile CO_SDO_state_t state;
OD_IO_t OD_IO;
uint16_t index;
uint8_t subIndex;
OD_attr_t attribute;
volatile void *CANrxNew;
uint8_t CANrxData[8];
#if ((CO_CONFIG_SDO_SRV) & CO_CONFIG_FLAG_OD_DYNAMIC) || defined CO_DOXYGEN
CO_CANmodule_t *CANdevRx;
uint16_t CANdevRxIdx;
uint16_t CANdevTxIdx;
uint32_t COB_IDClientToServer;
uint32_t COB_IDServerToClient;
#endif
#if ((CO_CONFIG_SDO_SRV) & CO_CONFIG_SDO_SRV_SEGMENTED) || defined CO_DOXYGEN
OD_size_t sizeInd;
OD_size_t sizeTran;
uint8_t toggle;
bool_t finished;
uint32_t SDOtimeoutTime_us;
uint32_t timeoutTimer;
char buf[CO_CONFIG_SDO_SRV_BUFFER_SIZE + 1];
OD_size_t bufOffsetWr;
OD_size_t bufOffsetRd;
#endif
#if ((CO_CONFIG_SDO_SRV) & CO_CONFIG_SDO_SRV_BLOCK) || defined CO_DOXYGEN
uint32_t block_SDOtimeoutTime_us;
uint32_t block_timeoutTimer;
uint8_t block_seqno;
uint8_t block_blksize;
uint8_t block_noData;
bool_t block_crcEnabled;
uint16_t block_crc;
#endif
#if ((CO_CONFIG_SDO_SRV) & CO_CONFIG_FLAG_CALLBACK_PRE) || defined CO_DOXYGEN
void (*pFunctSignalPre)(void *object);
void *functSignalObjectPre;
#endif
} CO_SDOserver_t;
CO_ReturnError_t CO_SDOserver_init(CO_SDOserver_t *SDO,
const OD_t *OD,
const OD_entry_t *OD_1200_SDOsrvPar,
uint8_t nodeId,
uint16_t SDOtimeoutTime_ms,
CO_CANmodule_t *CANdevRx,
uint16_t CANdevRxIdx,
CO_CANmodule_t *CANdevTx,
uint16_t CANdevTxIdx);
#if ((CO_CONFIG_SDO_SRV) & CO_CONFIG_FLAG_CALLBACK_PRE) || defined CO_DOXYGEN
void CO_SDOserver_initCallbackPre(CO_SDOserver_t *SDO,
void *object,
void (*pFunctSignalPre)(void *object));
#endif
CO_SDO_return_t CO_SDOserver_process(CO_SDOserver_t *SDO,
bool_t NMTisPreOrOperational,
uint32_t timeDifference_us,
uint32_t *timerNext_us);
/* CO_SDOserver */
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /* CO_SDO_SERVER_H */
uint32_t
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition: CO_driver.h:155
CO_SDOserver_t::COB_IDClientToServer
uint32_t COB_IDClientToServer
Copy of CANopen COB_ID Client -> Server, meaning of the specific bits:
Definition: CO_SDOserver.h:476
CO_SDOserver_t::block_noData
uint8_t block_noData
Number of bytes in last segment that do not contain data.
Definition: CO_SDOserver.h:512
CO_SDO_AB_CRC
@ CO_SDO_AB_CRC
0x05040004, CRC error (block mode only)
Definition: CO_SDOserver.h:347
CO_driver.h
Interface between CAN hardware and CANopenNode.
CO_SDO_AB_CMD
@ CO_SDO_AB_CMD
0x05040001, Command specifier not valid or unknown
Definition: CO_SDOserver.h:341
CO_SDO_ST_DOWNLOAD_BLK_END_RSP
@ CO_SDO_ST_DOWNLOAD_BLK_END_RSP
Definition: CO_SDOserver.h:252
CO_SDOserver_initCallbackPre
void CO_SDOserver_initCallbackPre(CO_SDOserver_t *SDO, void *object, void(*pFunctSignalPre)(void *object))
Initialize SDOrx callback function.
CO_SDOserver_t::functSignalObjectPre
void * functSignalObjectPre
From CO_SDOserver_initCallbackPre() or NULL.
Definition: CO_SDOserver.h:522
CO_SDOserver_t::timeoutTimer
uint32_t timeoutTimer
Timeout timer for SDO communication.
Definition: CO_SDOserver.h:494
CO_SDO_AB_NONE
@ CO_SDO_AB_NONE
0x00000000, No abort
Definition: CO_SDOserver.h:335
CO_SDO_RT_ok_communicationEnd
@ CO_SDO_RT_ok_communicationEnd
Success, end of communication.
Definition: CO_SDOserver.h:426
CO_CONFIG_SDO_SRV_BUFFER_SIZE
#define CO_CONFIG_SDO_SRV_BUFFER_SIZE
Size of the internal data buffer for the SDO server.
Definition: CO_config.h:342
CO_SDO_AB_MAX_LESS_MIN
@ CO_SDO_AB_MAX_LESS_MIN
0x06090036, Maximum value is less than minimum value.
Definition: CO_SDOserver.h:387
CO_SDOserver_t
SDO server object.
Definition: CO_SDOserver.h:439
CO_SDO_ST_DOWNLOAD_BLK_SUBBLOCK_RSP
@ CO_SDO_ST_DOWNLOAD_BLK_SUBBLOCK_RSP
Definition: CO_SDOserver.h:236
CO_SDO_AB_SEQ_NUM
@ CO_SDO_AB_SEQ_NUM
0x05040003, Invalid sequence number in block mode
Definition: CO_SDOserver.h:345
CO_SDO_RT_waitingResponse
@ CO_SDO_RT_waitingResponse
Waiting server or client response.
Definition: CO_SDOserver.h:424
CO_SDO_return_t
CO_SDO_return_t
Return values from SDO server or client functions.
Definition: CO_SDOserver.h:410
CO_SDO_AB_DATA_LOC_CTRL
@ CO_SDO_AB_DATA_LOC_CTRL
0x08000021, Data cannot be transferred or stored to application because of local control
Definition: CO_SDOserver.h:396
CO_SDO_AB_NO_DATA
@ CO_SDO_AB_NO_DATA
0x08000024, No data available
Definition: CO_SDOserver.h:403
CO_SDOserver_t::block_seqno
uint8_t block_seqno
Sequence number of segment in block, 1..127.
Definition: CO_SDOserver.h:508
uint16_t
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition: CO_driver.h:153
CO_SDOserver_t::index
uint16_t index
Index of the current object in Object Dictionary.
Definition: CO_SDOserver.h:455
CO_ReturnError_t
CO_ReturnError_t
Return values of some CANopen functions.
Definition: CO_driver.h:488
CO_SDO_AB_GENERAL
@ CO_SDO_AB_GENERAL
0x08000000, General error
Definition: CO_SDOserver.h:391
CO_SDO_AB_VALUE_HIGH
@ CO_SDO_AB_VALUE_HIGH
0x06090031, Value range of parameter written too high
Definition: CO_SDOserver.h:383
CO_SDOserver_t::block_blksize
uint8_t block_blksize
Number of segments per block, 1..127.
Definition: CO_SDOserver.h:510
CO_SDO_ST_DOWNLOAD_BLK_INITIATE_RSP
@ CO_SDO_ST_DOWNLOAD_BLK_INITIATE_RSP
Definition: CO_SDOserver.h:213
CO_SDO_AB_TIMEOUT
@ CO_SDO_AB_TIMEOUT
0x05040000, SDO protocol timed out
Definition: CO_SDOserver.h:339
CO_SDO_ST_UPLOAD_BLK_SUBBLOCK_SREQ
@ CO_SDO_ST_UPLOAD_BLK_SUBBLOCK_SREQ
Definition: CO_SDOserver.h:289
bool_t
unsigned char bool_t
Boolean data type for general use.
Definition: CO_driver.h:141
CO_SDO_ST_DOWNLOAD_BLK_SUBBLOCK_REQ
@ CO_SDO_ST_DOWNLOAD_BLK_SUBBLOCK_REQ
Definition: CO_SDOserver.h:221
CO_SDO_RT_wrongArguments
@ CO_SDO_RT_wrongArguments
Error in arguments.
Definition: CO_SDOserver.h:428
CO_SDO_AB_UNSUPPORTED_ACCESS
@ CO_SDO_AB_UNSUPPORTED_ACCESS
0x06010000, Unsupported access to an object
Definition: CO_SDOserver.h:351
CO_SDOserver_t::finished
bool_t finished
If true, then: data transfer is finished (by download) or read from OD variable is finished (by uploa...
Definition: CO_SDOserver.h:490
CO_SDO_ST_UPLOAD_BLK_INITIATE_RSP
@ CO_SDO_ST_UPLOAD_BLK_INITIATE_RSP
Definition: CO_SDOserver.h:275
CO_SDO_AB_READONLY
@ CO_SDO_AB_READONLY
0x06010002, Attempt to write a read only object
Definition: CO_SDOserver.h:355
CO_SDO_ST_DOWNLOAD_SEGMENT_REQ
@ CO_SDO_ST_DOWNLOAD_SEGMENT_REQ
Definition: CO_SDOserver.h:147
CO_SDO_AB_DATA_DEV_STATE
@ CO_SDO_AB_DATA_DEV_STATE
0x08000022, Data cannot be transferred or stored to application because of present device state
Definition: CO_SDOserver.h:399
CO_SDOserver_t::CANrxNew
volatile void * CANrxNew
Indicates, if new SDO message received from CAN bus.
Definition: CO_SDOserver.h:462
CO_SDOserver_t::OD_IO
OD_IO_t OD_IO
Object dictionary interface for current object.
Definition: CO_SDOserver.h:453
CO_SDO_ST_DOWNLOAD_INITIATE_REQ
@ CO_SDO_ST_DOWNLOAD_INITIATE_REQ
Definition: CO_SDOserver.h:131
CO_SDOserver_t::toggle
uint8_t toggle
Toggle bit toggled in each segment in segmented transfer.
Definition: CO_SDOserver.h:487
CO_SDO_ST_DOWNLOAD_BLK_END_REQ
@ CO_SDO_ST_DOWNLOAD_BLK_END_REQ
Definition: CO_SDOserver.h:244
CO_SDO_AB_TYPE_MISMATCH
@ CO_SDO_AB_TYPE_MISMATCH
0x06070010, Data type does not match, length of service parameter does not match
Definition: CO_SDOserver.h:371
CO_SDOserver_t::sizeTran
OD_size_t sizeTran
Size of data which is actually transferred.
Definition: CO_SDOserver.h:485
CO_SDOserver_t::OD
const OD_t * OD
From CO_SDOserver_init()
Definition: CO_SDOserver.h:445
CO_SDO_AB_DEVICE_INCOMPAT
@ CO_SDO_AB_DEVICE_INCOMPAT
0x06040047, General internal incompatibility in device
Definition: CO_SDOserver.h:366
CO_SDO_ST_DOWNLOAD_SEGMENT_RSP
@ CO_SDO_ST_DOWNLOAD_SEGMENT_RSP
Definition: CO_SDOserver.h:154
CO_SDO_AB_NO_RESOURCE
@ CO_SDO_AB_NO_RESOURCE
0x060A0023, Resource not available: SDO connection
Definition: CO_SDOserver.h:389
CO_SDO_AB_NOT_EXIST
@ CO_SDO_AB_NOT_EXIST
0x06020000, Object does not exist in the object dictionary
Definition: CO_SDOserver.h:357
CO_SDO_AB_PRAM_INCOMPAT
@ CO_SDO_AB_PRAM_INCOMPAT
0x06040043, General parameter incompatibility reasons
Definition: CO_SDOserver.h:364
CO_SDO_AB_INVALID_VALUE
@ CO_SDO_AB_INVALID_VALUE
0x06090030, Invalid value for parameter (download only).
Definition: CO_SDOserver.h:381
CO_SDO_AB_DATA_SHORT
@ CO_SDO_AB_DATA_SHORT
0x06070013, Data type does not match, length of service parameter too short
Definition: CO_SDOserver.h:377
CO_SDO_RT_blockDownldInProgress
@ CO_SDO_RT_blockDownldInProgress
Block download is in progress.
Definition: CO_SDOserver.h:419
CO_SDO_AB_VALUE_LOW
@ CO_SDO_AB_VALUE_LOW
0x06090032, Value range of parameter written too low
Definition: CO_SDOserver.h:385
CO_SDO_RT_uploadDataBufferFull
@ CO_SDO_RT_uploadDataBufferFull
Data buffer is full.
Definition: CO_SDOserver.h:415
CO_SDOserver_t::bufOffsetRd
OD_size_t bufOffsetRd
Offset of first data available for read in the buffer.
Definition: CO_SDOserver.h:500
CO_SDOserver_t::state
volatile CO_SDO_state_t state
Internal state of the SDO server.
Definition: CO_SDOserver.h:451
CO_SDOserver_t::attribute
OD_attr_t attribute
Attribute bit-field of the current OD sub-object, see OD_attributes_t.
Definition: CO_SDOserver.h:459
CO_SDO_AB_BLOCK_SIZE
@ CO_SDO_AB_BLOCK_SIZE
0x05040002, Invalid block size in block mode
Definition: CO_SDOserver.h:343
CO_SDOserver_init
CO_ReturnError_t CO_SDOserver_init(CO_SDOserver_t *SDO, const OD_t *OD, const OD_entry_t *OD_1200_SDOsrvPar, uint8_t nodeId, uint16_t SDOtimeoutTime_ms, CO_CANmodule_t *CANdevRx, uint16_t CANdevRxIdx, CO_CANmodule_t *CANdevTx, uint16_t CANdevTxIdx)
Initialize SDO object.
Definition: CO_SDOserver.c:357
CO_SDO_RT_blockUploadInProgress
@ CO_SDO_RT_blockUploadInProgress
Block upload is in progress.
Definition: CO_SDOserver.h:422
CO_SDOserver_t::CANdevTxIdx
uint16_t CANdevTxIdx
From CO_SDOserver_init()
Definition: CO_SDOserver.h:471
CO_SDO_AB_DATA_LONG
@ CO_SDO_AB_DATA_LONG
0x06070012, Data type does not match, length of service parameter too high
Definition: CO_SDOserver.h:374
CO_SDO_AB_WRITEONLY
@ CO_SDO_AB_WRITEONLY
0x06010001, Attempt to read a write only object
Definition: CO_SDOserver.h:353
CO_SDO_ST_UPLOAD_BLK_END_CRSP
@ CO_SDO_ST_UPLOAD_BLK_END_CRSP
Definition: CO_SDOserver.h:322
CO_SDO_ST_UPLOAD_BLK_INITIATE_REQ2
@ CO_SDO_ST_UPLOAD_BLK_INITIATE_REQ2
Definition: CO_SDOserver.h:281
CO_SDO_ST_UPLOAD_BLK_INITIATE_REQ
@ CO_SDO_ST_UPLOAD_BLK_INITIATE_REQ
Definition: CO_SDOserver.h:265
CO_SDOserver_t::CANdevTx
CO_CANmodule_t * CANdevTx
From CO_SDOserver_init()
Definition: CO_SDOserver.h:441
CO_SDO_ST_UPLOAD_INITIATE_RSP
@ CO_SDO_ST_UPLOAD_INITIATE_RSP
Definition: CO_SDOserver.h:179
CO_SDO_abortCode_t
CO_SDO_abortCode_t
SDO abort codes.
Definition: CO_SDOserver.h:333
CO_SDO_AB_NO_MAP
@ CO_SDO_AB_NO_MAP
0x06040041, Object cannot be mapped to the PDO
Definition: CO_SDOserver.h:359
CO_SDO_RT_endedWithClientAbort
@ CO_SDO_RT_endedWithClientAbort
Communication ended with client abort.
Definition: CO_SDOserver.h:430
CO_SDOserver_t::CANdevRx
CO_CANmodule_t * CANdevRx
From CO_SDOserver_init()
Definition: CO_SDOserver.h:467
CO_SDO_ST_IDLE
@ CO_SDO_ST_IDLE
Definition: CO_SDOserver.h:108
CO_SDO_RT_endedWithServerAbort
@ CO_SDO_RT_endedWithServerAbort
Communication ended with server abort.
Definition: CO_SDOserver.h:432
CO_SDO_state_t
CO_SDO_state_t
Internal states of the SDO state machine.
Definition: CO_SDOserver.h:102
CO_SDOserver_t::SDOtimeoutTime_us
uint32_t SDOtimeoutTime_us
Maximum timeout time between request and response in microseconds.
Definition: CO_SDOserver.h:492
CO_SDO_AB_HW
@ CO_SDO_AB_HW
0x06060000, Access failed due to hardware error
Definition: CO_SDOserver.h:368
CO_SDO_ST_UPLOAD_SEGMENT_REQ
@ CO_SDO_ST_UPLOAD_SEGMENT_REQ
Definition: CO_SDOserver.h:185
CO_SDO_ST_DOWNLOAD_LOCAL_TRANSFER
@ CO_SDO_ST_DOWNLOAD_LOCAL_TRANSFER
Definition: CO_SDOserver.h:121
CO_SDOserver_t::CANdevRxIdx
uint16_t CANdevRxIdx
From CO_SDOserver_init()
Definition: CO_SDOserver.h:469
CO_SDO_ST_UPLOAD_INITIATE_REQ
@ CO_SDO_ST_UPLOAD_INITIATE_REQ
Definition: CO_SDOserver.h:168
CO_ODinterface.h
CANopen Object Dictionary interface.
CO_SDOserver_t::block_crc
uint16_t block_crc
Calculated CRC checksum.
Definition: CO_SDOserver.h:516
CO_SDO_ST_UPLOAD_SEGMENT_RSP
@ CO_SDO_ST_UPLOAD_SEGMENT_RSP
Definition: CO_SDOserver.h:194
CO_SDO_AB_OUT_OF_MEM
@ CO_SDO_AB_OUT_OF_MEM
0x05040005, Out of memory
Definition: CO_SDOserver.h:349
CO_SDOserver_t::nodeId
uint8_t nodeId
From CO_SDOserver_init()
Definition: CO_SDOserver.h:447
CO_SDO_AB_DATA_OD
@ CO_SDO_AB_DATA_OD
0x08000023, Object dictionary not present or dynamic generation fails
Definition: CO_SDOserver.h:401
OD_t
Object Dictionary.
Definition: CO_ODinterface.h:352
CO_SDO_ST_UPLOAD_BLK_END_SREQ
@ CO_SDO_ST_UPLOAD_BLK_END_SREQ
Definition: CO_SDOserver.h:312
CO_CANmodule_t
Complete CAN module object.
Definition: CO_driver.h:319
CO_SDO_AB_DATA_TRANSF
@ CO_SDO_AB_DATA_TRANSF
0x08000020, Data cannot be transferred or stored to application
Definition: CO_SDOserver.h:393
CO_SDOserver_t::COB_IDServerToClient
uint32_t COB_IDServerToClient
Copy of CANopen COB_ID Server -> Client, similar as above.
Definition: CO_SDOserver.h:478
CO_SDOserver_t::block_SDOtimeoutTime_us
uint32_t block_SDOtimeoutTime_us
Timeout time for SDO sub-block download, half of SDOtimeoutTime_us.
Definition: CO_SDOserver.h:504
OD_IO_t
Structure for input / output on the OD variable.
Definition: CO_ODinterface.h:263
CO_SDO_ST_UPLOAD_LOCAL_TRANSFER
@ CO_SDO_ST_UPLOAD_LOCAL_TRANSFER
Definition: CO_SDOserver.h:161
CO_SDOserver_t::subIndex
uint8_t subIndex
Subindex of the current object in Object Dictionary.
Definition: CO_SDOserver.h:457
CO_SDOserver_t::sizeInd
OD_size_t sizeInd
Size of data, which will be transferred.
Definition: CO_SDOserver.h:483
OD_entry_t
Object Dictionary entry for one OD object.
Definition: CO_ODinterface.h:336
CO_SDO_ST_UPLOAD_BLK_SUBBLOCK_CRSP
@ CO_SDO_ST_UPLOAD_BLK_SUBBLOCK_CRSP
Definition: CO_SDOserver.h:304
CO_SDO_ST_DOWNLOAD_INITIATE_RSP
@ CO_SDO_ST_DOWNLOAD_INITIATE_RSP
Definition: CO_SDOserver.h:139
CO_SDOserver_t::block_crcEnabled
bool_t block_crcEnabled
Client CRC support in block transfer.
Definition: CO_SDOserver.h:514
CO_SDO_AB_SUB_UNKNOWN
@ CO_SDO_AB_SUB_UNKNOWN
0x06090011, Sub index does not exist
Definition: CO_SDOserver.h:379
CO_SDO_RT_waitingLocalTransfer
@ CO_SDO_RT_waitingLocalTransfer
Waiting in client local transfer.
Definition: CO_SDOserver.h:412
CO_SDOserver_process
CO_SDO_return_t CO_SDOserver_process(CO_SDOserver_t *SDO, bool_t NMTisPreOrOperational, uint32_t timeDifference_us, uint32_t *timerNext_us)
Process SDO communication.
Definition: CO_SDOserver.c:723
CO_SDO_AB_TOGGLE_BIT
@ CO_SDO_AB_TOGGLE_BIT
0x05030000, Toggle bit not altered
Definition: CO_SDOserver.h:337
CO_SDOserver_t::block_timeoutTimer
uint32_t block_timeoutTimer
Timeout timer for SDO sub-block download.
Definition: CO_SDOserver.h:506
CO_SDOserver_t::CANtxBuff
CO_CANtx_t * CANtxBuff
CAN transmit buffer inside CANdevTx for CAN tx message.
Definition: CO_SDOserver.h:443
CO_SDOserver_t::bufOffsetWr
OD_size_t bufOffsetWr
Offset of next free data byte available for write in the buffer.
Definition: CO_SDOserver.h:498
CO_SDO_ST_ABORT
@ CO_SDO_ST_ABORT
Definition: CO_SDOserver.h:114
CO_CANtx_t
Configuration object for CAN transmit message for specific CANopenNode Object.
Definition: CO_driver.h:299
CO_SDO_ST_DOWNLOAD_BLK_INITIATE_REQ
@ CO_SDO_ST_DOWNLOAD_BLK_INITIATE_REQ
Definition: CO_SDOserver.h:203
uint8_t
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition: CO_driver.h:151
OD_size_t
#define OD_size_t
Variable of type OD_size_t contains data length in bytes of OD variable.
Definition: CO_ODinterface.h:44
CO_SDO_RT_transmittBufferFull
@ CO_SDO_RT_transmittBufferFull
CAN transmit buffer is full.
Definition: CO_SDOserver.h:417
OD_attr_t
#define OD_attr_t
Size of Object Dictionary attribute.
Definition: CO_ODinterface.h:50
CO_SDO_AB_MAP_LEN
@ CO_SDO_AB_MAP_LEN
0x06040042, Number and length of object to be mapped exceeds PDO length
Definition: CO_SDOserver.h:362