Robot Raconteur Companion C++ Library
Loading...
Searching...
No Matches
SensorDataUtil.h
Go to the documentation of this file.
1
23
24#include "DateTimeUtil.h"
25
26#pragma once
27
28namespace RobotRaconteur
29{
30namespace Companion
31{
32namespace Util
33{
34
43com::robotraconteur::sensordata::SensorDataHeaderPtr FillSensorDataHeader(
44 RobotRaconteur::RobotRaconteurNodePtr node, com::robotraconteur::device::DeviceInfoPtr device_info, uint64_t seqno)
45{
46 com::robotraconteur::sensordata::SensorDataHeaderPtr ret(new com::robotraconteur::sensordata::SensorDataHeader());
47 ret->seqno = seqno;
48 ret->ts = TimeSpec2Now(node, device_info);
49 return ret;
50}
51
52} // namespace Util
53} // namespace Companion
54} // namespace RobotRaconteur
com::robotraconteur::datetime::TimeSpec2 TimeSpec2Now(const RobotRaconteur::RobotRaconteurNodePtr &node, const com::robotraconteur::device::DeviceInfoPtr &info)
Get the current TimeSpec from the node, stored as TimeSpec2.
com::robotraconteur::sensordata::SensorDataHeaderPtr FillSensorDataHeader(RobotRaconteur::RobotRaconteurNodePtr node, com::robotraconteur::device::DeviceInfoPtr device_info, uint64_t seqno)
Fill in a SensorDataHeader with the current time and sequence number.
Definition SensorDataUtil.h:43