java.lang.Object
org.yamcs.mqtt.DefaultMqttToTmPacketConverter
- All Implemented Interfaces:
MqttToTmPacketConverter
Default MQTT packet converter - it uses the message payload as the TM packet: one mqtt message = one tm packet
It sets the
-
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
-
DefaultMqttToTmPacketConverter
public DefaultMqttToTmPacketConverter()
-
-
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
-