Class TcTransferFrame

java.lang.Object
org.yamcs.tctm.ccsds.TcTransferFrame

public class TcTransferFrame extends Object
TC Transfer Frame as per

CCSDS RECOMMENDED STANDARD FOR TC SPACE DATA LINK PROTOCOL CCSDS 232.0-B-4 October 2021

Frame structure:

  • Transfer Frame Primary Header (5 bytes mandatory)
  • Transfer Frame Data Field (up to 1019 or 1017 bytes, mandatory)
  • Frame Error Control Field (2 bytes, optional).
The Transfer Frame Primary Header structure:
  • Transfer Frame Version Number (2 bits, mandatory)
  • Bypass Flag (1 bit, mandatory)
  • Control Command Flag (1 bit, mandatory)
  • Reserved Spare (2 bits, mandatory)
  • Spacecraft Identifier (10 bits, mandatory)
  • Virtual Channel Identifier (6 bits, mandatory)
  • Frame Length (10 bits, mandatory)
  • Frame Sequence Number (8 bits, mandatory)
  • Field Details

    • spacecraftId

      protected final int spacecraftId
    • virtualChannelId

      protected final int virtualChannelId
  • Constructor Details

    • TcTransferFrame

      public TcTransferFrame(byte[] data, int spacecraftId, int virtualChannelId)
  • Method Details

    • isCmdControl

      public boolean isCmdControl()
    • setCmdControl

      public void setCmdControl(boolean cmdControl)
    • isBypass

      public boolean isBypass()
    • setBypass

      public void setBypass(boolean bypass)
    • bypassFlag

      public int bypassFlag()
    • cmdControlFlag

      public int cmdControlFlag()
    • getData

      public byte[] getData()
      returns the data of the frame - that is frame header + frame data + optional checksum

      The frame data starts and ends at the offsets returned by getDataStart() and getDataEnd() respectively

    • getDataStart

      public int getDataStart()
      returns the offset of the data start inside the frame

      For CCSDS TC frames the offset is always 5

    • getDataEnd

      public int getDataEnd()
      returns the offset of the data end inside the frame

      For CCSDS TC frames this is the end of the frame or 2 bytes before depending whether error control is used or not.

    • setVcFrameSeq

      public void setVcFrameSeq(int vS)
    • getVcFrameSeq

      public int getVcFrameSeq()
    • setDataStart

      public void setDataStart(int start)
    • setDataEnd

      public void setDataEnd(int end)
    • getVirtualChannelId

      public int getVirtualChannelId()
    • getCommands

      public List<PreparedCommand> getCommands()
      Returns:
      the list of commands that compose this frame. It could be null (e.g. for BC frames)
    • setCommands

      public void setCommands(List<PreparedCommand> commands)
    • getGenerationTime

      public long getGenerationTime()
    • toString

      public String toString()
      Overrides:
      toString in class Object