Class for handling the Communications Link Control Word (CLCW) as described in CCSDS 232.0-B-3.
More...
#include <ccsds_clcw.h>
|
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...
|
|
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.
◆ 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_StatusField | The 3-bit Status Field is mission specific. |
u8_VirtualChannelID | The Virtual Channel Identifier shall contain the virtual channel of which the CLCW is associated with (6 bit). |
b_NoRfAvail | The No RF Available Flag shall indicate if the radio frequency (RF) is available (value 0) or not (value 1). |
b_NoBitLock | The No Bit Lock shall indicate if the physical layer finds a signal and is working normally (value 0) |
b_LockOut | The LockOut Flag shall indicate that a Type-A Transfer Frame violated the acceptance criteria (value 1). |
b_Wait | The Wait Flag shall indicate that the remote system is able to receive and process transfer frames (value 1). |
b_Retransmit | The Retransmit Flag shall indicate that one or more Type-A Transfer Frames are rejected and need to be retransmitted (value 1). |
u8_FarmBCounter | The 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_ReportValue | The 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_StatusField | Pointer to an uint8_t where the mission-specific Status Field shall be stored. |
pu8_VirtualChannelID | Pointer to an uint8_t where the Virtual Channel Identifier shall be stored. |
pb_NoRfAvail | Pointer to a bool where the No RF Available flag shall be stored. |
pb_NoBitLock | Pointer to a bool where the No Bit Lock flag shall be stored. |
pb_LockOut | Pointer to a bool where the LockOut Flag shall be stored. |
pb_Wait | Pointer to a bool where the Wait Flag shall be stored. |
pb_Retransmit | Pointer to a bool where the Retransmit flag shall be stored. |
pu8_FarmBCounter | Pointer to an uint8_t where the FARM-B counter shall be stored. |
pu8_ReportValue | Pointer to an uint8_t where the 8-bit FARM-A counter shall be stored. |
u32_CLCW | The Communications Link Control Word (CLCW) which is to be extracted. |
- Return values
-
0 | Exctraction was sucessfull. |
-1 | The CLCW version number does not match the expected one. |
The documentation for this class was generated from the following files: