link state now detected by bit and carrier lock flags
This commit is contained in:
parent
345ccf5392
commit
542aa994b7
@ -110,7 +110,7 @@ void initmission::initTasks() {
|
|||||||
// If a command has not been read before the next one arrives, the old command will be
|
// If a command has not been read before the next one arrives, the old command will be
|
||||||
// overwritten by the PDEC.
|
// overwritten by the PDEC.
|
||||||
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
|
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
|
||||||
"PDEC_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1, missedDeadlineFunc);
|
"PDEC_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
||||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
||||||
|
@ -981,10 +981,10 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF *gpioComIF) {
|
|||||||
#if BOARD_TE0720 == 0
|
#if BOARD_TE0720 == 0
|
||||||
GpioCookie* gpioRS485Chip = new GpioCookie;
|
GpioCookie* gpioRS485Chip = new GpioCookie;
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver",
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver",
|
||||||
gpio::Direction::OUT, gpio::HIGH);
|
gpio::Direction::OUT, gpio::LOW);
|
||||||
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_CLOCK, gpio);
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_CLOCK, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_DATA, "RS485 Transceiver",
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_DATA, "RS485 Transceiver",
|
||||||
gpio::Direction::OUT, gpio::HIGH);
|
gpio::Direction::OUT, gpio::LOW);
|
||||||
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_DATA, gpio);
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_DATA, gpio);
|
||||||
|
|
||||||
// Default configuration enables RX channels (RXEN = LOW)
|
// Default configuration enables RX channels (RXEN = LOW)
|
||||||
|
@ -39,6 +39,8 @@ debugging. */
|
|||||||
// Set to 1 if telecommands are received via the PDEC IP Core
|
// Set to 1 if telecommands are received via the PDEC IP Core
|
||||||
#define OBSW_TC_FROM_PDEC 1
|
#define OBSW_TC_FROM_PDEC 1
|
||||||
|
|
||||||
|
#define TMTC_TEST_SETUP 1
|
||||||
|
|
||||||
#define OBSW_ENABLE_TIMERS 1
|
#define OBSW_ENABLE_TIMERS 1
|
||||||
#define OBSW_ADD_STAR_TRACKER 0
|
#define OBSW_ADD_STAR_TRACKER 0
|
||||||
#define OBSW_ADD_PLOC_SUPERVISOR 0
|
#define OBSW_ADD_PLOC_SUPERVISOR 0
|
||||||
@ -92,7 +94,6 @@ debugging. */
|
|||||||
#define OBSW_TEST_TE7020_HEATER 0
|
#define OBSW_TEST_TE7020_HEATER 0
|
||||||
#define OBSW_TEST_GPIO_OPEN_BY_LABEL 0
|
#define OBSW_TEST_GPIO_OPEN_BY_LABEL 0
|
||||||
#define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0
|
#define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0
|
||||||
#define OBSW_LINK_IS_UP 1
|
|
||||||
|
|
||||||
#define OBSW_DEBUG_P60DOCK 0
|
#define OBSW_DEBUG_P60DOCK 0
|
||||||
#define OBSW_DEBUG_PDU1 0
|
#define OBSW_DEBUG_PDU1 0
|
||||||
@ -109,7 +110,7 @@ debugging. */
|
|||||||
#define OBSW_DEBUG_STARTRACKER 0
|
#define OBSW_DEBUG_STARTRACKER 0
|
||||||
#define OBSW_DEBUG_PLOC_MPSOC 0
|
#define OBSW_DEBUG_PLOC_MPSOC 0
|
||||||
#define OBSW_DEBUG_PLOC_SUPERVISOR 0
|
#define OBSW_DEBUG_PLOC_SUPERVISOR 0
|
||||||
#define OBSW_DEBUG_PDEC_HANDLER 0
|
#define OBSW_DEBUG_PDEC_HANDLER 1
|
||||||
|
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/** Hardcoded */
|
/** Hardcoded */
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include "OBSWConfig.h"
|
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
#include "fsfw/serviceinterface/serviceInterfaceDefintions.h"
|
#include "fsfw/serviceinterface/serviceInterfaceDefintions.h"
|
||||||
#include "fsfw/objectmanager/ObjectManager.h"
|
#include "fsfw/objectmanager/ObjectManager.h"
|
||||||
@ -271,8 +270,8 @@ void CCSDSHandler::enableTransmit() {
|
|||||||
}
|
}
|
||||||
transmitterCountdown.setTimeout(TRANSMITTER_TIMEOUT);
|
transmitterCountdown.setTimeout(TRANSMITTER_TIMEOUT);
|
||||||
#if BOARD_TE0720 == 0
|
#if BOARD_TE0720 == 0
|
||||||
gpioIF->pullLow(enTxClock);
|
gpioIF->pullHigh(enTxClock);
|
||||||
gpioIF->pullLow(enTxData);
|
gpioIF->pullHigh(enTxData);
|
||||||
#endif /* BOARD_TE0720 == 0 */
|
#endif /* BOARD_TE0720 == 0 */
|
||||||
linkState = UP;
|
linkState = UP;
|
||||||
// Set link state of all virtual channels to link up
|
// Set link state of all virtual channels to link up
|
||||||
@ -290,9 +289,10 @@ void CCSDSHandler::checkTxTimer() {
|
|||||||
|
|
||||||
void CCSDSHandler::disableTransmit() {
|
void CCSDSHandler::disableTransmit() {
|
||||||
#if BOARD_TE0720 == 0
|
#if BOARD_TE0720 == 0
|
||||||
gpioIF->pullHigh(enTxClock);
|
gpioIF->pullLow(enTxClock);
|
||||||
gpioIF->pullHigh(enTxData);
|
gpioIF->pullLow(enTxData);
|
||||||
#endif /* BOARD_TE0720 == 0 */
|
#endif /* BOARD_TE0720 == 0 */
|
||||||
linkState = DOWN;
|
linkState = DOWN;
|
||||||
forwardLinkstate();
|
forwardLinkstate();
|
||||||
|
transmitterCountdown.setTimeout(0);
|
||||||
}
|
}
|
||||||
|
@ -89,9 +89,13 @@ private:
|
|||||||
//! [EXPORT] : [COMMENT] Received action message with unknown action id
|
//! [EXPORT] : [COMMENT] Received action message with unknown action id
|
||||||
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0);
|
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0);
|
||||||
|
|
||||||
|
#if TMTC_TEST_SETUP == 0
|
||||||
// syrlinks must not be transmitting more than 15 minutes (according to datasheet)
|
// syrlinks must not be transmitting more than 15 minutes (according to datasheet)
|
||||||
// static const uint32_t TRANSMITTER_TIMEOUT = 900000; //900000 ms = 15 min
|
static const uint32_t TRANSMITTER_TIMEOUT = 900000; //900000 ms = 15 min
|
||||||
static const uint32_t TRANSMITTER_TIMEOUT = 10000; //900000 ms = 15 min
|
#else
|
||||||
|
// Set to high value when not sending via syrlinks
|
||||||
|
static const uint32_t TRANSMITTER_TIMEOUT = 86400000; // 1 day
|
||||||
|
#endif /* TMTC_TEST_SETUP == 0 */
|
||||||
|
|
||||||
static const bool UP = true;
|
static const bool UP = true;
|
||||||
static const bool DOWN = false;
|
static const bool DOWN = false;
|
||||||
|
@ -64,6 +64,6 @@ void VirtualChannel::setPtmeObject(PtmeIF* ptme_) {
|
|||||||
ptme = ptme_;
|
ptme = ptme_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VirtualChannel::setLinkState(bool linkIsUp) {
|
void VirtualChannel::setLinkState(bool linkIsUp_) {
|
||||||
linkIsUp = linkIsUp;
|
linkIsUp = linkIsUp_;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ class VirtualChannel: public AcceptsTelemetryIF, public HasReturnvaluesIF {
|
|||||||
* @brief Can be used by the owner to set the link state. Packets will be discarded if link
|
* @brief Can be used by the owner to set the link state. Packets will be discarded if link
|
||||||
* to ground station is down.
|
* to ground station is down.
|
||||||
*/
|
*/
|
||||||
void setLinkState(bool linkIsUp);
|
void setLinkState(bool linkIsUp_);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -46,11 +46,7 @@ private:
|
|||||||
MessageQueueIF* tmQueue = nullptr;
|
MessageQueueIF* tmQueue = nullptr;
|
||||||
uint8_t vcId;
|
uint8_t vcId;
|
||||||
|
|
||||||
#if OBSW_LINK_IS_UP == 1
|
|
||||||
bool linkIsUp = true;
|
|
||||||
#else
|
|
||||||
bool linkIsUp = false;
|
bool linkIsUp = false;
|
||||||
#endif /* OBSW_LINK_IS_UP == 1 */
|
|
||||||
|
|
||||||
StorageManagerIF* tmStore = nullptr;
|
StorageManagerIF* tmStore = nullptr;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user