diff --git a/datapoollocal/LocalDataPoolManager.h b/datapoollocal/LocalDataPoolManager.h index 95d48303..c4024cf9 100644 --- a/datapoollocal/LocalDataPoolManager.h +++ b/datapoollocal/LocalDataPoolManager.h @@ -48,7 +48,7 @@ class HousekeepingPacketUpdate; * @author R. Mueller */ class LocalDataPoolManager { - template friend class LocalPoolVar; + template friend class LocalPoolVariable; template friend class LocalPoolVector; friend class LocalPoolDataSetBase; friend void (Factory::setStaticFrameworkObjectIds)(); diff --git a/datapoollocal/LocalPoolVariable.h b/datapoollocal/LocalPoolVariable.h index c18d5443..7b7e443e 100644 --- a/datapoollocal/LocalPoolVariable.h +++ b/datapoollocal/LocalPoolVariable.h @@ -22,10 +22,10 @@ * @ingroup data_pool */ template -class LocalPoolVar: public LocalPoolObjectBase { +class LocalPoolVariable: public LocalPoolObjectBase { public: //! Default ctor is forbidden. - LocalPoolVar() = delete; + LocalPoolVariable() = delete; /** * This constructor is used by the data creators to have pool variable @@ -43,7 +43,7 @@ public: * If nullptr, the variable is not registered. * @param setReadWriteMode Specify the read-write mode of the pool variable. */ - LocalPoolVar(HasLocalDataPoolIF* hkOwner, lp_id_t poolId, + LocalPoolVariable(HasLocalDataPoolIF* hkOwner, lp_id_t poolId, DataSetIF* dataSet = nullptr, pool_rwm_t setReadWriteMode = pool_rwm_t::VAR_READ_WRITE); @@ -64,7 +64,7 @@ public: * @param setReadWriteMode Specify the read-write mode of the pool variable. * */ - LocalPoolVar(object_id_t poolOwner, lp_id_t poolId, + LocalPoolVariable(object_id_t poolOwner, lp_id_t poolId, DataSetIF* dataSet = nullptr, pool_rwm_t setReadWriteMode = pool_rwm_t::VAR_READ_WRITE); /** @@ -73,10 +73,10 @@ public: * @param dataSet * @param setReadWriteMode */ - LocalPoolVar(gp_id_t globalPoolId, DataSetIF* dataSet = nullptr, + LocalPoolVariable(gp_id_t globalPoolId, DataSetIF* dataSet = nullptr, pool_rwm_t setReadWriteMode = pool_rwm_t::VAR_READ_WRITE); - virtual~ LocalPoolVar() {}; + virtual~ LocalPoolVariable() {}; /** * @brief This is the local copy of the data pool entry. @@ -118,23 +118,23 @@ public: ReturnValue_t commit(dur_millis_t lockTimeout = MutexIF::BLOCKING) override; - LocalPoolVar &operator=(const T& newValue); - LocalPoolVar &operator=(const LocalPoolVar& newPoolVariable); + LocalPoolVariable &operator=(const T& newValue); + LocalPoolVariable &operator=(const LocalPoolVariable& newPoolVariable); //! Explicit type conversion operator. Allows casting the class to //! its template type to perform operations on value. explicit operator T() const; - bool operator==(const LocalPoolVar& other) const; + bool operator==(const LocalPoolVariable& other) const; bool operator==(const T& other) const; - bool operator!=(const LocalPoolVar& other) const; + bool operator!=(const LocalPoolVariable& other) const; bool operator!=(const T& other) const; - bool operator<(const LocalPoolVar& other) const; + bool operator<(const LocalPoolVariable& other) const; bool operator<(const T& other) const; - bool operator>(const LocalPoolVar& other) const; + bool operator>(const LocalPoolVariable& other) const; bool operator>(const T& other) const; protected: @@ -160,7 +160,7 @@ protected: // std::ostream is the type for object std::cout template friend std::ostream& operator<< (std::ostream &out, - const LocalPoolVar &var); + const LocalPoolVariable &var); private: }; @@ -168,18 +168,18 @@ private: #include "LocalPoolVariable.tpp" template -using lp_var_t = LocalPoolVar; +using lp_var_t = LocalPoolVariable; -using lp_bool_t = LocalPoolVar; -using lp_uint8_t = LocalPoolVar; -using lp_uint16_t = LocalPoolVar; -using lp_uint32_t = LocalPoolVar; -using lp_uint64_t = LocalPoolVar; -using lp_int8_t = LocalPoolVar; -using lp_int16_t = LocalPoolVar; -using lp_int32_t = LocalPoolVar; -using lp_int64_t = LocalPoolVar; -using lp_float_t = LocalPoolVar; -using lp_double_t = LocalPoolVar; +using lp_bool_t = LocalPoolVariable; +using lp_uint8_t = LocalPoolVariable; +using lp_uint16_t = LocalPoolVariable; +using lp_uint32_t = LocalPoolVariable; +using lp_uint64_t = LocalPoolVariable; +using lp_int8_t = LocalPoolVariable; +using lp_int16_t = LocalPoolVariable; +using lp_int32_t = LocalPoolVariable; +using lp_int64_t = LocalPoolVariable; +using lp_float_t = LocalPoolVariable; +using lp_double_t = LocalPoolVariable; #endif /* FSFW_DATAPOOLLOCAL_LOCALPOOLVARIABLE_H_ */ diff --git a/datapoollocal/LocalPoolVariable.tpp b/datapoollocal/LocalPoolVariable.tpp index b9f7b906..48649ad5 100644 --- a/datapoollocal/LocalPoolVariable.tpp +++ b/datapoollocal/LocalPoolVariable.tpp @@ -6,32 +6,32 @@ #endif template -inline LocalPoolVar::LocalPoolVar(HasLocalDataPoolIF* hkOwner, +inline LocalPoolVariable::LocalPoolVariable(HasLocalDataPoolIF* hkOwner, lp_id_t poolId, DataSetIF* dataSet, pool_rwm_t setReadWriteMode): LocalPoolObjectBase(poolId, hkOwner, dataSet, setReadWriteMode) {} template -inline LocalPoolVar::LocalPoolVar(object_id_t poolOwner, lp_id_t poolId, +inline LocalPoolVariable::LocalPoolVariable(object_id_t poolOwner, lp_id_t poolId, DataSetIF *dataSet, pool_rwm_t setReadWriteMode): LocalPoolObjectBase(poolOwner, poolId, dataSet, setReadWriteMode) {} template -inline LocalPoolVar::LocalPoolVar(gp_id_t globalPoolId, DataSetIF *dataSet, +inline LocalPoolVariable::LocalPoolVariable(gp_id_t globalPoolId, DataSetIF *dataSet, pool_rwm_t setReadWriteMode): LocalPoolObjectBase(globalPoolId.objectId, globalPoolId.localPoolId, dataSet, setReadWriteMode){} template -inline ReturnValue_t LocalPoolVar::read(dur_millis_t lockTimeout) { +inline ReturnValue_t LocalPoolVariable::read(dur_millis_t lockTimeout) { MutexHelper(hkManager->getMutexHandle(), MutexIF::TimeoutType::WAITING, lockTimeout); return readWithoutLock(); } template -inline ReturnValue_t LocalPoolVar::readWithoutLock() { +inline ReturnValue_t LocalPoolVariable::readWithoutLock() { if(readWriteMode == pool_rwm_t::VAR_WRITE) { sif::debug << "LocalPoolVar: Invalid read write " "mode for read() call." << std::endl; @@ -53,14 +53,14 @@ inline ReturnValue_t LocalPoolVar::readWithoutLock() { } template -inline ReturnValue_t LocalPoolVar::commit(dur_millis_t lockTimeout) { +inline ReturnValue_t LocalPoolVariable::commit(dur_millis_t lockTimeout) { MutexHelper(hkManager->getMutexHandle(), MutexIF::TimeoutType::WAITING, lockTimeout); return commitWithoutLock(); } template -inline ReturnValue_t LocalPoolVar::commitWithoutLock() { +inline ReturnValue_t LocalPoolVariable::commitWithoutLock() { if(readWriteMode == pool_rwm_t::VAR_READ) { sif::debug << "LocalPoolVar: Invalid read write " "mode for commit() call." << std::endl; @@ -81,88 +81,88 @@ inline ReturnValue_t LocalPoolVar::commitWithoutLock() { } template -inline ReturnValue_t LocalPoolVar::serialize(uint8_t** buffer, size_t* size, +inline ReturnValue_t LocalPoolVariable::serialize(uint8_t** buffer, size_t* size, const size_t max_size, SerializeIF::Endianness streamEndianness) const { return SerializeAdapter::serialize(&value, buffer, size ,max_size, streamEndianness); } template -inline size_t LocalPoolVar::getSerializedSize() const { +inline size_t LocalPoolVariable::getSerializedSize() const { return SerializeAdapter::getSerializedSize(&value); } template -inline ReturnValue_t LocalPoolVar::deSerialize(const uint8_t** buffer, +inline ReturnValue_t LocalPoolVariable::deSerialize(const uint8_t** buffer, size_t* size, SerializeIF::Endianness streamEndianness) { return SerializeAdapter::deSerialize(&value, buffer, size, streamEndianness); } template inline std::ostream& operator<< (std::ostream &out, - const LocalPoolVar &var) { + const LocalPoolVariable &var) { out << var.value; return out; } template -inline LocalPoolVar::operator T() const { +inline LocalPoolVariable::operator T() const { return value; } template -inline LocalPoolVar & LocalPoolVar::operator=(const T& newValue) { +inline LocalPoolVariable & LocalPoolVariable::operator=(const T& newValue) { value = newValue; return *this; } template -inline LocalPoolVar& LocalPoolVar::operator =( - const LocalPoolVar& newPoolVariable) { +inline LocalPoolVariable& LocalPoolVariable::operator =( + const LocalPoolVariable& newPoolVariable) { value = newPoolVariable.value; return *this; } template -inline bool LocalPoolVar::operator ==(const LocalPoolVar &other) const { +inline bool LocalPoolVariable::operator ==(const LocalPoolVariable &other) const { return this->value == other.value; } template -inline bool LocalPoolVar::operator ==(const T &other) const { +inline bool LocalPoolVariable::operator ==(const T &other) const { return this->value == other; } template -inline bool LocalPoolVar::operator !=(const LocalPoolVar &other) const { +inline bool LocalPoolVariable::operator !=(const LocalPoolVariable &other) const { return not (*this == other); } template -inline bool LocalPoolVar::operator !=(const T &other) const { +inline bool LocalPoolVariable::operator !=(const T &other) const { return not (*this == other); } template -inline bool LocalPoolVar::operator <(const LocalPoolVar &other) const { +inline bool LocalPoolVariable::operator <(const LocalPoolVariable &other) const { return this->value < other.value; } template -inline bool LocalPoolVar::operator <(const T &other) const { +inline bool LocalPoolVariable::operator <(const T &other) const { return this->value < other; } template -inline bool LocalPoolVar::operator >(const LocalPoolVar &other) const { +inline bool LocalPoolVariable::operator >(const LocalPoolVariable &other) const { return not (*this < other); } template -inline bool LocalPoolVar::operator >(const T &other) const { +inline bool LocalPoolVariable::operator >(const T &other) const { return not (*this < other); } diff --git a/monitoring/MonitorBase.h b/monitoring/MonitorBase.h index 530a3840..967f0f62 100644 --- a/monitoring/MonitorBase.h +++ b/monitoring/MonitorBase.h @@ -72,7 +72,7 @@ protected: return HasReturnvaluesIF::RETURN_OK; } - LocalPoolVar poolVariable; + LocalPoolVariable poolVariable; }; #endif /* FSFW_MONITORING_MONITORBASE_H_ */