Class RefMdbPacketGenerator

java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.tests.RefMdbPacketGenerator
All Implemented Interfaces:
com.google.common.util.concurrent.Service, ProcessorService, TmPacketProvider

public class RefMdbPacketGenerator extends com.google.common.util.concurrent.AbstractService implements TmPacketProvider
Generates packets according to the refmdb database. Works either as a ProcessorService part of a processor or as TmPacketProvider in the integration tests
  • Field Details

    • headerLength

      public final int headerLength
      See Also:
    • pkt1Length

      public final int pkt1Length
      See Also:
    • pkt1_1Length

      public final int pkt1_1Length
      See Also:
    • pkt1_2Length

      public final int pkt1_2Length
      See Also:
    • pkt1_3Length

      public final int pkt1_3Length
      See Also:
    • pkt1_4Length

      public final int pkt1_4Length
      See Also:
    • pkt1_5Length

      public final int pkt1_5Length
      See Also:
    • pkt1_6Length

      public final int pkt1_6Length
      See Also:
    • pkt1_7Length

      public final int pkt1_7Length
      See Also:
    • pkt1_8Length

      public final int pkt1_8Length
      See Also:
    • pkt1_9Length

      public final int pkt1_9Length
      See Also:
    • pkt1_10Length

      public final int pkt1_10Length
      See Also:
    • pkt1_11Length

      public final int pkt1_11Length
      See Also:
    • pkt4Length

      public final int pkt4Length
      See Also:
    • pkt5Length

      public final int pkt5Length
    • pkt6Length

      public final int pkt6Length
      See Also:
    • pkt2Length

      public final int pkt2Length
      See Also:
    • pkt1_ListLength

      public final int pkt1_ListLength
      See Also:
    • pkt1_AndLength

      public final int pkt1_AndLength
      See Also:
    • pkt1_OrLength

      public final int pkt1_OrLength
      See Also:
    • pkt1_And_OrLength

      public final int pkt1_And_OrLength
      See Also:
    • contVerifCmdAck_Length

      public final int contVerifCmdAck_Length
      See Also:
    • algVerifCmdAck_Length

      public final int algVerifCmdAck_Length
      See Also:
    • pIntegerPara1_1

      public volatile short pIntegerPara1_1
    • pIntegerPara1_1_1

      public volatile byte pIntegerPara1_1_1
    • pFloatPara1_1_2

      public volatile short pFloatPara1_1_2
    • pFloatPara1_1_3

      public volatile float pFloatPara1_1_3
    • pEnumerationPara1_1_4

      public volatile byte pEnumerationPara1_1_4
    • pStringPara1_1_5

      public volatile String pStringPara1_1_5
    • pIntegerPara1_1_6

      public volatile int pIntegerPara1_1_6
    • pIntegerPara1_1_7

      public volatile byte pIntegerPara1_1_7
    • pIntegerPara1_1_8

      public volatile long pIntegerPara1_1_8
    • pIntegerPara1_11_1

      public volatile int pIntegerPara1_11_1
    • pIntegerPara1_11_1_unsigned_value

      public volatile long pIntegerPara1_11_1_unsigned_value
    • pFloatPara1_20_1

      public volatile float pFloatPara1_20_1
    • pTimePara_sec6_1

      public volatile int pTimePara_sec6_1
    • pTimePara_sec6_2

      public volatile byte pTimePara_sec6_2
    • pLEIntegerPara1_2_1

      public volatile byte pLEIntegerPara1_2_1
    • pLEIntegerPara1_2_2

      public volatile short pLEIntegerPara1_2_2
    • pLEIntegerPara1_2_3

      public volatile int pLEIntegerPara1_2_3
    • pLEFloatPara1_2_1

      public volatile short pLEFloatPara1_2_1
    • pLEFloatPara1_2_2

      public volatile float pLEFloatPara1_2_2
    • pFixedStringPara1_3_1

      public static final String pFixedStringPara1_3_1
      See Also:
    • pFixedStringPara1_3_2

      public static final String pFixedStringPara1_3_2
      See Also:
    • pTerminatedStringPara1_3_3

      public static final String pTerminatedStringPara1_3_3
      See Also:
    • pTerminatedStringPara1_3_4

      public static final String pTerminatedStringPara1_3_4
      See Also:
    • pPrependedSizeStringPara1_3_5

      public static final String pPrependedSizeStringPara1_3_5
      See Also:
    • pPrependedSizeStringPara1_3_6

      public static final String pPrependedSizeStringPara1_3_6
      See Also:
    • pFixedStringPara1_3_7

      public static final String pFixedStringPara1_3_7
      See Also:
    • pStringFloatFSPara1_4_1

      public String pStringFloatFSPara1_4_1
    • pStringFloatTSCPara1_4_2

      public String pStringFloatTSCPara1_4_2
    • pStringFloatTSSCPara1_4_3

      public static final String pStringFloatTSSCPara1_4_3
      See Also:
    • pStringFloatFSBPara1_4_4

      public static final String pStringFloatFSBPara1_4_4
      See Also:
    • pStringFloatPSPara1_4_5

      public static final String pStringFloatPSPara1_4_5
      See Also:
    • pStringIntFixedPara1_5_1

      public static final String pStringIntFixedPara1_5_1
      See Also:
    • pStringIntTermPara1_5_2

      public String pStringIntTermPara1_5_2
    • pStringIntTermPara1_5_3

      public static final String pStringIntTermPara1_5_3
      See Also:
    • pStringIntPrePara1_5_4

      public static final String pStringIntPrePara1_5_4
      See Also:
    • pStringIntStrPara1_5_5

      public static final String pStringIntStrPara1_5_5
      See Also:
    • pFixedBinary1

      public static final byte[] pFixedBinary1
    • pPrependedSizeBinary1

      public static final byte[] pPrependedSizeBinary1
    • pStringEnumPara1_12_1

      public String pStringEnumPara1_12_1
    • pStringBooleanPara10_1

      public String pStringBooleanPara10_1
    • pIntegerPara2_1

      public static final int pIntegerPara2_1
      See Also:
    • pIntegerPara2_2

      public static final int pIntegerPara2_2
      See Also:
    • pkt7Length

      public final int pkt7Length
      See Also:
    • paggr1_member1

      public byte paggr1_member1
    • paggr1_member2

      public short paggr1_member2
    • paggr1_member3

      public float paggr1_member3
    • para_pkt8_count

      public final int para_pkt8_count
      See Also:
    • pkt8Length

      public final int pkt8Length
      See Also:
    • pkt9Length

      public final int pkt9Length
      See Also:
  • Constructor Details

    • RefMdbPacketGenerator

      public RefMdbPacketGenerator(String instance, String name, String spec)
    • RefMdbPacketGenerator

      public RefMdbPacketGenerator()
  • Method Details

    • init

      public void init(Processor proc, YConfiguration config, Object spec)
      Specified by:
      init in interface ProcessorService
      config - service configuration as specified in processor.yaml
      spec - passed by the user when creating the processor (for instance via the REST API)
    • setTmSink

      public void setTmSink(TmSink tmSink)
    • generate_PKT1_1

      public byte[] generate_PKT1_1()
    • generate_PKT1_2

      public byte[] generate_PKT1_2()
    • generate_PKT1_3

      public byte[] generate_PKT1_3()
    • generate_PKT14

      public byte[] generate_PKT14()
    • generate_PKT1_5

      public byte[] generate_PKT1_5()
    • generate_TM2_PKT1

      public byte[] generate_TM2_PKT1()
    • generate_PKT1_6

      public byte[] generate_PKT1_6(int pIntegerPara16_1, int pIntegerPara16_2)
      Generate a packet with configurable content
    • generate_PKT1_6

      public byte[] generate_PKT1_6(int pIntegerPara16_1, int pIntegerPara16_2, long rectime, long gentime)
      Generate a packet with configurable content
    • generate_PKT1_7

      public byte[] generate_PKT1_7()
    • generate_PKT1_8

      public byte[] generate_PKT1_8(int pIntegerPara18_1, int pIntegerPara18_2)
    • generate_PKT1_9

      public byte[] generate_PKT1_9()
    • generate_PKT1_10

      public byte[] generate_PKT1_10(int pIntegerPara1_10_1, int pEnumerationPara1_10_2, float pFloatPara1_10_3)
    • generate_PKT1_11

      public byte[] generate_PKT1_11()
    • generate_PKT1_12

      public byte[] generate_PKT1_12()
    • generate_PKT4

      public byte[] generate_PKT4()
    • generate_PKT5

      public byte[] generate_PKT5()
    • generate_PKT6

      public byte[] generate_PKT6()
    • generate_PKT2

      public byte[] generate_PKT2()
    • generate_PKT1_List

      public ByteBuffer generate_PKT1_List()
    • generate_PKT1_AND

      public ByteBuffer generate_PKT1_AND()
    • generate_PKT1_OR_1

      public ByteBuffer generate_PKT1_OR_1()
    • generate_PKT1_AND_OR_1

      public ByteBuffer generate_PKT1_AND_OR_1()
    • generate_PKT1_AND_OR_2

      public ByteBuffer generate_PKT1_AND_OR_2()
    • generate_PKT1

      public byte[] generate_PKT1(int integerPara1_1, int packetType, short integerPara1_2)
    • generateContVerifCmdAck

      public ByteBuffer generateContVerifCmdAck(short cmdId, byte stage, int result)
    • generateAlgVerifCmdAck

      public ByteBuffer generateAlgVerifCmdAck(short cmdId, short packetSeq, byte stage, int result)
    • generate_PKT3

      public byte[] generate_PKT3()
    • setGenerationTime

      public void setGenerationTime(long genTime)
      set the generation time used to send the packets. If TimeEncoding.INVALID_INSTANT is used, the current time will be sent
      Parameters:
      genTime -
    • generate_PKT7

      public byte[] generate_PKT7()
    • generate_PKT8

      public byte[] generate_PKT8()
    • generate_PKT9

      public byte[] generate_PKT9(short obId, int v)
    • generate_PKT10

      public byte[] generate_PKT10()
    • generate_PKT11

      public byte[] generate_PKT11(String s, byte v)
    • generate_PKT12

      public byte[] generate_PKT12()
    • generate_PKT13

      public byte[] generate_PKT13()
    • getGenerationTime

      public long getGenerationTime()
    • simulateGap

      public void simulateGap(int apid)
    • isArchiveReplay

      public boolean isArchiveReplay()
      Description copied from interface: TmPacketProvider
      true if this is a replay from archive
      Specified by:
      isArchiveReplay in interface TmPacketProvider
      Returns:
    • doStart

      protected void doStart()
      Specified by:
      doStart in class com.google.common.util.concurrent.AbstractService
    • doStop

      protected void doStop()
      Specified by:
      doStop in class com.google.common.util.concurrent.AbstractService