Generic description of the ECMG <=> SCS protocol.
More...
#include <tsECMGSCS.h>
|
| Protocol () |
| Default constructor.
|
|
void | add (TAG cmd_tag) |
| This method declares a command tag in the protocol.
|
|
void | add (TAG cmd_tag, TAG param_tag, const Protocol *compound, size_t min_count, size_t max_count) |
| This method declares a command tag in the protocol and one of its parameters.
|
|
void | add (TAG cmd_tag, TAG param_tag, size_t min_size, size_t max_size, size_t min_count, size_t max_count) |
| This method declares a command tag in the protocol and one of its parameters.
|
|
virtual void | buildErrorResponse (const tlv::MessageFactory &, tlv::MessagePtr &) const override |
| Error response creation.
|
|
virtual void | factory (const tlv::MessageFactory &, tlv::MessagePtr &) const override |
| Generic factory method.
|
|
bool | hasVersion () const |
| Check if the protocol has a protocol version number.
|
|
virtual UString | name () const override |
| Get the protocol name (for information only).
|
|
void | setVersion (VERSION v) |
| Change the protocol version number.
|
|
VERSION | version () const |
| Get the protocol version number.
|
|
Generic description of the ECMG <=> SCS protocol.
◆ factory()
Generic factory method.
This pure virtual method must be implemented by subclasses. This method is invoked by the MessageFactory after analysis of the command and parameters. All actual parameters have been checked for consistency with the protocol.
- Parameters
-
[in] | mf | The message factory which analyzed the binary message. |
[out] | msg | Safe pointer to the new message. |
Implements ts::tlv::Protocol.
◆ buildErrorResponse()
Error response creation.
This method creates an error response from the result of the analysis of a faulty incoming message.
- Parameters
-
[in] | mf | The message factory which analyzed the binary message. |
[out] | msg | Safe pointer to the new error message. |
Implements ts::tlv::Protocol.
◆ name()
virtual UString ts::ecmgscs::Protocol::name |
( |
| ) |
const |
|
overridevirtual |
Get the protocol name (for information only).
- Returns
- The protocol name.
Implements ts::tlv::Protocol.
◆ hasVersion()
bool ts::tlv::Protocol::hasVersion |
( |
| ) |
const |
|
inlineinherited |
Check if the protocol has a protocol version number.
- Returns
- True if the message has a protocol version number.
◆ version()
VERSION ts::tlv::Protocol::version |
( |
| ) |
const |
|
inlineinherited |
Get the protocol version number.
- Returns
- The protocol version number.
◆ setVersion()
void ts::tlv::Protocol::setVersion |
( |
VERSION |
v | ) |
|
|
inlineinherited |
Change the protocol version number.
- Parameters
-
[in] | v | The new protocol version number. |
◆ add() [1/3]
void ts::tlv::Protocol::add |
( |
TAG |
cmd_tag | ) |
|
|
inlineinherited |
This method declares a command tag in the protocol.
Required only for commands without parameters.
- Parameters
-
◆ add() [2/3]
void ts::tlv::Protocol::add |
( |
TAG |
cmd_tag, |
|
|
TAG |
param_tag, |
|
|
size_t |
min_size, |
|
|
size_t |
max_size, |
|
|
size_t |
min_count, |
|
|
size_t |
max_count |
|
) |
| |
|
inherited |
This method declares a command tag in the protocol and one of its parameters.
Must be invoked for each parameter of each command.
- Parameters
-
[in] | cmd_tag | Message tag. |
[in] | param_tag | Parameter tag. |
[in] | min_size | Minimum allowed size for the parameter value. |
[in] | max_size | Maximum allowed size for the parameter value. |
[in] | min_count | Minimum number of occurences of this parameter in the command. |
[in] | max_count | Maximum number of occurences of this parameter in the command. |
◆ add() [3/3]
void ts::tlv::Protocol::add |
( |
TAG |
cmd_tag, |
|
|
TAG |
param_tag, |
|
|
const Protocol * |
compound, |
|
|
size_t |
min_count, |
|
|
size_t |
max_count |
|
) |
| |
|
inherited |
This method declares a command tag in the protocol and one of its parameters.
Same as add() but with a parameter which is a compound TLV structure.
- Parameters
-
[in] | cmd_tag | Message tag. |
[in] | param_tag | Parameter tag. |
[in] | compound | Protocol describing the compound TLV structure. |
[in] | min_count | Minimum number of occurences of this parameter in the command. |
[in] | max_count | Maximum number of occurences of this parameter in the command. |
The documentation for this class was generated from the following file: