This class defines the API of the TranslatorMessage.
#include <translator.h>
|
|
TranslatorMessage * | copyValues () |
| Copy all signal values from RX to TX.
|
|
bool | isBigEndian () |
| Returns true in case of BigEndian.
|
|
bool | isLittleEndian () |
| Returns true in case of LittleEndian.
|
|
TranslatorMessage * | setBigEndian () |
| Switches the message to BigEndian.
|
|
TranslatorMessage * | setLittleEndian () |
| Switches the message to LittleEndian.
|
|
TranslatorMessage * | setCallback (QString strCallback) |
| Sets the callback function, which is called whenever this message was translated successfully.
|
|
TranslatorMessage * | setCallback (QString strTarget, QString strCallback) |
| Sets the callback function in a connected ScriptObject, which is called whenever this message was translated successfully.
|
|
TranslatorMessage * | setCallback (QString strProject, QString strTarget, QString strCallback) |
| Sets the callback function in a ScriptObject in another project, which is called whenever this message was translated successfully.
|
|
TranslatorMessage * | append (TranslatorSignal *pSignal) |
| Appends a signal.
|
|
TranslatorProtocol * | getProtocol () |
| Returns the signal with the given index.
|
|
TranslatorSignal * | getSignal (unsigned int uSignal) |
| Returns the signal with the given index.
|
|
TranslatorSignal * | getSignal (QString strSignal) |
| Returns the signal with the given name.
|
|
void | send (QString strTarget) |
| Sends the message.
|
|
void | send (QString strTarget, QString strMetadata) |
| Sends the message.
|
|
void | send (QString strTargetProject, QString strTarget, QString strMetadata) |
| Sends the message.
|
|
int | translate () |
| Translate the TX message in a dry run. Returns the complete length of the resulting message.
|
|
◆ append
Appends a signal to the message.
Example:
var message11 = tr.createMessage(0x01000001, "message11");
var signal1 = tr.createSignalBool("mySignal", myOffset);
var signal2 = tr.createSignalUint8("myUint8", myOffset).setHex();
message1.append(signal1).append(signal2);
- Parameters
-
pSignal | The handle of the signal. |
- Returns
- Returns the handle to the message or 0 in case of an error.
◆ getSignal
- Parameters
-
strSignal | Returns the signal with the given name. |
◆ send [1/3]
void send |
( |
QString | strTarget | ) |
|
|
slot |
- Parameters
-
strTarget | Sends the message. |
◆ send [2/3]
void send |
( |
QString | strTarget, |
|
|
QString | strMetadata ) |
|
slot |
- Parameters
-
strMetadata | Sends the message. |
◆ send [3/3]
void send |
( |
QString | strTargetProject, |
|
|
QString | strTarget, |
|
|
QString | strMetadata ) |
|
slot |
- Parameters
-
strMetadata | Sends the message. |
◆ setCallback [1/3]
- Parameters
-
strCallback | Sets the callback function, which is called whenever this message was translated successfully. |
◆ setCallback [2/3]
TranslatorMessage * setCallback |
( |
QString | strProject, |
|
|
QString | strTarget, |
|
|
QString | strCallback ) |
|
slot |
- Parameters
-
strCallback | Sets the callback function, which is called whenever this message was translated successfully. |
◆ setCallback [3/3]
- Parameters
-
strCallback | Sets the callback function, which is called whenever this message was translated successfully. |