/** CODE GENERATED BY: setup.py * @file * * NAME: PARALLAX_Task * * FUNCTION: PARALLAX Task C++ interface. * * DESCRIPTION: * - PUBLIC MEMBER FUNCTIONS * - SLONG preProcess() * - Postcondition: Task pre-processing complete. * Returns RETURN_SUCCESS if the operation was * successful, otherwise it returns RETURN_FAIL. * - SLONG processSegment() * - Postcondition: Task segment processing complete. * Returns RETURN_SUCCESS if the operation was * successful, otherwise it returns RETURN_FAIL. * - SLONG postProcess() * - Postcondition: Taks post-processing complete. * Returns RETURN_SUCCESS if the operation was * successful, otherwise it returns RETURN_FAIL. * * REFERENCE: * * CALLING SEQUENCE: * - Pre-processing before segment processing * - Segment processing for each segment * - Post-processing after segment processing * * INPUTS: * * OUTPUTS: * * DEPENDENCIES: * * #include "Task.hpp" * * RESTRICTIONS: * * HISTORY: * - Created by setup.py * * @ingroup PARALLAX */ #include "PARALLAX_Task.hpp" #include "SystemConnection.hpp" #include "DataSource.hpp" #include "ConfigSource.hpp" #include "WorkOrderSource.hpp" #include "Array.hpp" #include "Framework_Global_Variables.hpp" #include "Logger.hpp" using namespace FW; using namespace FW::FC; extern "C" { void run_parallax_(SLONG* Return_Status); } SLONG PARALLAX_Task::preProcess() { SLONG Return_Status = RETURN_SUCCESS; const ConfigSource &cf = getTaskConfig(); DataSource &ds = getTaskData(); const std::string input_LBL = "input/sat/MaxFocalPlnTemp"; if(cf.has(input_LBL)){ const auto &MaxFocalPlaneTempArray = ds.get >(input_LBL); const auto &channel_names = cf.get >("parameters/CHANNEL_NAMES"); for(size_t i = 0; i < channel_names.getExtent(0); i++){ const std::string capability_LBL = "capability/" + channel_names(i) + "/MaxFocalPlaneTemp"; if(getTaskWorkOrder().isRequested(capability_LBL)){ int channel = std::stoi(channel_names(i)) - 1; float MaxFocalPlaneTemp = MaxFocalPlaneTempArray(channel); ds.put(capability_LBL, MaxFocalPlaneTemp); } } } return Return_Status; } SLONG PARALLAX_Task::processSegment() { SLONG Return_Status = RETURN_SUCCESS; run_parallax_(&Return_Status); return Return_Status; } SLONG PARALLAX_Task::postProcess() { SLONG Return_Status = RETURN_SUCCESS; return Return_Status; }