Chiller daikin logic added
This commit is contained in:
@@ -87,6 +87,12 @@ protected:
|
||||
* @param strategy A pointer to the Strategy_Behavior object. The State takes ownership.
|
||||
*/
|
||||
void addStrategy(const std::string& pointDescription, Strategy_Behavior* strategy);
|
||||
/**
|
||||
* @brief returns a behavior strategy for a specific Modbus point in this state.
|
||||
* @param pointDescription The description of the Modbus point your need to get.
|
||||
*/
|
||||
Strategy_Behavior* getStrategy(const std::string& pointDescription);
|
||||
|
||||
std::map<std::string, Strategy_Behavior*> _strategies; /**< @brief Map of strategies active in this state, keyed by point description. */
|
||||
};
|
||||
|
||||
@@ -110,6 +116,20 @@ template<typename T>
|
||||
void State<T>::addStrategy(const std::string& pointDescription, Strategy_Behavior* strategy){
|
||||
this->_strategies[pointDescription] = strategy;
|
||||
}
|
||||
/**
|
||||
* @brief returns a behavior strategy for a specific Modbus point in this state.
|
||||
* @param pointDescription The description of the Modbus point your need to get.
|
||||
*/
|
||||
template<typename T>
|
||||
Strategy_Behavior* State<T>::getStrategy(const std::string& pointDescription){
|
||||
{
|
||||
auto it = _strategies.find(pointDescription);
|
||||
if (it != _strategies.end()) {
|
||||
return it->second;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the value of a Modbus point, correctly handling float types.
|
||||
|
||||
Reference in New Issue
Block a user