Merge remote-tracking branch 'origin/develop' into mueller/master
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* \date 06.11.2019
|
||||
*/
|
||||
|
||||
#include <fsfwconfig/devices/logicalAddresses.h>
|
||||
#include "addresses.h"
|
||||
|
||||
|
||||
|
35
fsfwconfig/devices/addresses.h
Normal file
35
fsfwconfig/devices/addresses.h
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* \file addresses.cpp
|
||||
*
|
||||
* \date 07.11.2019
|
||||
*/
|
||||
|
||||
#ifndef FSFWCONFIG_DEVICES_ADDRESSES_H_
|
||||
#define FSFWCONFIG_DEVICES_ADDRESSES_H_
|
||||
#include <stdint.h>
|
||||
#include <fsfw/devicehandlers/CookieIF.h>
|
||||
#include <fsfwconfig/objects/systemObjectList.h>
|
||||
|
||||
namespace addresses {
|
||||
/* Logical addresses have uint32_t datatype */
|
||||
enum logicalAddresses: address_t {
|
||||
PCDU,
|
||||
|
||||
/* Dummy and Test Addresses */
|
||||
DUMMY_ECHO = 129,
|
||||
DUMMY_GPS0 = 130,
|
||||
DUMMY_GPS1 = 131,
|
||||
};
|
||||
|
||||
/* Addresses of devices supporting the CSP protocol */
|
||||
enum cspAddresses: uint8_t {
|
||||
P60DOCK = 4,
|
||||
ACU = 2,
|
||||
PDU1 = 3,
|
||||
/* PDU2 occupies X4 slot of P60Dock */
|
||||
PDU2 = 6
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif /* FSFWCONFIG_DEVICES_ADDRESSES_H_ */
|
@ -1,26 +0,0 @@
|
||||
/**
|
||||
* \file logicalAddresses.cpp
|
||||
*
|
||||
* \date 07.11.2019
|
||||
*/
|
||||
|
||||
#ifndef FSFWCONFIG_DEVICES_LOGICALADDRESSES_H_
|
||||
#define FSFWCONFIG_DEVICES_LOGICALADDRESSES_H_
|
||||
#include <stdint.h>
|
||||
#include <fsfw/devicehandlers/CookieIF.h>
|
||||
#include <fsfwconfig/objects/systemObjectList.h>
|
||||
|
||||
namespace addresses {
|
||||
/* Logical addresses have uint32_t datatype */
|
||||
enum logicalAddresses: address_t {
|
||||
PCDU,
|
||||
|
||||
/* Dummy and Test Addresses */
|
||||
DUMMY_ECHO = 129,
|
||||
DUMMY_GPS0 = 130,
|
||||
DUMMY_GPS1 = 131,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif /* FSFWCONFIG_DEVICES_LOGICALADDRESSES_H_ */
|
@ -26,9 +26,17 @@ namespace objects {
|
||||
TEST_TASK = 0x42694269,
|
||||
DUMMY_INTERFACE = 0xCAFECAFE,
|
||||
DUMMY_HANDLER = 0x4400AFFE,
|
||||
P60DOCK_TEST_TASK = 0x00005060,
|
||||
|
||||
/* 0x49 ('I') for Communication Interfaces **/
|
||||
ARDUINO_COM_IF = 0x49000001
|
||||
ARDUINO_COM_IF = 0x49000001,
|
||||
CSP_COM_IF = 0x49000002,
|
||||
|
||||
/* 0x44 ('D') for device handlers */
|
||||
P60DOCK_HANDLER = 0x44000001,
|
||||
PDU1_HANDLER = 0x44000002,
|
||||
PDU2_HANDLER = 0x44000003,
|
||||
ACU_HANDLER = 0x44000004
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -28,3 +28,61 @@ ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence)
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t pst::gomspacePstInit(FixedTimeslotTaskIF *thisSequence){
|
||||
|
||||
uint32_t length = thisSequence->getPeriodMs();
|
||||
|
||||
thisSequence->addSlot(objects::P60DOCK_HANDLER,
|
||||
length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::PDU1_HANDLER,
|
||||
length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::PDU2_HANDLER,
|
||||
length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::ACU_HANDLER,
|
||||
length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
|
||||
thisSequence->addSlot(objects::P60DOCK_HANDLER,
|
||||
length * 0, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::PDU1_HANDLER,
|
||||
length * 0, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::PDU2_HANDLER,
|
||||
length * 0, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::ACU_HANDLER,
|
||||
length * 0, DeviceHandlerIF::SEND_WRITE);
|
||||
|
||||
thisSequence->addSlot(objects::P60DOCK_HANDLER,
|
||||
length * 0.25, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::PDU1_HANDLER,
|
||||
length * 0.25, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::PDU2_HANDLER,
|
||||
length * 0.25, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::ACU_HANDLER,
|
||||
length * 0.25, DeviceHandlerIF::GET_WRITE);
|
||||
|
||||
thisSequence->addSlot(objects::P60DOCK_HANDLER,
|
||||
length * 0.5, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::PDU1_HANDLER,
|
||||
length * 0.5, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::PDU2_HANDLER,
|
||||
length * 0.5, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::ACU_HANDLER,
|
||||
length * 0.5, DeviceHandlerIF::SEND_READ);
|
||||
|
||||
thisSequence->addSlot(objects::P60DOCK_HANDLER,
|
||||
length * 0.75, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::PDU1_HANDLER,
|
||||
length * 0.75, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::PDU2_HANDLER,
|
||||
length * 0.75, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::ACU_HANDLER,
|
||||
length * 0.75, DeviceHandlerIF::GET_READ);
|
||||
|
||||
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
else {
|
||||
sif::error << "Initialization of GomSpace PST failed" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,13 @@ namespace pst {
|
||||
/* 0.4 second period init*/
|
||||
ReturnValue_t pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence);
|
||||
|
||||
/**
|
||||
* @brief This function creates the PST for all gomspace devices. They are
|
||||
* scheduled in a separate PST because the gomspace library uses
|
||||
* blocking calls when requesting data from devices.
|
||||
*/
|
||||
ReturnValue_t gomspacePstInit(FixedTimeslotTaskIF *thisSequence);
|
||||
}
|
||||
|
||||
|
||||
#endif /* POLLINGSEQUENCEINIT_H_ */
|
||||
|
Reference in New Issue
Block a user