Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 1 | #ifndef __HOST_IPMI_DCMI_HANDLER_H__ |
| 2 | #define __HOST_IPMI_DCMI_HANDLER_H__ |
| 3 | |
| 4 | #include <map> |
| 5 | #include <string> |
| 6 | #include <vector> |
Tom Joseph | b9d86f4 | 2017-07-26 18:03:47 +0530 | [diff] [blame] | 7 | #include <sdbusplus/bus.hpp> |
Deepak Kodihalli | b1e8fba | 2018-01-24 04:57:10 -0600 | [diff] [blame] | 8 | #include "nlohmann/json.hpp" |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 9 | |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 10 | namespace dcmi |
| 11 | { |
| 12 | |
Ratan Gupta | 11ddbd2 | 2017-08-05 11:59:39 +0530 | [diff] [blame] | 13 | enum Commands |
| 14 | { |
| 15 | // Get capability bits |
Dhruvaraj Subhashchandran | e29be41 | 2018-01-16 05:11:56 -0600 | [diff] [blame] | 16 | GET_CAPABILITIES = 0x01, |
Marri Devender Rao | 66c5fda | 2018-01-18 10:48:37 -0600 | [diff] [blame] | 17 | GET_POWER_READING = 0x02, |
Ratan Gupta | 11ddbd2 | 2017-08-05 11:59:39 +0530 | [diff] [blame] | 18 | GET_POWER_LIMIT = 0x03, |
| 19 | SET_POWER_LIMIT = 0x04, |
| 20 | APPLY_POWER_LIMIT = 0x05, |
| 21 | GET_ASSET_TAG = 0x06, |
| 22 | SET_ASSET_TAG = 0x08, |
Vladislav Vovchenko | 8f7a6f6 | 2017-08-17 00:31:14 +0300 | [diff] [blame] | 23 | GET_MGMNT_CTRL_ID_STR = 0x09, |
| 24 | SET_MGMNT_CTRL_ID_STR = 0x0A, |
Deepak Kodihalli | ee717d7 | 2018-01-24 04:53:09 -0600 | [diff] [blame] | 25 | GET_TEMP_READINGS = 0x10, |
Ratan Gupta | 11ddbd2 | 2017-08-05 11:59:39 +0530 | [diff] [blame] | 26 | }; |
| 27 | |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 28 | static constexpr auto propIntf = "org.freedesktop.DBus.Properties"; |
| 29 | static constexpr auto assetTagIntf = |
| 30 | "xyz.openbmc_project.Inventory.Decorator.AssetTag"; |
| 31 | static constexpr auto assetTagProp = "AssetTag"; |
Vladislav Vovchenko | 8f7a6f6 | 2017-08-17 00:31:14 +0300 | [diff] [blame] | 32 | static constexpr auto networkServiceName = "xyz.openbmc_project.Network"; |
| 33 | static constexpr auto networkConfigObj = |
| 34 | "/xyz/openbmc_project/network/config"; |
| 35 | static constexpr auto networkConfigIntf = |
| 36 | "xyz.openbmc_project.Network.SystemConfiguration"; |
| 37 | static constexpr auto hostNameProp = "HostName"; |
Deepak Kodihalli | ee717d7 | 2018-01-24 04:53:09 -0600 | [diff] [blame] | 38 | static constexpr auto temperatureSensorType = 0x01; |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 39 | |
| 40 | namespace assettag |
| 41 | { |
| 42 | |
| 43 | using ObjectPath = std::string; |
| 44 | using Service = std::string; |
| 45 | using Interfaces = std::vector<std::string>; |
| 46 | using ObjectTree = std::map<ObjectPath, std::map<Service, Interfaces>>; |
| 47 | |
| 48 | } //namespace assettag |
| 49 | |
Deepak Kodihalli | ee717d7 | 2018-01-24 04:53:09 -0600 | [diff] [blame] | 50 | namespace temp_readings |
| 51 | { |
| 52 | static constexpr auto maxDataSets = 8; |
| 53 | static constexpr auto maxInstances = 255; |
Deepak Kodihalli | 138e018 | 2018-02-02 07:17:02 -0600 | [diff] [blame] | 54 | static constexpr auto maxTemp = 127; // degrees C |
Deepak Kodihalli | b1e8fba | 2018-01-24 04:57:10 -0600 | [diff] [blame] | 55 | static constexpr auto configFile = |
| 56 | "/usr/share/ipmi-providers/dcmi_temp_readings.json"; |
Deepak Kodihalli | ee717d7 | 2018-01-24 04:53:09 -0600 | [diff] [blame] | 57 | |
| 58 | /** @struct Response |
| 59 | * |
| 60 | * DCMI payload for Get Temperature Readings response |
| 61 | */ |
| 62 | struct Response |
| 63 | { |
| 64 | #if BYTE_ORDER == LITTLE_ENDIAN |
| 65 | uint8_t temperature: 7; //!< Temperature reading in Celsius |
| 66 | uint8_t sign: 1; //!< Sign bit |
| 67 | #endif |
| 68 | #if BYTE_ORDER == BIG_ENDIAN |
| 69 | uint8_t sign: 1; //!< Sign bit |
| 70 | uint8_t temperature: 7; //!< Temperature reading in Celsius |
| 71 | #endif |
| 72 | uint8_t instance; //!< Entity instance number |
| 73 | } __attribute__((packed)); |
| 74 | |
| 75 | using ResponseList = std::vector<Response>; |
| 76 | using NumInstances = size_t; |
Deepak Kodihalli | b1e8fba | 2018-01-24 04:57:10 -0600 | [diff] [blame] | 77 | using Value = uint8_t; |
| 78 | using Sign = bool; |
| 79 | using Temperature = std::tuple<Value, Sign>; |
| 80 | using Json = nlohmann::json; |
Deepak Kodihalli | ee717d7 | 2018-01-24 04:53:09 -0600 | [diff] [blame] | 81 | } |
| 82 | |
Tom Joseph | 6f6dd4d | 2017-07-12 20:07:11 +0530 | [diff] [blame] | 83 | static constexpr auto groupExtId = 0xDC; |
| 84 | |
| 85 | static constexpr auto assetTagMaxOffset = 62; |
| 86 | static constexpr auto assetTagMaxSize = 63; |
| 87 | static constexpr auto maxBytes = 16; |
Vladislav Vovchenko | 8f7a6f6 | 2017-08-17 00:31:14 +0300 | [diff] [blame] | 88 | static constexpr size_t maxCtrlIdStrLen = 63; |
Tom Joseph | 6f6dd4d | 2017-07-12 20:07:11 +0530 | [diff] [blame] | 89 | |
| 90 | /** @struct GetAssetTagRequest |
| 91 | * |
| 92 | * DCMI payload for Get Asset Tag command request. |
| 93 | */ |
| 94 | struct GetAssetTagRequest |
| 95 | { |
| 96 | uint8_t groupID; //!< Group extension identification. |
| 97 | uint8_t offset; //!< Offset to read. |
| 98 | uint8_t bytes; //!< Number of bytes to read. |
| 99 | } __attribute__((packed)); |
| 100 | |
| 101 | /** @struct GetAssetTagResponse |
| 102 | * |
| 103 | * DCMI payload for Get Asset Tag command response. |
| 104 | */ |
| 105 | struct GetAssetTagResponse |
| 106 | { |
| 107 | uint8_t groupID; //!< Group extension identification. |
| 108 | uint8_t tagLength; //!< Total asset tag length. |
| 109 | } __attribute__((packed)); |
| 110 | |
Tom Joseph | 545dd23 | 2017-07-12 20:20:49 +0530 | [diff] [blame] | 111 | /** @struct SetAssetTagRequest |
| 112 | * |
| 113 | * DCMI payload for Set Asset Tag command request. |
| 114 | */ |
| 115 | struct SetAssetTagRequest |
| 116 | { |
| 117 | uint8_t groupID; //!< Group extension identification. |
| 118 | uint8_t offset; //!< Offset to write. |
| 119 | uint8_t bytes; //!< Number of bytes to write. |
| 120 | } __attribute__((packed)); |
| 121 | |
| 122 | /** @struct SetAssetTagResponse |
| 123 | * |
| 124 | * DCMI payload for Set Asset Tag command response. |
| 125 | */ |
| 126 | struct SetAssetTagResponse |
| 127 | { |
| 128 | uint8_t groupID; //!< Group extension identification. |
| 129 | uint8_t tagLength; //!< Total asset tag length. |
| 130 | } __attribute__((packed)); |
| 131 | |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 132 | /** @brief Read the object tree to fetch the object path that implemented the |
| 133 | * Asset tag interface. |
| 134 | * |
| 135 | * @param[in,out] objectTree - object tree |
| 136 | * |
| 137 | * @return On success return the object tree with the object path that |
| 138 | * implemented the AssetTag interface. |
| 139 | */ |
| 140 | void readAssetTagObjectTree(dcmi::assettag::ObjectTree& objectTree); |
| 141 | |
| 142 | /** @brief Read the asset tag of the server |
| 143 | * |
| 144 | * @return On success return the asset tag. |
| 145 | */ |
| 146 | std::string readAssetTag(); |
| 147 | |
Tom Joseph | be5b989 | 2017-07-15 00:55:23 +0530 | [diff] [blame] | 148 | /** @brief Write the asset tag to the asset tag DBUS property |
| 149 | * |
| 150 | * @param[in] assetTag - Asset Tag to be written to the property. |
| 151 | */ |
| 152 | void writeAssetTag(const std::string& assetTag); |
| 153 | |
Tom Joseph | b9d86f4 | 2017-07-26 18:03:47 +0530 | [diff] [blame] | 154 | /** @brief Read the current power cap value |
| 155 | * |
| 156 | * @param[in] bus - dbus connection |
| 157 | * |
| 158 | * @return On success return the power cap value. |
| 159 | */ |
| 160 | uint32_t getPcap(sdbusplus::bus::bus& bus); |
| 161 | |
| 162 | /** @brief Check if the power capping is enabled |
| 163 | * |
| 164 | * @param[in] bus - dbus connection |
| 165 | * |
| 166 | * @return true if the powerCap is enabled and false if the powercap |
| 167 | * is disabled. |
| 168 | */ |
| 169 | bool getPcapEnabled(sdbusplus::bus::bus& bus); |
| 170 | |
| 171 | /** @struct GetPowerLimitRequest |
| 172 | * |
| 173 | * DCMI payload for Get Power Limit command request. |
| 174 | */ |
| 175 | struct GetPowerLimitRequest |
| 176 | { |
| 177 | uint8_t groupID; //!< Group extension identification. |
| 178 | uint16_t reserved; //!< Reserved |
| 179 | } __attribute__((packed)); |
| 180 | |
| 181 | /** @struct GetPowerLimitResponse |
| 182 | * |
| 183 | * DCMI payload for Get Power Limit command response. |
| 184 | */ |
| 185 | struct GetPowerLimitResponse |
| 186 | { |
| 187 | uint8_t groupID; //!< Group extension identification. |
| 188 | uint16_t reserved; //!< Reserved. |
| 189 | uint8_t exceptionAction; //!< Exception action. |
| 190 | uint16_t powerLimit; //!< Power limit requested in watts. |
| 191 | uint32_t correctionTime; //!< Correction time limit in milliseconds. |
| 192 | uint16_t reserved1; //!< Reserved. |
| 193 | uint16_t samplingPeriod; //!< Statistics sampling period in seconds. |
| 194 | } __attribute__((packed)); |
| 195 | |
Tom Joseph | 46fa37d | 2017-07-26 18:11:55 +0530 | [diff] [blame] | 196 | /** @brief Set the power cap value |
| 197 | * |
| 198 | * @param[in] bus - dbus connection |
| 199 | * @param[in] powerCap - power cap value |
| 200 | */ |
| 201 | void setPcap(sdbusplus::bus::bus& bus, const uint32_t powerCap); |
| 202 | |
| 203 | /** @struct SetPowerLimitRequest |
| 204 | * |
| 205 | * DCMI payload for Set Power Limit command request. |
| 206 | */ |
| 207 | struct SetPowerLimitRequest |
| 208 | { |
| 209 | uint8_t groupID; //!< Group extension identification. |
| 210 | uint16_t reserved; //!< Reserved |
| 211 | uint8_t reserved1; //!< Reserved |
| 212 | uint8_t exceptionAction; //!< Exception action. |
| 213 | uint16_t powerLimit; //!< Power limit requested in watts. |
| 214 | uint32_t correctionTime; //!< Correction time limit in milliseconds. |
| 215 | uint16_t reserved2; //!< Reserved. |
| 216 | uint16_t samplingPeriod; //!< Statistics sampling period in seconds. |
| 217 | } __attribute__((packed)); |
| 218 | |
| 219 | /** @struct SetPowerLimitResponse |
| 220 | * |
| 221 | * DCMI payload for Set Power Limit command response. |
| 222 | */ |
| 223 | struct SetPowerLimitResponse |
| 224 | { |
| 225 | uint8_t groupID; //!< Group extension identification. |
| 226 | } __attribute__((packed)); |
| 227 | |
Tom Joseph | 6c8d51b | 2017-07-26 18:18:06 +0530 | [diff] [blame] | 228 | /** @brief Enable or disable the power capping |
| 229 | * |
| 230 | * @param[in] bus - dbus connection |
| 231 | * @param[in] enabled - enable/disable |
| 232 | */ |
| 233 | void setPcapEnable(sdbusplus::bus::bus& bus, bool enabled); |
| 234 | |
| 235 | /** @struct ApplyPowerLimitRequest |
| 236 | * |
| 237 | * DCMI payload for Activate/Deactivate Power Limit command request. |
| 238 | */ |
| 239 | struct ApplyPowerLimitRequest |
| 240 | { |
| 241 | uint8_t groupID; //!< Group extension identification. |
| 242 | uint8_t powerLimitAction; //!< Power limit activation |
| 243 | uint16_t reserved; //!< Reserved |
| 244 | } __attribute__((packed)); |
| 245 | |
| 246 | /** @struct ApplyPowerLimitResponse |
| 247 | * |
| 248 | * DCMI payload for Acticate/Deactivate Power Limit command response. |
| 249 | */ |
| 250 | struct ApplyPowerLimitResponse |
| 251 | { |
| 252 | uint8_t groupID; //!< Group extension identification. |
| 253 | } __attribute__((packed)); |
| 254 | |
Vladislav Vovchenko | 8f7a6f6 | 2017-08-17 00:31:14 +0300 | [diff] [blame] | 255 | /** @struct GetMgmntCtrlIdStrRequest |
| 256 | * |
| 257 | * DCMI payload for Get Management Controller Identifier String cmd request. |
| 258 | */ |
| 259 | struct GetMgmntCtrlIdStrRequest |
| 260 | { |
| 261 | uint8_t groupID; //!< Group extension identification. |
| 262 | uint8_t offset; //!< Offset to read. |
| 263 | uint8_t bytes; //!< Number of bytes to read. |
| 264 | } __attribute__((packed)); |
| 265 | |
| 266 | /** @struct GetMgmntCtrlIdStrResponse |
| 267 | * |
| 268 | * DCMI payload for Get Management Controller Identifier String cmd response. |
| 269 | */ |
| 270 | struct GetMgmntCtrlIdStrResponse |
| 271 | { |
| 272 | uint8_t groupID; //!< Group extension identification. |
| 273 | uint8_t strLen; //!< ID string length. |
| 274 | char data[]; //!< ID string |
| 275 | } __attribute__((packed)); |
| 276 | |
| 277 | /** @struct SetMgmntCtrlIdStrRequest |
| 278 | * |
| 279 | * DCMI payload for Set Management Controller Identifier String cmd request. |
| 280 | */ |
| 281 | struct SetMgmntCtrlIdStrRequest |
| 282 | { |
| 283 | uint8_t groupID; //!< Group extension identification. |
| 284 | uint8_t offset; //!< Offset to write. |
| 285 | uint8_t bytes; //!< Number of bytes to read. |
| 286 | char data[]; //!< ID string |
| 287 | } __attribute__((packed)); |
| 288 | |
| 289 | /** @struct GetMgmntCtrlIdStrResponse |
| 290 | * |
| 291 | * DCMI payload for Get Management Controller Identifier String cmd response. |
| 292 | */ |
| 293 | struct SetMgmntCtrlIdStrResponse |
| 294 | { |
| 295 | uint8_t groupID; //!< Group extension identification. |
| 296 | uint8_t offset; //!< Last Offset Written. |
| 297 | } __attribute__((packed)); |
| 298 | |
Dhruvaraj Subhashchandran | e29be41 | 2018-01-16 05:11:56 -0600 | [diff] [blame] | 299 | /** @enum DCMICapParameters |
| 300 | * |
| 301 | * DCMI Capability parameters |
| 302 | */ |
| 303 | enum class DCMICapParameters |
| 304 | { |
| 305 | SUPPORTED_DCMI_CAPS = 0x01, //!< Supported DCMI Capabilities |
| 306 | MANDATORY_PLAT_ATTRIBUTES = 0x02, //!< Mandatory Platform Attributes |
| 307 | OPTIONAL_PLAT_ATTRIBUTES = 0x03, //!< Optional Platform Attributes |
| 308 | MANAGEABILITY_ACCESS_ATTRIBUTES = 0x04, //!< Manageability Access Attributes |
| 309 | }; |
| 310 | |
| 311 | /** @struct GetDCMICapRequest |
| 312 | * |
| 313 | * DCMI payload for Get capabilities cmd request. |
| 314 | */ |
| 315 | struct GetDCMICapRequest |
| 316 | { |
| 317 | uint8_t groupID; //!< Group extension identification. |
| 318 | uint8_t param; //!< Capability parameter selector. |
| 319 | } __attribute__((packed)); |
| 320 | |
| 321 | /** @struct GetDCMICapRequest |
| 322 | * |
| 323 | * DCMI payload for Get capabilities cmd response. |
| 324 | */ |
| 325 | struct GetDCMICapResponse |
| 326 | { |
| 327 | uint8_t groupID; //!< Group extension identification. |
| 328 | uint8_t major; //!< DCMI Specification Conformance - major ver |
| 329 | uint8_t minor; //!< DCMI Specification Conformance - minor ver |
| 330 | uint8_t paramRevision; //!< Parameter Revision = 02h |
| 331 | uint8_t data[]; //!< Capability array |
| 332 | } __attribute__((packed)); |
| 333 | |
| 334 | /** @struct DCMICap |
| 335 | * |
| 336 | * DCMI capabilities protocol info. |
| 337 | */ |
| 338 | struct DCMICap |
| 339 | { |
| 340 | std::string name; //!< Name of DCMI capability. |
| 341 | uint8_t bytePosition; //!< Starting byte number from DCMI spec. |
| 342 | uint8_t position; //!< bit position from the DCMI spec. |
| 343 | uint8_t length; //!< Length of the value from DCMI spec. |
| 344 | }; |
| 345 | |
| 346 | using DCMICapList = std::vector<DCMICap>; |
| 347 | |
| 348 | /** @struct DCMICapEntry |
| 349 | * |
| 350 | * DCMI capabilities list and size for each parameter. |
| 351 | */ |
| 352 | struct DCMICapEntry |
| 353 | { |
| 354 | uint8_t size; //!< Size of capability array in bytes. |
| 355 | DCMICapList capList; //!< List of capabilities for a parameter. |
| 356 | }; |
| 357 | |
| 358 | using DCMICaps = std::map<DCMICapParameters, DCMICapEntry>; |
| 359 | |
Deepak Kodihalli | ee717d7 | 2018-01-24 04:53:09 -0600 | [diff] [blame] | 360 | /** @struct GetTempReadingsRequest |
| 361 | * |
| 362 | * DCMI payload for Get Temperature Readings request |
| 363 | */ |
| 364 | struct GetTempReadingsRequest |
| 365 | { |
| 366 | uint8_t groupID; //!< Group extension identification. |
| 367 | uint8_t sensorType; //!< Type of the sensor |
| 368 | uint8_t entityId; //!< Entity ID |
| 369 | uint8_t entityInstance; //!< Entity Instance (0 means all instances) |
| 370 | uint8_t instanceStart; //!< Instance start (used if instance is 0) |
| 371 | } __attribute__((packed)); |
| 372 | |
| 373 | /** @struct GetTempReadingsResponse |
| 374 | * |
| 375 | * DCMI header for Get Temperature Readings response |
| 376 | */ |
| 377 | struct GetTempReadingsResponseHdr |
| 378 | { |
| 379 | uint8_t groupID; //!< Group extension identification. |
| 380 | uint8_t numInstances; //!< No. of instances for requested id |
| 381 | uint8_t numDataSets; //!< No. of sets of temperature data |
| 382 | } __attribute__((packed)); |
| 383 | |
| 384 | namespace temp_readings |
| 385 | { |
Deepak Kodihalli | b1e8fba | 2018-01-24 04:57:10 -0600 | [diff] [blame] | 386 | /** @brief Read temperature from a d-bus object, scale it as per dcmi |
| 387 | * get temperature reading requirements. |
| 388 | * |
| 389 | * @param[in] dbusService - the D-Bus service |
| 390 | * @param[in] dbusPath - the D-Bus path |
| 391 | * |
| 392 | * @return A temperature reading |
| 393 | */ |
| 394 | Temperature readTemp(const std::string& dbusService, |
| 395 | const std::string& dbusPath); |
| 396 | |
| 397 | /** @brief Parse out JSON config file containing information |
| 398 | * related to temperature readings. |
| 399 | * |
| 400 | * @return A json object |
| 401 | */ |
| 402 | Json parseConfig(); |
| 403 | |
Deepak Kodihalli | ee717d7 | 2018-01-24 04:53:09 -0600 | [diff] [blame] | 404 | /** @brief Read temperatures and fill up DCMI response for the Get |
| 405 | * Temperature Readings command. This looks at a specific |
| 406 | * instance. |
| 407 | * |
| 408 | * @param[in] type - one of "inlet", "cpu", "baseboard" |
| 409 | * @param[in] instance - A non-zero Entity instance number |
| 410 | * |
| 411 | * @return A tuple, containing a temperature reading and the |
| 412 | * number of instances. |
| 413 | */ |
| 414 | std::tuple<Response, NumInstances> read (const std::string& type, |
| 415 | uint8_t instance); |
| 416 | |
| 417 | /** @brief Read temperatures and fill up DCMI response for the Get |
| 418 | * Temperature Readings command. This looks at a range of |
| 419 | * instances. |
| 420 | * |
| 421 | * @param[in] type - one of "inlet", "cpu", "baseboard" |
| 422 | * @param[in] instanceStart - Entity instance start index |
| 423 | * |
| 424 | * @return A tuple, containing a list of temperature readings and the |
| 425 | * number of instances. |
| 426 | */ |
| 427 | std::tuple<ResponseList, NumInstances> readAll(const std::string& type, |
| 428 | uint8_t instanceStart); |
| 429 | } |
| 430 | |
Marri Devender Rao | 66c5fda | 2018-01-18 10:48:37 -0600 | [diff] [blame] | 431 | /** @brief Read power reading from power reading sensor object |
| 432 | * |
| 433 | * @param[in] bus - dbus connection |
| 434 | * |
| 435 | * @return total power reading |
| 436 | */ |
| 437 | int64_t getPowerReading(sdbusplus::bus::bus& bus); |
| 438 | |
| 439 | /** @struct GetPowerReadingRequest |
| 440 | * |
| 441 | * DCMI Get Power Reading command request. |
| 442 | * Refer DCMI specification Version 1.1 Section 6.6.1 |
| 443 | */ |
| 444 | struct GetPowerReadingRequest |
| 445 | { |
| 446 | uint8_t groupID; //!< Group extension identification. |
| 447 | uint8_t mode; //!< Mode |
| 448 | uint8_t modeAttribute; //!< Mode Attributes |
| 449 | } __attribute__((packed)); |
| 450 | |
| 451 | /** @struct GetPowerReadingResponse |
| 452 | * |
| 453 | * DCMI Get Power Reading command response. |
| 454 | * Refer DCMI specification Version 1.1 Section 6.6.1 |
| 455 | */ |
| 456 | struct GetPowerReadingResponse |
| 457 | { |
| 458 | uint8_t groupID; //!< Group extension identification. |
| 459 | uint16_t currentPower; //!< Current power in watts |
| 460 | uint16_t minimumPower; //!< Minimum power over sampling duration |
| 461 | //!< in watts |
| 462 | uint16_t maximumPower; //!< Maximum power over sampling duration |
| 463 | //!< in watts |
| 464 | uint16_t averagePower; //!< Average power over sampling duration |
| 465 | //!< in watts |
| 466 | uint32_t timeStamp; //!< IPMI specification based time stamp |
| 467 | uint32_t timeFrame; //!< Statistics reporting time period in milli |
| 468 | //!< seconds. |
| 469 | uint8_t powerReadingState; //!< Power Reading State |
| 470 | } __attribute__((packed)); |
| 471 | |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 472 | } // namespace dcmi |
| 473 | |
| 474 | #endif |