Alex exoskeleton
ALEX SoftwareDocumentation
Functions
CO_time.c File Reference
#include "CO_time.h"
#include <time.h>
#include <string.h>
Include dependency graph for CO_time.c:

Go to the source code of this file.

Functions

void CO_time_init (CO_time_t *tm, CO_SDO_t *SDO, uint64_t *epochTimeBaseMs, uint32_t *epochTimeOffsetMs, uint16_t idx_OD_time)
 
void CO_time_process (CO_time_t *tm)
 

Function Documentation

void CO_time_init ( CO_time_t tm,
CO_SDO_t *  SDO,
uint64_t *  epochTimeBaseMs,
uint32_t epochTimeOffsetMs,
uint16_t  idx_OD_time 
)

Initialize time object.

Function must be called in the communication reset section.

Parameters
tmThis object will be initialized.
SDOSDO server object.
epochTimeBaseMsPointer to milliseconds since Unix Epoch (1.1.1970, 00:00:00, UTC) - base.
epochTimeOffsetMspointer to offset. Set to 0 at program startup and increments since then.
idx_OD_timeIndex in Object Dictionary.

Definition at line 89 of file CO_time.c.

void CO_time_process ( CO_time_t tm)

Process time object.

Function must be called cyclically in 1ms intervals.

Parameters
tmThis object.

Definition at line 109 of file CO_time.c.