- All Known Implementing Classes:
DefaultMqttToTmPacketConverter,LeafMqttToTmPacketConverter
public interface MqttToTmPacketConverter
Instances of this interfaces are run on the incoming MQTT messages to transform them to TM packets
-
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.
-
Method Details
-
init
Called at initialisation; the config may be empty but won't be null. -
convert
Converts 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.- Parameters:
message- the MQTT message to be converted- Returns:
- an
Iterableof TmPacket objects, possibly empty
-