PTME_LOCK atomic boolean and related handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -79,7 +79,8 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
* @param enTxData GPIO ID of RS485 tx data enable
|
||||
*/
|
||||
CcsdsIpCoreHandler(object_id_t objectId, object_id_t tcDestination, PtmeConfig& ptmeConfig,
|
||||
std::atomic_bool& linkState, GpioIF* gpioIF, PtmeGpios gpioIds);
|
||||
std::atomic_bool& linkState, GpioIF* gpioIF, PtmeGpios gpioIds,
|
||||
std::atomic_bool& ptmeLocked);
|
||||
|
||||
~CcsdsIpCoreHandler();
|
||||
|
||||
@ -137,9 +138,8 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
//! [EXPORT] : [COMMENT] Received action message with unknown action id
|
||||
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0);
|
||||
|
||||
// using VirtualChannelMap = std::unordered_map<VcId_t, VirtualChannelWithQueue*>;
|
||||
// VirtualChannelMap virtualChannelMap;
|
||||
std::atomic_bool& linkState;
|
||||
std::atomic_bool& ptmeLocked;
|
||||
|
||||
object_id_t tcDestination;
|
||||
|
||||
@ -158,7 +158,15 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
PtmeGpios ptmeGpios;
|
||||
// BAT priority bit on by default to enable priority selection mode for the PTME.
|
||||
uint8_t batPriorityParam = 0;
|
||||
bool updateBatPriorityOnTxOff = false;
|
||||
|
||||
struct UpdateContext {
|
||||
bool updateBatPrio = false;
|
||||
bool updateClockRate = false;
|
||||
bool enableTransmitAfterPtmeUpdate = false;
|
||||
uint8_t ptmeUpdateCycleCount = 0;
|
||||
bool performPtmeUpdateAfterXCycles = false;
|
||||
bool setModeAfterUpdate = false;
|
||||
} updateContext{};
|
||||
|
||||
GpioIF* gpioIF = nullptr;
|
||||
|
||||
@ -180,6 +188,8 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
*/
|
||||
void disableTransmit();
|
||||
|
||||
void performPtmeUpdateWhenApplicable();
|
||||
|
||||
/**
|
||||
* The following set of functions configure the mode of the PTME bandwith allocation table (BAT)
|
||||
* module. This consists of the following 2 steps:
|
||||
@ -189,6 +199,11 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
void enablePrioritySelectMode();
|
||||
void disablePrioritySelectMode();
|
||||
void updateBatPriorityFromParam();
|
||||
|
||||
void setMode(Mode_t mode, Submode_t submode);
|
||||
void resetPtme();
|
||||
void initPtmeUpdateAfterXCycles();
|
||||
void finishPtmeUpdateAfterXCycles(bool doResetPtme);
|
||||
};
|
||||
|
||||
#endif /* CCSDSHANDLER_H_ */
|
||||
|
Reference in New Issue
Block a user