30#define CO_CONFIG_TIME (CO_CONFIG_TIME_ENABLE | CO_CONFIG_GLOBAL_FLAG_CALLBACK_PRE | CO_CONFIG_GLOBAL_FLAG_OD_DYNAMIC)
33#if (((CO_CONFIG_TIME)&CO_CONFIG_TIME_ENABLE) != 0) || defined CO_DOXYGEN
62#define CO_TIME_MSG_LENGTH 6U
77#if (((CO_CONFIG_TIME)&CO_CONFIG_TIME_PRODUCER) != 0) || defined CO_DOXYGEN
83#if (((CO_CONFIG_TIME)&CO_CONFIG_FLAG_CALLBACK_PRE) != 0) || defined CO_DOXYGEN
84 void (*pFunctSignalPre)(
void* object);
87#if (((CO_CONFIG_TIME)&CO_CONFIG_FLAG_OD_DYNAMIC) != 0) || defined CO_DOXYGEN
109#
if (((CO_CONFIG_TIME)&CO_CONFIG_TIME_PRODUCER) != 0) || defined CO_DOXYGEN
114#if (((CO_CONFIG_TIME)&CO_CONFIG_FLAG_CALLBACK_PRE) != 0) || defined CO_DOXYGEN
138 (void)producerInterval_ms;
144#if ((CO_CONFIG_TIME)&CO_CONFIG_TIME_PRODUCER) != 0
CANopen Network management and Heartbeat producer protocol.
CANopen Object Dictionary interface.
Interface between CAN hardware and CANopenNode.
bool_t CO_TIME_process(CO_TIME_t *TIME, bool_t NMTisPreOrOperational, uint32_t timeDifference_us)
Process TIME object.
#define CO_TIME_MSG_LENGTH
Length of the TIME message.
Definition CO_TIME.h:62
static void CO_TIME_set(CO_TIME_t *TIME, uint32_t ms, uint16_t days, uint32_t producerInterval_ms)
Set current time.
Definition CO_TIME.h:137
CO_ReturnError_t CO_TIME_init(CO_TIME_t *TIME, OD_entry_t *OD_1012_cobIdTimeStamp, CO_CANmodule_t *CANdevRx, uint16_t CANdevRxIdx, CO_CANmodule_t *CANdevTx, uint16_t CANdevTxIdx, uint32_t *errInfo)
Initialize TIME object.
void CO_TIME_initCallbackPre(CO_TIME_t *TIME, void *object, void(*pFunctSignalPre)(void *object))
Initialize TIME callback function.
#define NULL
NULL, for general usage.
Definition CO_driver.h:123
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition CO_driver.h:132
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition CO_driver.h:133
uint_fast8_t bool_t
Boolean data type for general use.
Definition CO_driver.h:126
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition CO_driver.h:131
CO_ReturnError_t
Return values of some CANopen functions.
Definition CO_driver.h:449
Complete CAN module object.
Definition CO_driver.h:268
Configuration object for CAN transmit message for specific CANopenNode Object.
Definition CO_driver.h:250
TIME producer and consumer object.
Definition CO_TIME.h:67
uint32_t ms
Milliseconds after midnight.
Definition CO_TIME.h:69
OD_extension_t OD_1012_extension
Extension for OD object.
Definition CO_TIME.h:88
uint32_t producerTimer_ms
Sync producer timer.
Definition CO_TIME.h:79
bool_t isProducer
True, if device is TIME producer.
Definition CO_TIME.h:74
uint16_t residual_us
Residual microseconds calculated inside CO_TIME_process()
Definition CO_TIME.h:71
uint32_t producerInterval_ms
Interval for time producer in milli seconds.
Definition CO_TIME.h:78
volatile void * CANrxNew
Variable indicates, if new TIME message received from CAN bus.
Definition CO_TIME.h:76
void * functSignalObjectPre
From CO_TIME_initCallbackPre() or NULL.
Definition CO_TIME.h:85
CO_CANtx_t * CANtxBuff
CAN transmit buffer.
Definition CO_TIME.h:81
CO_CANmodule_t * CANdevTx
From CO_TIME_init()
Definition CO_TIME.h:80
uint16_t days
Number of days since January 1, 1984.
Definition CO_TIME.h:70
bool_t isConsumer
True, if device is TIME consumer.
Definition CO_TIME.h:72
Object Dictionary entry for one OD object.
Definition CO_ODinterface.h:272
Extension of OD object, which can optionally be specified by application in initialization phase with...
Definition CO_ODinterface.h:245