taken over cleaned up branch

This commit is contained in:
Robin Müller 2020-12-13 22:13:22 +01:00
parent 3f77fab2d9
commit 692aa087d8
8 changed files with 32 additions and 28 deletions

View File

@ -1,8 +1,10 @@
#include "RMAP.h"
#include "rmapStructs.h"
#include "RMAPChannelIF.h"
#include "../devicehandlers/DeviceCommunicationIF.h" #include "../devicehandlers/DeviceCommunicationIF.h"
#include "../rmap/rmapStructs.h"
#include "../rmap/RMAP.h" #include <cstddef>
#include "../rmap/RMAPChannelIF.h"
#include <stddef.h>
ReturnValue_t RMAP::reset(RMAPCookie* cookie) { ReturnValue_t RMAP::reset(RMAPCookie* cookie) {
return cookie->getChannel()->reset(); return cookie->getChannel()->reset();

View File

@ -1,5 +1,5 @@
#ifndef RMAPpp_H_ #ifndef FSFW_RMAP_RMAP_H_
#define RMAPpp_H_ #define FSFW_RMAP_RMAP_H_
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include "../rmap/RMAPCookie.h" #include "../rmap/RMAPCookie.h"

View File

@ -1,7 +1,7 @@
#ifndef RMAPCHANNELIF_H_ #ifndef FSFW_RMAP_RMAPCHANNELIF_H_
#define RMAPCHANNELIF_H_ #define FSFW_RMAP_RMAPCHANNELIF_H_
#include "../rmap/RMAPCookie.h" #include "RMAPCookie.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include <cstddef> #include <cstddef>
@ -113,4 +113,4 @@ public:
}; };
#endif /* RMAPCHANNELIF_H_ */ #endif /* FSFW_RMAP_RMAPCHANNELIF_H_ */

View File

@ -1,6 +1,6 @@
#include "../rmap/RMAPChannelIF.h" #include "RMAPChannelIF.h"
#include "../rmap/RMAPCookie.h" #include "RMAPCookie.h"
#include <stddef.h> #include <cstddef>
RMAPCookie::RMAPCookie() { RMAPCookie::RMAPCookie() {
@ -31,7 +31,8 @@ RMAPCookie::RMAPCookie() {
RMAPCookie::RMAPCookie(uint32_t set_address, uint8_t set_extended_address, RMAPCookie::RMAPCookie(uint32_t set_address, uint8_t set_extended_address,
RMAPChannelIF *set_channel, uint8_t set_command_mask, uint32_t maxReplyLen) { RMAPChannelIF *set_channel, uint8_t set_command_mask,
size_t maxReplyLen) {
this->header.dest_address = 0; this->header.dest_address = 0;
this->header.protocol = 0x01; this->header.protocol = 0x01;
this->header.instruction = 0; this->header.instruction = 0;

View File

@ -1,8 +1,8 @@
#ifndef RMAPCOOKIE_H_ #ifndef FSFW_RMAP_RMAPCOOKIE_H_
#define RMAPCOOKIE_H_ #define FSFW_RMAP_RMAPCOOKIE_H_
#include "rmapStructs.h"
#include "../devicehandlers/CookieIF.h" #include "../devicehandlers/CookieIF.h"
#include "../rmap/rmapStructs.h"
#include <cstddef> #include <cstddef>
class RMAPChannelIF; class RMAPChannelIF;
@ -13,7 +13,8 @@ public:
RMAPCookie(); RMAPCookie();
RMAPCookie(uint32_t set_address, uint8_t set_extended_address, RMAPCookie(uint32_t set_address, uint8_t set_extended_address,
RMAPChannelIF *set_channel, uint8_t set_command_mask, uint32_t maxReplyLen = 0); RMAPChannelIF *set_channel, uint8_t set_command_mask,
size_t maxReplyLen = 0);
virtual ~RMAPCookie(); virtual ~RMAPCookie();
@ -56,4 +57,4 @@ protected:
uint8_t dataCRC; uint8_t dataCRC;
}; };
#endif /* RMAPCOOKIE_H_ */ #endif /* FSFW_RMAP_RMAPCOOKIE_H_ */

View File

@ -1,5 +1,5 @@
#include "../rmap/RmapDeviceCommunicationIF.h" #include "RmapDeviceCommunicationIF.h"
#include "../rmap/RMAP.h" #include "RMAP.h"
//TODO Cast here are all potential bugs //TODO Cast here are all potential bugs
RmapDeviceCommunicationIF::~RmapDeviceCommunicationIF() { RmapDeviceCommunicationIF::~RmapDeviceCommunicationIF() {

View File

@ -1,5 +1,5 @@
#ifndef MISSION_RMAP_RMAPDEVICECOMMUNICATIONINTERFACE_H_ #ifndef FSFW_RMAP_RMAPDEVICECOMMUNICATIONINTERFACE_H_
#define MISSION_RMAP_RMAPDEVICECOMMUNICATIONINTERFACE_H_ #define FSFW_RMAP_RMAPDEVICECOMMUNICATIONINTERFACE_H_
#include "../devicehandlers/DeviceCommunicationIF.h" #include "../devicehandlers/DeviceCommunicationIF.h"
@ -86,4 +86,4 @@ public:
uint32_t getParameter(CookieIF* cookie); uint32_t getParameter(CookieIF* cookie);
}; };
#endif /* MISSION_RMAP_RMAPDEVICECOMMUNICATIONINTERFACE_H_ */ #endif /* FSFW_RMAP_RMAPDEVICECOMMUNICATIONINTERFACE_H_ */

View File

@ -1,7 +1,7 @@
#ifndef RMAPSTRUCTS_H_ #ifndef FSFW_RMAP_RMAPSTRUCTS_H_
#define RMAPSTRUCTS_H_ #define FSFW_RMAP_RMAPSTRUCTS_H_
#include <stdint.h> #include <cstdint>
//SHOULDDO: having the defines within a namespace would be nice. Problem are the defines referencing the previous define, eg RMAP_COMMAND_WRITE //SHOULDDO: having the defines within a namespace would be nice. Problem are the defines referencing the previous define, eg RMAP_COMMAND_WRITE
@ -95,4 +95,4 @@ struct rmap_write_reply_header {
} }
#endif /* RMAPSTRUCTS_H_ */ #endif /* FSFW_RMAP_RMAPSTRUCTS_H_ */