TSDuck v3.40-3968
MPEG Transport Stream Toolkit
|
Base class for DVB SimulCrypt TLV messages operating on channels. More...
#include <tstlvChannelMessage.h>
Public Member Functions | |
ChannelMessage (const tlv::MessageFactory &fact, TAG tag_ch_id) | |
Constructor. | |
ChannelMessage (TAG tag, uint16_t ch_id=0) | |
Constructor. | |
ChannelMessage (VERSION protocol_version, TAG tag, uint16_t ch_id=0) | |
Constructor. | |
virtual UString | dump (size_t indent=0) const |
Dump routine. | |
void | forceProtocolVersion (VERSION version) |
Force the protocol version number to another value. | |
bool | hasProtocolVersion () const |
Check if the message has a protocol version number. | |
VERSION | protocolVersion () const |
Get the protocol version number. | |
void | serialize (Serializer &zer) const |
Serialize the message using a Serializer. | |
TAG | tag () const |
Get the message tag. | |
Public Attributes | |
uint16_t | channel_id = 0 |
Channel id. | |
Protected Types | |
using | superclass = ChannelMessage |
Alias for the superclass of subclasses. | |
Protected Member Functions | |
virtual void | serializeParameters (Serializer &zer) const =0 |
Parameter serialization. | |
Static Protected Member Functions | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
static UString | dumpDecimal (size_t indent, const UString &name, const INT &value) |
Dump an integer value in decimal (helper routine for subclasses). | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
static UString | dumpHexa (size_t indent, const UString &name, const INT &value) |
Dump an integer value in hexadecimal (helper routine for subclasses). | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
static UString | dumpInteger (size_t indent, const UString &name, const INT &value) |
Dump an integer value (helper routine for subclasses). | |
static UString | dumpOptional (size_t indent, const UString &name, bool has_value, const ByteBlock &value, uint32_t flags=UString::HEXA|UString::ASCII) |
Dump an optional byte block (helper routine for subclasses). | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
static UString | dumpOptionalDecimal (size_t indent, const UString &name, bool has_value, const INT &value) |
Dump an optional integer value in decimal (helper routine for subclasses). | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
static UString | dumpOptionalDecimal (size_t indent, const UString &name, const std::optional< INT > &value) |
Dump an optional integer value in decimal (helper routine for subclasses). | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
static UString | dumpOptionalHexa (size_t indent, const UString &name, bool has_value, const INT &value) |
Dump an optional integer value in hexadecimal (helper routine for subclasses). | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
static UString | dumpOptionalHexa (size_t indent, const UString &name, const std::optional< INT > &value) |
Dump an optional integer value in hexadecimal (helper routine for subclasses). | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
static UString | dumpOptionalInteger (size_t indent, const UString &name, bool has_value, const INT &value) |
Dump an optional integer value (helper routine for subclasses). | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
static UString | dumpOptionalInteger (size_t indent, const UString &name, const std::optional< INT > &value) |
Dump an optional integer value (helper routine for subclasses). | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> | |
static UString | dumpVector (size_t indent, const UString &name, const std::vector< INT > &val, UString(*toString)(INT)=nullptr) |
Dump a vector of integer values (helper routine for subclasses). | |
static UString | dumpVector (size_t indent, const UString &name, const UStringVector &value) |
Dump a vector of strings (helper routine for subclasses). | |
Base class for DVB SimulCrypt TLV messages operating on channels.
ts::tlv::ChannelMessage::ChannelMessage | ( | TAG | tag, |
uint16_t | ch_id = 0 |
||
) |
Constructor.
[in] | tag | Message tag. |
[in] | ch_id | Channel id. |
ts::tlv::ChannelMessage::ChannelMessage | ( | const tlv::MessageFactory & | fact, |
TAG | tag_ch_id | ||
) |
|
inlineinherited |
Check if the message has a protocol version number.
|
inlineinherited |
Get the protocol version number.
|
inlineinherited |
Force the protocol version number to another value.
Use with care.
[in] | version | The protocol version number. |
|
inlineinherited |
Get the message tag.
|
inherited |
Serialize the message using a Serializer.
[in,out] | zer | A TLV serializer. |
|
virtualinherited |
Dump routine.
Create a string representing the message content. The implementation in the base class dumps the common fields. Can be used by subclasses.
[in] | indent | Left indentation size. |
Reimplemented in ts::duck::LogSection, ts::duck::LogTable, ts::duck::ClearECM, ts::duck::Error, ts::ecmgscs::ChannelSetup, ts::ecmgscs::ChannelTest, ts::ecmgscs::ChannelStatus, ts::ecmgscs::ChannelClose, ts::ecmgscs::ChannelError, ts::ecmgscs::StreamSetup, ts::ecmgscs::StreamTest, ts::ecmgscs::StreamStatus, ts::ecmgscs::StreamCloseRequest, ts::ecmgscs::StreamCloseResponse, ts::ecmgscs::StreamError, ts::ecmgscs::CWProvision, ts::ecmgscs::ECMResponse, ts::emmgmux::ChannelSetup, ts::emmgmux::ChannelTest, ts::emmgmux::ChannelStatus, ts::emmgmux::ChannelClose, ts::emmgmux::ChannelError, ts::emmgmux::StreamSetup, ts::emmgmux::StreamTest, ts::emmgmux::StreamStatus, ts::emmgmux::StreamCloseRequest, ts::emmgmux::StreamCloseResponse, ts::emmgmux::StreamError, ts::emmgmux::StreamBWRequest, ts::emmgmux::StreamBWAllocation, and ts::emmgmux::DataProvision.
|
protectedpure virtualinherited |
Parameter serialization.
This protected pure virtual method must be implemented by subclasses to serialize their parameters.
[in,out] | zer | A TLV serializer. |
Implemented in ts::duck::LogSection, ts::duck::LogTable, ts::duck::ClearECM, ts::duck::Error, ts::ecmgscs::ChannelSetup, ts::ecmgscs::ChannelTest, ts::ecmgscs::ChannelStatus, ts::ecmgscs::ChannelClose, ts::ecmgscs::ChannelError, ts::ecmgscs::StreamSetup, ts::ecmgscs::StreamTest, ts::ecmgscs::StreamStatus, ts::ecmgscs::StreamCloseRequest, ts::ecmgscs::StreamCloseResponse, ts::ecmgscs::StreamError, ts::ecmgscs::CWProvision, ts::ecmgscs::ECMResponse, ts::emmgmux::ChannelSetup, ts::emmgmux::ChannelTest, ts::emmgmux::ChannelStatus, ts::emmgmux::ChannelClose, ts::emmgmux::ChannelError, ts::emmgmux::StreamSetup, ts::emmgmux::StreamTest, ts::emmgmux::StreamStatus, ts::emmgmux::StreamCloseRequest, ts::emmgmux::StreamCloseResponse, ts::emmgmux::StreamError, ts::emmgmux::StreamBWRequest, ts::emmgmux::StreamBWAllocation, and ts::emmgmux::DataProvision.
|
staticprotectedinherited |
Dump a vector of strings (helper routine for subclasses).
[in] | indent | Left indentation size. |
[in] | name | Parameter name. |
[in] | value | Vector of strings. |
|
staticprotectedinherited |
Dump a vector of integer values (helper routine for subclasses).
Signed integer types are dumped in decimal, unsigned types in hexadecimal.
INT | An integer type. |
[in] | indent | Left indentation size. |
[in] | name | Parameter name. |
[in] | val | Vector of integer values. |
[in] | toString | Optional function to convert an INT value into a string. |
|
staticprotectedinherited |
Dump an optional byte block (helper routine for subclasses).
[in] | indent | Left indentation size. |
[in] | name | Parameter name. |
[in] | has_value | If false, no value is available, return an empty string. |
[in] | value | Byte block. |
[in] | flags | Hexa dump flags for ts::Hexa(). |
|
inlinestaticprotectedinherited |
Dump an integer value (helper routine for subclasses).
Signed integer types are dumped in decimal, unsigned types in hexadecimal.
INT | An integer type. |
[in] | indent | Left indentation size. |
[in] | name | Parameter name. |
[in] | value | Integer value. |
|
inlinestaticprotectedinherited |
Dump an optional integer value in decimal (helper routine for subclasses).
INT | An integer type. |
[in] | indent | Left indentation size. |
[in] | name | Parameter name. |
[in] | has_value | If false, no value is available, return an empty string. |
[in] | value | Integer value. |
|
inlinestaticprotectedinherited |
Dump an optional integer value in hexadecimal (helper routine for subclasses).
INT | An integer type. |
[in] | indent | Left indentation size. |
[in] | name | Parameter name. |
[in] | has_value | If false, no value is available, return an empty string. |
[in] | value | Integer value. |
|
inlinestaticprotectedinherited |
Dump an optional integer value (helper routine for subclasses).
Signed integer types are dumped in decimal, unsigned types in hexadecimal.
INT | An integer type. |
[in] | indent | Left indentation size. |
[in] | name | Parameter name. |
[in] | has_value | If false, no value is available, return an empty string. |
[in] | value | Integer value. |
|
inlinestaticprotectedinherited |
Dump an optional integer value (helper routine for subclasses).
Signed integer types are dumped in decimal, unsigned types in hexadecimal.
INT | An integer type. |
[in] | indent | Left indentation size. |
[in] | name | Parameter name. |
[in] | value | Integer value. |