Merge pull request 'new returnvalues, RETURN_FAILED is 0xFFFF now' (#120) from KSat/fsfw:mueller_returnvalues into master

This commit is contained in:
Robin Müller 2020-07-02 14:45:05 +02:00
commit 68c41e2396
2 changed files with 17 additions and 16 deletions

View File

@ -24,6 +24,7 @@ enum {
MEMORY_HELPER, //MH
SERIALIZE_IF, //SE
FIXED_MAP, //FM
FIXED_MULTIMAP, //FMM
HAS_HEALTH_IF, //HHI
FIFO_CLASS, //FF
MESSAGE_PROXY, //MQP
@ -54,11 +55,15 @@ enum {
HAS_ACTIONS_IF, //HF
DEVICE_COMMUNICATION_IF, //DC
BSP, //BSP
TIME_STAMPER_IF, //TSI 52
TIME_STAMPER_IF, //TSI 53
//TODO This will shift all IDs for FLP
SGP4PROPAGATOR_CLASS, //SGP4 53
MUTEX_IF, //MUX 54
MESSAGE_QUEUE_IF,//MQI 55
SGP4PROPAGATOR_CLASS, //SGP4 54
MUTEX_IF, //MUX 55
MESSAGE_QUEUE_IF,//MQI 56
SEMAPHORE_IF, //SPH 57
LOCAL_POOL_OWNER_IF, //LPIF 58
POOL_VARIABLE_IF, //PVA 59
HOUSEKEEPING_MANAGER, //HKM 60
FW_CLASS_ID_COUNT //is actually count + 1 !
};

View File

@ -1,27 +1,23 @@
#ifndef HASRETURNVALUESIF_H_
#define HASRETURNVALUESIF_H_
#ifndef FRAMEWORK_RETURNVALUES_HASRETURNVALUESIF_H_
#define FRAMEWORK_RETURNVALUES_HASRETURNVALUESIF_H_
#include <stdint.h>
#include <framework/returnvalues/FwClassIds.h>
#include <config/returnvalues/classIds.h>
#include <cstdint>
#define MAKE_RETURN_CODE( number ) ((INTERFACE_ID << 8) + (number))
typedef uint16_t ReturnValue_t;
class HasReturnvaluesIF {
public:
static const ReturnValue_t RETURN_OK = 0;
static const ReturnValue_t RETURN_FAILED = 1;
virtual ~HasReturnvaluesIF() {
}
virtual ~HasReturnvaluesIF() {}
static ReturnValue_t makeReturnCode(uint8_t interfaceId, uint8_t number) {
return (interfaceId << 8) + number;
}
};
#endif /* HASRETURNVALUESIF_H_ */
#endif /* FRAMEWORK_RETURNVALUES_HASRETURNVALUESIF_H_ */