applied formatting
Some checks failed
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
2022-01-17 15:58:27 +01:00
parent 975b3cd294
commit 77c45c0de9
206 changed files with 28883 additions and 30263 deletions

View File

@ -1,8 +1,8 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
#include "fsfw/datapoollocal/StaticLocalDataSet.h"
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
namespace GpsHyperion {
@ -11,60 +11,53 @@ static constexpr DeviceCommandId_t TRIGGER_RESET_PIN = 5;
static constexpr uint32_t DATASET_ID = 0;
enum GpsPoolIds: lp_id_t {
LATITUDE = 0,
LONGITUDE = 1,
ALTITUDE = 2,
SPEED = 3,
FIX_MODE = 4,
SATS_IN_USE = 5,
SATS_IN_VIEW = 6,
UNIX_SECONDS = 7,
YEAR = 8,
MONTH = 9,
DAY = 10,
HOURS = 11,
MINUTES = 12,
SECONDS = 13
enum GpsPoolIds : lp_id_t {
LATITUDE = 0,
LONGITUDE = 1,
ALTITUDE = 2,
SPEED = 3,
FIX_MODE = 4,
SATS_IN_USE = 5,
SATS_IN_VIEW = 6,
UNIX_SECONDS = 7,
YEAR = 8,
MONTH = 9,
DAY = 10,
HOURS = 11,
MINUTES = 12,
SECONDS = 13
};
enum GpsFixModes: uint8_t {
INVALID = 0,
NO_FIX = 1,
FIX_2D = 2,
FIX_3D = 3
};
enum GpsFixModes : uint8_t { INVALID = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3 };
}
} // namespace GpsHyperion
class GpsPrimaryDataset: public StaticLocalDataSet<18> {
public:
GpsPrimaryDataset(object_id_t gpsId):
StaticLocalDataSet(sid_t(gpsId, GpsHyperion::DATASET_ID)) {
setAllVariablesReadOnly();
}
class GpsPrimaryDataset : public StaticLocalDataSet<18> {
public:
GpsPrimaryDataset(object_id_t gpsId) : StaticLocalDataSet(sid_t(gpsId, GpsHyperion::DATASET_ID)) {
setAllVariablesReadOnly();
}
lp_var_t<double> latitude = lp_var_t<double>(sid.objectId,
GpsHyperion::LATITUDE, this);
lp_var_t<double> longitude = lp_var_t<double>(sid.objectId,
GpsHyperion::LONGITUDE, this);
lp_var_t<double> altitude = lp_var_t<double>(sid.objectId, GpsHyperion::ALTITUDE, this);
lp_var_t<double> speed = lp_var_t<double>(sid.objectId, GpsHyperion::SPEED, this);
lp_var_t<uint8_t> fixMode = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::FIX_MODE, this);
lp_var_t<uint8_t> satInUse = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::SATS_IN_USE, this);
lp_var_t<uint8_t> satInView = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::SATS_IN_VIEW, this);
lp_var_t<uint16_t> year = lp_var_t<uint16_t>(sid.objectId, GpsHyperion::YEAR, this);
lp_var_t<uint8_t> month = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::MONTH, this);
lp_var_t<uint8_t> day = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::DAY, this);
lp_var_t<uint8_t> hours = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::HOURS, this);
lp_var_t<uint8_t> minutes = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::MINUTES, this);
lp_var_t<uint8_t> seconds = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::SECONDS, this);
lp_var_t<uint32_t> unixSeconds = lp_var_t<uint32_t>(sid.objectId,
GpsHyperion::UNIX_SECONDS, this);
private:
friend class GPSHyperionHandler;
GpsPrimaryDataset(HasLocalDataPoolIF* hkOwner):
StaticLocalDataSet(hkOwner, GpsHyperion::DATASET_ID) {}
lp_var_t<double> latitude = lp_var_t<double>(sid.objectId, GpsHyperion::LATITUDE, this);
lp_var_t<double> longitude = lp_var_t<double>(sid.objectId, GpsHyperion::LONGITUDE, this);
lp_var_t<double> altitude = lp_var_t<double>(sid.objectId, GpsHyperion::ALTITUDE, this);
lp_var_t<double> speed = lp_var_t<double>(sid.objectId, GpsHyperion::SPEED, this);
lp_var_t<uint8_t> fixMode = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::FIX_MODE, this);
lp_var_t<uint8_t> satInUse = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::SATS_IN_USE, this);
lp_var_t<uint8_t> satInView = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::SATS_IN_VIEW, this);
lp_var_t<uint16_t> year = lp_var_t<uint16_t>(sid.objectId, GpsHyperion::YEAR, this);
lp_var_t<uint8_t> month = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::MONTH, this);
lp_var_t<uint8_t> day = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::DAY, this);
lp_var_t<uint8_t> hours = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::HOURS, this);
lp_var_t<uint8_t> minutes = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::MINUTES, this);
lp_var_t<uint8_t> seconds = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::SECONDS, this);
lp_var_t<uint32_t> unixSeconds =
lp_var_t<uint32_t>(sid.objectId, GpsHyperion::UNIX_SECONDS, this);
private:
friend class GPSHyperionHandler;
GpsPrimaryDataset(HasLocalDataPoolIF* hkOwner)
: StaticLocalDataSet(hkOwner, GpsHyperion::DATASET_ID) {}
};
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_ */

View File

@ -2,37 +2,32 @@
#define MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEPACKETS_H_
#include <fsfw/serialize/SerialBufferAdapter.h>
#include <fsfw/serialize/SerializeElement.h>
#include <fsfw/serialize/SerialLinkedListAdapter.h>
#include <fsfw/serialize/SerialFixedArrayListAdapter.h>
#include <fsfw/serialize/SerialLinkedListAdapter.h>
#include <fsfw/serialize/SerializeElement.h>
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
/**
* @brief This class can be used to generated the command for the CspComIF
* to reset the watchdog in a gomspace device.
*/
class WatchdogResetCommand : public SerialLinkedListAdapter<SerializeIF> {
public:
public:
WatchdogResetCommand() { setLinks(); }
WatchdogResetCommand() {
setLinks();
}
private:
WatchdogResetCommand(const WatchdogResetCommand &command);
void setLinks() {
setStart(&cspPort);
cspPort.setNext(&querySize);
querySize.setNext(&magic);
}
SerializeElement<uint8_t> cspPort = GOMSPACE::P60_PORT_GNDWDT_RESET;
SerializeElement<uint16_t> querySize = 1;
/* Sending 0x78 to port 9 of a gomspace device resets the ground watchdog */
SerializeElement<uint8_t> magic = 0x78;
private:
WatchdogResetCommand(const WatchdogResetCommand &command);
void setLinks() {
setStart(&cspPort);
cspPort.setNext(&querySize);
querySize.setNext(&magic);
}
SerializeElement<uint8_t> cspPort = GOMSPACE::P60_PORT_GNDWDT_RESET;
SerializeElement<uint16_t> querySize = 1;
/* Sending 0x78 to port 9 of a gomspace device resets the ground watchdog */
SerializeElement<uint8_t> magic = 0x78;
};
/**
* @brief A serial linked list adapter implementation to generate ping
* commands for devices supporting the CSP protocol. This command can
@ -44,33 +39,32 @@ private:
* transmitted to the target device.
*/
class CspPingCommand : public SerialLinkedListAdapter<SerializeIF> {
public:
/**
* @brief Constructor
*
* @param querySize_ The size of bytes replied by the ping request.
* Amounts to the number of bytes send.
* @param data_ Pointer to data which should be sent to the device.
* All data will be sent back by the ping target.
*/
CspPingCommand(const uint8_t* data_, uint16_t querySize_) :
querySize(querySize_), data(data_, querySize_) {
setLinks();
}
public:
/**
* @brief Constructor
*
* @param querySize_ The size of bytes replied by the ping request.
* Amounts to the number of bytes send.
* @param data_ Pointer to data which should be sent to the device.
* All data will be sent back by the ping target.
*/
CspPingCommand(const uint8_t *data_, uint16_t querySize_)
: querySize(querySize_), data(data_, querySize_) {
setLinks();
}
private:
CspPingCommand(const CspPingCommand &command);
void setLinks() {
setStart(&cspPort);
cspPort.setNext(&querySize);
querySize.setNext(&data);
}
SerializeElement<uint8_t> cspPort = GOMSPACE::PING_PORT;
SerializeElement<uint16_t> querySize;
SerializeElement<SerialBufferAdapter<uint8_t>> data;
private:
CspPingCommand(const CspPingCommand &command);
void setLinks() {
setStart(&cspPort);
cspPort.setNext(&querySize);
querySize.setNext(&data);
}
SerializeElement<uint8_t> cspPort = GOMSPACE::PING_PORT;
SerializeElement<uint16_t> querySize;
SerializeElement<SerialBufferAdapter<uint8_t>> data;
};
/**
* @brief A serial linked list adapter implementation of the gs_rparam_query_t
* struct defined in rparam.h. Can be used to build the message to set
@ -81,47 +75,49 @@ private:
* and the size to query.
*/
class CspSetParamCommand : public SerialLinkedListAdapter<SerializeIF> {
public:
public:
CspSetParamCommand(uint16_t querySize_, uint16_t payloadlength_, uint16_t checksum_,
uint16_t seq_, uint16_t total_, uint16_t addr_, const uint8_t *parameter_,
uint8_t parameterCount_)
: querySize(querySize_),
payloadlength(payloadlength_),
checksum(checksum_),
seq(seq_),
total(total_),
addr(addr_),
parameter(parameter_, parameterCount_) {
setLinks();
}
CspSetParamCommand(uint16_t querySize_, uint16_t payloadlength_,
uint16_t checksum_, uint16_t seq_, uint16_t total_, uint16_t addr_,
const uint8_t* parameter_, uint8_t parameterCount_) :
querySize(querySize_), payloadlength(
payloadlength_), checksum(checksum_), seq(seq_), total(
total_), addr(addr_), parameter(parameter_, parameterCount_) {
setLinks();
}
private:
CspSetParamCommand(const CspSetParamCommand &command);
void setLinks() {
setStart(&cspPort);
cspPort.setNext(&querySize);
querySize.setNext(&action);
action.setNext(&tableId);
tableId.setNext(&payloadlength);
payloadlength.setNext(&checksum);
checksum.setNext(&seq);
seq.setNext(&total);
total.setNext(&addr);
addr.setNext(&parameter);
}
SerializeElement<uint8_t> cspPort = GOMSPACE::PARAM_PORT;
/* Only a parameter will be set. No data will be queried with this command */
SerializeElement<uint16_t> querySize;
SerializeElement<uint8_t> action = 0xFF; // param set
/* We will never set a parameter in a table other than the configuration
* table */
SerializeElement<uint8_t> tableId = 1;
SerializeElement<uint16_t> payloadlength;
SerializeElement<uint16_t> checksum;
SerializeElement<uint16_t> seq;
SerializeElement<uint16_t> total;
SerializeElement<uint16_t> addr;
SerializeElement<SerialBufferAdapter<uint8_t>> parameter;
private:
CspSetParamCommand(const CspSetParamCommand &command);
void setLinks() {
setStart(&cspPort);
cspPort.setNext(&querySize);
querySize.setNext(&action);
action.setNext(&tableId);
tableId.setNext(&payloadlength);
payloadlength.setNext(&checksum);
checksum.setNext(&seq);
seq.setNext(&total);
total.setNext(&addr);
addr.setNext(&parameter);
}
SerializeElement<uint8_t> cspPort = GOMSPACE::PARAM_PORT;
/* Only a parameter will be set. No data will be queried with this command */
SerializeElement<uint16_t> querySize;
SerializeElement<uint8_t> action = 0xFF; // param set
/* We will never set a parameter in a table other than the configuration
* table */
SerializeElement<uint8_t> tableId = 1;
SerializeElement<uint16_t> payloadlength;
SerializeElement<uint16_t> checksum;
SerializeElement<uint16_t> seq;
SerializeElement<uint16_t> total;
SerializeElement<uint16_t> addr;
SerializeElement<SerialBufferAdapter<uint8_t>> parameter;
};
/**
* @brief This class can be used to generate a get param command for the
* gomspace devices which will be sent to the device communication
@ -131,50 +127,50 @@ private:
* and will not be transmitted physically to the target device.
*/
class CspGetParamCommand : public SerialLinkedListAdapter<SerializeIF> {
public:
/* The size of the header of a gomspace CSP packet. */
static const uint8_t GS_HDR_LENGTH = 12;
public:
/* The size of the header of a gomspace CSP packet. */
static const uint8_t GS_HDR_LENGTH = 12;
CspGetParamCommand(uint16_t querySize_, uint8_t tableId_,
uint16_t addresslength_, uint16_t checksum_, uint16_t seq_,
uint16_t total_, uint16_t addr_) :
querySize(querySize_), tableId(tableId_), addresslength(
addresslength_), checksum(checksum_), seq(seq_), total(
total_), addr(addr_) {
fixedValuesInit();
setLinks();
}
CspGetParamCommand(uint16_t querySize_, uint8_t tableId_, uint16_t addresslength_,
uint16_t checksum_, uint16_t seq_, uint16_t total_, uint16_t addr_)
: querySize(querySize_),
tableId(tableId_),
addresslength(addresslength_),
checksum(checksum_),
seq(seq_),
total(total_),
addr(addr_) {
fixedValuesInit();
setLinks();
}
private:
CspGetParamCommand(const CspGetParamCommand &command);
void setLinks() {
setStart(&cspPort);
cspPort.setNext(&querySize);
querySize.setNext(&action);
action.setNext(&tableId);
tableId.setNext(&addresslength);
addresslength.setNext(&checksum);
checksum.setNext(&seq);
seq.setNext(&total);
total.setNext(&addr);
}
void fixedValuesInit(){
cspPort.entry = GOMSPACE::PARAM_PORT;
}
SerializeElement<uint8_t> cspPort;
SerializeElement<uint16_t> querySize; // size of bytes to query
/* Following information will also be physically transmitted to the target
* device*/
SerializeElement<uint8_t> action = 0x00; // get param
SerializeElement<uint8_t> tableId;
SerializeElement<uint16_t> addresslength;
SerializeElement<uint16_t> checksum;
SerializeElement<uint16_t> seq;
SerializeElement<uint16_t> total;
SerializeElement<uint16_t> addr;
private:
CspGetParamCommand(const CspGetParamCommand &command);
void setLinks() {
setStart(&cspPort);
cspPort.setNext(&querySize);
querySize.setNext(&action);
action.setNext(&tableId);
tableId.setNext(&addresslength);
addresslength.setNext(&checksum);
checksum.setNext(&seq);
seq.setNext(&total);
total.setNext(&addr);
}
void fixedValuesInit() { cspPort.entry = GOMSPACE::PARAM_PORT; }
SerializeElement<uint8_t> cspPort;
SerializeElement<uint16_t> querySize; // size of bytes to query
/* Following information will also be physically transmitted to the target
* device*/
SerializeElement<uint8_t> action = 0x00; // get param
SerializeElement<uint8_t> tableId;
SerializeElement<uint16_t> addresslength;
SerializeElement<uint16_t> checksum;
SerializeElement<uint16_t> seq;
SerializeElement<uint16_t> total;
SerializeElement<uint16_t> addr;
};
/**
* @brief This class can be used to generate a get param command for the
* gomspace devices which will be sent to the device communication
@ -184,205 +180,186 @@ private:
* and will not be transmitted physically to the target device.
*/
class RequestFullTableCommand : public SerialLinkedListAdapter<SerializeIF> {
public:
public:
RequestFullTableCommand(uint16_t querySize_, uint8_t tableId_)
: querySize(querySize_), tableId(tableId_) {
setLinks();
}
RequestFullTableCommand(uint16_t querySize_, uint8_t tableId_) :
querySize(querySize_), tableId(tableId_) {
setLinks();
}
private:
RequestFullTableCommand(const RequestFullTableCommand &command);
void setLinks() {
setStart(&cspPort);
cspPort.setNext(&querySize);
querySize.setNext(&action);
action.setNext(&tableId);
tableId.setNext(&addresslength);
addresslength.setNext(&checksum);
checksum.setNext(&seq);
seq.setNext(&total);
}
SerializeElement<uint8_t> cspPort = GOMSPACE::PARAM_PORT;
/** Size of bytes to query (size of csp header + size of table) */
SerializeElement<uint16_t> querySize;
/* Following information will also be physically transmitted to the target
* device*/
SerializeElement<uint8_t> action = 0x00; // get param
SerializeElement<uint8_t> tableId;
/* Size of address. Set to 0 to get full table */
SerializeElement<uint16_t> addresslength = 0;
SerializeElement<uint16_t> checksum = GOMSPACE::IGNORE_CHECKSUM;
SerializeElement<uint16_t> seq = 0;
SerializeElement<uint16_t> total = 0;
private:
RequestFullTableCommand(const RequestFullTableCommand &command);
void setLinks() {
setStart(&cspPort);
cspPort.setNext(&querySize);
querySize.setNext(&action);
action.setNext(&tableId);
tableId.setNext(&addresslength);
addresslength.setNext(&checksum);
checksum.setNext(&seq);
seq.setNext(&total);
}
SerializeElement<uint8_t> cspPort = GOMSPACE::PARAM_PORT;
/** Size of bytes to query (size of csp header + size of table) */
SerializeElement<uint16_t> querySize;
/* Following information will also be physically transmitted to the target
* device*/
SerializeElement<uint8_t> action = 0x00; // get param
SerializeElement<uint8_t> tableId;
/* Size of address. Set to 0 to get full table */
SerializeElement<uint16_t> addresslength = 0;
SerializeElement<uint16_t> checksum = GOMSPACE::IGNORE_CHECKSUM;
SerializeElement<uint16_t> seq = 0;
SerializeElement<uint16_t> total = 0;
};
/**
* @brief This class can be used to deserialize replies from gomspace devices
* and extract the relevant data.
*/
class CspGetParamReply : public SerialLinkedListAdapter<SerializeIF> {
public:
/**
* @brief Constructor
*
* @param payloadBuffer Pointer to a buffer to store the payload data of
* the CSP packet.
* @param payloadBufferSz The size of the payload buffer where the payload
* data will be stored.
*/
CspGetParamReply(uint8_t* payloadBuffer_, uint8_t payloadBufferSz_) :
payload(payloadBuffer_, payloadBufferSz_) {
setLinks();
}
public:
/**
* @brief Constructor
*
* @param payloadBuffer Pointer to a buffer to store the payload data of
* the CSP packet.
* @param payloadBufferSz The size of the payload buffer where the payload
* data will be stored.
*/
CspGetParamReply(uint8_t *payloadBuffer_, uint8_t payloadBufferSz_)
: payload(payloadBuffer_, payloadBufferSz_) {
setLinks();
}
uint8_t getAction(){
return action;
}
uint8_t getAction() { return action; }
uint8_t getTableId(){
return tableId;
}
uint8_t getTableId() { return tableId; }
uint16_t getLength(){
return length;
}
uint16_t getLength() { return length; }
uint16_t getAddress(){
return addr;
}
uint16_t getAddress() { return addr; }
private:
CspGetParamReply(const CspGetParamReply &reply);
void setLinks() {
setStart(&action);
action.setNext(&tableId);
tableId.setNext(&length);
length.setNext(&checksum);
checksum.setNext(&seq);
seq.setNext(&total);
total.setNext(&addr);
addr.setNext(&payload);
}
private:
CspGetParamReply(const CspGetParamReply &reply);
void setLinks() {
setStart(&action);
action.setNext(&tableId);
tableId.setNext(&length);
length.setNext(&checksum);
checksum.setNext(&seq);
seq.setNext(&total);
total.setNext(&addr);
addr.setNext(&payload);
}
SerializeElement<uint8_t> action;
SerializeElement<uint8_t> tableId;
SerializeElement<uint16_t> length; //length of address field + payload data
SerializeElement<uint16_t> checksum;
SerializeElement<uint16_t> seq;
SerializeElement<uint16_t> total;
SerializeElement<uint16_t> addr;
SerializeElement<SerialBufferAdapter<uint8_t>> payload;
SerializeElement<uint8_t> action;
SerializeElement<uint8_t> tableId;
SerializeElement<uint16_t> length; // length of address field + payload data
SerializeElement<uint16_t> checksum;
SerializeElement<uint16_t> seq;
SerializeElement<uint16_t> total;
SerializeElement<uint16_t> addr;
SerializeElement<SerialBufferAdapter<uint8_t>> payload;
};
/**
* @brief This class generates telemetry packets containing data from
* CSP get-parameter-replies.
*/
class ParamReply : public SerialLinkedListAdapter<SerializeIF> {
public:
/**
* @brief Constructor
*
* @param payloadBuffer Pointer to a buffer to store the payload data of
* the CSP packet.
* @param payloadBufferSz The size of the payload buffer where the payload
* data will be stored.
*/
ParamReply(uint8_t action_, uint8_t tableId_, uint16_t addr_,
uint16_t payloadLength_, uint8_t* payloadBuffer_) :
action(action_), tableId(tableId_), addr(addr_), payloadLength(
payloadLength_), payload(payloadBuffer_, payloadLength) {
setLinks();
}
public:
/**
* @brief Constructor
*
* @param payloadBuffer Pointer to a buffer to store the payload data of
* the CSP packet.
* @param payloadBufferSz The size of the payload buffer where the payload
* data will be stored.
*/
ParamReply(uint8_t action_, uint8_t tableId_, uint16_t addr_, uint16_t payloadLength_,
uint8_t *payloadBuffer_)
: action(action_),
tableId(tableId_),
addr(addr_),
payloadLength(payloadLength_),
payload(payloadBuffer_, payloadLength) {
setLinks();
}
private:
ParamReply(const CspGetParamReply &reply);
void setLinks() {
setStart(&action);
action.setNext(&tableId);
tableId.setNext(&addr);
addr.setNext(&payloadLength);
payloadLength.setNext(&payload);
}
SerializeElement<uint8_t> action;
SerializeElement<uint8_t> tableId;
SerializeElement<uint16_t> addr;
SerializeElement<uint16_t> payloadLength;
SerializeElement<SerialBufferAdapter<uint16_t>> payload;
private:
ParamReply(const CspGetParamReply &reply);
void setLinks() {
setStart(&action);
action.setNext(&tableId);
tableId.setNext(&addr);
addr.setNext(&payloadLength);
payloadLength.setNext(&payload);
}
SerializeElement<uint8_t> action;
SerializeElement<uint8_t> tableId;
SerializeElement<uint16_t> addr;
SerializeElement<uint16_t> payloadLength;
SerializeElement<SerialBufferAdapter<uint16_t>> payload;
};
/**
* @brief This class generates the reply containing data from a full housekeeping table request
* of the PDU2.
* @brief This class generates the reply containing data from a full housekeeping table
* request of the PDU2.
*/
class Pdu2FullTableReply : public SerialLinkedListAdapter<SerializeIF> {
public:
/**
* @brief Constructor
*
* @param action_ The command which triggered the full table request.
* @param tableId_ The id of the requested table.
* @param tableDataset_ The dataset holding the table data.
*/
Pdu2FullTableReply(uint8_t action_, uint8_t tableId_, SerializeIF* tableDataset_) :
action(action_), tableId(tableId_), dataset(tableDataset_) {
setLinks();
}
public:
/**
* @brief Constructor
*
* @param action_ The command which triggered the full table request.
* @param tableId_ The id of the requested table.
* @param tableDataset_ The dataset holding the table data.
*/
Pdu2FullTableReply(uint8_t action_, uint8_t tableId_, SerializeIF *tableDataset_)
: action(action_), tableId(tableId_), dataset(tableDataset_) {
setLinks();
}
private:
Pdu2FullTableReply(const Pdu2FullTableReply &reply);
void setLinks() {
setStart(&action);
action.setNext(&tableId);
tableId.setNext(&dataset);
}
SerializeElement<uint8_t> action;
SerializeElement<uint8_t> tableId;
LinkedElement<SerializeIF> dataset;
private:
Pdu2FullTableReply(const Pdu2FullTableReply &reply);
void setLinks() {
setStart(&action);
action.setNext(&tableId);
tableId.setNext(&dataset);
}
SerializeElement<uint8_t> action;
SerializeElement<uint8_t> tableId;
LinkedElement<SerializeIF> dataset;
};
/**
* @brief This class helps to unpack information from an action message
* to set a parameter in gomspace devices. The action message can be
* for example received from the PUS Service 8.
*/
class SetParamMessageUnpacker: public SerialLinkedListAdapter<SerializeIF> {
public:
/* Largest parameter is a uint32_t */
static const uint32_t MAX_SIZE = 4;
class SetParamMessageUnpacker : public SerialLinkedListAdapter<SerializeIF> {
public:
/* Largest parameter is a uint32_t */
static const uint32_t MAX_SIZE = 4;
SetParamMessageUnpacker() {
setLinks();
}
SetParamMessageUnpacker() { setLinks(); }
uint16_t getAddress() {
return address;
}
uint16_t getAddress() { return address; }
uint8_t* getParameter() {
return parameter->front();
}
uint8_t *getParameter() { return parameter->front(); }
uint8_t getParameterSize(){
return parameter->size;
}
uint8_t getParameterSize() { return parameter->size; }
private:
void setLinks() {
setStart(&address);
address.setNext(&parameter);
}
SetParamMessageUnpacker(const SetParamMessageUnpacker &message);
SerializeElement<uint16_t> address;
SerializeElement<SerialFixedArrayListAdapter<uint8_t, MAX_SIZE, uint8_t>> parameter;
private:
void setLinks() {
setStart(&address);
address.setNext(&parameter);
}
SetParamMessageUnpacker(const SetParamMessageUnpacker &message);
SerializeElement<uint16_t> address;
SerializeElement<SerialFixedArrayListAdapter<uint8_t, MAX_SIZE, uint8_t>> parameter;
};
/**
* @brief This class generates a message which can be sent to the GomspaceDeviceHandler to
* command a parameter change.
@ -391,76 +368,64 @@ private:
* | memory address | size of parameter value | parameter value |
*/
class GomspaceSetParamMessage : public SerialLinkedListAdapter<SerializeIF> {
public:
public:
/* The size of the largest parameter */
static const uint8_t MAX_SIZE = 4;
/* The size of the largest parameter */
static const uint8_t MAX_SIZE = 4;
/**
* @brief Constructor
*
* @param memoryAddress The address of the parameter to change in the configuration table.
* @param parameterValue Pointer to the parameter value to set.
* @param parameterSize The size of the parameter.
*
*/
GomspaceSetParamMessage(uint16_t memoryAddress, const uint8_t *parameterValue,
uint8_t parameterSize)
: memoryAddress(memoryAddress), parameterValueBuffer(parameterValue, parameterSize, true) {
setLinks();
}
/**
* @brief Constructor
*
* @param memoryAddress The address of the parameter to change in the configuration table.
* @param parameterValue Pointer to the parameter value to set.
* @param parameterSize The size of the parameter.
*
*/
GomspaceSetParamMessage(uint16_t memoryAddress, const uint8_t* parameterValue,
uint8_t parameterSize) :
memoryAddress(memoryAddress), parameterValueBuffer(parameterValue, parameterSize, true) {
setLinks();
}
private:
GomspaceSetParamMessage(const GomspaceSetParamMessage &reply);
void setLinks() {
setStart(&memoryAddress);
memoryAddress.setNext(&parameterValueBuffer);
}
SerializeElement<uint16_t> memoryAddress;
/**
* Parameter can be uint8_t, uint16_t or uint32_t. Thus max size of parameterValueBuffer is
* four bytes.
*/
SerializeElement<SerialBufferAdapter<uint8_t>> parameterValueBuffer;
private:
GomspaceSetParamMessage(const GomspaceSetParamMessage &reply);
void setLinks() {
setStart(&memoryAddress);
memoryAddress.setNext(&parameterValueBuffer);
}
SerializeElement<uint16_t> memoryAddress;
/**
* Parameter can be uint8_t, uint16_t or uint32_t. Thus max size of parameterValueBuffer is
* four bytes.
*/
SerializeElement<SerialBufferAdapter<uint8_t>> parameterValueBuffer;
};
/**
* @brief This class helps to unpack information from an action message
* to get a parameter from gomspace devices. The action message can be
* for example received from the PUS Service 8.
*/
class GetParamMessageUnpacker: public SerialLinkedListAdapter<SerializeIF> {
public:
class GetParamMessageUnpacker : public SerialLinkedListAdapter<SerializeIF> {
public:
GetParamMessageUnpacker() { setLinks(); }
GetParamMessageUnpacker() {
setLinks();
}
uint8_t getTableId() { return tableId; }
uint8_t getTableId() {
return tableId;
}
uint16_t getAddress() { return address; }
uint16_t getAddress() {
return address;
}
uint8_t getParameterSize() { return parameterSize; }
uint8_t getParameterSize(){
return parameterSize;
}
private:
GetParamMessageUnpacker(const GetParamMessageUnpacker &message);
void setLinks() {
setStart(&tableId);
tableId.setNext(&address);
address.setNext(&parameterSize);
}
SerializeElement<uint8_t> tableId;
SerializeElement<uint16_t> address; //The memory address offset within the table
/* The size of the requested value (e.g. temperature is a uint16_t value) */
SerializeElement<uint8_t> parameterSize;
private:
GetParamMessageUnpacker(const GetParamMessageUnpacker &message);
void setLinks() {
setStart(&tableId);
tableId.setNext(&address);
address.setNext(&parameterSize);
}
SerializeElement<uint8_t> tableId;
SerializeElement<uint16_t> address; // The memory address offset within the table
/* The size of the requested value (e.g. temperature is a uint16_t value) */
SerializeElement<uint8_t> parameterSize;
};
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEPACKETS_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,14 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_GYROADIS16507DEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_GYROADIS16507DEFINITIONS_H_
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
#include "fsfw/datapoollocal/StaticLocalDataSet.h"
#include <cstddef>
#include "fsfw/datapoollocal/StaticLocalDataSet.h"
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
namespace ADIS1650X {
enum class Type {
ADIS16505,
ADIS16507
};
enum class Type { ADIS16505, ADIS16507 };
static constexpr size_t MAXIMUM_REPLY_SIZE = 64;
static constexpr uint8_t WRITE_MASK = 0b1000'0000;
@ -63,91 +60,82 @@ static constexpr size_t SENSOR_READOUT_SIZE = 20 + 2;
static constexpr uint32_t ADIS_DATASET_ID = READ_SENSOR_DATA;
static constexpr uint32_t ADIS_CFG_DATASET_ID = READ_OUT_CONFIG;
enum GlobCmds: uint8_t {
FACTORY_CALIBRATION = 0b0000'0010,
SENSOR_SELF_TEST = 0b0000'0100,
FLASH_MEMORY_UPDATE = 0b0000'1000,
FLASH_MEMORY_TEST = 0b0001'0000,
SOFTWARE_RESET = 0b1000'0000
enum GlobCmds : uint8_t {
FACTORY_CALIBRATION = 0b0000'0010,
SENSOR_SELF_TEST = 0b0000'0100,
FLASH_MEMORY_UPDATE = 0b0000'1000,
FLASH_MEMORY_TEST = 0b0001'0000,
SOFTWARE_RESET = 0b1000'0000
};
enum PrimaryPoolIds: lp_id_t {
ANG_VELOC_X,
ANG_VELOC_Y,
ANG_VELOC_Z,
ACCELERATION_X,
ACCELERATION_Y,
ACCELERATION_Z,
TEMPERATURE,
DIAG_STAT_REGISTER,
FILTER_SETTINGS,
MSC_CTRL_REGISTER,
DEC_RATE_REGISTER,
enum PrimaryPoolIds : lp_id_t {
ANG_VELOC_X,
ANG_VELOC_Y,
ANG_VELOC_Z,
ACCELERATION_X,
ACCELERATION_Y,
ACCELERATION_Z,
TEMPERATURE,
DIAG_STAT_REGISTER,
FILTER_SETTINGS,
MSC_CTRL_REGISTER,
DEC_RATE_REGISTER,
};
enum FilterSettings: uint8_t {
NO_FILTER = 0,
TWO_TAPS = 1,
FOUR_TAPS = 2,
EIGHT_TAPS = 3,
SIXTEEN_TAPS = 4,
THIRTYTWO_TAPS = 5,
SIXTYFOUR_TAPS = 6
enum FilterSettings : uint8_t {
NO_FILTER = 0,
TWO_TAPS = 1,
FOUR_TAPS = 2,
EIGHT_TAPS = 3,
SIXTEEN_TAPS = 4,
THIRTYTWO_TAPS = 5,
SIXTYFOUR_TAPS = 6
};
}
} // namespace ADIS1650X
class AdisGyroPrimaryDataset: public StaticLocalDataSet<8> {
public:
class AdisGyroPrimaryDataset : public StaticLocalDataSet<8> {
public:
/** Constructor for data users like controllers */
AdisGyroPrimaryDataset(object_id_t adisId)
: StaticLocalDataSet(sid_t(adisId, ADIS1650X::ADIS_DATASET_ID)) {
setAllVariablesReadOnly();
}
/** Constructor for data users like controllers */
AdisGyroPrimaryDataset(object_id_t adisId):
StaticLocalDataSet(sid_t(adisId, ADIS1650X::ADIS_DATASET_ID)) {
setAllVariablesReadOnly();
}
/* Angular velocities in degrees per second (DPS) */
lp_var_t<double> angVelocX = lp_var_t<double>(sid.objectId, ADIS1650X::ANG_VELOC_X, this);
lp_var_t<double> angVelocY = lp_var_t<double>(sid.objectId, ADIS1650X::ANG_VELOC_Y, this);
lp_var_t<double> angVelocZ = lp_var_t<double>(sid.objectId, ADIS1650X::ANG_VELOC_Z, this);
lp_var_t<double> accelX = lp_var_t<double>(sid.objectId, ADIS1650X::ACCELERATION_X, this);
lp_var_t<double> accelY = lp_var_t<double>(sid.objectId, ADIS1650X::ACCELERATION_Y, this);
lp_var_t<double> accelZ = lp_var_t<double>(sid.objectId, ADIS1650X::ACCELERATION_Z, this);
lp_var_t<float> temperature = lp_var_t<float>(sid.objectId, ADIS1650X::TEMPERATURE, this);
/* Angular velocities in degrees per second (DPS) */
lp_var_t<double> angVelocX = lp_var_t<double>(sid.objectId,
ADIS1650X::ANG_VELOC_X, this);
lp_var_t<double> angVelocY = lp_var_t<double>(sid.objectId,
ADIS1650X::ANG_VELOC_Y, this);
lp_var_t<double> angVelocZ = lp_var_t<double>(sid.objectId,
ADIS1650X::ANG_VELOC_Z, this);
lp_var_t<double> accelX = lp_var_t<double>(sid.objectId,
ADIS1650X::ACCELERATION_X, this);
lp_var_t<double> accelY = lp_var_t<double>(sid.objectId,
ADIS1650X::ACCELERATION_Y, this);
lp_var_t<double> accelZ = lp_var_t<double>(sid.objectId,
ADIS1650X::ACCELERATION_Z, this);
lp_var_t<float> temperature = lp_var_t<float>(sid.objectId,
ADIS1650X::TEMPERATURE, this);
private:
friend class GyroADIS1650XHandler;
/** Constructor for the data creator */
AdisGyroPrimaryDataset(HasLocalDataPoolIF* hkOwner):
StaticLocalDataSet(hkOwner, ADIS1650X::ADIS_DATASET_ID) {}
private:
friend class GyroADIS1650XHandler;
/** Constructor for the data creator */
AdisGyroPrimaryDataset(HasLocalDataPoolIF* hkOwner)
: StaticLocalDataSet(hkOwner, ADIS1650X::ADIS_DATASET_ID) {}
};
class AdisGyroConfigDataset: public StaticLocalDataSet<5> {
public:
class AdisGyroConfigDataset : public StaticLocalDataSet<5> {
public:
/** Constructor for data users like controllers */
AdisGyroConfigDataset(object_id_t adisId)
: StaticLocalDataSet(sid_t(adisId, ADIS1650X::ADIS_CFG_DATASET_ID)) {
setAllVariablesReadOnly();
}
/** Constructor for data users like controllers */
AdisGyroConfigDataset(object_id_t adisId):
StaticLocalDataSet(sid_t(adisId, ADIS1650X::ADIS_CFG_DATASET_ID)) {
setAllVariablesReadOnly();
}
lp_var_t<uint16_t> diagStatReg = lp_var_t<uint16_t>(sid.objectId, ADIS1650X::DIAG_STAT_REGISTER);
lp_var_t<uint8_t> filterSetting = lp_var_t<uint8_t>(sid.objectId, ADIS1650X::FILTER_SETTINGS);
lp_var_t<uint16_t> mscCtrlReg = lp_var_t<uint16_t>(sid.objectId, ADIS1650X::MSC_CTRL_REGISTER);
lp_var_t<uint16_t> decRateReg = lp_var_t<uint16_t>(sid.objectId, ADIS1650X::DEC_RATE_REGISTER);
lp_var_t<uint16_t> diagStatReg = lp_var_t<uint16_t>(sid.objectId,
ADIS1650X::DIAG_STAT_REGISTER);
lp_var_t<uint8_t> filterSetting = lp_var_t<uint8_t>(sid.objectId, ADIS1650X::FILTER_SETTINGS);
lp_var_t<uint16_t> mscCtrlReg = lp_var_t<uint16_t>(sid.objectId, ADIS1650X::MSC_CTRL_REGISTER);
lp_var_t<uint16_t> decRateReg = lp_var_t<uint16_t>(sid.objectId, ADIS1650X::DEC_RATE_REGISTER);
private:
friend class GyroADIS1650XHandler;
/** Constructor for the data creator */
AdisGyroConfigDataset(HasLocalDataPoolIF* hkOwner):
StaticLocalDataSet(hkOwner, ADIS1650X::ADIS_CFG_DATASET_ID) {}
private:
friend class GyroADIS1650XHandler;
/** Constructor for the data creator */
AdisGyroConfigDataset(HasLocalDataPoolIF* hkOwner)
: StaticLocalDataSet(hkOwner, ADIS1650X::ADIS_CFG_DATASET_ID) {}
};
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GYROADIS16507DEFINITIONS_H_ */

View File

@ -3,6 +3,7 @@
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <cstdint>
namespace L3GD20H {
@ -36,8 +37,8 @@ static constexpr uint8_t SET_Z_ENABLE = 1 << 2;
static constexpr uint8_t SET_X_ENABLE = 1 << 1;
static constexpr uint8_t SET_Y_ENABLE = 1;
static constexpr uint8_t CTRL_REG_1_VAL = SET_POWER_NORMAL_MODE | SET_Z_ENABLE |
SET_Y_ENABLE | SET_X_ENABLE;
static constexpr uint8_t CTRL_REG_1_VAL =
SET_POWER_NORMAL_MODE | SET_Z_ENABLE | SET_Y_ENABLE | SET_X_ENABLE;
/* Register 2 */
static constexpr uint8_t EXTERNAL_EDGE_ENB = 1 << 7;
@ -101,40 +102,29 @@ static constexpr DeviceCommandId_t READ_CTRL_REGS = 2;
static constexpr uint32_t GYRO_DATASET_ID = READ_REGS;
enum GyroPoolIds: lp_id_t {
ANG_VELOC_X,
ANG_VELOC_Y,
ANG_VELOC_Z,
TEMPERATURE
enum GyroPoolIds : lp_id_t { ANG_VELOC_X, ANG_VELOC_Y, ANG_VELOC_Z, TEMPERATURE };
} // namespace L3GD20H
class GyroPrimaryDataset : public StaticLocalDataSet<5> {
public:
/** Constructor for data users like controllers */
GyroPrimaryDataset(object_id_t mgmId)
: StaticLocalDataSet(sid_t(mgmId, L3GD20H::GYRO_DATASET_ID)) {
setAllVariablesReadOnly();
}
/* Angular velocities in degrees per second (DPS) */
lp_var_t<float> angVelocX = lp_var_t<float>(sid.objectId, L3GD20H::ANG_VELOC_X, this);
lp_var_t<float> angVelocY = lp_var_t<float>(sid.objectId, L3GD20H::ANG_VELOC_Y, this);
lp_var_t<float> angVelocZ = lp_var_t<float>(sid.objectId, L3GD20H::ANG_VELOC_Z, this);
lp_var_t<float> temperature = lp_var_t<float>(sid.objectId, L3GD20H::TEMPERATURE, this);
private:
friend class GyroHandlerL3GD20H;
/** Constructor for the data creator */
GyroPrimaryDataset(HasLocalDataPoolIF* hkOwner)
: StaticLocalDataSet(hkOwner, L3GD20H::GYRO_DATASET_ID) {}
};
}
class GyroPrimaryDataset: public StaticLocalDataSet<5> {
public:
/** Constructor for data users like controllers */
GyroPrimaryDataset(object_id_t mgmId):
StaticLocalDataSet(sid_t(mgmId, L3GD20H::GYRO_DATASET_ID)) {
setAllVariablesReadOnly();
}
/* Angular velocities in degrees per second (DPS) */
lp_var_t<float> angVelocX = lp_var_t<float>(sid.objectId,
L3GD20H::ANG_VELOC_X, this);
lp_var_t<float> angVelocY = lp_var_t<float>(sid.objectId,
L3GD20H::ANG_VELOC_Y, this);
lp_var_t<float> angVelocZ = lp_var_t<float>(sid.objectId,
L3GD20H::ANG_VELOC_Z, this);
lp_var_t<float> temperature = lp_var_t<float>(sid.objectId,
L3GD20H::TEMPERATURE, this);
private:
friend class GyroHandlerL3GD20H;
/** Constructor for the data creator */
GyroPrimaryDataset(HasLocalDataPoolIF* hkOwner):
StaticLocalDataSet(hkOwner, L3GD20H::GYRO_DATASET_ID) {}
};
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GYROL3GD20DEFINITIONS_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,15 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_MAX13865DEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_MAX13865DEFINITIONS_H_
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include <fsfw/datapoollocal/LocalPoolVariable.h>
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include "objects/systemObjectList.h"
namespace Max31865Definitions {
enum PoolIds: lp_id_t {
RTD_VALUE,
TEMPERATURE_C,
FAULT_BYTE
};
enum PoolIds : lp_id_t { RTD_VALUE, TEMPERATURE_C, FAULT_BYTE };
static constexpr DeviceCommandId_t CONFIG_CMD = 0x80;
static constexpr DeviceCommandId_t WRITE_HIGH_THRESHOLD = 0x83;
@ -31,35 +28,26 @@ static constexpr uint8_t CLEAR_FAULT_BIT_VAL = 0b0000'0010;
static constexpr size_t MAX_REPLY_SIZE = 5;
class Max31865Set:
public StaticLocalDataSet<sizeof(float) + sizeof(uint8_t)> {
public:
/**
* Constructor used by owner and data creators like device handlers.
* @param owner
* @param setId
*/
Max31865Set(HasLocalDataPoolIF* owner):
StaticLocalDataSet(owner, MAX31865_SET_ID) {
}
class Max31865Set : public StaticLocalDataSet<sizeof(float) + sizeof(uint8_t)> {
public:
/**
* Constructor used by owner and data creators like device handlers.
* @param owner
* @param setId
*/
Max31865Set(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, MAX31865_SET_ID) {}
/**
* Constructor used by data users like controllers.
* @param sid
*/
Max31865Set(object_id_t objectId):
StaticLocalDataSet(sid_t(objectId, MAX31865_SET_ID)) {
}
/**
* Constructor used by data users like controllers.
* @param sid
*/
Max31865Set(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, MAX31865_SET_ID)) {}
lp_var_t<float> rtdValue = lp_var_t<float>(sid.objectId,
PoolIds::RTD_VALUE, this);
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId,
PoolIds::TEMPERATURE_C, this);
lp_var_t<uint8_t> errorByte = lp_var_t<uint8_t>(sid.objectId,
PoolIds::FAULT_BYTE, this);
lp_var_t<float> rtdValue = lp_var_t<float>(sid.objectId, PoolIds::RTD_VALUE, this);
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId, PoolIds::TEMPERATURE_C, this);
lp_var_t<uint8_t> errorByte = lp_var_t<uint8_t>(sid.objectId, PoolIds::FAULT_BYTE, this);
};
}
} // namespace Max31865Definitions
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_MAX13865DEFINITIONS_H_ */

View File

@ -1,172 +1,166 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_PLOCMPSOCDEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_PLOCMPSOCDEFINITIONS_H_
#include <fsfw/tmtcpacket/SpacePacket.h>
#include <fsfw/globalfunctions/CRC.h>
#include <fsfw/serialize/SerializeAdapter.h>
#include <fsfw/tmtcpacket/SpacePacket.h>
namespace PLOC_MPSOC {
static const DeviceCommandId_t NONE = 0x0;
static const DeviceCommandId_t TC_MEM_WRITE = 0x1;
static const DeviceCommandId_t TC_MEM_READ = 0x2;
static const DeviceCommandId_t ACK_REPORT = 0x3;
static const DeviceCommandId_t EXE_REPORT = 0x5;
static const DeviceCommandId_t TM_MEMORY_READ_REPORT = 0x6;
static const DeviceCommandId_t NONE = 0x0;
static const DeviceCommandId_t TC_MEM_WRITE = 0x1;
static const DeviceCommandId_t TC_MEM_READ = 0x2;
static const DeviceCommandId_t ACK_REPORT = 0x3;
static const DeviceCommandId_t EXE_REPORT = 0x5;
static const DeviceCommandId_t TM_MEMORY_READ_REPORT = 0x6;
static const uint16_t SIZE_ACK_REPORT = 14;
static const uint16_t SIZE_EXE_REPORT = 14;
static const uint16_t SIZE_TM_MEM_READ_REPORT = 18;
static const uint16_t SIZE_ACK_REPORT = 14;
static const uint16_t SIZE_EXE_REPORT = 14;
static const uint16_t SIZE_TM_MEM_READ_REPORT = 18;
/**
* SpacePacket apids of PLOC telecommands and telemetry.
*/
static const uint16_t APID_TC_MEM_WRITE = 0x714;
static const uint16_t APID_TC_MEM_READ = 0x715;
static const uint16_t APID_TM_MEMORY_READ_REPORT = 0x404;
static const uint16_t APID_ACK_SUCCESS = 0x400;
static const uint16_t APID_ACK_FAILURE = 0x401;
static const uint16_t APID_EXE_SUCCESS = 0x402;
static const uint16_t APID_EXE_FAILURE = 0x403;
/**
* SpacePacket apids of PLOC telecommands and telemetry.
*/
static const uint16_t APID_TC_MEM_WRITE = 0x714;
static const uint16_t APID_TC_MEM_READ = 0x715;
static const uint16_t APID_TM_MEMORY_READ_REPORT = 0x404;
static const uint16_t APID_ACK_SUCCESS = 0x400;
static const uint16_t APID_ACK_FAILURE = 0x401;
static const uint16_t APID_EXE_SUCCESS = 0x402;
static const uint16_t APID_EXE_FAILURE = 0x403;
/** Offset from first byte in Space packet to first byte of data field */
static const uint8_t DATA_FIELD_OFFSET = 6;
/** Offset from first byte in Space packet to first byte of data field */
static const uint8_t DATA_FIELD_OFFSET = 6;
/**
* The size of payload data which will be forwarded to the requesting object. e.g. PUS Service
* 8.
*/
static const uint8_t SIZE_MEM_READ_REPORT_DATA = 10;
/**
* The size of payload data which will be forwarded to the requesting object. e.g. PUS Service
* 8.
*/
static const uint8_t SIZE_MEM_READ_REPORT_DATA = 10;
/**
* PLOC space packet length for fixed size packets. This is the size of the whole packet data
* field. For the length field in the space packet this size will be substracted by one.
*/
static const uint16_t LENGTH_TC_MEM_WRITE = 12;
static const uint16_t LENGTH_TC_MEM_READ = 8;
/**
* PLOC space packet length for fixed size packets. This is the size of the whole packet data
* field. For the length field in the space packet this size will be substracted by one.
*/
static const uint16_t LENGTH_TC_MEM_WRITE = 12;
static const uint16_t LENGTH_TC_MEM_READ = 8;
static const size_t MAX_REPLY_SIZE = SIZE_TM_MEM_READ_REPORT;
static const size_t MAX_COMMAND_SIZE = 18;
static const size_t MAX_REPLY_SIZE = SIZE_TM_MEM_READ_REPORT;
static const size_t MAX_COMMAND_SIZE = 18;
/**
* @brief This class helps to build the memory read command for the PLOC.
*
* @details The last two bytes of the packet data field contain a CRC calculated over the whole
* space packet. This is the CRC-16-CCITT as specified in
* ECSS-E-ST-70-41C Telemetry and telecommand packet utilization.
*/
class TcMemRead : public SpacePacket {
public:
/**
* @brief This class helps to build the memory read command for the PLOC.
*
* @details The last two bytes of the packet data field contain a CRC calculated over the whole
* space packet. This is the CRC-16-CCITT as specified in
* ECSS-E-ST-70-41C Telemetry and telecommand packet utilization.
*/
class TcMemRead : public SpacePacket {
public:
/**
* @brief Constructor
*
* @param memAddr The memory address to read from.
*/
TcMemRead(const uint32_t memAddr, uint16_t sequenceCount)
: SpacePacket(LENGTH_TC_MEM_READ - 1, true, APID_TC_MEM_READ, sequenceCount) {
fillPacketDataField(&memAddr);
}
/**
* @brief Constructor
*
* @param memAddr The memory address to read from.
*/
TcMemRead(const uint32_t memAddr, uint16_t sequenceCount) :
SpacePacket(LENGTH_TC_MEM_READ - 1, true, APID_TC_MEM_READ, sequenceCount) {
fillPacketDataField(&memAddr);
}
private:
/**
* @brief This function builds the packet data field for the mem read command.
*
* @param memAddrPtr Pointer to the memory address to read from.
*/
void fillPacketDataField(const uint32_t* memAddrPtr) {
/* Add memAddr to packet data field */
size_t serializedSize = 0;
uint8_t* memoryAddressPos = this->localData.fields.buffer;
SerializeAdapter::serialize<uint32_t>(memAddrPtr, &memoryAddressPos, &serializedSize,
sizeof(*memAddrPtr), SerializeIF::Endianness::LITTLE);
private:
/* Add memLen to packet data field */
this->localData.fields.buffer[OFFSET_MEM_LEN_FIELD] = 1;
this->localData.fields.buffer[OFFSET_MEM_LEN_FIELD + 1] = 0;
/**
* @brief This function builds the packet data field for the mem read command.
*
* @param memAddrPtr Pointer to the memory address to read from.
*/
void fillPacketDataField(const uint32_t* memAddrPtr) {
/* Add memAddr to packet data field */
size_t serializedSize = 0;
uint8_t* memoryAddressPos = this->localData.fields.buffer;
SerializeAdapter::serialize<uint32_t>(memAddrPtr, &memoryAddressPos, &serializedSize,
sizeof(*memAddrPtr), SerializeIF::Endianness::LITTLE);
/* Calculate crc */
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
sizeof(CCSDSPrimaryHeader) + LENGTH_TC_MEM_READ - CRC_SIZE);
/* Add memLen to packet data field */
this->localData.fields.buffer[OFFSET_MEM_LEN_FIELD] = 1;
this->localData.fields.buffer[OFFSET_MEM_LEN_FIELD + 1] = 0;
/* Add crc to packet data field of space packet */
serializedSize = 0;
uint8_t* crcPos = this->localData.fields.buffer + CRC_OFFSET;
SerializeAdapter::serialize<uint16_t>(&crc, &crcPos, &serializedSize, sizeof(crc),
SerializeIF::Endianness::BIG);
}
/* Calculate crc */
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
sizeof(CCSDSPrimaryHeader) + LENGTH_TC_MEM_READ - CRC_SIZE);
static const uint8_t OFFSET_MEM_LEN_FIELD = 4;
static const uint8_t CRC_OFFSET = 6;
};
/* Add crc to packet data field of space packet */
serializedSize = 0;
uint8_t* crcPos = this->localData.fields.buffer + CRC_OFFSET;
SerializeAdapter::serialize<uint16_t>(&crc, &crcPos, &serializedSize,
sizeof(crc), SerializeIF::Endianness::BIG);
}
/**
* @brief This class helps to generate the space packet to write to a memory address within
* the PLOC.
* @details The last two bytes of the packet data field contain a CRC calculated over the whole
* space packet. This is the CRC-16-CCITT as specified in
* ECSS-E-ST-70-41C Telemetry and telecommand packet utilization.
*/
class TcMemWrite : public SpacePacket {
public:
/**
* @brief Constructor
*
* @param memAddr The PLOC memory address where to write to.
* @param memoryData The data to write to the specified memory address.
* @param sequenceCount The subsequence count. Must be incremented with each new packet.
*/
TcMemWrite(const uint32_t memAddr, const uint32_t memoryData, uint16_t sequenceCount)
: SpacePacket(LENGTH_TC_MEM_WRITE - 1, true, APID_TC_MEM_WRITE, sequenceCount) {
fillPacketDataField(&memAddr, &memoryData);
}
static const uint8_t OFFSET_MEM_LEN_FIELD = 4;
static const uint8_t CRC_OFFSET = 6;
private:
/**
* @brief This function builds the packet data field for the mem write command.
*
* @param memAddrPtr Pointer to the PLOC memory address where to write to.
* @param memoryDataPtr Pointer to the memoryData to write
*/
void fillPacketDataField(const uint32_t* memAddrPtr, const uint32_t* memoryDataPtr) {
/* Add memAddr to packet data field */
size_t serializedSize = 0;
uint8_t* memoryAddressPos = this->localData.fields.buffer;
SerializeAdapter::serialize<uint32_t>(memAddrPtr, &memoryAddressPos, &serializedSize,
sizeof(*memAddrPtr), SerializeIF::Endianness::BIG);
};
/* Add memLen to packet data field */
this->localData.fields.buffer[OFFSET_MEM_LEN_FIELD] = 1;
this->localData.fields.buffer[OFFSET_MEM_LEN_FIELD + 1] = 0;
/**
* @brief This class helps to generate the space packet to write to a memory address within
* the PLOC.
* @details The last two bytes of the packet data field contain a CRC calculated over the whole
* space packet. This is the CRC-16-CCITT as specified in
* ECSS-E-ST-70-41C Telemetry and telecommand packet utilization.
*/
class TcMemWrite : public SpacePacket {
public:
/**
* @brief Constructor
*
* @param memAddr The PLOC memory address where to write to.
* @param memoryData The data to write to the specified memory address.
* @param sequenceCount The subsequence count. Must be incremented with each new packet.
*/
TcMemWrite(const uint32_t memAddr, const uint32_t memoryData, uint16_t sequenceCount) :
SpacePacket(LENGTH_TC_MEM_WRITE - 1, true, APID_TC_MEM_WRITE, sequenceCount) {
fillPacketDataField(&memAddr, &memoryData);
}
/* Add memData to packet data field */
serializedSize = 0;
uint8_t* memoryDataPos = this->localData.fields.buffer + OFFSET_MEM_DATA_FIELD;
SerializeAdapter::serialize<uint32_t>(memoryDataPtr, &memoryDataPos, &serializedSize,
sizeof(*memoryDataPtr), SerializeIF::Endianness::BIG);
private:
/* Calculate crc */
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
sizeof(CCSDSPrimaryHeader) + LENGTH_TC_MEM_WRITE - CRC_SIZE);
/**
* @brief This function builds the packet data field for the mem write command.
*
* @param memAddrPtr Pointer to the PLOC memory address where to write to.
* @param memoryDataPtr Pointer to the memoryData to write
*/
void fillPacketDataField(const uint32_t* memAddrPtr, const uint32_t* memoryDataPtr) {
serializedSize = 0;
uint8_t* crcPos = this->localData.fields.buffer + CRC_OFFSET;
/* Add crc to packet data field of space packet */
SerializeAdapter::serialize<uint16_t>(&crc, &crcPos, &serializedSize, sizeof(crc),
SerializeIF::Endianness::BIG);
}
/* Add memAddr to packet data field */
size_t serializedSize = 0;
uint8_t* memoryAddressPos = this->localData.fields.buffer;
SerializeAdapter::serialize<uint32_t>(memAddrPtr, &memoryAddressPos, &serializedSize,
sizeof(*memAddrPtr), SerializeIF::Endianness::BIG);
/* Add memLen to packet data field */
this->localData.fields.buffer[OFFSET_MEM_LEN_FIELD] = 1;
this->localData.fields.buffer[OFFSET_MEM_LEN_FIELD + 1] = 0;
/* Add memData to packet data field */
serializedSize = 0;
uint8_t* memoryDataPos = this->localData.fields.buffer + OFFSET_MEM_DATA_FIELD;
SerializeAdapter::serialize<uint32_t>(memoryDataPtr, &memoryDataPos, &serializedSize,
sizeof(*memoryDataPtr), SerializeIF::Endianness::BIG);
/* Calculate crc */
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
sizeof(CCSDSPrimaryHeader) + LENGTH_TC_MEM_WRITE - CRC_SIZE);
serializedSize = 0;
uint8_t* crcPos = this->localData.fields.buffer + CRC_OFFSET;
/* Add crc to packet data field of space packet */
SerializeAdapter::serialize<uint16_t>(&crc, &crcPos, &serializedSize,
sizeof(crc), SerializeIF::Endianness::BIG);
}
/** Offsets from base address of packet data field */
static const uint8_t OFFSET_MEM_LEN_FIELD = 4;
static const uint8_t OFFSET_MEM_DATA_FIELD = 6;
static const uint8_t CRC_OFFSET = 10;
};
}
/** Offsets from base address of packet data field */
static const uint8_t OFFSET_MEM_LEN_FIELD = 4;
static const uint8_t OFFSET_MEM_DATA_FIELD = 6;
static const uint8_t CRC_OFFSET = 10;
};
} // namespace PLOC_MPSOC
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_PLOCMPSOCDEFINITIONS_H_ */

View File

@ -3,84 +3,79 @@
namespace RAD_SENSOR {
static const DeviceCommandId_t NONE = 0x0; // Set when no command is pending
static const DeviceCommandId_t NONE = 0x0; // Set when no command is pending
/**
* This command initiates the ADC conversion for all channels including the internal
* temperature sensor.
*/
static const DeviceCommandId_t WRITE_SETUP = 0x1;
static const DeviceCommandId_t START_CONVERSION = 0x2;
static const DeviceCommandId_t READ_CONVERSIONS = 0x3;
/**
* This command initiates the ADC conversion for all channels including the internal
* temperature sensor.
*/
static const DeviceCommandId_t WRITE_SETUP = 0x1;
static const DeviceCommandId_t START_CONVERSION = 0x2;
static const DeviceCommandId_t READ_CONVERSIONS = 0x3;
/**
* @brief This is the configuration byte which will be written to the setup register after
* power on.
*
* @note Bit1 (DIFFSEL1) - Bit0 (DIFFSEL0): 0b00, no data follows the setup byte
* Bit3 (REFSEL1) - Bit2 (REFSEL0): 0b10, internal reference, no wake-up delay
* Bit5 (CLKSEL1) - Bit4 (CLKSEL0): 0b10, MAX1227 uses internal oscillator for timing
* Bit7 - Bit6: 0b01, tells MAX1227 that this is the setup register
*
*/
static const uint8_t SETUP_DEFINITION = 0b01101000;
/**
* @brief This is the configuration byte which will be written to the setup register after
* power on.
*
* @note Bit1 (DIFFSEL1) - Bit0 (DIFFSEL0): 0b00, no data follows the setup byte
* Bit3 (REFSEL1) - Bit2 (REFSEL0): 0b10, internal reference, no wake-up delay
* Bit5 (CLKSEL1) - Bit4 (CLKSEL0): 0b10, MAX1227 uses internal oscillator for timing
* Bit7 - Bit6: 0b01, tells MAX1227 that this is the setup register
*
*/
static const uint8_t SETUP_DEFINITION = 0b01101000;
/**
* @brief This value will always be written to the ADC conversion register to specify the
* conversions to perform.
* @details Bit0: 1 - Enables temperature conversion
* Bit2 (SCAN1) and Bit1 (SCAN0): 0b00 (channel conversion from 0 to N)
* Bit6 - Bit3 defines N: 0b0111 (N = 7)
* Bit7: Always 1. Tells the ADC that this is the conversion register.
*/
static const uint8_t CONVERSION_DEFINITION = 0b10111001;
/**
* @brief This value will always be written to the ADC conversion register to specify the
* conversions to perform.
* @details Bit0: 1 - Enables temperature conversion
* Bit2 (SCAN1) and Bit1 (SCAN0): 0b00 (channel conversion from 0 to N)
* Bit6 - Bit3 defines N: 0b0111 (N = 7)
* Bit7: Always 1. Tells the ADC that this is the conversion register.
*/
static const uint8_t CONVERSION_DEFINITION = 0b10111001;
// static const uint8_t CONVERSION_DEFINITION = 0b10111111;
/**
* @brief Writing this value resets the fifo of the MAX1227.
*/
static const uint8_t RESET_DEFINITION = 0b00011000;
/**
* @brief Writing this value resets the fifo of the MAX1227.
*/
static const uint8_t RESET_DEFINITION = 0b00011000;
static const uint8_t DUMMY_BYTE = 0xFF;
static const uint8_t DUMMY_BYTE = 0xFF;
static const uint8_t RAD_SENSOR_DATA_SET_ID = READ_CONVERSIONS;
static const uint8_t RAD_SENSOR_DATA_SET_ID = READ_CONVERSIONS;
static const uint8_t DATASET_ENTRIES = 7;
/**
* One temperature value and conversions for AIN0 - AIN7
*/
static const uint8_t READ_SIZE = 18;
static const uint8_t DATASET_ENTRIES = 7;
/**
* One temperature value and conversions for AIN0 - AIN7
*/
static const uint8_t READ_SIZE = 18;
enum Max1227PoolIds: lp_id_t {
TEMPERATURE_C,
AIN0,
AIN1,
AIN4,
AIN5,
AIN6,
AIN7,
};
class RadSensorDataset: public StaticLocalDataSet<DATASET_ENTRIES> {
public:
RadSensorDataset(HasLocalDataPoolIF* owner) :
StaticLocalDataSet(owner, RAD_SENSOR_DATA_SET_ID) {
}
RadSensorDataset(object_id_t objectId) :
StaticLocalDataSet(sid_t(objectId, RAD_SENSOR_DATA_SET_ID)) {
}
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId, TEMPERATURE_C, this);
lp_var_t<uint16_t> ain0 = lp_var_t<uint16_t>(sid.objectId, AIN0, this);
lp_var_t<uint16_t> ain1 = lp_var_t<uint16_t>(sid.objectId, AIN1, this);
lp_var_t<uint16_t> ain4 = lp_var_t<uint16_t>(sid.objectId, AIN4, this);
lp_var_t<uint16_t> ain5 = lp_var_t<uint16_t>(sid.objectId, AIN5, this);
lp_var_t<uint16_t> ain6 = lp_var_t<uint16_t>(sid.objectId, AIN6, this);
lp_var_t<uint16_t> ain7 = lp_var_t<uint16_t>(sid.objectId, AIN7, this);
enum Max1227PoolIds : lp_id_t {
TEMPERATURE_C,
AIN0,
AIN1,
AIN4,
AIN5,
AIN6,
AIN7,
};
}
class RadSensorDataset : public StaticLocalDataSet<DATASET_ENTRIES> {
public:
RadSensorDataset(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, RAD_SENSOR_DATA_SET_ID) {}
RadSensorDataset(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, RAD_SENSOR_DATA_SET_ID)) {}
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId, TEMPERATURE_C, this);
lp_var_t<uint16_t> ain0 = lp_var_t<uint16_t>(sid.objectId, AIN0, this);
lp_var_t<uint16_t> ain1 = lp_var_t<uint16_t>(sid.objectId, AIN1, this);
lp_var_t<uint16_t> ain4 = lp_var_t<uint16_t>(sid.objectId, AIN4, this);
lp_var_t<uint16_t> ain5 = lp_var_t<uint16_t>(sid.objectId, AIN5, this);
lp_var_t<uint16_t> ain6 = lp_var_t<uint16_t>(sid.objectId, AIN6, this);
lp_var_t<uint16_t> ain7 = lp_var_t<uint16_t>(sid.objectId, AIN7, this);
};
} // namespace RAD_SENSOR
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_RADSENSOR_H_ */

View File

@ -1,66 +1,61 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_RWDEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_RWDEFINITIONS_H_
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include <fsfw/datapoollocal/LocalPoolVariable.h>
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include "objects/systemObjectList.h"
namespace RwDefinitions {
static const uint32_t SPI_REPLY_DELAY = 70000; //us
static const uint32_t SPI_REPLY_DELAY = 70000; // us
enum PoolIds: lp_id_t {
TEMPERATURE_C,
CURR_SPEED,
REFERENCE_SPEED,
STATE,
CLC_MODE,
LAST_RESET_STATUS,
CURRRENT_RESET_STATUS,
TM_LAST_RESET_STATUS,
TM_MCU_TEMPERATURE,
PRESSURE_SENSOR_TEMPERATURE,
PRESSURE,
TM_RW_STATE,
TM_CLC_MODE,
TM_RW_CURR_SPEED,
TM_RW_REF_SPEED,
INVALID_CRC_PACKETS,
INVALID_LEN_PACKETS,
INVALID_CMD_PACKETS,
EXECUTED_REPLIES,
COMMAND_REPLIES,
UART_BYTES_WRITTEN,
UART_BYTES_READ,
UART_PARITY_ERRORS,
UART_NOISE_ERRORS,
UART_FRAME_ERRORS,
UART_REG_OVERRUN_ERRORS,
UART_TOTAL_ERRORS,
TOTAL_ERRORS,
SPI_BYTES_WRITTEN,
SPI_BYTES_READ,
SPI_REG_OVERRUN_ERRORS,
SPI_TOTAL_ERRORS
enum PoolIds : lp_id_t {
TEMPERATURE_C,
CURR_SPEED,
REFERENCE_SPEED,
STATE,
CLC_MODE,
LAST_RESET_STATUS,
CURRRENT_RESET_STATUS,
TM_LAST_RESET_STATUS,
TM_MCU_TEMPERATURE,
PRESSURE_SENSOR_TEMPERATURE,
PRESSURE,
TM_RW_STATE,
TM_CLC_MODE,
TM_RW_CURR_SPEED,
TM_RW_REF_SPEED,
INVALID_CRC_PACKETS,
INVALID_LEN_PACKETS,
INVALID_CMD_PACKETS,
EXECUTED_REPLIES,
COMMAND_REPLIES,
UART_BYTES_WRITTEN,
UART_BYTES_READ,
UART_PARITY_ERRORS,
UART_NOISE_ERRORS,
UART_FRAME_ERRORS,
UART_REG_OVERRUN_ERRORS,
UART_TOTAL_ERRORS,
TOTAL_ERRORS,
SPI_BYTES_WRITTEN,
SPI_BYTES_READ,
SPI_REG_OVERRUN_ERRORS,
SPI_TOTAL_ERRORS
};
enum States: uint8_t {
STATE_ERROR,
IDLE,
COASTING,
RUNNING_SPEED_STABLE,
RUNNING_SPEED_CHANGING
};
enum States : uint8_t { STATE_ERROR, IDLE, COASTING, RUNNING_SPEED_STABLE, RUNNING_SPEED_CHANGING };
enum LastResetStatus: uint8_t {
CLEARED = 0,
PIN_RESET = 1,
POR_PDR_BOR_RESET = 2,
SOFTWARE_RESET = 4,
INDEPENDENT_WATCHDOG_RESET = 8,
WINDOW_WATCHDOG_RESET = 16,
LOW_POWER_RESET = 32
enum LastResetStatus : uint8_t {
CLEARED = 0,
PIN_RESET = 1,
POR_PDR_BOR_RESET = 2,
SOFTWARE_RESET = 4,
INDEPENDENT_WATCHDOG_RESET = 8,
WINDOW_WATCHDOG_RESET = 16,
LOW_POWER_RESET = 32
};
static const DeviceCommandId_t RESET_MCU = 1;
@ -103,66 +98,45 @@ static const uint8_t TM_SET_ENTRIES = 24;
/**
* @brief This dataset can be used to store the temperature of a reaction wheel.
*/
class TemperatureSet:
public StaticLocalDataSet<TEMPERATURE_SET_ENTRIES> {
public:
class TemperatureSet : public StaticLocalDataSet<TEMPERATURE_SET_ENTRIES> {
public:
TemperatureSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, TEMPERATURE_SET_ID) {}
TemperatureSet(HasLocalDataPoolIF* owner):
StaticLocalDataSet(owner, TEMPERATURE_SET_ID) {
}
TemperatureSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, TEMPERATURE_SET_ID)) {}
TemperatureSet(object_id_t objectId):
StaticLocalDataSet(sid_t(objectId, TEMPERATURE_SET_ID)) {
}
lp_var_t<int32_t> temperatureCelcius = lp_var_t<int32_t>(sid.objectId,
PoolIds::TEMPERATURE_C, this);
lp_var_t<int32_t> temperatureCelcius =
lp_var_t<int32_t>(sid.objectId, PoolIds::TEMPERATURE_C, this);
};
/**
* @brief This dataset can be used to store the reaction wheel status.
*/
class StatusSet:
public StaticLocalDataSet<STATUS_SET_ENTRIES> {
public:
class StatusSet : public StaticLocalDataSet<STATUS_SET_ENTRIES> {
public:
StatusSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, STATUS_SET_ID) {}
StatusSet(HasLocalDataPoolIF* owner):
StaticLocalDataSet(owner, STATUS_SET_ID) {
}
StatusSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, STATUS_SET_ID)) {}
StatusSet(object_id_t objectId):
StaticLocalDataSet(sid_t(objectId, STATUS_SET_ID)) {
}
lp_var_t<int32_t> currSpeed = lp_var_t<int32_t>(sid.objectId,
PoolIds::CURR_SPEED, this);
lp_var_t<int32_t> referenceSpeed = lp_var_t<int32_t>(sid.objectId,
PoolIds::REFERENCE_SPEED, this);
lp_var_t<uint8_t> state = lp_var_t<uint8_t>(sid.objectId,
PoolIds::STATE, this);
lp_var_t<uint8_t> clcMode = lp_var_t<uint8_t>(sid.objectId,
PoolIds::CLC_MODE, this);
lp_var_t<int32_t> currSpeed = lp_var_t<int32_t>(sid.objectId, PoolIds::CURR_SPEED, this);
lp_var_t<int32_t> referenceSpeed =
lp_var_t<int32_t>(sid.objectId, PoolIds::REFERENCE_SPEED, this);
lp_var_t<uint8_t> state = lp_var_t<uint8_t>(sid.objectId, PoolIds::STATE, this);
lp_var_t<uint8_t> clcMode = lp_var_t<uint8_t>(sid.objectId, PoolIds::CLC_MODE, this);
};
/**
* @brief This dataset stores the last reset status.
*/
class LastResetSatus:
public StaticLocalDataSet<LAST_RESET_ENTRIES> {
public:
class LastResetSatus : public StaticLocalDataSet<LAST_RESET_ENTRIES> {
public:
LastResetSatus(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, LAST_RESET_ID) {}
LastResetSatus(HasLocalDataPoolIF* owner):
StaticLocalDataSet(owner, LAST_RESET_ID) {
}
LastResetSatus(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, LAST_RESET_ID)) {}
LastResetSatus(object_id_t objectId):
StaticLocalDataSet(sid_t(objectId, LAST_RESET_ID)) {
}
lp_var_t<uint8_t> lastResetStatus = lp_var_t<uint8_t>(sid.objectId,
PoolIds::LAST_RESET_STATUS, this);
lp_var_t<uint8_t> currentResetStatus = lp_var_t<uint8_t>(sid.objectId,
PoolIds::CURRRENT_RESET_STATUS, this);
lp_var_t<uint8_t> lastResetStatus =
lp_var_t<uint8_t>(sid.objectId, PoolIds::LAST_RESET_STATUS, this);
lp_var_t<uint8_t> currentResetStatus =
lp_var_t<uint8_t>(sid.objectId, PoolIds::CURRRENT_RESET_STATUS, this);
};
/**
@ -170,69 +144,57 @@ public:
* reaction wheels. https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/
* EIVE_IRS/Arbeitsdaten/08_Used%20Components/Nanoavionics_Reactionwheels&fileid=181622
*/
class TmDataset:
public StaticLocalDataSet<TM_SET_ENTRIES> {
public:
class TmDataset : public StaticLocalDataSet<TM_SET_ENTRIES> {
public:
TmDataset(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, TM_SET_ID) {}
TmDataset(HasLocalDataPoolIF* owner):
StaticLocalDataSet(owner, TM_SET_ID) {
}
TmDataset(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, TM_SET_ID)) {}
TmDataset(object_id_t objectId):
StaticLocalDataSet(sid_t(objectId, TM_SET_ID)) {
}
lp_var_t<uint8_t> lastResetStatus = lp_var_t<uint8_t>(sid.objectId,
PoolIds::TM_LAST_RESET_STATUS, this);
lp_var_t<int32_t> mcuTemperature = lp_var_t<int32_t>(sid.objectId,
PoolIds::TM_MCU_TEMPERATURE, this);
lp_var_t<float> pressureSensorTemperature = lp_var_t<float>(sid.objectId,
PoolIds::PRESSURE_SENSOR_TEMPERATURE, this);
lp_var_t<float> pressure = lp_var_t<float>(sid.objectId,
PoolIds::PRESSURE, this);
lp_var_t<uint8_t> rwState = lp_var_t<uint8_t>(sid.objectId,
PoolIds::TM_RW_STATE, this);
lp_var_t<uint8_t> rwClcMode = lp_var_t<uint8_t>(sid.objectId,
PoolIds::TM_CLC_MODE, this);
lp_var_t<int32_t> rwCurrSpeed = lp_var_t<int32_t>(sid.objectId,
PoolIds::TM_RW_CURR_SPEED, this);
lp_var_t<int32_t> rwRefSpeed = lp_var_t<int32_t>(sid.objectId,
PoolIds::TM_RW_REF_SPEED, this);
lp_var_t<uint32_t> numOfInvalidCrcPackets = lp_var_t<uint32_t>(sid.objectId,
PoolIds::INVALID_CRC_PACKETS, this);
lp_var_t<uint32_t> numOfInvalidLenPackets = lp_var_t<uint32_t>(sid.objectId,
PoolIds::INVALID_LEN_PACKETS, this);
lp_var_t<uint32_t> numOfInvalidCmdPackets = lp_var_t<uint32_t>(sid.objectId,
PoolIds::INVALID_CMD_PACKETS, this);
lp_var_t<uint32_t> numOfCmdExecutedReplies = lp_var_t<uint32_t>(sid.objectId,
PoolIds::EXECUTED_REPLIES, this);
lp_var_t<uint32_t> numOfCmdReplies = lp_var_t<uint32_t>(sid.objectId,
PoolIds::COMMAND_REPLIES, this);
lp_var_t<uint32_t> uartNumOfBytesWritten = lp_var_t<uint32_t>(sid.objectId,
PoolIds::UART_BYTES_WRITTEN, this);
lp_var_t<uint32_t> uartNumOfBytesRead = lp_var_t<uint32_t>(sid.objectId,
PoolIds::UART_BYTES_READ, this);
lp_var_t<uint32_t> uartNumOfParityErrors = lp_var_t<uint32_t>(sid.objectId,
PoolIds::UART_PARITY_ERRORS, this);
lp_var_t<uint32_t> uartNumOfNoiseErrors = lp_var_t<uint32_t>(sid.objectId,
PoolIds::UART_NOISE_ERRORS, this);
lp_var_t<uint32_t> uartNumOfFrameErrors = lp_var_t<uint32_t>(sid.objectId,
PoolIds::UART_FRAME_ERRORS, this);
lp_var_t<uint32_t> uartNumOfRegisterOverrunErrors = lp_var_t<uint32_t>(sid.objectId,
PoolIds::UART_REG_OVERRUN_ERRORS, this);
lp_var_t<uint32_t> uartTotalNumOfErrors = lp_var_t<uint32_t>(sid.objectId,
PoolIds::UART_TOTAL_ERRORS, this);
lp_var_t<uint32_t> spiNumOfBytesWritten = lp_var_t<uint32_t>(sid.objectId,
PoolIds::SPI_BYTES_WRITTEN, this);
lp_var_t<uint32_t> spiNumOfBytesRead = lp_var_t<uint32_t>(sid.objectId,
PoolIds::SPI_BYTES_READ, this);
lp_var_t<uint32_t> spiNumOfRegisterOverrunErrors = lp_var_t<uint32_t>(sid.objectId,
PoolIds::SPI_REG_OVERRUN_ERRORS, this);
lp_var_t<uint32_t> spiTotalNumOfErrors = lp_var_t<uint32_t>(sid.objectId,
PoolIds::SPI_TOTAL_ERRORS, this);
lp_var_t<uint8_t> lastResetStatus =
lp_var_t<uint8_t>(sid.objectId, PoolIds::TM_LAST_RESET_STATUS, this);
lp_var_t<int32_t> mcuTemperature =
lp_var_t<int32_t>(sid.objectId, PoolIds::TM_MCU_TEMPERATURE, this);
lp_var_t<float> pressureSensorTemperature =
lp_var_t<float>(sid.objectId, PoolIds::PRESSURE_SENSOR_TEMPERATURE, this);
lp_var_t<float> pressure = lp_var_t<float>(sid.objectId, PoolIds::PRESSURE, this);
lp_var_t<uint8_t> rwState = lp_var_t<uint8_t>(sid.objectId, PoolIds::TM_RW_STATE, this);
lp_var_t<uint8_t> rwClcMode = lp_var_t<uint8_t>(sid.objectId, PoolIds::TM_CLC_MODE, this);
lp_var_t<int32_t> rwCurrSpeed = lp_var_t<int32_t>(sid.objectId, PoolIds::TM_RW_CURR_SPEED, this);
lp_var_t<int32_t> rwRefSpeed = lp_var_t<int32_t>(sid.objectId, PoolIds::TM_RW_REF_SPEED, this);
lp_var_t<uint32_t> numOfInvalidCrcPackets =
lp_var_t<uint32_t>(sid.objectId, PoolIds::INVALID_CRC_PACKETS, this);
lp_var_t<uint32_t> numOfInvalidLenPackets =
lp_var_t<uint32_t>(sid.objectId, PoolIds::INVALID_LEN_PACKETS, this);
lp_var_t<uint32_t> numOfInvalidCmdPackets =
lp_var_t<uint32_t>(sid.objectId, PoolIds::INVALID_CMD_PACKETS, this);
lp_var_t<uint32_t> numOfCmdExecutedReplies =
lp_var_t<uint32_t>(sid.objectId, PoolIds::EXECUTED_REPLIES, this);
lp_var_t<uint32_t> numOfCmdReplies =
lp_var_t<uint32_t>(sid.objectId, PoolIds::COMMAND_REPLIES, this);
lp_var_t<uint32_t> uartNumOfBytesWritten =
lp_var_t<uint32_t>(sid.objectId, PoolIds::UART_BYTES_WRITTEN, this);
lp_var_t<uint32_t> uartNumOfBytesRead =
lp_var_t<uint32_t>(sid.objectId, PoolIds::UART_BYTES_READ, this);
lp_var_t<uint32_t> uartNumOfParityErrors =
lp_var_t<uint32_t>(sid.objectId, PoolIds::UART_PARITY_ERRORS, this);
lp_var_t<uint32_t> uartNumOfNoiseErrors =
lp_var_t<uint32_t>(sid.objectId, PoolIds::UART_NOISE_ERRORS, this);
lp_var_t<uint32_t> uartNumOfFrameErrors =
lp_var_t<uint32_t>(sid.objectId, PoolIds::UART_FRAME_ERRORS, this);
lp_var_t<uint32_t> uartNumOfRegisterOverrunErrors =
lp_var_t<uint32_t>(sid.objectId, PoolIds::UART_REG_OVERRUN_ERRORS, this);
lp_var_t<uint32_t> uartTotalNumOfErrors =
lp_var_t<uint32_t>(sid.objectId, PoolIds::UART_TOTAL_ERRORS, this);
lp_var_t<uint32_t> spiNumOfBytesWritten =
lp_var_t<uint32_t>(sid.objectId, PoolIds::SPI_BYTES_WRITTEN, this);
lp_var_t<uint32_t> spiNumOfBytesRead =
lp_var_t<uint32_t>(sid.objectId, PoolIds::SPI_BYTES_READ, this);
lp_var_t<uint32_t> spiNumOfRegisterOverrunErrors =
lp_var_t<uint32_t>(sid.objectId, PoolIds::SPI_REG_OVERRUN_ERRORS, this);
lp_var_t<uint32_t> spiTotalNumOfErrors =
lp_var_t<uint32_t>(sid.objectId, PoolIds::SPI_TOTAL_ERRORS, this);
};
}
} // namespace RwDefinitions
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_RWDEFINITIONS_H_ */

View File

@ -1,101 +1,88 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_SYRLINKSDEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_SYRLINKSDEFINITIONS_H_
namespace SYRLINKS {
static const DeviceCommandId_t NONE = 0x0;
static const DeviceCommandId_t RESET_UNIT = 0x01;
/** Reads out all status registers */
static const DeviceCommandId_t READ_RX_STATUS_REGISTERS = 0x02;
/** Sets Tx mode to standby */
static const DeviceCommandId_t SET_TX_MODE_STANDBY = 0x03;
/** Starts transmission mode. Only reached when clock signal is applying to the data tx input */
static const DeviceCommandId_t SET_TX_MODE_MODULATION = 0x04;
/** Sends out a single carrier wave for testing purpose */
static const DeviceCommandId_t SET_TX_MODE_CW = 0x05;
static const DeviceCommandId_t ACK_REPLY = 0x06;
static const DeviceCommandId_t READ_TX_STATUS = 0x07;
static const DeviceCommandId_t READ_TX_WAVEFORM = 0x08;
static const DeviceCommandId_t READ_TX_AGC_VALUE_HIGH_BYTE = 0x09;
static const DeviceCommandId_t READ_TX_AGC_VALUE_LOW_BYTE = 0x0A;
static const DeviceCommandId_t NONE = 0x0;
static const DeviceCommandId_t RESET_UNIT = 0x01;
/** Reads out all status registers */
static const DeviceCommandId_t READ_RX_STATUS_REGISTERS = 0x02;
/** Sets Tx mode to standby */
static const DeviceCommandId_t SET_TX_MODE_STANDBY = 0x03;
/** Starts transmission mode. Only reached when clock signal is applying to the data tx input */
static const DeviceCommandId_t SET_TX_MODE_MODULATION = 0x04;
/** Sends out a single carrier wave for testing purpose */
static const DeviceCommandId_t SET_TX_MODE_CW = 0x05;
static const DeviceCommandId_t ACK_REPLY = 0x06;
static const DeviceCommandId_t READ_TX_STATUS = 0x07;
static const DeviceCommandId_t READ_TX_WAVEFORM = 0x08;
static const DeviceCommandId_t READ_TX_AGC_VALUE_HIGH_BYTE = 0x09;
static const DeviceCommandId_t READ_TX_AGC_VALUE_LOW_BYTE = 0x0A;
/** Size of a simple transmission success response */
static const uint8_t ACK_SIZE = 12;
static const uint8_t SIZE_CRC_AND_TERMINATION = 5;
/** The size of the header with the message identifier and the payload size field */
static const uint8_t MESSAGE_HEADER_SIZE = 5;
/** Size of reply to an rx status registers request */
static const uint8_t RX_STATUS_REGISTERS_REPLY_SIZE = 49;
static const uint8_t READ_ONE_REGISTER_REPLY_SIE = 13;
/** Size of a simple transmission success response */
static const uint8_t ACK_SIZE = 12;
static const uint8_t SIZE_CRC_AND_TERMINATION = 5;
/** The size of the header with the message identifier and the payload size field */
static const uint8_t MESSAGE_HEADER_SIZE = 5;
/** Size of reply to an rx status registers request */
static const uint8_t RX_STATUS_REGISTERS_REPLY_SIZE = 49;
static const uint8_t READ_ONE_REGISTER_REPLY_SIE = 13;
static const uint8_t RX_DATASET_ID = 0x1;
static const uint8_t TX_DATASET_ID = 0x2;
static const uint8_t RX_DATASET_ID = 0x1;
static const uint8_t TX_DATASET_ID = 0x2;
static const size_t MAX_REPLY_SIZE = RX_STATUS_REGISTERS_REPLY_SIZE;
static const size_t MAX_COMMAND_SIZE = 15;
static const size_t MAX_REPLY_SIZE = RX_STATUS_REGISTERS_REPLY_SIZE;
static const size_t MAX_COMMAND_SIZE = 15;
static const size_t CRC_FIELD_SIZE = 4;
static const size_t CRC_FIELD_SIZE = 4;
static const uint8_t RX_DATASET_SIZE = 8;
static const uint8_t TX_DATASET_SIZE = 3;
static const uint8_t RX_DATASET_SIZE = 8;
static const uint8_t TX_DATASET_SIZE = 3;
enum SyrlinksPoolIds: lp_id_t {
RX_STATUS,
RX_SENSITIVITY,
RX_FREQUENCY_SHIFT,
RX_IQ_POWER,
RX_AGC_VALUE,
RX_DEMOD_EB,
RX_DEMOD_N0,
RX_DATA_RATE,
TX_STATUS,
TX_CONV_DIFF,
TX_CONV_FILTER,
TX_WAVEFORM,
TX_PCM_INDEX,
TX_AGC_VALUE,
};
class RxDataset: public StaticLocalDataSet<RX_DATASET_SIZE> {
public:
RxDataset(HasLocalDataPoolIF* owner) :
StaticLocalDataSet(owner, RX_DATASET_ID) {
}
RxDataset(object_id_t objectId) :
StaticLocalDataSet(sid_t(objectId, RX_DATASET_ID)) {
}
lp_var_t<uint8_t> rxStatus = lp_var_t<uint8_t>(sid.objectId, RX_STATUS, this);
lp_var_t<uint32_t> rxSensitivity = lp_var_t<uint32_t>(sid.objectId, RX_SENSITIVITY, this);
lp_var_t<uint32_t> rxFrequencyShift = lp_var_t<uint32_t>(sid.objectId, RX_FREQUENCY_SHIFT, this);
lp_var_t<uint16_t> rxIqPower = lp_var_t<uint16_t>(sid.objectId, RX_IQ_POWER, this);
lp_var_t<uint16_t> rxAgcValue = lp_var_t<uint16_t>(sid.objectId, RX_AGC_VALUE, this);
lp_var_t<uint32_t> rxDemodEb = lp_var_t<uint32_t>(sid.objectId, RX_DEMOD_EB, this);
lp_var_t<uint32_t> rxDemodN0 = lp_var_t<uint32_t>(sid.objectId, RX_DEMOD_N0, this);
lp_var_t<uint8_t> rxDataRate = lp_var_t<uint8_t>(sid.objectId, RX_DATA_RATE, this);
enum SyrlinksPoolIds : lp_id_t {
RX_STATUS,
RX_SENSITIVITY,
RX_FREQUENCY_SHIFT,
RX_IQ_POWER,
RX_AGC_VALUE,
RX_DEMOD_EB,
RX_DEMOD_N0,
RX_DATA_RATE,
TX_STATUS,
TX_CONV_DIFF,
TX_CONV_FILTER,
TX_WAVEFORM,
TX_PCM_INDEX,
TX_AGC_VALUE,
};
class RxDataset : public StaticLocalDataSet<RX_DATASET_SIZE> {
public:
RxDataset(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, RX_DATASET_ID) {}
class TxDataset: public StaticLocalDataSet<TX_DATASET_SIZE> {
public:
RxDataset(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, RX_DATASET_ID)) {}
TxDataset(HasLocalDataPoolIF* owner) :
StaticLocalDataSet(owner, TX_DATASET_ID) {
}
TxDataset(object_id_t objectId) :
StaticLocalDataSet(sid_t(objectId, TX_DATASET_ID)) {
}
lp_var_t<uint8_t> txStatus = lp_var_t<uint8_t>(sid.objectId, TX_STATUS, this);
lp_var_t<uint8_t> txWaveform = lp_var_t<uint8_t>(sid.objectId, TX_WAVEFORM, this);
lp_var_t<uint16_t> txAgcValue = lp_var_t<uint16_t>(sid.objectId, TX_AGC_VALUE, this);
lp_var_t<uint8_t> rxStatus = lp_var_t<uint8_t>(sid.objectId, RX_STATUS, this);
lp_var_t<uint32_t> rxSensitivity = lp_var_t<uint32_t>(sid.objectId, RX_SENSITIVITY, this);
lp_var_t<uint32_t> rxFrequencyShift = lp_var_t<uint32_t>(sid.objectId, RX_FREQUENCY_SHIFT, this);
lp_var_t<uint16_t> rxIqPower = lp_var_t<uint16_t>(sid.objectId, RX_IQ_POWER, this);
lp_var_t<uint16_t> rxAgcValue = lp_var_t<uint16_t>(sid.objectId, RX_AGC_VALUE, this);
lp_var_t<uint32_t> rxDemodEb = lp_var_t<uint32_t>(sid.objectId, RX_DEMOD_EB, this);
lp_var_t<uint32_t> rxDemodN0 = lp_var_t<uint32_t>(sid.objectId, RX_DEMOD_N0, this);
lp_var_t<uint8_t> rxDataRate = lp_var_t<uint8_t>(sid.objectId, RX_DATA_RATE, this);
};
}
class TxDataset : public StaticLocalDataSet<TX_DATASET_SIZE> {
public:
TxDataset(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, TX_DATASET_ID) {}
TxDataset(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, TX_DATASET_ID)) {}
lp_var_t<uint8_t> txStatus = lp_var_t<uint8_t>(sid.objectId, TX_STATUS, this);
lp_var_t<uint8_t> txWaveform = lp_var_t<uint8_t>(sid.objectId, TX_WAVEFORM, this);
lp_var_t<uint16_t> txAgcValue = lp_var_t<uint16_t>(sid.objectId, TX_AGC_VALUE, this);
};
} // namespace SYRLINKS
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_SYRLINKSDEFINITIONS_H_ */

View File

@ -2,46 +2,35 @@
#define MISSION_DEVICES_DEVICEDEFINITIONS_TMP1075DEFINITIONS_H_
namespace TMP1075 {
static const uint8_t TEMP_REG_ADDR = 0x0;
static const uint8_t CFGR_ADDR = 0x1;
static const uint8_t TEMP_REG_ADDR = 0x0;
static const uint8_t CFGR_ADDR = 0x1;
/* Writing this information to the configuration register sets the tmp1075
* to shutdown mode and starts a single temperature conversion */
static const uint16_t ONE_SHOT_MODE = 0x8100;
/* Writing this information to the configuration register sets the tmp1075
* to shutdown mode and starts a single temperature conversion */
static const uint16_t ONE_SHOT_MODE = 0x8100;
static const DeviceCommandId_t NONE = 0x0; // Set when no command is pending
static const DeviceCommandId_t GET_TEMP = 0x1;
static const DeviceCommandId_t START_ADC_CONVERSION = 0x2;
static const DeviceCommandId_t NONE = 0x0; // Set when no command is pending
static const DeviceCommandId_t GET_TEMP = 0x1;
static const DeviceCommandId_t START_ADC_CONVERSION = 0x2;
static const uint8_t GET_TEMP_REPLY_SIZE = 2;
static const uint8_t CFGR_CMD_SIZE = 3;
static const uint8_t POINTER_REG_SIZE = 1;
static const uint8_t GET_TEMP_REPLY_SIZE = 2;
static const uint8_t CFGR_CMD_SIZE = 3;
static const uint8_t POINTER_REG_SIZE = 1;
static const uint32_t TMP1075_DATA_SET_ID = GET_TEMP;
static const uint32_t TMP1075_DATA_SET_ID = GET_TEMP;
static const uint8_t MAX_REPLY_LENGTH = GET_TEMP_REPLY_SIZE;
static const uint8_t MAX_REPLY_LENGTH = GET_TEMP_REPLY_SIZE;
enum Tmp1075PoolIds: lp_id_t {
TEMPERATURE_C_TMP1075_1,
TEMPERATURE_C_TMP1075_2
};
enum Tmp1075PoolIds : lp_id_t { TEMPERATURE_C_TMP1075_1, TEMPERATURE_C_TMP1075_2 };
class Tmp1075Dataset:
public StaticLocalDataSet<sizeof(float)> {
public:
class Tmp1075Dataset : public StaticLocalDataSet<sizeof(float)> {
public:
Tmp1075Dataset(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, TMP1075_DATA_SET_ID) {}
Tmp1075Dataset(HasLocalDataPoolIF* owner):
StaticLocalDataSet(owner, TMP1075_DATA_SET_ID) {
}
Tmp1075Dataset(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, TMP1075_DATA_SET_ID)) {}
Tmp1075Dataset(object_id_t objectId):
StaticLocalDataSet(sid_t(objectId, TMP1075_DATA_SET_ID)) {
}
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId,
TEMPERATURE_C_TMP1075_1, this);
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId, TEMPERATURE_C_TMP1075_1, this);
};
}
} // namespace TMP1075
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_TMP1075DEFINITIONS_H_ */