CCSDS
Static Public Member Functions | List of all members
CCSDS::Clcw Class Reference

Class for handling the Communications Link Control Word (CLCW) as described in CCSDS 232.0-B-3. More...

#include <ccsds_clcw.h>

Static Public Member Functions

static uint32_t create (const uint8_t u8_StatusField, const uint8_t u8_VirtualChannelID, const bool b_NoRfAvail, const bool b_NoBitLock, const bool b_LockOut, const bool b_Wait, const bool b_Retransmit, const uint8_t u8_FarmBCounter, const uint8_t u8_ReportValue)
 Creates a Communications Link Control Word (CLCW) as described in CCSDS 232.0-B-3. More...
 
static int32_t extract (uint8_t *pu8_StatusField, uint8_t *pu8_VirtualChannelID, bool *pb_NoRfAvail, bool *pb_NoBitLock, bool *pb_LockOut, bool *pb_Wait, bool *pb_Retransmit, uint8_t *pu8_FarmBCounter, uint8_t *pu8_ReportValue, const uint32_t u32_CLCW)
 Extractes a Communications Link Control Word (CLCW) as described in CCSDS 232.0-B-3. More...
 

Detailed Description

Class for handling the Communications Link Control Word (CLCW) as described in CCSDS 232.0-B-3.

The CLCW is carried by the Operational Control Field (OCF) of the Telemetry Transfer Frame. It is used to report the state of the remote data communication system. Except the NoRFAvail and the NoBitLock flags, which indicates the general physical layer of the telecommand channel, all values are specific to the respective virtual channel.

Member Function Documentation

◆ create()

uint32_t CCSDS::Clcw::create ( const uint8_t  u8_StatusField,
const uint8_t  u8_VirtualChannelID,
const bool  b_NoRfAvail,
const bool  b_NoBitLock,
const bool  b_LockOut,
const bool  b_Wait,
const bool  b_Retransmit,
const uint8_t  u8_FarmBCounter,
const uint8_t  u8_ReportValue 
)
static

Creates a Communications Link Control Word (CLCW) as described in CCSDS 232.0-B-3.

Parameters
u8_StatusFieldThe 3-bit Status Field is mission specific.
u8_VirtualChannelIDThe Virtual Channel Identifier shall contain the virtual channel of which the CLCW is associated with (6 bit).
b_NoRfAvailThe No RF Available Flag shall indicate if the radio frequency (RF) is available (value 0) or not (value 1).
b_NoBitLockThe No Bit Lock shall indicate if the physical layer finds a signal and is working normally (value 0)
b_LockOutThe LockOut Flag shall indicate that a Type-A Transfer Frame violated the acceptance criteria (value 1).
b_WaitThe Wait Flag shall indicate that the remote system is able to receive and process transfer frames (value 1).
b_RetransmitThe Retransmit Flag shall indicate that one or more Type-A Transfer Frames are rejected and need to be retransmitted (value 1).
u8_FarmBCounterThe FARM-B counter shall contain the 2 least segnificant bits of the counter maintained by the FARM everytime a Type-B Transfer Frame is accepted in Bypass Mode.
u8_ReportValueThe 8-bit FARM-A counter (the Report Value) shall contain the value of the Next Expected Frame Sequence Number.
Returns
The Communications Link Control Word (CLCW) as an uint32_t.

◆ extract()

int32_t CCSDS::Clcw::extract ( uint8_t *  pu8_StatusField,
uint8_t *  pu8_VirtualChannelID,
bool *  pb_NoRfAvail,
bool *  pb_NoBitLock,
bool *  pb_LockOut,
bool *  pb_Wait,
bool *  pb_Retransmit,
uint8_t *  pu8_FarmBCounter,
uint8_t *  pu8_ReportValue,
const uint32_t  u32_CLCW 
)
static

Extractes a Communications Link Control Word (CLCW) as described in CCSDS 232.0-B-3.

Parameters
pu8_StatusFieldPointer to an uint8_t where the mission-specific Status Field shall be stored.
pu8_VirtualChannelIDPointer to an uint8_t where the Virtual Channel Identifier shall be stored.
pb_NoRfAvailPointer to a bool where the No RF Available flag shall be stored.
pb_NoBitLockPointer to a bool where the No Bit Lock flag shall be stored.
pb_LockOutPointer to a bool where the LockOut Flag shall be stored.
pb_WaitPointer to a bool where the Wait Flag shall be stored.
pb_RetransmitPointer to a bool where the Retransmit flag shall be stored.
pu8_FarmBCounterPointer to an uint8_t where the FARM-B counter shall be stored.
pu8_ReportValuePointer to an uint8_t where the 8-bit FARM-A counter shall be stored.
u32_CLCWThe Communications Link Control Word (CLCW) which is to be extracted.
Return values
0Exctraction was sucessfull.
-1The CLCW version number does not match the expected one.

The documentation for this class was generated from the following files: