blob: d58f640688cfdf4f5e5e916e4a3f481e4ca73bbb [file] [log] [blame]
#ifndef __HOST_IPMI_SEN_HANDLER_H__
#define __HOST_IPMI_SEN_HANDLER_H__
#include <stdint.h>
// IPMI commands for net functions.
enum ipmi_netfn_sen_cmds
{
IPMI_CMD_GET_SENSOR_READING = 0x2D,
IPMI_CMD_GET_SENSOR_TYPE = 0x2F,
IPMI_CMD_SET_SENSOR = 0x30,
};
#define MAX_DBUS_PATH 128
struct dbus_interface_t {
uint8_t sensornumber;
uint8_t sensortype;
char bus[MAX_DBUS_PATH];
char path[MAX_DBUS_PATH];
char interface[MAX_DBUS_PATH];
};
int set_sensor_dbus_state_s(uint8_t , const char *, const char *);
int set_sensor_dbus_state_y(uint8_t , const char *, const uint8_t);
int find_openbmc_path(uint8_t , dbus_interface_t *);
/**
* @struct SetSensorReadingReq
*
* IPMI Request data for Set Sensor Reading and Event Status Command
*/
struct SetSensorReadingReq
{
uint8_t number;
uint8_t operation;
uint8_t reading;
uint8_t assertOffset0_7;
uint8_t assertOffset8_14;
uint8_t deassertOffset0_7;
uint8_t deassertOffset8_14;
uint8_t eventData1;
uint8_t eventData2;
uint8_t eventData3;
} __attribute__((packed));
#endif