WIP: somethings wrong.. #19
@ -1048,6 +1048,7 @@ private:
|
|||||||
|
|
||||||
/** Cached for initialize() */
|
/** Cached for initialize() */
|
||||||
static object_id_t defaultHkDestination;
|
static object_id_t defaultHkDestination;
|
||||||
|
/** HK destination can also be set individually */
|
||||||
object_id_t hkDestination = objects::NO_OBJECT;
|
object_id_t hkDestination = objects::NO_OBJECT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
#include <framework/tmtcpacket/pus/TcPacketStored.h>
|
#include <framework/tmtcpacket/pus/TcPacketStored.h>
|
||||||
#include <framework/tmtcpacket/pus/TmPacketStored.h>
|
#include <framework/tmtcpacket/pus/TmPacketStored.h>
|
||||||
|
|
||||||
object_id_t CommandingServiceBase::packetSource = objects::NO_OBJECT;
|
object_id_t CommandingServiceBase::defaultPacketSource = objects::NO_OBJECT;
|
||||||
object_id_t CommandingServiceBase::packetDestination = objects::NO_OBJECT;
|
object_id_t CommandingServiceBase::defaultPacketDestination = objects::NO_OBJECT;
|
||||||
|
|
||||||
CommandingServiceBase::CommandingServiceBase(object_id_t setObjectId,
|
CommandingServiceBase::CommandingServiceBase(object_id_t setObjectId,
|
||||||
uint16_t apid, uint8_t service, uint8_t numberOfParallelCommands,
|
uint16_t apid, uint8_t service, uint8_t numberOfParallelCommands,
|
||||||
@ -62,10 +62,18 @@ ReturnValue_t CommandingServiceBase::initialize() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(packetDestination == objects::NO_OBJECT) {
|
||||||
|
packetDestination = defaultPacketDestination;
|
||||||
|
}
|
||||||
AcceptsTelemetryIF* packetForwarding =
|
AcceptsTelemetryIF* packetForwarding =
|
||||||
objectManager->get<AcceptsTelemetryIF>(packetDestination);
|
objectManager->get<AcceptsTelemetryIF>(packetDestination);
|
||||||
|
|
||||||
|
if(packetSource == objects::NO_OBJECT) {
|
||||||
|
packetSource = defaultPacketSource;
|
||||||
|
}
|
||||||
PUSDistributorIF* distributor = objectManager->get<PUSDistributorIF>(
|
PUSDistributorIF* distributor = objectManager->get<PUSDistributorIF>(
|
||||||
packetSource);
|
packetSource);
|
||||||
|
|
||||||
if (packetForwarding == nullptr or distributor == nullptr) {
|
if (packetForwarding == nullptr or distributor == nullptr) {
|
||||||
sif::error << "CommandingServiceBase::intialize: Packet source or "
|
sif::error << "CommandingServiceBase::intialize: Packet source or "
|
||||||
"packet destination invalid!" << std::endl;
|
"packet destination invalid!" << std::endl;
|
||||||
|
@ -248,8 +248,10 @@ protected:
|
|||||||
uint32_t failureParameter1 = 0;
|
uint32_t failureParameter1 = 0;
|
||||||
uint32_t failureParameter2 = 0;
|
uint32_t failureParameter2 = 0;
|
||||||
|
|
||||||
static object_id_t packetSource;
|
static object_id_t defaultPacketSource;
|
||||||
static object_id_t packetDestination;
|
object_id_t packetSource = objects::NO_OBJECT;
|
||||||
|
static object_id_t defaultPacketDestination;
|
||||||
|
object_id_t packetDestination = objects::NO_OBJECT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pointer to the task which executes this component,
|
* Pointer to the task which executes this component,
|
||||||
|
Loading…
Reference in New Issue
Block a user