YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Stamp.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_STAMP_H
8#define YARP_OS_STAMP_H
9
10#include <yarp/os/NetFloat64.h>
11#include <yarp/os/NetInt32.h>
12#include <yarp/os/Portable.h>
13
14
15namespace yarp::os {
16
21{
22private:
23 NetInt32 sequenceNumber;
24 NetFloat64 timeStamp;
25
26public:
30 explicit Stamp();
31
39 Stamp(int count, double time);
40
46 int getCount() const;
47
53 double getTime() const;
54
60 bool isValid() const;
61
68 int getMaxCount() const;
69
74 void update();
75
80 void update(double time);
81
82 // Documented in Portable
83 bool read(ConnectionReader& connection) override;
84
85 // Documented in Portable
86 bool write(ConnectionWriter& connection) const override;
87};
88
89} // namespace yarp::os
90
91#endif // YARP_OS_STAMP_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 time stamp and/or sequence number.
Definition Stamp.h:21
An interface to the operating system, including Port based communication.
std::int32_t NetInt32
Definition of the NetInt32 type.
Definition NetInt32.h:29
#define YARP_os_API
Definition api.h:18