updated datapool files
This commit is contained in:
@ -21,18 +21,10 @@ class PoolVariableIF : public SerializeIF {
|
||||
friend class DataSetBase;
|
||||
friend class GlobDataSet;
|
||||
friend class LocalDataSet;
|
||||
protected:
|
||||
/**
|
||||
* @brief The commit call shall write back a newly calculated local
|
||||
* value to the data pool.
|
||||
*/
|
||||
virtual ReturnValue_t commit() = 0;
|
||||
/**
|
||||
* @brief The read call shall read the value of this parameter from
|
||||
* the data pool and store the content locally.
|
||||
*/
|
||||
virtual ReturnValue_t read() = 0;
|
||||
public:
|
||||
static constexpr uint8_t INTERFACE_ID = CLASS_ID::POOL_VARIABLE_IF;
|
||||
static constexpr ReturnValue_t INVALID_READ_WRITE_MODE = MAKE_RETURN_CODE(0xA0);
|
||||
|
||||
static constexpr bool VALID = 1;
|
||||
static constexpr bool INVALID = 0;
|
||||
static constexpr uint32_t NO_PARAMETER = 0;
|
||||
@ -61,9 +53,43 @@ public:
|
||||
/**
|
||||
* @brief With this call, the valid information of the variable is set.
|
||||
*/
|
||||
// why not just use a boolean here?
|
||||
virtual void setValid(uint8_t validity) = 0;
|
||||
virtual void setValid(bool validity) = 0;
|
||||
|
||||
/**
|
||||
* @brief The commit call shall write back a newly calculated local
|
||||
* value to the data pool.
|
||||
* @details
|
||||
* It is assumed that these calls are implemented in a thread-safe manner!
|
||||
*/
|
||||
virtual ReturnValue_t commit(uint32_t lockTimeout) = 0;
|
||||
/**
|
||||
* @brief The read call shall read the value of this parameter from
|
||||
* the data pool and store the content locally.
|
||||
* @details
|
||||
* It is assumbed that these calls are implemented in a thread-safe manner!
|
||||
*/
|
||||
virtual ReturnValue_t read(uint32_t lockTimeout) = 0;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* @brief Same as commit with the difference that comitting will be
|
||||
* performed without a lock
|
||||
* @return
|
||||
* This can be used if the lock protection is handled externally
|
||||
* to avoid the overhead of locking and unlocking consecutively.
|
||||
* Declared protected to avoid free public usage.
|
||||
*/
|
||||
virtual ReturnValue_t readWithoutLock() = 0;
|
||||
/**
|
||||
* @brief Same as commit with the difference that comitting will be
|
||||
* performed without a lock
|
||||
* @return
|
||||
* This can be used if the lock protection is handled externally
|
||||
* to avoid the overhead of locking and unlocking consecutively.
|
||||
* Declared protected to avoid free public usage.
|
||||
*/
|
||||
virtual ReturnValue_t commitWithoutLock() = 0;
|
||||
};
|
||||
|
||||
using pool_rwm_t = PoolVariableIF::ReadWriteMode_t;
|
||||
|
Reference in New Issue
Block a user