CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
CO_SDOclient_t Struct Reference

SDO client object. More...

#include <CO_SDOclient.h>

+ Collaboration diagram for CO_SDOclient_t:

Data Fields

OD_tOD
 From CO_SDOclient_init()
 
uint8_t nodeId
 From CO_SDOclient_init()
 
OD_IO_t OD_IO
 Object dictionary interface for locally transferred object.
 
CO_CANmodule_tCANdevRx
 From CO_SDOclient_init()
 
uint16_t CANdevRxIdx
 From CO_SDOclient_init()
 
CO_CANmodule_tCANdevTx
 From CO_SDOclient_init()
 
uint16_t CANdevTxIdx
 From CO_SDOclient_init()
 
CO_CANtx_tCANtxBuff
 CAN transmit buffer inside CANdevTx for CAN tx message.
 
uint32_t COB_IDClientToServer
 Copy of CANopen COB_ID Client -> Server, meaning of the specific bits:
 
uint32_t COB_IDServerToClient
 Copy of CANopen COB_ID Server -> Client, similar as above.
 
OD_extension_t OD_1280_extension
 Extension for OD object.
 
uint8_t nodeIDOfTheSDOServer
 Node-ID of the SDO server.
 
bool_t valid
 If true, SDO channel is valid.
 
uint16_t index
 Index of current object in Object Dictionary.
 
uint8_t subIndex
 Subindex of current object in Object Dictionary.
 
bool_t finished
 If true, then data transfer is finished.
 
size_t sizeInd
 Size of data, which will be transferred.
 
size_t sizeTran
 Size of data which is actually transferred.
 
volatile CO_SDO_state_t state
 Internal state of the SDO client.
 
uint32_t SDOtimeoutTime_us
 Maximum timeout time between request and response in microseconds.
 
uint32_t timeoutTimer
 Timeout timer for SDO communication.
 
CO_fifo_t bufFifo
 CO_fifo_t object for data buffer (not pointer)
 
uint8_t buf [CO_CONFIG_SDO_CLI_BUFFER_SIZE+1U]
 Data buffer of usable size CO_CONFIG_SDO_CLI_BUFFER_SIZE, used inside bufFifo.
 
volatile void * CANrxNew
 Indicates, if new SDO message received from CAN bus.
 
uint8_t CANrxData [8]
 8 data bytes of the received message
 
void(* pFunctSignal )(void *object)
 From CO_SDOclient_initCallbackPre() or NULL.
 
void * functSignalObject
 From CO_SDOclient_initCallbackPre() or NULL.
 
uint8_t toggle
 Toggle bit toggled in each segment in segmented transfer.
 
uint32_t block_SDOtimeoutTime_us
 Timeout time for SDO sub-block upload, half of SDOtimeoutTime_us.
 
uint32_t block_timeoutTimer
 Timeout timer for SDO sub-block upload.
 
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
 Server CRC support in block transfer.
 
uint8_t block_dataUploadLast [7]
 Last 7 bytes of data at block upload.
 
uint16_t block_crc
 Calculated CRC checksum.
 

Detailed Description

SDO client object.

Field Documentation

◆ COB_IDClientToServer

uint32_t CO_SDOclient_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

size_t CO_SDOclient_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.

◆ buf

uint8_t CO_SDOclient_t::buf[CO_CONFIG_SDO_CLI_BUFFER_SIZE+1U]

Data buffer of usable size CO_CONFIG_SDO_CLI_BUFFER_SIZE, used inside bufFifo.

Must be one byte larger for fifo usage.

◆ CANrxNew

volatile void* CO_SDOclient_t::CANrxNew

Indicates, if new SDO message received from CAN bus.

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


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