Package org.yamcs.tctm.ccsds
Class TcTransferFrame
java.lang.Object
org.yamcs.tctm.ccsds.TcTransferFrame
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).
- 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 Summary
Modifier and TypeFieldDescriptionprotected final int
protected final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
byte[]
getData()
returns the data of the frame - that is frame header + frame data + optional checksumint
returns the offset of the data end inside the frameint
returns the offset of the data start inside the framelong
int
int
boolean
isBypass()
boolean
void
setBypass
(boolean bypass) void
setCmdControl
(boolean cmdControl) void
setCommands
(List<PreparedCommand> commands) void
setDataEnd
(int end) void
setDataStart
(int start) void
setVcFrameSeq
(int vS) toString()
-
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 checksumThe frame data starts and ends at the offsets returned by
getDataStart()
andgetDataEnd()
respectively -
getDataStart
public int getDataStart()returns the offset of the data start inside the frameFor CCSDS TC frames the offset is always 5
-
getDataEnd
public int getDataEnd()returns the offset of the data end inside the frameFor 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
- Returns:
- the list of commands that compose this frame. It could be null (e.g. for BC frames)
-
setCommands
-
getGenerationTime
public long getGenerationTime() -
toString
-