blob: 0e9f89c7686b25f21d7936b188a96dc156e077a0 [file] [log] [blame]
The MQTT protocol module was written initially with an external codec (see http://git.eclipse.org/c/titan/titan.ProtocolModules.MQTT.git/)
The reason for this was that the variable length encoding of remLength cannot be directly handled by RAW alone; some external assistance is needed;
A new protocol module has been written (based on the RAW codec), which can handle encoding directions. But for the decoding the external codec should be used.
To enable more throughout fuzzing (negative testing) the TTCN-3 types were extended with fields that stores the length of fields of the length of payload, based on the MQTT standard.
The RAW encoder cannot compute correctly the remLength field, but calling the f_adjustLength function on the result of the RAW encoding will produce the correct remLength and the correct message to be sent.