|
cc_tools_qt
Common Environment for Protocol Analysis.
|
#include "cc_tools_qt/ToolsMessage.h"
Main interface class used by CommsChampion Tools to display and manipulate messages.
Inherits QObject.
Public Types | |
| using | DataSeq = std::vector< std::uint8_t > |
| Type for sequence of raw bytes. | |
| using | Ptr = std::unique_ptr< ToolsMessage > |
| Pointer to message object. | |
| enum class | Type { Invalid , Received , Sent , NumOfValues } |
| Type of the message. More... | |
Public Member Functions | |
| virtual | ~ToolsMessage () noexcept |
| Destructor. | |
| bool | assign (const ToolsMessage &other) |
| Assign contents of other message to this ones. | |
| bool | decodeData (const DataSeq &data) |
| Decode (or deserialise) message contents. | |
| DataSeq | encodeData () const |
| Encode (or serialise) message contents. | |
| QString | idAsString () const |
| Get string representation of message ID. | |
| bool | isValid () const |
| Check the message contents are valid. | |
| const char * | name () const |
| Get message name. | |
| bool | refreshMsg () |
| Refresh message contents. | |
| void | reset () |
| Reset message contents to default constructed values. | |
Protected Member Functions | |
| virtual bool | assignImpl (const ToolsMessage &other)=0 |
| Polymophic assignment functionality. | |
| virtual bool | decodeDataImpl (const DataSeq &data)=0 |
| Polymorphic deserialisation functionality. | |
| virtual DataSeq | encodeDataImpl () const =0 |
| Polymorphic serialisation functionality. | |
| virtual QString | idAsStringImpl () const |
| Polymophic functionality to get string representation of message ID. | |
| virtual bool | isValidImpl () const =0 |
| Polymorphic validity check functionality. | |
| virtual const char * | nameImpl () const =0 |
| Polymorphic name retrieval functionality. | |
| virtual qlonglong | numericIdImpl () const =0 |
| Polymophic functionality to get numeric message ID. | |
| virtual bool | refreshMsgImpl ()=0 |
| Polymorphic refresh functionality. | |
| virtual void | resetImpl ()=0 |
| Polymorphic reset functionality. | |
|
strong |
|
virtualdefaultnoexcept |
Destructor.
virtual to allow polymorphic destruction
| bool cc_tools_qt::ToolsMessage::assign | ( | const ToolsMessage & | other | ) |
Assign contents of other message to this ones.
|
protectedpure virtual |
Polymophic assignment functionality.
Invoked by assign().
| bool cc_tools_qt::ToolsMessage::decodeData | ( | const DataSeq & | data | ) |
Decode (or deserialise) message contents.
Invokes decodeDataImpl().
|
protectedpure virtual |
Polymorphic deserialisation functionality.
Invoked by decodeData().
| ToolsMessage::DataSeq cc_tools_qt::ToolsMessage::encodeData | ( | ) | const |
Encode (or serialise) message contents.
Invokes encodeDataImpl().
|
protectedpure virtual |
Polymorphic serialisation functionality.
Invoked by encodeData().
| QString cc_tools_qt::ToolsMessage::idAsString | ( | ) | const |
Get string representation of message ID.
Invokes idAsStringImpl().
|
protectedvirtual |
Polymophic functionality to get string representation of message ID.
Invoked by idAsString().
| bool cc_tools_qt::ToolsMessage::isValid | ( | ) | const |
Check the message contents are valid.
Invokes isValidImpl().
|
protectedpure virtual |
Polymorphic validity check functionality.
Invoked by isValid().
| const char * cc_tools_qt::ToolsMessage::name | ( | ) | const |
Get message name.
Invokes virtual nameImpl().
|
protectedpure virtual |
Polymorphic name retrieval functionality.
Invoked by name().
|
protectedpure virtual |
Polymophic functionality to get numeric message ID.
Invoked by idAsString().
| bool cc_tools_qt::ToolsMessage::refreshMsg | ( | ) |
Refresh message contents.
Needs to be invoked by the CommsChampion Tools when some field get modified. Invokes refreshMsgImpl().
|
protectedpure virtual |
Polymorphic refresh functionality.
Invoked by refresh().
|
protectedpure virtual |
Polymorphic reset functionality.
Invoked by reset().