Interface MqttToTmPacketConverter

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 Type
    Method
    Description
    convert(org.eclipse.paho.client.mqttv3.MqttMessage message)
    Converts an incoming MQTT message to an iterable collection of TmPacket objects.
    void
    init(String yamcsInstance, String linkName, YConfiguration config)
    Called at initialisation; the config may be empty but won't be null.
  • Method Details

    • init

      void init(String yamcsInstance, String linkName, YConfiguration config)
      Called at initialisation; the config may be empty but won't be null.
    • convert

      Iterable<TmPacket> convert(org.eclipse.paho.client.mqttv3.MqttMessage message)
      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 Iterable may yield no elements if the message cannot be converted.

      Parameters:
      message - the MQTT message to be converted
      Returns:
      an Iterable of TmPacket objects, possibly empty