java.lang.Object
org.yamcs.mqtt.LeafMqttToTmPacketConverter
- All Implemented Interfaces:
MqttToTmPacketConverter
MQTT packet converter that works with LeafSpace ground stations.
Messages are JSON objects with two fields: timestamp and payload.
timestamp is UTC in ISO 8601 format and is used to set the Earth Reception Time (ERT).
payload is a string with the binary data encoded as a sequence of octets in hexadecimal.
Example:
{"timestamp": "2024-08-12T22:23:28.430897", "payload": "0x47 0x1c 0xa 0x2"}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(org.eclipse.paho.client.mqttv3.MqttMessage message) Converts an incoming MQTT message to an iterable collection of TmPacket objects.voidinit(String yamcsInstance, String linkName, YConfiguration config) Called at initialisation; the config may be empty but won't be null.
-
Constructor Details
-
LeafMqttToTmPacketConverter
public LeafMqttToTmPacketConverter()
-
-
Method Details
-
init
Description copied from interface:MqttToTmPacketConverterCalled at initialisation; the config may be empty but won't be null.- Specified by:
initin interfaceMqttToTmPacketConverter
-
convert
Description copied from interface:MqttToTmPacketConverterConverts an incoming MQTT message to an iterable collection of TmPacket objects.The implementation is responsible for setting the reception time and the data part of each TmPacket. Other fields in the TmPacket are optional and can be left unpopulated.
The returned
Iterablemay yield no elements if the message cannot be converted.- Specified by:
convertin interfaceMqttToTmPacketConverter- Parameters:
message- the MQTT message to be converted- Returns:
- an
Iterableof TmPacket objects, possibly empty
-