TSDuck v3.40-3968
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::ecmgscs::ChannelTest Class Reference

ECMG <=> SCS channel_test command. More...

#include <tsECMGSCS.h>

Inheritance diagram for ts::ecmgscs::ChannelTest:
Collaboration diagram for ts::ecmgscs::ChannelTest:

Public Member Functions

 ChannelTest (const ts::tlv::MessageFactory &fact)
 Constructor from a message factory.
 
 ChannelTest (const ts::tlv::Protocol &proto)
 Constructor with version from protocol.
 
 ChannelTest (ts::tlv::VERSION version)
 Constructor with version.
 
virtual ts::UString dump (size_t indent=0) const override
 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 (ts::tlv::Serializer &) const override
 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).
 

Detailed Description

ECMG <=> SCS channel_test command.

Constructor & Destructor Documentation

◆ ChannelTest() [1/3]

ts::ecmgscs::ChannelTest::ChannelTest ( ts::tlv::VERSION  version)
inline

Constructor with version.

Parameters
[in]versionProtocol version.

◆ ChannelTest() [2/3]

ts::ecmgscs::ChannelTest::ChannelTest ( const ts::tlv::Protocol proto)
inline

Constructor with version from protocol.

Parameters
[in]protoProtocol definition.

◆ ChannelTest() [3/3]

ts::ecmgscs::ChannelTest::ChannelTest ( const ts::tlv::MessageFactory fact)

Constructor from a message factory.

Parameters
[in]factMessage factory.

Member Function Documentation

◆ dump()

virtual ts::UString ts::ecmgscs::ChannelTest::dump ( size_t  indent = 0) const
overridevirtual

Dump routine.

Create a string representing the message content. The implementation in the base class dumps the common fields. Can be used by subclasses.

Parameters
[in]indentLeft indentation size.
Returns
A string representing the message.

Reimplemented from ts::tlv::Message.

◆ serializeParameters()

virtual void ts::ecmgscs::ChannelTest::serializeParameters ( ts::tlv::Serializer zer) const
overrideprotectedvirtual

Parameter serialization.

This protected pure virtual method must be implemented by subclasses to serialize their parameters.

Parameters
[in,out]zerA TLV serializer.

Implements ts::tlv::Message.

◆ hasProtocolVersion()

bool ts::tlv::Message::hasProtocolVersion ( ) const
inlineinherited

Check if the message has a protocol version number.

Returns
True if the message has a protocol version number.

◆ protocolVersion()

VERSION ts::tlv::Message::protocolVersion ( ) const
inlineinherited

Get the protocol version number.

Returns
The protocol version number.

◆ forceProtocolVersion()

void ts::tlv::Message::forceProtocolVersion ( VERSION  version)
inlineinherited

Force the protocol version number to another value.

Use with care.

Parameters
[in]versionThe protocol version number.

◆ tag()

TAG ts::tlv::Message::tag ( ) const
inlineinherited

Get the message tag.

Returns
The message tag.

◆ serialize()

void ts::tlv::Message::serialize ( Serializer zer) const
inherited

Serialize the message using a Serializer.

Parameters
[in,out]zerA TLV serializer.

◆ dumpVector() [1/2]

static UString ts::tlv::Message::dumpVector ( size_t  indent,
const UString name,
const UStringVector value 
)
staticprotectedinherited

Dump a vector of strings (helper routine for subclasses).

Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]valueVector of strings.
Returns
The formatted string with embedded new-lines.

◆ dumpVector() [2/2]

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
static UString ts::tlv::Message::dumpVector ( size_t  indent,
const UString name,
const std::vector< INT > &  val,
UString(*)(INT toString = nullptr 
)
staticprotectedinherited

Dump a vector of integer values (helper routine for subclasses).

Signed integer types are dumped in decimal, unsigned types in hexadecimal.

Template Parameters
INTAn integer type.
Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]valVector of integer values.
[in]toStringOptional function to convert an INT value into a string.
Returns
The formatted string with embedded new-lines.

◆ dumpOptional()

static UString ts::tlv::Message::dumpOptional ( size_t  indent,
const UString name,
bool  has_value,
const ByteBlock value,
uint32_t  flags = UString::HEXA|UString::ASCII 
)
staticprotectedinherited

Dump an optional byte block (helper routine for subclasses).

Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]has_valueIf false, no value is available, return an empty string.
[in]valueByte block.
[in]flagsHexa dump flags for ts::Hexa().
Returns
The formatted string with embedded new-lines.

◆ dumpDecimal()

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
static UString ts::tlv::Message::dumpDecimal ( size_t  indent,
const UString name,
const INT value 
)
inlinestaticprotectedinherited

Dump an integer value in decimal (helper routine for subclasses).

Template Parameters
INTAn integer type.
Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]valueInteger value.
Returns
The formatted string with embedded new-lines.

◆ dumpHexa()

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
static UString ts::tlv::Message::dumpHexa ( size_t  indent,
const UString name,
const INT value 
)
inlinestaticprotectedinherited

Dump an integer value in hexadecimal (helper routine for subclasses).

Template Parameters
INTAn integer type.
Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]valueInteger value.
Returns
The formatted string with embedded new-lines.

◆ dumpInteger()

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
static UString ts::tlv::Message::dumpInteger ( size_t  indent,
const UString name,
const INT value 
)
inlinestaticprotectedinherited

Dump an integer value (helper routine for subclasses).

Signed integer types are dumped in decimal, unsigned types in hexadecimal.

Template Parameters
INTAn integer type.
Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]valueInteger value.
Returns
The formatted string with embedded new-lines.

◆ dumpOptionalDecimal() [1/2]

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
static UString ts::tlv::Message::dumpOptionalDecimal ( size_t  indent,
const UString name,
bool  has_value,
const INT value 
)
inlinestaticprotectedinherited

Dump an optional integer value in decimal (helper routine for subclasses).

Template Parameters
INTAn integer type.
Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]has_valueIf false, no value is available, return an empty string.
[in]valueInteger value.
Returns
The formatted string with embedded new-lines.

◆ dumpOptionalDecimal() [2/2]

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
static UString ts::tlv::Message::dumpOptionalDecimal ( size_t  indent,
const UString name,
const std::optional< INT > &  value 
)
inlinestaticprotectedinherited

Dump an optional integer value in decimal (helper routine for subclasses).

Template Parameters
INTAn integer type.
Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]valueInteger value.
Returns
The formatted string with embedded new-lines.

◆ dumpOptionalHexa() [1/2]

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
static UString ts::tlv::Message::dumpOptionalHexa ( size_t  indent,
const UString name,
bool  has_value,
const INT value 
)
inlinestaticprotectedinherited

Dump an optional integer value in hexadecimal (helper routine for subclasses).

Template Parameters
INTAn integer type.
Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]has_valueIf false, no value is available, return an empty string.
[in]valueInteger value.
Returns
The formatted string with embedded new-lines.

◆ dumpOptionalHexa() [2/2]

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
static UString ts::tlv::Message::dumpOptionalHexa ( size_t  indent,
const UString name,
const std::optional< INT > &  value 
)
inlinestaticprotectedinherited

Dump an optional integer value in hexadecimal (helper routine for subclasses).

Template Parameters
INTAn integer type.
Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]valueInteger value.
Returns
The formatted string with embedded new-lines.

◆ dumpOptionalInteger() [1/2]

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
static UString ts::tlv::Message::dumpOptionalInteger ( size_t  indent,
const UString name,
bool  has_value,
const INT value 
)
inlinestaticprotectedinherited

Dump an optional integer value (helper routine for subclasses).

Signed integer types are dumped in decimal, unsigned types in hexadecimal.

Template Parameters
INTAn integer type.
Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]has_valueIf false, no value is available, return an empty string.
[in]valueInteger value.
Returns
The formatted string with embedded new-lines.

◆ dumpOptionalInteger() [2/2]

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
static UString ts::tlv::Message::dumpOptionalInteger ( size_t  indent,
const UString name,
const std::optional< INT > &  value 
)
inlinestaticprotectedinherited

Dump an optional integer value (helper routine for subclasses).

Signed integer types are dumped in decimal, unsigned types in hexadecimal.

Template Parameters
INTAn integer type.
Parameters
[in]indentLeft indentation size.
[in]nameParameter name.
[in]valueInteger value.
Returns
The formatted string with embedded new-lines.

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