Representation of a date in DVB SimulCrypt protocols (ETSI TS 103 197).
More...
#include <tsSimulCryptDate.h>
|
static constexpr size_t | SIZE = 8 |
| Binary size in bytes of a DVB SimulCrypt date.
|
|
Representation of a date in DVB SimulCrypt protocols (ETSI TS 103 197).
A DVB SimulCrypt date is represented on 8 bytes:
- year: 2 bytes
- month: 1 byte
- day: 1 byte
- hour: 1 byte
- minute: 1 byte
- second: 1 byte
- hundredth: 1 byte
◆ SimulCryptDate() [1/3]
ts::SimulCryptDate::SimulCryptDate |
( |
const void * |
bin | ) |
|
|
inline |
Constructor from binary data.
- Parameters
-
[in] | bin | Address of an 8-byte binary DVB SimulCrypt date. |
◆ SimulCryptDate() [2/3]
ts::SimulCryptDate::SimulCryptDate |
( |
const Time & |
time | ) |
|
Constructor from a ts::Time.
- Parameters
-
[in] | time | Time value to set. |
◆ SimulCryptDate() [3/3]
ts::SimulCryptDate::SimulCryptDate |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day, |
|
|
int |
hour, |
|
|
int |
minute, |
|
|
int |
second, |
|
|
int |
hundredth |
|
) |
| |
Constructor from broken-down date fields.
- Parameters
-
[in] | year | Number of years. |
[in] | month | Number of months (1 to 12). |
[in] | day | Number of days (1 to 31). |
[in] | hour | Number of hours (0 to 23). |
[in] | minute | Number of minutes (0 to 59). |
[in] | second | Number of seconds (0 to 59). |
[in] | hundredth | Number of hundredths of seconds (0 to 99). |
◆ year()
int ts::SimulCryptDate::year |
( |
| ) |
const |
|
inline |
Get the number of years.
- Returns
- The number of years.
◆ month()
int ts::SimulCryptDate::month |
( |
| ) |
const |
|
inline |
Get the number of months.
- Returns
- The number of months.
◆ day()
int ts::SimulCryptDate::day |
( |
| ) |
const |
|
inline |
Get the number of days.
- Returns
- The number of days.
◆ hour()
int ts::SimulCryptDate::hour |
( |
| ) |
const |
|
inline |
Get the number of hours.
- Returns
- The number of hours.
◆ minute()
int ts::SimulCryptDate::minute |
( |
| ) |
const |
|
inline |
Get the number of minutes.
- Returns
- The number of minutes.
◆ second()
int ts::SimulCryptDate::second |
( |
| ) |
const |
|
inline |
Get the number of seconds.
- Returns
- The number of seconds.
◆ hundredth()
int ts::SimulCryptDate::hundredth |
( |
| ) |
const |
|
inline |
Get the number of hundredths of seconds.
- Returns
- The number of hundredths of seconds.
◆ setYear()
void ts::SimulCryptDate::setYear |
( |
int |
n | ) |
|
|
inline |
Set the number of years.
- Parameters
-
[in] | n | The number of years. |
◆ setMonth()
void ts::SimulCryptDate::setMonth |
( |
int |
n | ) |
|
|
inline |
Set the number of months.
- Parameters
-
[in] | n | The number of months. |
◆ setDay()
void ts::SimulCryptDate::setDay |
( |
int |
n | ) |
|
|
inline |
Set the number of days.
- Parameters
-
◆ setHour()
void ts::SimulCryptDate::setHour |
( |
int |
n | ) |
|
|
inline |
Set the number of hours.
- Parameters
-
[in] | n | The number of hours. |
◆ setMinute()
void ts::SimulCryptDate::setMinute |
( |
int |
n | ) |
|
|
inline |
Set the number of minutes.
- Parameters
-
[in] | n | The number of minutes. |
◆ setSecond()
void ts::SimulCryptDate::setSecond |
( |
int |
n | ) |
|
|
inline |
Set the number of seconds.
- Parameters
-
[in] | n | The number of seconds. |
◆ setHundredth()
void ts::SimulCryptDate::setHundredth |
( |
int |
n | ) |
|
|
inline |
Set the number of hundredths of seconds.
- Parameters
-
[in] | n | The number of hundredths of seconds. |
◆ getBinary()
void ts::SimulCryptDate::getBinary |
( |
const void * |
a | ) |
|
|
inline |
Read from memory (8 bytes).
- Parameters
-
[in] | a | Address of an 8-byte binary DVB SimulCrypt date. |
◆ putBinary()
void ts::SimulCryptDate::putBinary |
( |
void * |
a | ) |
const |
|
inline |
Write to memory (8 bytes).
- Parameters
-
[out] | a | Address of an 8-byte buffer for the binary DVB SimulCrypt date. |
◆ put() [1/2]
Put into a DVB SimulCrypt TLV messages.
- Parameters
-
[in,out] | zer | A TLV serializer. |
◆ put() [2/2]
Put as a complete TLV structure into a DVB SimulCrypt TLV messages.
- Parameters
-
[in,out] | zer | A TLV serializer. |
[in] | tag | Tag for the date parameter. |
◆ get()
Get from a DVB SimulCrypt TLV messages.
- Parameters
-
[in,out] | factory | A TLV message factory. |
[in] | tag | Tag for the date parameter. |
- Exceptions
-
◆ operator Time()
ts::SimulCryptDate::operator Time |
( |
| ) |
const |
Convert to a Time object.
- Returns
- The equivalent ts::Time object.
◆ operator UString()
ts::SimulCryptDate::operator UString |
( |
| ) |
const |
Convert to a string object.
- Returns
- The equivalent string.
The documentation for this class was generated from the following file: