Package org.yamcs.tctm.csp
Class CspPacket
java.lang.Object
org.yamcs.tctm.csp.CspPacket
Helper class for accessing CubeSat Space Protocol v1 fields
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getBytes()
boolean
static boolean
getCrcFlag
(byte[] packet) int
static int
getDestination
(byte[] packet) int
boolean
int
int
boolean
int
static int
getSource
(byte[] packet) int
boolean
static void
setCrcFlag
(byte[] packet, boolean enabled) void
setHeader
(byte priority, byte source, byte destination, byte destinationPort, byte sourcePort) void
setHeader
(byte priority, byte source, byte destination, byte destinationPort, byte sourcePort, boolean hmacFlag, boolean xteaFlag, boolean rdpFlag, boolean crcFlag) toString()
-
Field Details
-
bb
-
-
Constructor Details
-
CspPacket
public CspPacket(byte[] packet) -
CspPacket
-
-
Method Details
-
getPriority
public int getPriority() -
getSource
public int getSource() -
getSource
public static int getSource(byte[] packet) -
getSourcePort
public int getSourcePort() -
getDestination
public int getDestination() -
getDestination
public static int getDestination(byte[] packet) -
getDestinationPort
public int getDestinationPort() -
getHmacFlag
public boolean getHmacFlag() -
getXteaFlag
public boolean getXteaFlag() -
getRdpFlag
public boolean getRdpFlag() -
getCrcFlag
public boolean getCrcFlag() -
getCrcFlag
public static boolean getCrcFlag(byte[] packet) -
setCrcFlag
public static void setCrcFlag(byte[] packet, boolean enabled) -
setHeader
public void setHeader(byte priority, byte source, byte destination, byte destinationPort, byte sourcePort) -
setHeader
public void setHeader(byte priority, byte source, byte destination, byte destinationPort, byte sourcePort, boolean hmacFlag, boolean xteaFlag, boolean rdpFlag, boolean crcFlag) -
getLength
public int getLength() -
getBytes
public byte[] getBytes() -
getByteBuffer
-
toString
-