YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
StampWithFrame.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026-2026 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_OS_STAMPWITHFRAME_H
7#define YARP_OS_STAMPWITHFRAME_H
8
9#include <yarp/os/Portable.h>
10#include <yarp/conf/numeric.h>
11
12#include <string>
13
14namespace yarp::os {
15
22 public Portable
23{
24public:
25 using count_t = std::uint32_t;
26
31 static constexpr count_t npos = static_cast<count_t>(-1);
32
36 explicit StampWithFrame();
37
45 StampWithFrame(count_t count, yarp::conf::float64_t time, std::string frameId = {});
46
53
60
64 ~StampWithFrame() override;
65
72 StampWithFrame& operator=(const StampWithFrame& rhs);
73
80 StampWithFrame& operator=(StampWithFrame&& rhs) noexcept;
81
87 count_t count() const;
88
94 yarp::conf::float64_t timeStamp() const;
95
101 std::string frameId() const;
102
108 bool isValid() const;
109
114 void update();
115
120 void update(yarp::conf::float64_t time);
121
127 void setFrameId(std::string frameId);
128
129
130 // Documented in Portable
131 bool read(ConnectionReader& connection) override;
132
133 // Documented in Portable
134 bool write(ConnectionWriter& connection) const override;
135
136private:
137#ifndef DOXYGEN_SHOULD_SKIP_THIS
138 class Private;
139 Private* mPriv;
140#endif // DOXYGEN_SHOULD_SKIP_THIS
141};
142
143
144} // namespace yarp::os
145
146#endif // YARP_OS_STAMPWITHFRAME_H
A mini-server for performing network communication in the background.
An interface for reading from a network connection.
An interface for writing to a network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
Definition Portable.h:25
An abstraction for a sequence number, time stamp and/or frame id.
double float64_t
Definition numeric.h:77
An interface to the operating system, including Port based communication.
#define YARP_os_API
Definition api.h:18