![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tstlvMessage.h>

Public Member Functions | |
| virtual UString | dump (size_t indent=0) const |
| void | forceProtocolVersion (VERSION version) |
| bool | hasProtocolVersion () const |
| VERSION | protocolVersion () const |
| void | serialize (Serializer &zer) const |
| TAG | tag () const |
Protected Types | |
| using | superclass = Message |
Protected Member Functions | |
| Message (TAG tag) | |
| Message (VERSION protocol_version, TAG tag) | |
| virtual void | serializeParameters (Serializer &zer) const =0 |
Static Protected Member Functions | |
| template<typename INT> requires std::integral<INT> | |
| static UString | dumpDecimal (size_t indent, const UString &name, const INT &value) |
| template<typename INT> requires std::integral<INT> | |
| static UString | dumpHexa (size_t indent, const UString &name, const INT &value) |
| template<typename INT> requires std::integral<INT> | |
| static UString | dumpInteger (size_t indent, const UString &name, const INT &value) |
| static UString | dumpOptional (size_t indent, const UString &name, bool has_value, const ByteBlock &value, uint32_t flags=UString::HEXA|UString::ASCII) |
| template<typename INT> requires std::integral<INT> | |
| static UString | dumpOptionalDecimal (size_t indent, const UString &name, bool has_value, const INT &value) |
| template<typename INT> requires std::integral<INT> | |
| static UString | dumpOptionalDecimal (size_t indent, const UString &name, const std::optional< INT > &value) |
| template<typename INT> requires std::integral<INT> | |
| static UString | dumpOptionalHexa (size_t indent, const UString &name, bool has_value, const INT &value) |
| template<typename INT> requires std::integral<INT> | |
| static UString | dumpOptionalHexa (size_t indent, const UString &name, const std::optional< INT > &value) |
| template<typename INT> requires std::integral<INT> | |
| static UString | dumpOptionalInteger (size_t indent, const UString &name, bool has_value, const INT &value) |
| template<typename INT> requires std::integral<INT> | |
| static UString | dumpOptionalInteger (size_t indent, const UString &name, const std::optional< INT > &value) |
| template<typename INT> requires std::integral<INT> | |
| static UString | dumpVector (size_t indent, const UString &name, const std::vector< INT > &val, UString(*toString)(INT)=nullptr) |
| static UString | dumpVector (size_t indent, const UString &name, const UStringVector &value) |
Abstract base class for TLV messages
All messages use the same structure as the DVB interfaces defined in the "DVB Simulcrypt Head End" standard, that is to say a TLV protocol. The messages shall have the same generic format as all connection-oriented TLV DVB Simulcrypt protocols and illustrated as follow:
The version field is optional and defined by the protocol. A protocol decides if there is a leading version byte to each message
The protocols use the same byte order and parameter order as DVB Simulcrypt protocols: For parameters with a size two or more bytes, the first byte to be transmitted will be the most significant byte. This is commonly known as "big endian" or "MSB first". Parameters do not need to be ordered within the generic message.
|
protected |
Alias for the superclass of subclasses.
|
protected |
Protected constructor for subclasses.
| [in] | tag | Message tag. |
|
inline |
Check if the message has a protocol version number.
|
inline |
Get the protocol version number.
|
inline |
Force the protocol version number to another value. Use with care.
| [in] | version | The protocol version number. |
|
inline |
Get the message tag.
| void ts::tlv::Message::serialize | ( | Serializer & | zer | ) | const |
Serialize the message using a Serializer.
| [in,out] | zer | A TLV serializer. |
|
virtual |
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::ClearECM, ts::duck::Error, ts::duck::LogSection, ts::duck::LogTable, ts::ecmgscs::ChannelClose, ts::ecmgscs::ChannelError, ts::ecmgscs::ChannelSetup, ts::ecmgscs::ChannelStatus, ts::ecmgscs::ChannelTest, ts::ecmgscs::CWProvision, ts::ecmgscs::ECMResponse, ts::ecmgscs::StreamCloseRequest, ts::ecmgscs::StreamCloseResponse, ts::ecmgscs::StreamError, ts::ecmgscs::StreamSetup, ts::ecmgscs::StreamStatus, ts::ecmgscs::StreamTest, ts::emmgmux::ChannelClose, ts::emmgmux::ChannelError, ts::emmgmux::ChannelSetup, ts::emmgmux::ChannelStatus, ts::emmgmux::ChannelTest, ts::emmgmux::DataProvision, ts::emmgmux::StreamBWAllocation, ts::emmgmux::StreamBWRequest, ts::emmgmux::StreamCloseRequest, ts::emmgmux::StreamCloseResponse, ts::emmgmux::StreamError, ts::emmgmux::StreamSetup, ts::emmgmux::StreamStatus, and ts::emmgmux::StreamTest.
|
protectedpure virtual |
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::ClearECM, ts::duck::Error, ts::duck::LogSection, ts::duck::LogTable, ts::ecmgscs::ChannelClose, ts::ecmgscs::ChannelError, ts::ecmgscs::ChannelSetup, ts::ecmgscs::ChannelStatus, ts::ecmgscs::ChannelTest, ts::ecmgscs::CWProvision, ts::ecmgscs::ECMResponse, ts::ecmgscs::StreamCloseRequest, ts::ecmgscs::StreamCloseResponse, ts::ecmgscs::StreamError, ts::ecmgscs::StreamSetup, ts::ecmgscs::StreamStatus, ts::ecmgscs::StreamTest, ts::emmgmux::ChannelClose, ts::emmgmux::ChannelError, ts::emmgmux::ChannelSetup, ts::emmgmux::ChannelStatus, ts::emmgmux::ChannelTest, ts::emmgmux::DataProvision, ts::emmgmux::StreamBWAllocation, ts::emmgmux::StreamBWRequest, ts::emmgmux::StreamCloseRequest, ts::emmgmux::StreamCloseResponse, ts::emmgmux::StreamError, ts::emmgmux::StreamSetup, ts::emmgmux::StreamStatus, and ts::emmgmux::StreamTest.
|
staticprotected |
Dump a vector of strings (helper routine for subclasses).
| [in] | indent | Left indentation size. |
| [in] | name | Parameter name. |
| [in] | value | Vector of strings. |
|
staticprotected |
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(). |
|
inlinestaticprotected |
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. |
|
inlinestaticprotected |
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. |
|
inlinestaticprotected |
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. |
|
inlinestaticprotected |
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. |
|
inlinestaticprotected |
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. |
|
staticprotected |
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. |