diff options
Diffstat (limited to 'src/include/usr/ipmi')
-rw-r--r-- | src/include/usr/ipmi/ipmi_reasoncodes.H | 2 | ||||
-rw-r--r-- | src/include/usr/ipmi/ipmisensor.H | 66 |
2 files changed, 68 insertions, 0 deletions
diff --git a/src/include/usr/ipmi/ipmi_reasoncodes.H b/src/include/usr/ipmi/ipmi_reasoncodes.H index c8931bdb0..972391675 100644 --- a/src/include/usr/ipmi/ipmi_reasoncodes.H +++ b/src/include/usr/ipmi/ipmi_reasoncodes.H @@ -42,6 +42,7 @@ namespace IPMI MOD_IPMISENSOR_TYPE = 0x08, // IPMI::getSensorType MOD_IPMISENSOR_ENTITY_ID = 0x09, // IPMI::getSensorEntityId MOD_IPMISENSOR_NAME = 0x0A, // IPMI::getSensorName + MOD_IPMISENSOR_REBOOTCNTRL = 0x0B, // IPMI::SENSOR getRebootControl }; enum IPMIReasonCode @@ -61,6 +62,7 @@ namespace IPMI RC_SENSOR_NOT_FOUND = IPMI_COMP_ID | 0x0d, RC_INVALID_VPD_DATA = IPMI_COMP_ID | 0x0e, RC_INVALID_SENSOR_NUMBER = IPMI_COMP_ID | 0x0f, + RC_INVALID_SENSOR_SETTING = IPMI_COMP_ID | 0x10, }; }; diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H index 5b59a45c5..15499ce13 100644 --- a/src/include/usr/ipmi/ipmisensor.H +++ b/src/include/usr/ipmi/ipmisensor.H @@ -635,6 +635,72 @@ namespace SENSOR }; /** + * @class RebootControlSensor + * + * @brief Specialized class for the system reboot control + * + * @par Detailed Description: + * Provides the functionality needed to enable/disable auto reboot + * control controlled by the BMC. + * + * Usage: + * RebootControlSensor l_rbotCtl; + * l_rbotCtl.setRebootControl( autoRebootSetting::ENABLE_REBOOTS ); + * l_rbotCtl.setRebootControl( autoRebootSetting::DISABLE_REBOOTS ); + * + */ + class RebootControlSensor : public SensorBase + { + + public: + /** + * @enum autoRebootSetting + * enum to define the contr + */ + enum autoRebootSetting + { + DISABLE_REBOOTS = 0x00, // keep current state + ENABLE_REBOOTS = 0x01, // allow reboot for FIRDATA analysis + }; + + /** + * @brief Constructor for the RebootControlSensor + * + * The system target holds the IPMI sensor number for this sensor. + * + */ + RebootControlSensor(); + + /** + * @brief Destructor for the RebootControlSensor + * + */ + ~RebootControlSensor(); + + /** + * @brief Set reboots to enabled or disabled + * + * @param[in] i_setting - enable/disable + * + * @return Errorlog handle + * + */ + errlHndl_t setRebootControl( autoRebootSetting i_setting ); + + /** + * @brief get the value of the reboot control from the BMC. + * + * @param[o] i_setting - reboot control value + * + * @return Errorlog handle + * + */ + errlHndl_t getRebootControl( autoRebootSetting& o_setting ); + + }; + + + /** * @class StatusSensor * * @brief Specialized class to handle DIMM, PROC and Core status. |