YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Header.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_OS_HEADER_H
8#define YARP_OS_HEADER_H
9
10#include <yarp/os/Portable.h>
11#include <yarp/conf/numeric.h>
12
13#include <string>
14
15namespace yarp::os {
16
23 public Portable
24{
25public:
26 using count_t = std::uint32_t;
27
32 static constexpr count_t npos = static_cast<count_t>(-1);
33
37 explicit Header();
38
46 Header(count_t count, yarp::conf::float64_t time, std::string frameId = {});
47
53 Header(const Header& rhs);
54
60 Header(Header&& rhs) noexcept;
61
65 ~Header() override;
66
73 Header& operator=(const Header& rhs);
74
81 Header& operator=(Header&& rhs) noexcept;
82
88 count_t count() const;
89
95 yarp::conf::float64_t timeStamp() const;
96
102 std::string frameId() const;
103
109 bool isValid() const;
110
115 void update();
116
121 void update(yarp::conf::float64_t time);
122
128 void setFrameId(std::string frameId);
129
130
131 // Documented in Portable
132 bool read(ConnectionReader& connection) override;
133
134 // Documented in Portable
135 bool write(ConnectionWriter& connection) const override;
136
137private:
138#ifndef DOXYGEN_SHOULD_SKIP_THIS
139 class Private;
140 Private* mPriv;
141#endif // DOXYGEN_SHOULD_SKIP_THIS
142};
143
144
145} // namespace yarp::os
146
147#endif // YARP_OS_HEADER_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.
An abstraction for a sequence number, time stamp and/or frame id.
Definition Header.h:24
std::uint32_t count_t
Definition Header.h:26
This is a base class for objects that can be both read from and be written to the YARP network.
Definition Portable.h:25
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