Alex exoskeleton
ALEX SoftwareDocumentation
Classes | Functions
CO_time.h File Reference
#include <CO_driver.h>
#include "CO_SDO.h"
Include dependency graph for CO_time.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CO_time_t
 Time object, usable for timestamping - Defined in CANOpen code. More...
 

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)
 

Detailed Description

CANopen time interface.

Author
Janez Paternoster

This file is part of CANopenSocket, a Linux implementation of CANopen stack with master functionality. Project home page is https://github.com/CANopenNode/CANopenSocket. CANopenSocket is based on CANopenNode: https://github.com/CANopenNode/CANopenNode.

CANopenSocket is free and open source software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file CO_time.h.

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.