Package org.yamcs.pus

Class PusCommandPostprocessor

java.lang.Object
org.yamcs.tctm.AbstractCommandPostProcessor
org.yamcs.pus.PusCommandPostprocessor
All Implemented Interfaces:
CommandPostprocessor

public class PusCommandPostprocessor extends AbstractCommandPostProcessor
  • Field Details

    • CCSDS_SEQCOUNT_PARA_NAME

      public static final String CCSDS_SEQCOUNT_PARA_NAME
      See Also:
    • OPTION_SCHEDULE_TIME

      public static final CommandOption OPTION_SCHEDULE_TIME
      Only registered when the pus11 block is present in the post-processor configuration - a link that doesn't declare support for PUS 11 scheduling doesn't offer this option (keeps it from cluttering command forms on links that only support PUS 22 scheduling, or neither).
    • OPTION_SUB_SCHEDULE_ID

      public static final CommandOption OPTION_SUB_SCHEDULE_ID
      Sub-schedule to insert the command into. Only registered (and only written into the TC(11,4)) when the pus11 -> subScheduleId block is present in the post-processor configuration.
    • OPTION_GROUP_ID

      public static final CommandOption OPTION_GROUP_ID
      Scheduling group to associate the command with. Only registered (and only written into the TC(11,4)) when the pus11 -> groupId block is present in the post-processor configuration.
    • OPTION_ORBIT_NUMBER

      public static final CommandOption OPTION_ORBIT_NUMBER
      Orbit number of the position tag to insert the command at (ST[22] position-based scheduling). Setting this (together with OPTION_ORBIT_ANGLE) wraps the command into a TC(22,4). Only registered when the pus22 block is present in the post-processor configuration.
    • OPTION_ORBIT_ANGLE

      public static final CommandOption OPTION_ORBIT_ANGLE
      Orbit angle (degrees, 0-360) of the position tag to insert the command at. Its mere presence is what triggers wrapping the command into a TC(22,4), exactly like OPTION_SCHEDULE_TIME triggers a TC(11,4).
    • OPTION_SUB_SCHEDULE_ID_22

      public static final CommandOption OPTION_SUB_SCHEDULE_ID_22
      Sub-schedule to insert the command into. Only registered (and only written into the TC(22,4)) when the pus22 -> subScheduleId block is present in the post-processor configuration.
    • OPTION_GROUP_ID_22

      public static final CommandOption OPTION_GROUP_ID_22
      Scheduling group to associate the command with. Only registered (and only written into the TC(22,4)) when the pus22 -> groupId block is present in the post-processor configuration.
    • seqFiller

      protected CcsdsSeqCountFiller seqFiller
    • timeEncoder

      protected CucTimeEncoder timeEncoder
  • Constructor Details

    • PusCommandPostprocessor

      public PusCommandPostprocessor()
  • Method Details

    • init

      public void init(String yamcsInstance, YConfiguration config, Link link)
      Description copied from interface: CommandPostprocessor
      Called to initialise the postprocessor. The link parameter can be used to register link actions.
      Specified by:
      init in interface CommandPostprocessor
      Overrides:
      init in class AbstractCommandPostProcessor
    • process

      public byte[] process(PreparedCommand pc)
      Description copied from interface: CommandPostprocessor
      processes the command and returns the binary buffer. Returns null if the command cannot be processed (e.g. its size does not correspond to what this processor expects). In this case, the post-processor is expected to fail the command in the command history (also filling in an appropriate reason)
      Returns:
      the processed command or null if the command cannot be processed
    • getBinaryLength

      public int getBinaryLength(PreparedCommand pc)
      Description copied from interface: CommandPostprocessor
      Return the size of the binary packet for this command.

      This is required in the frame links which bundle multiple commands together to know if the command will fit into the frame before post-processing it.

      Returns:
      the size of the binary packet which the method CommandPostprocessor.process(PreparedCommand) will return.