TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::SimulCryptDate Class Reference

#include <tsSimulCryptDate.h>

Public Member Functions

 SimulCryptDate ()
 SimulCryptDate (const Time &time)
 SimulCryptDate (const void *bin)
 SimulCryptDate (int year, int month, int day, int hour, int minute, int second, int hundredth)
int day () const
void get (const tlv::MessageFactory &factory, tlv::TAG tag)
void getBinary (const void *a)
int hour () const
int hundredth () const
int minute () const
int month () const
 operator Time () const
 operator UString () const
void put (tlv::Serializer &zer) const
void put (tlv::Serializer &zer, tlv::TAG tag) const
void putBinary (void *a) const
void reset ()
int second () const
void setDay (int n)
void setHour (int n)
void setHundredth (int n)
void setMinute (int n)
void setMonth (int n)
void setSecond (int n)
void setYear (int n)
int year () const

Static Public Attributes

static constexpr size_t SIZE = 8

Detailed Description

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

Constructor & Destructor Documentation

◆ SimulCryptDate() [1/4]

ts::SimulCryptDate::SimulCryptDate ( )
inline

Default constructor.

◆ SimulCryptDate() [2/4]

ts::SimulCryptDate::SimulCryptDate ( const void * bin)
inline

Constructor from binary data.

Parameters
[in]binAddress of an 8-byte binary DVB SimulCrypt date.

◆ SimulCryptDate() [3/4]

ts::SimulCryptDate::SimulCryptDate ( const Time & time)

Constructor from a ts::Time.

Parameters
[in]timeTime value to set.

◆ SimulCryptDate() [4/4]

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]yearNumber of years.
[in]monthNumber of months (1 to 12).
[in]dayNumber of days (1 to 31).
[in]hourNumber of hours (0 to 23).
[in]minuteNumber of minutes (0 to 59).
[in]secondNumber of seconds (0 to 59).
[in]hundredthNumber of hundredths of seconds (0 to 99).

Member Function Documentation

◆ 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]nThe number of years.

◆ setMonth()

void ts::SimulCryptDate::setMonth ( int n)
inline

Set the number of months.

Parameters
[in]nThe number of months.

◆ setDay()

void ts::SimulCryptDate::setDay ( int n)
inline

Set the number of days.

Parameters
[in]nThe number of days.

◆ setHour()

void ts::SimulCryptDate::setHour ( int n)
inline

Set the number of hours.

Parameters
[in]nThe number of hours.

◆ setMinute()

void ts::SimulCryptDate::setMinute ( int n)
inline

Set the number of minutes.

Parameters
[in]nThe number of minutes.

◆ setSecond()

void ts::SimulCryptDate::setSecond ( int n)
inline

Set the number of seconds.

Parameters
[in]nThe number of seconds.

◆ setHundredth()

void ts::SimulCryptDate::setHundredth ( int n)
inline

Set the number of hundredths of seconds.

Parameters
[in]nThe number of hundredths of seconds.

◆ reset()

void ts::SimulCryptDate::reset ( )
inline

Reset to a null value.

◆ getBinary()

void ts::SimulCryptDate::getBinary ( const void * a)
inline

Read from memory (8 bytes).

Parameters
[in]aAddress of an 8-byte binary DVB SimulCrypt date.

◆ putBinary()

void ts::SimulCryptDate::putBinary ( void * a) const
inline

Write to memory (8 bytes).

Parameters
[out]aAddress of an 8-byte buffer for the binary DVB SimulCrypt date.

◆ put() [1/2]

void ts::SimulCryptDate::put ( tlv::Serializer & zer) const
inline

Put into a DVB SimulCrypt TLV messages.

Parameters
[in,out]zerA TLV serializer.

◆ put() [2/2]

void ts::SimulCryptDate::put ( tlv::Serializer & zer,
tlv::TAG tag ) const
inline

Put as a complete TLV structure into a DVB SimulCrypt TLV messages.

Parameters
[in,out]zerA TLV serializer.
[in]tagTag for the date parameter.

◆ get()

void ts::SimulCryptDate::get ( const tlv::MessageFactory & factory,
tlv::TAG tag )

Get from a DVB SimulCrypt TLV messages.

Parameters
[in,out]factoryA TLV message factory.
[in]tagTag for the date parameter.
Exceptions
ts::tlv::DeserializationInternalErrorif not found.

◆ operator Time()

ts::SimulCryptDate::operator Time ( ) const

Convert to a Time object

Returns
The equivalent ts::Time object or Time::Epoch if the SimulCryptDate is not convertible to a Time value.

◆ operator UString()

ts::SimulCryptDate::operator UString ( ) const

Convert to a string object

Returns
The equivalent string.

Member Data Documentation

◆ SIZE

size_t ts::SimulCryptDate::SIZE = 8
staticconstexpr

Binary size in bytes of a DVB SimulCrypt date.


The documentation for this class was generated from the following file: