kbLogger 2.0.b1
The automotive ready test and logging program.
|
This class defines the API of the Translator.
#include <translator.h>
Public Slots | |
Translator related functions. | |
void | setVerbose (int iVerboseLevel) |
Sets the verbosity of the Translator. | |
void | trace (QString strText) |
Sends a trace message to the connected TraceViewer. | |
QString | translate (QString strFrom) |
Translate a hex string. Call this from within the script. | |
TranslatorProtocol * | createProtocol (QString strName, QString strMessageIdPositions) |
Creates an user defined protocol. | |
TranslatorProtocol * | createProtocol (QString strName, unsigned int uOffset, QString strMessageIdPositions) |
Creates an user defined protocol. | |
TranslatorProtocol * | getProtocol (QString strName) |
Gets an user defined protocol. | |
TranslatorMessage * | createMessage (QString strName, quint64 uMessageId) |
Creates a user defined message. | |
TranslatorMessage * | createMessage (QString strName, QString strMessageId) |
Creates a user defined message. | |
TranslatorMessage * | getMessage (QString strMessageHandle) |
Returns the message for that given message handle. | |
TranslatorSignalUserArray * | createArray (QString strName, unsigned int uOffset=0) |
Creates an user defined array. | |
TranslatorSignalUserBool * | createBool (QString strName, unsigned int uOffset=0) |
Creates a Bool signal. | |
TranslatorSignalUserEnum8 * | createEnum8 (QString strName, unsigned int uOffset=0) |
Creates a Enum8 signal. | |
TranslatorSignalUserEnum16 * | createEnum16 (QString strName, unsigned int uOffset=0) |
Creates a Enum16 signal. | |
TranslatorSignalUserEnum32 * | createEnum32 (QString strName, unsigned int uOffset=0) |
Creates a Enum32 signal. | |
TranslatorSignalUserFloat32 * | createFloat32 (QString strName, unsigned int uOffset=0) |
Creates a Float32 signal. | |
TranslatorSignalUserFloat64 * | createFloat64 (QString strName, unsigned int uOffset=0) |
Creates a Float64 signal. | |
TranslatorSignalUserInt8 * | createInt8 (QString strName, unsigned int uOffset=0) |
Creates a Int8 signal. | |
TranslatorSignalUserInt16 * | createInt16 (QString strName, unsigned int uOffset=0) |
Creates a Int16 signal. | |
TranslatorSignalUserInt32 * | createInt32 (QString strName, unsigned int uOffset=0) |
Creates a Int32 signal. | |
TranslatorSignalUserInt64 * | createInt64 (QString strName, unsigned int uOffset=0) |
Creates a Int64 signal. | |
TranslatorSignalUserSpace * | createSpace (QString strName, unsigned int uOffset=0) |
Creates an user defined empty space. | |
TranslatorSignalUserString * | createString (QString strName, unsigned int uOffset=0) |
Creates an user defined string. | |
TranslatorSignalUserStruct * | createStruct (QString strName, unsigned int uOffset=0) |
Creates an user defined struct. | |
TranslatorSignalUserUint8 * | createUint8 (QString strName, unsigned int uOffset=0) |
Creates a Uint8 signal. | |
TranslatorSignalUserUint16 * | createUint16 (QString strName, unsigned int uOffset=0) |
Creates a Uint16 signal. | |
TranslatorSignalUserUint32 * | createUint32 (QString strName, unsigned int uOffset=0) |
Creates a Uint32 signal. | |
TranslatorSignalUserUint64 * | createUint64 (QString strName, unsigned int uOffset=0) |
Creates a Uint64 signal. | |
ScriptValue | extractSignal (QString strText, QString strVariableName) |
Extracts a variable from the given message, which was already translated by the TranslatorObject. | |
|
slot |
Creates an user defined array.
This defines a static or variable array of the same signal. The signal can also be a structure.
The example below shows an array, which starts after an offset of 3 bytes and repeats its signal 5 times.
Example:
strArrayName | The name of the array. |
uOffset | The offset between the previous parameter and the array. |
|
slot |
Creates an user defined bool signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and signal. |
|
slot |
Creates an user defined Enum16 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Enum32 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Enum8 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Float32 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Float64 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Int16 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Int32 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Int64 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Int8 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates a user defined message.
This function creates a message with a longer message ID.
strMessageName | The name of the message to create. |
strMessageId | The message ID as a hex string. |
|
slot |
Creates a user defined message.
strMessageName | The name of the message to create. |
uMessageId | The message ID of the message. |
|
slot |
Creates a protocol.
The parameter strMessageIdPositions contains a description where in the byte stream the relevant message Ids can be found. For example, he string "0-2,4" means, the 32bit value from byte 0, 1, 3 and 4 is the ID for this message.
Example:
strProtocolName | The name of the protocol. |
strMessageIdPositions | The message ID description string. |
|
slot |
Creates a protocol.
The parameter strMessageIdPositions contains a description where in the byte stream the relevant message Ids can be found. For example, he string "0-2,4" means, the 32bit value from byte 0, 1, 2 and 4 is the ID for this message. If the parameter uOffset is e.g. 5, the 32bit value from byte 5, 6, 7 and 9 is the ID for this message.
Example:
strProtocolName | The name of the protocol. |
uOffset | The offset between the beginning of the message and the relevant bytes of the protocol. |
strMessageIdPositions | The message ID description string. |
|
slot |
Creates an user defined space.
The example below shows a space, which starts after an offset of 3 bytes and has a length of 8 bytes.
Example:
strSpaceName | The name of the space. |
uOffset | The offset between the previous parameter and the space. |
|
slot |
Creates an user defined string.
The example below shows a string, which starts after an offset of 3 bytes and has a length of 8 bytes.
Example:
strStringName | The name of the string. |
uOffset | The offset between the previous parameter and the string. |
|
slot |
Creates an user defined struct.
This defines a struct of the different signals. The signals can also be an array.
The example below shows a struct, which starts after an offset of 3 bytes and contains multiple signals.
Example:
strStructName | The name of the struct. |
uOffset | The offset between the previous parameter and the struct. |
|
slot |
Creates an user defined Uint16 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Uint32 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Uint64 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Creates an user defined Uint8 signal.
Example:
strSignalName | The name of the signal. |
uOffset | The offset between the previous and this signal. |
|
slot |
Extracts a variable from the given message, which was already translated by the TranslatorObject.
Example
strText | The text which contains the variables. |
strVariableName | The name of the variable to search. |
|
slot |
Returns the message for that given message handle.
strMessageHandle |
|
slot |
Gets an user defined protocol.
strName | The protocol name. |
|
slot |
Sets the verbosity of the Translator.
Useful for debugging user scripts within the TranslatorObject.
iVerboseLevel | 0 means quite. 1 and 2 means more output. |
|
slot |
Sends a trace message to the connected TraceViewer.
Example:
strText | The text to send to the TraceViewer. |
|
slot |
Translate a hex string. Call this from within the script.
strFrom | The hex string to translate. |