CANopenNode
CO_SDOserver_t Struct Reference

SDO server object. More...

#include <CO_SDOserver.h>

Data Fields

CO_CANmodule_tCANdevTx
 From CO_SDOserver_init()
 
CO_CANtx_tCANtxBuff
 CAN transmit buffer inside CANdevTx for CAN tx message.
 
const OD_tOD
 From CO_SDOserver_init()
 
uint8_t nodeId
 From CO_SDOserver_init()
 
volatile CO_SDO_state_t state
 Internal state of the SDO server.
 
OD_IO_t OD_IO
 Object dictionary interface for current object.
 
uint16_t index
 Index of the current object in Object Dictionary.
 
uint8_t subIndex
 Subindex of the current object in Object Dictionary.
 
OD_attr_t attribute
 Attribute bit-field of the current OD sub-object, see OD_attributes_t.
 
volatile void * CANrxNew
 Indicates, if new SDO message received from CAN bus. More...
 
uint8_t CANrxData [8]
 8 data bytes of the received message
 
CO_CANmodule_tCANdevRx
 From CO_SDOserver_init()
 
uint16_t CANdevRxIdx
 From CO_SDOserver_init()
 
uint16_t CANdevTxIdx
 From CO_SDOserver_init()
 
uint32_t COB_IDClientToServer
 Copy of CANopen COB_ID Client -> Server, meaning of the specific bits: More...
 
uint32_t COB_IDServerToClient
 Copy of CANopen COB_ID Server -> Client, similar as above.
 
OD_size_t sizeInd
 Size of data, which will be transferred. More...
 
OD_size_t sizeTran
 Size of data which is actually transferred.
 
uint8_t toggle
 Toggle bit toggled in each segment in segmented transfer.
 
bool_t finished
 If true, then: data transfer is finished (by download) or read from OD variable is finished (by upload)
 
uint32_t SDOtimeoutTime_us
 Maximum timeout time between request and response in microseconds.
 
uint32_t timeoutTimer
 Timeout timer for SDO communication.
 
char buf [CO_CONFIG_SDO_SRV_BUFFER_SIZE+1]
 Interim data buffer for segmented or block transfer + byte for '\0'.
 
OD_size_t bufOffsetWr
 Offset of next free data byte available for write in the buffer.
 
OD_size_t bufOffsetRd
 Offset of first data available for read in the buffer.
 
uint32_t block_SDOtimeoutTime_us
 Timeout time for SDO sub-block download, half of SDOtimeoutTime_us.
 
uint32_t block_timeoutTimer
 Timeout timer for SDO sub-block download.
 
uint8_t block_seqno
 Sequence number of segment in block, 1..127.
 
uint8_t block_blksize
 Number of segments per block, 1..127.
 
uint8_t block_noData
 Number of bytes in last segment that do not contain data.
 
bool_t block_crcEnabled
 Client CRC support in block transfer.
 
uint16_t block_crc
 Calculated CRC checksum.
 
void(* pFunctSignalPre )(void *object)
 From CO_SDOserver_initCallbackPre() or NULL.
 
void * functSignalObjectPre
 From CO_SDOserver_initCallbackPre() or NULL.
 

Detailed Description

SDO server object.

Field Documentation

◆ CANrxNew

volatile void* CO_SDOserver_t::CANrxNew

Indicates, if new SDO message received from CAN bus.

It is not cleared, until received message is completely processed.

◆ COB_IDClientToServer

uint32_t CO_SDOserver_t::COB_IDClientToServer

Copy of CANopen COB_ID Client -> Server, meaning of the specific bits:

  • Bit 0...10: 11-bit CAN identifier.
  • Bit 11..30: reserved, must be 0.
  • Bit 31: if 1, SDO client object is not used.

◆ sizeInd

OD_size_t CO_SDOserver_t::sizeInd

Size of data, which will be transferred.

It is optionally indicated by client in case of download or by server in case of upload.


The documentation for this struct was generated from the following file: