src/alfalfa/AlfalfaActuator.hpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #ifndef ALFALFA_COMPONENT_ACTUATOR_HPP | ||
| 7 | #define ALFALFA_COMPONENT_ACTUATOR_HPP | ||
| 8 | |||
| 9 | #include "AlfalfaAPI.hpp" | ||
| 10 | #include "AlfalfaComponentBase.hpp" | ||
| 11 | |||
| 12 | #include "../utilities/idf/IdfObject.hpp" | ||
| 13 | |||
| 14 | namespace openstudio { | ||
| 15 | namespace alfalfa { | ||
| 16 | class ALFALFA_API AlfalfaActuator : public AlfalfaComponentBase | ||
| 17 | { | ||
| 18 | public: | ||
| 19 | /** | ||
| 20 | * Create an AlfalfaActuator Component from a component_name, component_type, and control_type which reflect the EneregyManagementSystem:Actuator EnergyPlus IDD | ||
| 21 | */ | ||
| 22 | AlfalfaActuator(const std::string& component_name, const std::string& component_type, const std::string& control_type); | ||
| 23 | |||
| 24 | /** | ||
| 25 | * Create an AlfalfaActuator Component form an IdfObject. | ||
| 26 | * Valid idf_object types are EnergyManagementSystemActuator and IdfObject(IddObjectType::EnergyManagementSystem_Actuator) | ||
| 27 | */ | ||
| 28 | AlfalfaActuator(const IdfObject& actuator); | ||
| 29 | |||
| 30 | std::string deriveName() const override; | ||
| 31 | |||
| 32 | Json::Value toJSON() const override; | ||
| 33 | |||
| 34 | 72 | AlfalfaComponentCapability capability() const override { | |
| 35 |
1/1✓ Branch 1 taken 72 times.
|
72 | return AlfalfaComponentCapability::Bidirectional; |
| 36 | } | ||
| 37 | |||
| 38 | 56 | AlfalfaComponentType type() const override { | |
| 39 |
1/1✓ Branch 1 taken 56 times.
|
56 | return AlfalfaComponentType::Actuator; |
| 40 | } | ||
| 41 | |||
| 42 | 119 | std::unique_ptr<AlfalfaComponentBase> clone() const override { | |
| 43 |
1/1✓ Branch 1 taken 119 times.
|
119 | return std::make_unique<AlfalfaActuator>(*this); |
| 44 | } | ||
| 45 | |||
| 46 | std::string componentName() const; | ||
| 47 | std::string componentType() const; | ||
| 48 | std::string controlType() const; | ||
| 49 | |||
| 50 | static bool acceptsObjectType(const IddObjectType& idd_type); | ||
| 51 | |||
| 52 | private: | ||
| 53 | std::string m_component_name; | ||
| 54 | std::string m_component_type; | ||
| 55 | std::string m_control_type; | ||
| 56 | }; | ||
| 57 | } // namespace alfalfa | ||
| 58 | } // namespace openstudio | ||
| 59 | |||
| 60 | #endif | ||
| 61 |