Simple date/time representation used by the scanner's clock.
More...
#include <Timestamp.hpp>
|
| | Timestamp (int second=0, int minute=0, int hour=0, int day=1, int month=1, int year=1970) |
| | Construct a Timestamp with explicit components.
|
| |
| | Timestamp () |
| | Default constructor (1970-01-01 00:00:00).
|
| |
| | Timestamp (std::vector< std::byte > buff) |
| | Construct a Timestamp from a raw byte buffer.
|
| |
| | ~Timestamp ()=default |
| |
| std::tuple< int, int, int, int, int, int > | asTuple () const |
| | Return all components as a tuple.
|
| |
| std::tuple< int, int, int > | asDate () const |
| | Return the date portion as a tuple.
|
| |
|
| int | second |
| | Seconds (0–59).
|
| |
| int | minute |
| | Minutes (0–59).
|
| |
| int | hour |
| | Hours (0–23).
|
| |
| int | day |
| | Day of month (1–31).
|
| |
| int | month |
| | Month (1–12).
|
| |
| int | year |
| | Four-digit year.
|
| |
Simple date/time representation used by the scanner's clock.
◆ Timestamp() [1/3]
| OpenSRX::Timestamp::Timestamp |
( |
int | second = 0, |
|
|
int | minute = 0, |
|
|
int | hour = 0, |
|
|
int | day = 1, |
|
|
int | month = 1, |
|
|
int | year = 1970 ) |
|
inline |
Construct a Timestamp with explicit components.
- Parameters
-
| second | Seconds (0–59). |
| minute | Minutes (0–59). |
| hour | Hours (0–23). |
| day | Day of month (1–31). |
| month | Month (1–12). |
| year | Four-digit year. |
◆ Timestamp() [2/3]
| OpenSRX::Timestamp::Timestamp |
( |
| ) |
|
|
inline |
Default constructor (1970-01-01 00:00:00).
◆ Timestamp() [3/3]
| OpenSRX::Timestamp::Timestamp |
( |
std::vector< std::byte > | buff | ) |
|
Construct a Timestamp from a raw byte buffer.
- Parameters
-
| buff | Buffer containing encoded date/time data. |
◆ ~Timestamp()
| OpenSRX::Timestamp::~Timestamp |
( |
| ) |
|
|
default |
◆ asDate()
| std::tuple< int, int, int > OpenSRX::Timestamp::asDate |
( |
| ) |
const |
|
inline |
Return the date portion as a tuple.
- Returns
- (year, month, day).
◆ asTuple()
| std::tuple< int, int, int, int, int, int > OpenSRX::Timestamp::asTuple |
( |
| ) |
const |
|
inline |
Return all components as a tuple.
- Returns
- (year, month, day, hour, minute, second).
◆ day
| int OpenSRX::Timestamp::day |
◆ hour
| int OpenSRX::Timestamp::hour |
◆ minute
| int OpenSRX::Timestamp::minute |
◆ month
| int OpenSRX::Timestamp::month |
◆ second
| int OpenSRX::Timestamp::second |
◆ year
| int OpenSRX::Timestamp::year |
The documentation for this class was generated from the following file: