diff options
author | William A. Kennington III <wak@google.com> | 2018-12-14 02:14:33 -0800 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2019-02-07 01:55:40 +0000 |
commit | 194375f2676715a0e0697bab63234a4efe39fb96 (patch) | |
tree | 11282679c88b302c68996a039c9bd7016e38b53c /host-ipmid/ipmid-host-cmd-utils.hpp | |
parent | 851acb19d773fe771201968a43b7760c63757b8c (diff) | |
download | phosphor-host-ipmid-194375f2676715a0e0697bab63234a4efe39fb96.tar.gz phosphor-host-ipmid-194375f2676715a0e0697bab63234a4efe39fb96.zip |
Create libipmid and libipmid-host
This starts a transition to common ipmid libraries that providers can
link against. It will allow for a cleaner separation between common
ipmid functionality and daemon type specific code. This is needed so we
can resolve all of the symbols in the providers at link time instead of
discovering bad linkage by building and running a full ipmi daemon.
In future commits libraries will be packaged for libipmid and libipmid-host
which provide all of the symbols used by the current set of ipmid
providers.
This is the first step, it just separates and renames the headers.
Legacy symlinks are still kept around for compatability. It also adds
stub libraries so that external users can start linking as intended.
Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'host-ipmid/ipmid-host-cmd-utils.hpp')
-rw-r--r-- | host-ipmid/ipmid-host-cmd-utils.hpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/host-ipmid/ipmid-host-cmd-utils.hpp b/host-ipmid/ipmid-host-cmd-utils.hpp deleted file mode 100644 index e7c6dc2..0000000 --- a/host-ipmid/ipmid-host-cmd-utils.hpp +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - -#include <unistd.h> - -#include <functional> -#include <tuple> - -namespace phosphor -{ -namespace host -{ -namespace command -{ -/** @detail After sending SMS_ATN to the Host, Host comes down and - * asks why an 'SMS_ATN` was sent. - * BMC then sends 'There is a Message to be Read` as response. - * Host then comes down asks for Message and the specified - * commands and data would go as data conforming to IPMI spec. - * - * Refer: 6.13.2 Send Message Command From System Interface - * in IPMI V2.0 spec. - */ - -/** @brief IPMI command */ -using IPMIcmd = uint8_t; - -/** @brief Data associated with command */ -using Data = uint8_t; - -/** @brief <IPMI command, Data> to be sent as payload when Host asks for - * the message that can be associated with the previous SMS_ATN - */ -using IpmiCmdData = std::pair<IPMIcmd, Data>; - -/** @detail Implementation specific callback function to be invoked - * conveying the status of the executed command. Specific - * implementations may then broadcast an agreed signal - */ -using CallBack = std::function<void(IpmiCmdData, bool)>; - -/** @detail Tuple encapsulating above 2 to enable using Manager by - * different implementations. Users of Manager will supply - * <Ipmi command, Data> along with the callback handler. - * Manager will invoke the handler onveying the status of - * the command. - */ -using CommandHandler = std::tuple<IpmiCmdData, CallBack>; - -} // namespace command -} // namespace host -} // namespace phosphor |