2022-02-05 13:19:20 +01:00
|
|
|
#include "ObjectFactory.h"
|
|
|
|
|
|
|
|
#include <devConf.h>
|
2022-11-10 18:07:59 +01:00
|
|
|
#include <fsfw_hal/linux/serial/SerialComIF.h>
|
|
|
|
#include <fsfw_hal/linux/serial/SerialCookie.h>
|
2022-02-05 13:19:20 +01:00
|
|
|
|
|
|
|
#include "OBSWConfig.h"
|
2022-02-05 17:45:28 +01:00
|
|
|
#include "busConf.h"
|
2022-02-05 13:19:20 +01:00
|
|
|
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
|
|
|
|
#include "fsfw/tmtcpacket/pus/tm.h"
|
|
|
|
#include "fsfw/tmtcservices/CommandingServiceBase.h"
|
|
|
|
#include "fsfw/tmtcservices/PusServiceBase.h"
|
2022-02-05 18:09:55 +01:00
|
|
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
|
|
|
#include "linux/devices/startracker/StarTrackerHandler.h"
|
2022-02-05 13:19:20 +01:00
|
|
|
#include "mission/core/GenericFactory.h"
|
|
|
|
#include "mission/utility/TmFunnel.h"
|
|
|
|
#include "objects/systemObjectList.h"
|
|
|
|
#include "tmtc/apid.h"
|
|
|
|
#include "tmtc/pusIds.h"
|
|
|
|
|
|
|
|
void Factory::setStaticFrameworkObjectIds() {
|
|
|
|
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
|
|
|
|
PusServiceBase::packetDestination = objects::TM_FUNNEL;
|
|
|
|
|
|
|
|
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
|
|
|
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
|
|
|
|
|
|
|
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
|
|
|
|
TmFunnel::storageDestination = objects::NO_OBJECT;
|
|
|
|
|
|
|
|
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
|
|
|
|
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ObjectFactory::produce(void* args) {
|
|
|
|
Factory::setStaticFrameworkObjectIds();
|
|
|
|
ObjectFactory::produceGenericObjects();
|
|
|
|
|
|
|
|
UartCookie* starTrackerCookie =
|
2022-02-05 17:45:28 +01:00
|
|
|
new UartCookie(objects::STAR_TRACKER, egse::STAR_TRACKER_UART, UartModes::NON_CANONICAL,
|
2022-02-14 11:28:15 +01:00
|
|
|
uart::STAR_TRACKER_BAUD, startracker::MAX_FRAME_SIZE * 2 + 2);
|
2022-11-10 18:07:59 +01:00
|
|
|
newSerialComIF(objects::UART_COM_IF);
|
2022-02-05 13:19:20 +01:00
|
|
|
starTrackerCookie->setNoFixedSizeReply();
|
|
|
|
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
|
|
|
|
StarTrackerHandler* starTrackerHandler = new StarTrackerHandler(
|
|
|
|
objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie, strHelper);
|
|
|
|
starTrackerHandler->setStartUpImmediately();
|
|
|
|
}
|