|
| CommandManager (bool p_bIsActive=true, QObject *parent=0) |
|
| CommandManager (const QByteArray &p_qByteArrayJsonDoc, bool p_bIsActive=true, QObject *parent=0) |
|
| CommandManager (const QJsonDocument &p_jsonDoc, bool p_bIsActive=true, QObject *parent=0) |
|
void | clear () |
|
QMap< QString, Command > & | commandMap () |
|
bool | hasCommand (const QString &p_sCommand) const |
|
void | insert (const QJsonDocument &p_jsonDocument) |
|
void | insert (const QString &p_sKey, const QString &p_sDescription) |
|
void | insert (const QString &p_sKey, const Command &p_command) |
|
bool | isActive () const |
|
void | setStatus (bool status) |
|
virtual void | update (UTILSLIB::Subject *p_pSubject) |
|
Command & | operator[] (const QString &key) |
|
const Command | operator[] (const QString &key) const |
|
virtual | ~IObserver () |
|
Definition at line 36 of file commandmanager.h.
◆ clear()
void CommandManager::clear |
( |
| ) |
|
◆ commandMap()
QMap< QString, Command > & COMMUNICATIONLIB::CommandManager::commandMap |
( |
| ) |
|
|
inline |
Returns the lookup table of all available commands.
- Returns
- the command lookup table.
Definition at line 184 of file commandmanager.h.
◆ hasCommand()
bool COMMUNICATIONLIB::CommandManager::hasCommand |
( |
const QString & |
p_sCommand | ) |
const |
|
inline |
Checks if a command is managed;
- Parameters
-
p_sCommand | COmmand to check. |
- Returns
- true if part of command manager, false otherwise.
Definition at line 191 of file commandmanager.h.
◆ insert() [1/3]
void CommandManager::insert |
( |
const QJsonDocument & |
p_jsonDocument | ) |
|
Inserts commands encoded in a json document. Attention existing items are overwritten.
- Parameters
-
p_jsonDocument | JSON document containing commands. |
Definition at line 85 of file commandmanager.cpp.
◆ insert() [2/3]
void CommandManager::insert |
( |
const QString & |
p_sKey, |
|
|
const Command & |
p_command |
|
) |
| |
Inserts a new command and emmits dataChanged signal.
- Parameters
-
Definition at line 117 of file commandmanager.cpp.
◆ insert() [3/3]
void CommandManager::insert |
( |
const QString & |
p_sKey, |
|
|
const QString & |
p_sDescription |
|
) |
| |
Inserts a single command. Attention existing items are overwritten.
- Parameters
-
p_jsonDocument | JSON document containing commands. |
Definition at line 109 of file commandmanager.cpp.
◆ isActive()
bool COMMUNICATIONLIB::CommandManager::isActive |
( |
| ) |
const |
|
inline |
Returns if CommandManager is active. If true, this manager parses incomming commands.
- Returns
- if true, incomming commands are parsed.
Definition at line 198 of file commandmanager.h.
◆ operator[]() [1/2]
Command & CommandManager::operator[] |
( |
const QString & |
key | ) |
|
Subscript operator [] to access commands by command name
- Parameters
-
[in] | key | the command key word. |
- Returns
- Command object related to command key word.
Definition at line 165 of file commandmanager.cpp.
◆ operator[]() [2/2]
const Command CommandManager::operator[] |
( |
const QString & |
key | ) |
const |
Subscript operator [] to access commands by command name
- Parameters
-
- Returns
- Command object related to command key word.
Definition at line 172 of file commandmanager.cpp.
◆ response
void COMMUNICATIONLIB::CommandManager::response |
( |
QString |
p_sReply, |
|
|
Command |
p_command |
|
) |
| |
|
signal |
Is triggered when a reply is available. Commands are the emmiters of this signal -> access trough parent.
- Parameters
-
p_sReply | the plain or JSON formatted reply. |
p_command | Command which send the response |
◆ setStatus()
void COMMUNICATIONLIB::CommandManager::setStatus |
( |
bool |
status | ) |
|
|
inline |
◆ triggered
void COMMUNICATIONLIB::CommandManager::triggered |
( |
Command |
p_command | ) |
|
|
signal |
Is emitted when a command is ready to send
- Parameters
-
p_command | Command which should be send. |
◆ update()
The documentation for this class was generated from the following files: