CO_gateway_ascii.h
Go to the documentation of this file.
#ifndef CO_GATEWAY_ASCII_H
#define CO_GATEWAY_ASCII_H
#include "301/CO_driver.h"
#include "301/CO_fifo.h"
#include "301/CO_SDOclient.h"
#include "301/CO_NMT_Heartbeat.h"
#include "305/CO_LSSmaster.h"
#include "303/CO_LEDs.h"
/* default configuration, see CO_config.h */
#ifndef CO_CONFIG_GTW
#define CO_CONFIG_GTW (0)
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII) || defined CO_DOXYGEN
#ifdef __cplusplus
extern "C" {
#endif
#ifndef CO_GTWA_RESP_BUF_SIZE
#define CO_GTWA_RESP_BUF_SIZE 200
#endif
#ifndef CO_GTWA_STATE_TIMEOUT_TIME_US
#define CO_GTWA_STATE_TIMEOUT_TIME_US 1200000
#endif
typedef enum {
CO_GTWA_respErrorNone = 0,
CO_GTWA_respErrorReqNotSupported = 100,
CO_GTWA_respErrorSyntax = 101,
CO_GTWA_respErrorInternalState = 102,
CO_GTWA_respErrorTimeOut = 103,
CO_GTWA_respErrorNoDefaultNetSet = 104,
CO_GTWA_respErrorNoDefaultNodeSet = 105,
CO_GTWA_respErrorUnsupportedNet = 106,
CO_GTWA_respErrorUnsupportedNode = 107,
CO_GTWA_respErrorLostGuardingMessage = 200,
CO_GTWA_respErrorLostConnection = 201,
CO_GTWA_respErrorHeartbeatStarted = 202,
CO_GTWA_respErrorHeartbeatLost = 203,
CO_GTWA_respErrorWrongNMTstate = 204,
CO_GTWA_respErrorBootUp = 205,
CO_GTWA_respErrorErrorPassive = 300,
CO_GTWA_respErrorBusOff = 301,
CO_GTWA_respErrorCANbufferOverflow = 303,
CO_GTWA_respErrorCANinit = 304,
CO_GTWA_respErrorCANactive = 305,
CO_GTWA_respErrorPDOalreadyUsed = 400,
CO_GTWA_respErrorPDOlengthExceeded = 401,
CO_GTWA_respErrorLSSmanufacturer = 501,
CO_GTWA_respErrorLSSnodeIdNotSupported = 502,
CO_GTWA_respErrorLSSbitRateNotSupported = 503,
CO_GTWA_respErrorLSSparameterStoringFailed = 504,
CO_GTWA_respErrorLSSmediaError = 505,
CO_GTWA_respErrorRunningOutOfMemory = 600
} CO_GTWA_respErrorCode_t;
typedef enum {
CO_GTWA_ST_IDLE = 0x00U,
CO_GTWA_ST_READ = 0x10U,
CO_GTWA_ST_WRITE = 0x11U,
CO_GTWA_ST_WRITE_ABORTED = 0x12U,
CO_GTWA_ST_LSS_SWITCH_GLOB = 0x20U,
CO_GTWA_ST_LSS_SWITCH_SEL = 0x21U,
CO_GTWA_ST_LSS_SET_NODE = 0x22U,
CO_GTWA_ST_LSS_CONF_BITRATE = 0x23U,
CO_GTWA_ST_LSS_STORE = 0x24U,
CO_GTWA_ST_LSS_INQUIRE = 0x25U,
CO_GTWA_ST_LSS_INQUIRE_ADDR_ALL = 0x26U,
CO_GTWA_ST__LSS_FASTSCAN = 0x30U,
CO_GTWA_ST_LSS_ALLNODES = 0x31U,
CO_GTWA_ST_LOG = 0x80U,
CO_GTWA_ST_HELP = 0x81U,
CO_GTWA_ST_LED = 0x82U
} CO_GTWA_state_t;
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_SDO) || defined CO_DOXYGEN
/*
* CANopen Gateway-ascii data types structure
*/
typedef struct {
char* syntax;
size_t length;
size_t (*dataTypePrint)(CO_fifo_t *fifo,
char *buf,
size_t count,
bool_t end);
size_t (*dataTypeScan)(CO_fifo_t *dest,
CO_fifo_t *src,
CO_fifo_st *status);
} CO_GTWA_dataType_t;
#endif /* (CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_SDO */
typedef struct {
size_t (*readCallback)(void *object,
const char *buf,
size_t count,
uint8_t *connectionOK);
void *readCallbackObject;
uint32_t sequence;
int32_t net_default;
int16_t node_default;
uint16_t net;
uint8_t node;
CO_fifo_t commFifo;
char commBuf[CO_CONFIG_GTWA_COMM_BUF_SIZE + 1];
char respBuf[CO_GTWA_RESP_BUF_SIZE];
size_t respBufCount;
size_t respBufOffset;
bool_t respHold;
uint32_t timeDifference_us_cumulative;
CO_GTWA_state_t state;
uint32_t stateTimeoutTmr;
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_SDO) || defined CO_DOXYGEN
CO_SDOclient_t *SDO_C;
uint16_t SDOtimeoutTime;
bool_t SDOblockTransferEnable;
bool_t SDOdataCopyStatus;
const CO_GTWA_dataType_t *SDOdataType;
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_NMT) || defined CO_DOXYGEN
CO_NMT_t *NMT;
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_LSS) || defined CO_DOXYGEN
CO_LSSmaster_t *LSSmaster;
CO_LSS_address_t lssAddress;
uint8_t lssNID;
uint16_t lssBitrate;
CO_LSS_cs_t lssInquireCs;
CO_LSSmaster_fastscan_t lssFastscan;
uint8_t lssSubState;
uint8_t lssNodeCount;
bool_t lssStore;
uint16_t lssTimeout_ms;
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_LOG) || defined CO_DOXYGEN
char logBuf[CO_CONFIG_GTWA_LOG_BUF_SIZE + 1];
CO_fifo_t logFifo;
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_PRINT_HELP) || defined CO_DOXYGEN
const char *helpString;
size_t helpStringOffset;
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_PRINT_LEDS) || defined CO_DOXYGEN
CO_LEDs_t *LEDs;
uint8_t ledStringPreviousIndex;
#endif
} CO_GTWA_t;
CO_ReturnError_t CO_GTWA_init(CO_GTWA_t* gtwa,
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_SDO) || defined CO_DOXYGEN
CO_SDOclient_t* SDO_C,
uint16_t SDOclientTimeoutTime_ms,
bool_t SDOclientBlockTransfer,
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_NMT) || defined CO_DOXYGEN
CO_NMT_t *NMT,
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_LSS) || defined CO_DOXYGEN
CO_LSSmaster_t *LSSmaster,
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_PRINT_LEDS) || defined CO_DOXYGEN
CO_LEDs_t *LEDs,
#endif
uint8_t dummy);
void CO_GTWA_initRead(CO_GTWA_t* gtwa,
size_t (*readCallback)(void *object,
const char *buf,
size_t count,
uint8_t *connectionOK),
void *readCallbackObject);
static inline size_t CO_GTWA_write_getSpace(CO_GTWA_t* gtwa) {
return CO_fifo_getSpace(&gtwa->commFifo);
}
static inline size_t CO_GTWA_write(CO_GTWA_t* gtwa,
const char *buf,
size_t count)
{
return CO_fifo_write(&gtwa->commFifo, buf, count, NULL);
}
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_LOG) || defined CO_DOXYGEN
void CO_GTWA_log_print(CO_GTWA_t* gtwa, const char *message);
#endif /* (CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_LOG */
void CO_GTWA_process(CO_GTWA_t *gtwa,
bool_t enable,
uint32_t timeDifference_us,
uint32_t *timerNext_us);
/* CO_CANopen_309_3 */
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /* (CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII */
#endif /* CO_GATEWAY_ASCII_H */
uint32_t
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition: CO_driver.h:155
CO_GTWA_t::commFifo
CO_fifo_t commFifo
CO_fifo_t object for command (not pointer)
Definition: CO_gateway_ascii.h:325
CO_driver.h
Interface between CAN hardware and CANopenNode.
CO_GTWA_initRead
void CO_GTWA_initRead(CO_GTWA_t *gtwa, size_t(*readCallback)(void *object, const char *buf, size_t count, uint8_t *connectionOK), void *readCallbackObject)
Initialize read callback in Gateway-ascii object.
CO_GTWA_t::NMT
CO_NMT_t * NMT
NMT object from CO_GTWA_init()
Definition: CO_gateway_ascii.h:361
CO_GTWA_t::lssBitrate
uint16_t lssBitrate
LSS bitrate parameter.
Definition: CO_gateway_ascii.h:371
CO_GTWA_respErrorLSSmanufacturer
@ CO_GTWA_respErrorLSSmanufacturer
501 - LSS implementation- / manufacturer-specific error
Definition: CO_gateway_ascii.h:211
CO_LEDs_t
LEDs object, initialized by CO_LEDs_init()
Definition: CO_LEDs.h:93
CO_GTWA_t::node
uint8_t node
Current CANopen Node ID.
Definition: CO_gateway_ascii.h:323
CO_SDOclient_t
SDO client object.
Definition: CO_SDOclient.h:67
CO_GTWA_t::sequence
uint32_t sequence
Sequence number of the command.
Definition: CO_gateway_ascii.h:315
CO_GTWA_write
static size_t CO_GTWA_write(CO_GTWA_t *gtwa, const char *buf, size_t count)
Write command into CO_GTWA_t object.
Definition: CO_gateway_ascii.h:485
uint16_t
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition: CO_driver.h:153
CO_GTWA_t::lssNodeCount
uint8_t lssNodeCount
LSS allnodes node count parameter.
Definition: CO_gateway_ascii.h:379
CO_SDOclient.h
CANopen Service Data Object - client protocol.
CO_GTWA_ST_LSS_INQUIRE
@ CO_GTWA_ST_LSS_INQUIRE
LSS 'lss_inquire_addr' or 'lss_get_node'.
Definition: CO_gateway_ascii.h:249
CO_ReturnError_t
CO_ReturnError_t
Return values of some CANopen functions.
Definition: CO_driver.h:488
CO_GTWA_ST_IDLE
@ CO_GTWA_ST_IDLE
Gateway is idle, no command is processing.
Definition: CO_gateway_ascii.h:231
CO_GTWA_ST__LSS_FASTSCAN
@ CO_GTWA_ST__LSS_FASTSCAN
LSS '_lss_fastscan'.
Definition: CO_gateway_ascii.h:253
CO_GTWA_t::helpString
const char * helpString
Offset, when printing help text.
Definition: CO_gateway_ascii.h:393
bool_t
unsigned char bool_t
Boolean data type for general use.
Definition: CO_driver.h:141
CO_GTWA_t::lssSubState
uint8_t lssSubState
LSS allnodes sub state parameter.
Definition: CO_gateway_ascii.h:377
CO_GTWA_t::lssInquireCs
CO_LSS_cs_t lssInquireCs
LSS inquire parameter.
Definition: CO_gateway_ascii.h:373
CO_LSS_cs_t
CO_LSS_cs_t
LSS protocol command specifiers.
Definition: CO_LSS.h:86
CO_LSSmaster.h
CANopen Layer Setting Service - master protocol.
CO_GTWA_t::lssFastscan
CO_LSSmaster_fastscan_t lssFastscan
LSS fastscan parameter.
Definition: CO_gateway_ascii.h:375
int32_t
signed long int int32_t
INTEGER32 in CANopen (0004h), 32-bit signed integer.
Definition: CO_driver.h:147
CO_GTWA_t::respHold
bool_t respHold
See respBufOffset above.
Definition: CO_gateway_ascii.h:338
CO_GTWA_ST_WRITE
@ CO_GTWA_ST_WRITE
SDO 'write' (download)
Definition: CO_gateway_ascii.h:235
CO_GTWA_respErrorHeartbeatStarted
@ CO_GTWA_respErrorHeartbeatStarted
202 - Heartbeat started
Definition: CO_gateway_ascii.h:189
CO_GTWA_respErrorPDOlengthExceeded
@ CO_GTWA_respErrorPDOlengthExceeded
401 - PDO length exceeded
Definition: CO_gateway_ascii.h:209
CO_GTWA_t::readCallbackObject
void * readCallbackObject
Pointer to object, which will be used inside readCallback, from CO_GTWA_init()
Definition: CO_gateway_ascii.h:313
CO_GTWA_t::lssAddress
CO_LSS_address_t lssAddress
128 bit number, uniquely identifying each node
Definition: CO_gateway_ascii.h:367
CO_GTWA_respErrorBusOff
@ CO_GTWA_respErrorBusOff
301 - Bus off
Definition: CO_gateway_ascii.h:199
CO_NMT_t
NMT consumer and Heartbeat producer object.
Definition: CO_NMT_Heartbeat.h:162
CO_GTWA_respErrorLSSnodeIdNotSupported
@ CO_GTWA_respErrorLSSnodeIdNotSupported
502 - LSS node-ID not supported
Definition: CO_gateway_ascii.h:213
CO_GTWA_t::lssStore
bool_t lssStore
LSS allnodes store parameter.
Definition: CO_gateway_ascii.h:381
CO_GTWA_ST_LSS_CONF_BITRATE
@ CO_GTWA_ST_LSS_CONF_BITRATE
LSS 'lss_conf_bitrate'.
Definition: CO_gateway_ascii.h:245
CO_GTWA_write_getSpace
static size_t CO_GTWA_write_getSpace(CO_GTWA_t *gtwa)
Get free write buffer space.
Definition: CO_gateway_ascii.h:465
CO_GTWA_t::LEDs
CO_LEDs_t * LEDs
CO_LEDs_t object for CANopen status LEDs imitation from CO_GTWA_init()
Definition: CO_gateway_ascii.h:398
CO_GTWA_respErrorLostGuardingMessage
@ CO_GTWA_respErrorLostGuardingMessage
200 - Lost guarding message
Definition: CO_gateway_ascii.h:185
CO_GTWA_RESP_BUF_SIZE
#define CO_GTWA_RESP_BUF_SIZE
Size of response string buffer.
Definition: CO_gateway_ascii.h:151
CO_GTWA_t::SDO_C
CO_SDOclient_t * SDO_C
SDO client object from CO_GTWA_init()
Definition: CO_gateway_ascii.h:347
CO_GTWA_respErrorLSSmediaError
@ CO_GTWA_respErrorLSSmediaError
505 - LSS command failed because of media error
Definition: CO_gateway_ascii.h:219
CO_GTWA_respErrorWrongNMTstate
@ CO_GTWA_respErrorWrongNMTstate
204 - Wrong NMT state
Definition: CO_gateway_ascii.h:193
CO_GTWA_t::net
uint16_t net
Current CANopen Net number.
Definition: CO_gateway_ascii.h:321
CO_GTWA_respErrorLostConnection
@ CO_GTWA_respErrorLostConnection
201 - Lost connection
Definition: CO_gateway_ascii.h:187
CO_CONFIG_GTW
#define CO_CONFIG_GTW
Configuration of Gateway ASCII mapping.
Definition: CO_config.h:595
CO_GTWA_t::LSSmaster
CO_LSSmaster_t * LSSmaster
LSSmaster object from CO_GTWA_init()
Definition: CO_gateway_ascii.h:365
CO_GTWA_t::lssNID
uint8_t lssNID
LSS Node-ID parameter.
Definition: CO_gateway_ascii.h:369
CO_GTWA_state_t
CO_GTWA_state_t
Internal states of the Gateway-ascii state machine.
Definition: CO_gateway_ascii.h:228
CO_GTWA_init
CO_ReturnError_t CO_GTWA_init(CO_GTWA_t *gtwa, CO_SDOclient_t *SDO_C, uint16_t SDOclientTimeoutTime_ms, bool_t SDOclientBlockTransfer, CO_NMT_t *NMT, CO_LSSmaster_t *LSSmaster, CO_LEDs_t *LEDs, uint8_t dummy)
Initialize Gateway-ascii object.
CO_GTWA_respErrorNoDefaultNodeSet
@ CO_GTWA_respErrorNoDefaultNodeSet
105 - No default node set
Definition: CO_gateway_ascii.h:179
CO_GTWA_t::lssTimeout_ms
uint16_t lssTimeout_ms
LSS allnodes timeout parameter.
Definition: CO_gateway_ascii.h:383
CO_GTWA_respErrorCANinit
@ CO_GTWA_respErrorCANinit
304 - CAN init
Definition: CO_gateway_ascii.h:203
CO_GTWA_t::SDOdataType
const CO_GTWA_dataType_t * SDOdataType
Data type of variable in current SDO communication.
Definition: CO_gateway_ascii.h:357
CO_GTWA_respErrorSyntax
@ CO_GTWA_respErrorSyntax
101 - Syntax error
Definition: CO_gateway_ascii.h:171
CO_fifo_st
CO_fifo_st
Bitfields for status argument from CO_fifo_cpyTok2U8 function and similar.
Definition: CO_fifo.h:472
CO_LSSmaster_fastscan_t
Parameters for LSS fastscan CO_LSSmaster_IdentifyFastscan.
Definition: CO_LSSmaster.h:407
CO_LSSmaster_t
LSS master object.
Definition: CO_LSSmaster.h:108
CO_GTWA_respErrorNone
@ CO_GTWA_respErrorNone
0 - No error or idle
Definition: CO_gateway_ascii.h:167
CO_GTWA_t::SDOtimeoutTime
uint16_t SDOtimeoutTime
Timeout time for SDO transfer in milliseconds, if no response.
Definition: CO_gateway_ascii.h:349
CO_GTWA_respErrorTimeOut
@ CO_GTWA_respErrorTimeOut
103 - Time-out (where applicable)
Definition: CO_gateway_ascii.h:175
CO_GTWA_respErrorLSSparameterStoringFailed
@ CO_GTWA_respErrorLSSparameterStoringFailed
504 - LSS parameter storing failed
Definition: CO_gateway_ascii.h:217
CO_fifo_t
Fifo object.
Definition: CO_fifo.h:60
CO_GTWA_respErrorErrorPassive
@ CO_GTWA_respErrorErrorPassive
300 - Error passive
Definition: CO_gateway_ascii.h:197
CO_GTWA_ST_LSS_SWITCH_GLOB
@ CO_GTWA_ST_LSS_SWITCH_GLOB
LSS 'lss_switch_glob'.
Definition: CO_gateway_ascii.h:239
CO_GTWA_ST_LSS_STORE
@ CO_GTWA_ST_LSS_STORE
LSS 'lss_store'.
Definition: CO_gateway_ascii.h:247
CO_GTWA_t::node_default
int16_t node_default
Default CANopen Node ID number is undefined (-1) at startup.
Definition: CO_gateway_ascii.h:319
CO_GTWA_ST_LSS_INQUIRE_ADDR_ALL
@ CO_GTWA_ST_LSS_INQUIRE_ADDR_ALL
LSS 'lss_inquire_addr', all parameters.
Definition: CO_gateway_ascii.h:251
CO_GTWA_respErrorUnsupportedNet
@ CO_GTWA_respErrorUnsupportedNet
106 - Unsupported net
Definition: CO_gateway_ascii.h:181
CO_NMT_Heartbeat.h
CANopen Network management and Heartbeat producer protocol.
CO_fifo_write
size_t CO_fifo_write(CO_fifo_t *fifo, const char *buf, size_t count, uint16_t *crc)
Write data into CO_fifo_t object.
int16_t
signed int int16_t
INTEGER16 in CANopen (0003h), 16-bit signed integer.
Definition: CO_driver.h:145
CO_GTWA_process
void CO_GTWA_process(CO_GTWA_t *gtwa, bool_t enable, uint32_t timeDifference_us, uint32_t *timerNext_us)
Process Gateway-ascii object.
CO_GTWA_ST_LED
@ CO_GTWA_ST_LED
print 'status' of the node
Definition: CO_gateway_ascii.h:261
CO_GTWA_respErrorUnsupportedNode
@ CO_GTWA_respErrorUnsupportedNode
107 - Unsupported node
Definition: CO_gateway_ascii.h:183
CO_GTWA_t::stateTimeoutTmr
uint32_t stateTimeoutTmr
Timeout timer for the current state.
Definition: CO_gateway_ascii.h:344
CO_GTWA_respErrorCode_t
CO_GTWA_respErrorCode_t
Response error codes as specified by CiA 309-3.
Definition: CO_gateway_ascii.h:165
CO_GTWA_respErrorReqNotSupported
@ CO_GTWA_respErrorReqNotSupported
100 - Request not supported
Definition: CO_gateway_ascii.h:169
CO_GTWA_respErrorPDOalreadyUsed
@ CO_GTWA_respErrorPDOalreadyUsed
400 - PDO already used
Definition: CO_gateway_ascii.h:207
CO_GTWA_respErrorCANactive
@ CO_GTWA_respErrorCANactive
305 - CAN active (at init or start-up)
Definition: CO_gateway_ascii.h:205
CO_GTWA_respErrorInternalState
@ CO_GTWA_respErrorInternalState
102 - Request not processed due to internal state
Definition: CO_gateway_ascii.h:173
NULL
#define NULL
NULL, for general usage.
Definition: CO_driver.h:135
CO_GTWA_ST_LOG
@ CO_GTWA_ST_LOG
print message 'log'
Definition: CO_gateway_ascii.h:257
CO_CONFIG_GTWA_LOG_BUF_SIZE
#define CO_CONFIG_GTWA_LOG_BUF_SIZE
Size of message log buffer in ASCII gateway object.
Definition: CO_config.h:632
CO_CONFIG_GTWA_COMM_BUF_SIZE
#define CO_CONFIG_GTWA_COMM_BUF_SIZE
Size of command buffer in ASCII gateway object.
Definition: CO_config.h:625
CO_GTWA_ST_WRITE_ABORTED
@ CO_GTWA_ST_WRITE_ABORTED
SDO 'write' (download) - aborted, purging remaining data.
Definition: CO_gateway_ascii.h:237
CO_GTWA_respErrorNoDefaultNetSet
@ CO_GTWA_respErrorNoDefaultNetSet
104 - No default net set
Definition: CO_gateway_ascii.h:177
CO_GTWA_t::respBufOffset
size_t respBufOffset
If only part of data has been successfully written into external application (with readCallback()),...
Definition: CO_gateway_ascii.h:336
CO_GTWA_t::logFifo
CO_fifo_t logFifo
CO_fifo_t object for message log (not pointer)
Definition: CO_gateway_ascii.h:389
CO_GTWA_ST_LSS_SWITCH_SEL
@ CO_GTWA_ST_LSS_SWITCH_SEL
LSS 'lss_switch_sel'.
Definition: CO_gateway_ascii.h:241
CO_fifo.h
FIFO circular buffer.
CO_GTWA_respErrorRunningOutOfMemory
@ CO_GTWA_respErrorRunningOutOfMemory
600 - Running out of memory
Definition: CO_gateway_ascii.h:221
CO_LEDs.h
CANopen Indicator specification (CiA 303-3 v1.4.0)
CO_GTWA_ST_LSS_ALLNODES
@ CO_GTWA_ST_LSS_ALLNODES
LSS 'lss_allnodes'.
Definition: CO_gateway_ascii.h:255
CO_GTWA_t::net_default
int32_t net_default
Default CANopen Net number is undefined (-1) at startup.
Definition: CO_gateway_ascii.h:317
CO_GTWA_t::SDOdataCopyStatus
bool_t SDOdataCopyStatus
Indicate status of data copy from / to SDO buffer.
Definition: CO_gateway_ascii.h:355
CO_GTWA_t::SDOblockTransferEnable
bool_t SDOblockTransferEnable
SDO block transfer enabled?
Definition: CO_gateway_ascii.h:351
CO_GTWA_t::state
CO_GTWA_state_t state
Current state of the gateway object.
Definition: CO_gateway_ascii.h:342
CO_LSS_address_t
The LSS address is a 128 bit number, uniquely identifying each node.
Definition: CO_LSS.h:162
CO_GTWA_respErrorCANbufferOverflow
@ CO_GTWA_respErrorCANbufferOverflow
303 - CAN buffer overflow
Definition: CO_gateway_ascii.h:201
CO_GTWA_t::timeDifference_us_cumulative
uint32_t timeDifference_us_cumulative
Sum of time difference from CO_GTWA_process() in case of respHold.
Definition: CO_gateway_ascii.h:340
CO_GTWA_ST_READ
@ CO_GTWA_ST_READ
SDO 'read' (upload)
Definition: CO_gateway_ascii.h:233
CO_GTWA_respErrorHeartbeatLost
@ CO_GTWA_respErrorHeartbeatLost
203 - Heartbeat lost
Definition: CO_gateway_ascii.h:191
CO_GTWA_log_print
void CO_GTWA_log_print(CO_GTWA_t *gtwa, const char *message)
Print message log string into fifo buffer.
CO_GTWA_ST_HELP
@ CO_GTWA_ST_HELP
print 'help' text
Definition: CO_gateway_ascii.h:259
CO_fifo_getSpace
static size_t CO_fifo_getSpace(CO_fifo_t *fifo)
Get free buffer space in CO_fifo_t object.
Definition: CO_fifo.h:138
CO_GTWA_t
CANopen Gateway-ascii object.
Definition: CO_gateway_ascii.h:296
uint8_t
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition: CO_driver.h:151
CO_GTWA_ST_LSS_SET_NODE
@ CO_GTWA_ST_LSS_SET_NODE
LSS 'lss_set_node'.
Definition: CO_gateway_ascii.h:243
CO_GTWA_t::respBufCount
size_t respBufCount
Actual size of data in respBuf.
Definition: CO_gateway_ascii.h:331
CO_GTWA_respErrorBootUp
@ CO_GTWA_respErrorBootUp
205 - Boot-up
Definition: CO_gateway_ascii.h:195
CO_GTWA_respErrorLSSbitRateNotSupported
@ CO_GTWA_respErrorLSSbitRateNotSupported
503 - LSS bit-rate not supported
Definition: CO_gateway_ascii.h:215