diff options
Diffstat (limited to 'selutility.hpp')
-rw-r--r-- | selutility.hpp | 51 |
1 files changed, 11 insertions, 40 deletions
diff --git a/selutility.hpp b/selutility.hpp index 806f937..49ec1b7 100644 --- a/selutility.hpp +++ b/selutility.hpp @@ -28,32 +28,26 @@ using Id = uint32_t; using Timestamp = uint64_t; using Message = std::string; using AdditionalData = std::vector<std::string>; -using PropertyType = sdbusplus::message::variant<Resolved, Id, Timestamp, - Message, AdditionalData>; +using PropertyType = + std::variant<Resolved, Id, Timestamp, Message, AdditionalData>; static constexpr auto selVersion = 0x51; static constexpr auto invalidTimeStamp = 0xFFFFFFFF; -static constexpr auto operationSupport = 0x0A; - -/** @struct GetSELInfoResponse - * - * IPMI payload for Get SEL Info command response. - */ -struct GetSELInfoResponse -{ - uint8_t selVersion; //!< SEL revision. - uint16_t entries; //!< Number of log entries in SEL. - uint16_t freeSpace; //!< Free Space in bytes. - uint32_t addTimeStamp; //!< Most recent addition timestamp. - uint32_t eraseTimeStamp; //!< Most recent erase timestamp. - uint8_t operationSupport; //!< Operation support. -} __attribute__((packed)); static constexpr auto firstEntry = 0x0000; static constexpr auto lastEntry = 0xFFFF; static constexpr auto entireRecord = 0xFF; static constexpr auto selRecordSize = 16; +namespace operationSupport +{ +static constexpr bool overflow = false; +static constexpr bool deleteSel = true; +static constexpr bool partialAddSelEntry = false; +static constexpr bool reserveSel = true; +static constexpr bool getSelAllocationInfo = false; +} // namespace operationSupport + /** @struct GetSELEntryRequest * * IPMI payload for Get SEL Entry command request. @@ -86,33 +80,10 @@ struct GetSELEntryResponse uint8_t eventData3; //!< Event Data 3. } __attribute__((packed)); -/** @struct DeleteSELEntryRequest - * - * IPMI payload for Delete SEL Entry command request. - */ -struct DeleteSELEntryRequest -{ - uint16_t reservationID; //!< Reservation ID. - uint16_t selRecordID; //!< SEL Record ID. -} __attribute__((packed)); - static constexpr auto initiateErase = 0xAA; static constexpr auto getEraseStatus = 0x00; static constexpr auto eraseComplete = 0x01; -/** @struct ClearSELRequest - * - * IPMI payload for Clear SEL command request. - */ -struct ClearSELRequest -{ - uint16_t reservationID; //!< Reservation ID. - uint8_t charC; //!< Char 'C'(0x43h). - uint8_t charL; //!< Char 'L'(0x4Ch). - uint8_t charR; //!< Char 'R'(0x52h). - uint8_t eraseOperation; //!< Erase operation. -} __attribute__((packed)); - /** @brief Convert logging entry to SEL * * @param[in] objPath - DBUS object path of the logging entry. |