updating code from Flying Laptop
This is the framework of Flying Laptop OBSW version A.13.0.
This commit is contained in:
@ -1,10 +1,3 @@
|
||||
/*
|
||||
* HasParametersIF.h
|
||||
*
|
||||
* Created on: 26.11.2015
|
||||
* Author: mohr
|
||||
*/
|
||||
|
||||
#ifndef HASPARAMETERSIF_H_
|
||||
#define HASPARAMETERSIF_H_
|
||||
|
||||
@ -16,26 +9,28 @@ typedef uint32_t ParameterId_t;
|
||||
|
||||
class HasParametersIF {
|
||||
public:
|
||||
static const uint8_t INTERFACE_ID = HAS_PARAMETERS_IF;
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::HAS_PARAMETERS_IF;
|
||||
static const ReturnValue_t INVALID_MATRIX_ID = MAKE_RETURN_CODE(0x01);
|
||||
static const ReturnValue_t INVALID_DOMAIN_ID = MAKE_RETURN_CODE(0x02);
|
||||
static const ReturnValue_t INVALID_VALUE = MAKE_RETURN_CODE(0x03);
|
||||
static const ReturnValue_t READ_ONLY = MAKE_RETURN_CODE(0x05);
|
||||
|
||||
|
||||
|
||||
|
||||
static uint8_t getDomain(ParameterId_t id){
|
||||
static uint8_t getDomain(ParameterId_t id) {
|
||||
return id >> 24;
|
||||
}
|
||||
|
||||
static uint16_t getMatrixId(ParameterId_t id){
|
||||
static uint16_t getMatrixId(ParameterId_t id) {
|
||||
return id >> 8;
|
||||
}
|
||||
|
||||
static uint8_t getIndex(ParameterId_t id){
|
||||
static uint8_t getIndex(ParameterId_t id) {
|
||||
return id;
|
||||
}
|
||||
|
||||
static uint32_t getFullParameterId(uint8_t domainId, uint16_t parameterId,
|
||||
uint8_t index) {
|
||||
return (domainId << 24) + (parameterId << 8) + index;
|
||||
}
|
||||
|
||||
virtual ~HasParametersIF() {
|
||||
}
|
||||
|
Reference in New Issue
Block a user