Documentation
¶
Index ¶
- Constants
- Variables
- func GetSensorStatDesc(readingType SDRSensorReadingType, sensorType SDRSensorType, state2 uint8, ...) (string, []string)
- func NewRepo() *repo
- func ParseDSN(dsn string) (user, password, host string, port uint16, _err error)
- type ActivateSessionRequest
- type ActivateSessionResponse
- type AuthCapabilitiesRequest
- type AuthCapabilitiesResponse
- type BootDevice
- type ChassisControl
- type ChassisControlRequest
- type ChassisControlResponse
- type ChassisStatusRequest
- type ChassisStatusResponse
- type Client
- func (c *Client) CalSdrRecordValue(recordType uint8, recordKeyBody_Data *bytes.Buffer) (*sDRRecordAndValue, error)
- func (c *Client) Close() error
- func (c *Client) Control(ctl ChassisControl) error
- func (c *Client) DeviceID() (*DeviceIDResponse, error)
- func (c *Client) GetReserveSDRRepoForReserveId() (*ReserveRepositoryResponse, error)
- func (c *Client) GetSDR(reservationID uint16, recordID uint16) (sdr *sDRRecordAndValue, next uint16, err error)
- func (c *Client) GetSensorList(reservationID uint16) ([]SdrSensorInfo, error)
- func (c *Client) Open() error
- func (c *Client) RepositoryInfo() (*SDRRepositoryInfoResponse, error)
- func (c *Client) Send(req *Request, res Response) error
- func (c *Client) SetBootDevice(dev BootDevice) error
- type CloseSessionRequest
- type CloseSessionResponse
- type Command
- type CompletionCode
- type Connection
- type DeviceIDRequest
- type DeviceIDResponse
- type GetSDRCommandRequest
- type GetSDRCommandResponse
- type GetSensorReadingRequest
- type GetSensorReadingResponse
- type Handler
- type Message
- type NetworkFunction
- type OemID
- type Request
- type ReserveRepositoryResponse
- type ReserveSDRRepositoryRequest
- type Response
- type SDRCompactSensor
- type SDRFruDeviceLocator
- type SDRFullSensor
- func (r *SDRFullSensor) CalValue(value float64) uint8
- func (r *SDRFullSensor) DeviceId() string
- func (r *SDRFullSensor) GetMBExp() (M int16, B int16, Bexp int8, Rexp int8)
- func (r *SDRFullSensor) MarshalBinary() (data []byte, err error)
- func (r *SDRFullSensor) RecordId() uint16
- func (r *SDRFullSensor) RecordType() SDRRecordType
- func (r *SDRFullSensor) SetMBExp(M int16, B int16, Bexp int8, Rexp int8)
- func (r *SDRFullSensor) UnmarshalBinary(data []byte) error
- type SDRMCDeviceLoc
- type SDRMcDeviceLocator
- type SDRRecord
- type SDRRecordHeader
- type SDRRecordType
- type SDRRepositoryInfoRequest
- type SDRRepositoryInfoResponse
- type SDRSensorReadingData2
- type SDRSensorReadingType
- type SDRSensorType
- type SdrSensorInfo
- type SessionChallengeRequest
- type SessionChallengeResponse
- type SessionPrivilegeLevelRequest
- type SessionPrivilegeLevelResponse
- type SetSystemBootOptionsRequest
- type SetSystemBootOptionsResponse
- type Simulator
- type SystemBootOptionsRequest
- type SystemBootOptionsResponse
Constants ¶
const ( ControlPowerDown = ChassisControl(0x0) ControlPowerUp = ChassisControl(0x1) ControlPowerCycle = ChassisControl(0x2) ControlPowerHardReset = ChassisControl(0x3) ControlPowerPulseDiag = ChassisControl(0x4) ControlPowerAcpiSoft = ChassisControl(0x5) BootDeviceNone = BootDevice(0x00) BootDevicePxe = BootDevice(0x04) BootDeviceDisk = BootDevice(0x08) BootDeviceSafe = BootDevice(0x0c) BootDeviceDiag = BootDevice(0x10) BootDeviceCdrom = BootDevice(0x14) BootDeviceBios = BootDevice(0x18) BootDeviceRemoteFloppy = BootDevice(0x1c) BootDeviceRemotePrimary = BootDevice(0x24) BootDeviceRemoteCdrom = BootDevice(0x20) BootDeviceRemoteDisk = BootDevice(0x2c) BootDeviceFloppy = BootDevice(0x3c) SystemPower = 0x1 PowerOverload = 0x2 PowerInterlock = 0x4 MainPowerFault = 0x8 PowerControlFault = 0x10 PowerRestorePolicyAlwaysOff = 0x0 PowerRestorePolicyPrevious = 0x1 PowerRestorePolicyAlwaysOn = 0x2 PowerRestorePolicyUnknown = 0x3 PowerEventUnknown = 0x0 PowerEventAcFailed = 0x1 PowerEventOverload = 0x2 PowerEventInterlock = 0x4 PowerEventFault = 0x8 PowerEventCommand = 0x10 ChassisIntrusion = 0x1 FrontPanelLockout = 0x2 DriveFault = 0x4 CoolingFanFault = 0x8 SleepButtonDisable = 0x80 DiagButtonDisable = 0x40 ResetButtonDisable = 0x20 PowerButtonDisable = 0x10 SleepButtonDisabled = 0x08 DiagButtonDisabled = 0x04 ResetButtonDisabled = 0x02 PowerButtonDisabled = 0x01 BootParamSetInProgress = 0x0 BootParamSvcPartSelect = 0x1 BootParamSvcPartScan = 0x2 BootParamFlagValid = 0x3 BootParamInfoAck = 0x4 BootParamBootFlags = 0x5 BootParamInitInfo = 0x6 BootParamInitMbox = 0x7 )
const ( CommandGetDeviceID = Command(0x01) CommandGetAuthCapabilities = Command(0x38) CommandGetSessionChallenge = Command(0x39) CommandActivateSession = Command(0x3a) CommandSetSessionPrivilegeLevel = Command(0x3b) CommandCloseSession = Command(0x3c) CommandChassisControl = Command(0x02) CommandChassisStatus = Command(0x01) CommandSetSystemBootOptions = Command(0x08) CommandGetSystemBootOptions = Command(0x09) )
Command Number Assignments (table G-1)
const ( AuthTypeNone = iota AuthTypeMD2 AuthTypeMD5 AuthTypePassword AuthTypeOEM )
AuthType
const ( PrivLevelNone = iota PrivLevelCallback PrivLevelUser PrivLevelOperator PrivLevelAdmin PrivLevelOEM )
PrivLevel
const ( CommandGetSDRRepositoryInfo = Command(0x20) CommandGetReserveSDRRepo = Command(0x22) CommandGetSDR = Command(0x23) CommandGetSensorReading = Command(0x2d) )
const ( CommandCompleted = CompletionCode(0x00) ErrNodeBusy = CompletionCode(0xc0) ErrInvalidCommand = CompletionCode(0xc1) ErrInvalidLunCommand = CompletionCode(0xc2) ErrCommandTimeout = CompletionCode(0xc3) ErrOutOfSpace = CompletionCode(0xc4) ErrInvalidResv = CompletionCode(0xc5) ErrDataTruncated = CompletionCode(0xc6) ErrShortPacket = CompletionCode(0xc7) ErrLongPacket = CompletionCode(0xc8) ErrParamRange = CompletionCode(0xc9) ErrRequestData = CompletionCode(0xca) ErrNoObj = CompletionCode(0xcb) ErrInvalidPacket = CompletionCode(0xcc) ErrInvalidObjCommand = CompletionCode(0xcd) ErrNoResponse = CompletionCode(0xce) ErrDuplicateRequest = CompletionCode(0xcf) ErrRepoUpMode = CompletionCode(0xd0) ErrFirmwareUpMode = CompletionCode(0xd1) ErrInitMode = CompletionCode(0xd2) ErrPrivLevel = CompletionCode(0xd4) ErrInvalidState = CompletionCode(0xd5) ErrUnspecified = CompletionCode(0xff) )
Completion Codes per section 5.2
const ( SDR_OP_SUP_ALLOC_INFO = (1 << 0) SDR_OP_SUP_RESERVE_REPO = (1 << 1) SDR_OP_SUP_PARTIAL_ADD = (1 << 2) SDR_OP_SUP_DELETE = (1 << 3) SDR_OP_SUP_NON_MODAL_UP = (1 << 5) SDR_OP_SUP_MODAL_UP = (1 << 6) SDR_OP_SUP_OVERFLOW = (1 << 7) )
section 33.9
const ( SDR_RECORD_TYPE_FULL_SENSOR = 0x01 SDR_RECORD_TYPE_COMPACT_SENSOR = 0x02 SDR_RECORD_TYPE_EVENTONLY_SENSOR = 0x03 SDR_RECORD_TYPE_ENTITY_ASSOC = 0x08 SDR_RECORD_TYPE_DEVICE_ENTITY_ASSOC = 0x09 SDR_RECORD_TYPE_GENERIC_DEVICE_LOCATOR = 0x10 SDR_RECORD_TYPE_FRU_DEVICE_LOCATOR = 0x11 SDR_RECORD_TYPE_MC_DEVICE_LOCATOR = 0x12 SDR_RECORD_TYPE_MC_CONFIRMATION = 0x13 SDR_RECORD_TYPE_BMC_MSG_CHANNEL_INFO = 0x14 SDR_RECORD_TYPE_OEM = 0xc0 )
const ( RESERVED = 0x00 SDR_SENSOR_TYPECODES_TEMPERATURE = 0x01 SDR_SENSOR_TYPECODES_VOLTAGE = 0x02 SDR_SENSOR_TYPECODES_CURRENT = 0x03 SDR_SENSOR_TYPECODES_FAN = 0x04 SDR_SENSOR_TYPECODES_PHYSICALSECURITY = 0x05 SDR_SENSOR_TYPECODES_PALTFORMSECURITY = 0x06 SDR_SENSOR_TYPECODES_PROCESSOR = 0x07 SDR_SENSOR_TYPECODES_POWSERSUPPLY = 0x08 SDR_SENSOR_TYPECODES_POWERUNIT = 0x09 SDR_SENSOR_TYPECODES_COLLINGDEVICE = 0x0a SDR_SENSOR_TYPECODES_OTHERUNITSBASED = 0x0b SDR_SENSOR_TYPECODES_MEMORY = 0x0c SDR_SENSOR_TYPECODES_DRIVESLOT = 0x0d SDR_SENSOR_TYPECODES_POSTMEMORYRESIZE = 0x0e SDR_SENSOR_TYPECODES_SYSTEMFIRMWARE = 0x0f SDR_SENSOR_TYPECODES_EVENTLOGGINGDISABLED = 0x10 SDR_SENSOR_TYPECODES_WATCHDOG1 = 0x11 SDR_SENSOR_TYPECODES_SYSTEMEVENT = 0x12 SDR_SENSOR_TYPECODES_CRITICALINTERRUPT = 0x13 SDR_SENSOR_TYPECODES_BUTTONSWITCH = 0x14 SDR_SENSOR_TYPECODES_MODULEBOARD = 0x15 SDR_SENSOR_TYPECODES_MICROCTRLCOPROCESS = 0x16 SDR_SENSOR_TYPECODES_ADDINCARD = 0x17 SDR_SENSOR_TYPECODES_CHASSIS = 0x18 SDR_SENSOR_TYPECODES_CHIPSET = 0x19 SDR_SENSOR_TYPECODES_OTHER_FRU = 0x1a SDR_SENSOR_TYPECODES_CABLEINTERCONN = 0x1b SDR_SENSOR_TYPECODES_TERMINATOR = 0x1c SDR_SENSOR_TYPECODES_SYSBOOT_RESTAINITI = 0x1d SDR_SENSOR_TYPECODES_BOOTERROR = 0x1e SDR_SENSOR_TYPECODES_BASEOSBOOT_INITISTAT = 0x1f SDR_SENSOR_TYPECODES_OSSTOP_SHUTDOWN = 0x20 SDR_SENSOR_TYPECODES_STOPCONNECTOR = 0x21 SDR_SENSOR_TYPECODES_SYSTEMACPIPOWERSTAT = 0x22 SDR_SENSOR_TYPECODES_WATCHDOG2 = 0x23 SDR_SENSOR_TYPECODES_PLATORMALERT = 0x24 SDR_SENSOR_TYPECODES_ENTITYPRESENCE = 0x25 SDR_SENSOR_TYPECODES_MONITORASIC_IC = 0x26 SDR_SENSOR_TYPECODES_LAN = 0x27 SDR_SENSOR_TYPECODES_MANAGSUBSYSHEALTH = 0x28 SDR_SENSOR_TYPECODES_BATTERY = 0x29 SDR_SENSOR_TYPECODES_SESSIONAUDIT = 0x2a SDR_SENSOR_TYPECODES_VERSIONCHANGE = 0x2b SDR_SENSOR_TYPECODES_FRUSTATE = 0x2c )
const ( SENSOR_READTYPE_UNSPECIFIED = 0x00 SENSOR_READTYPE_THREADHOLD = 0x01 SENSOR_READTYPE_GENERIC_L = 0x02 SENSOR_READTYPE_GENERIC_H = 0x0C SENSOR_READTYPE_SENSORSPECIF = 0x6F SENSOR_READTYPE_OEM_L = 0x70 SENSOR_READTYPE_OEM_H = 0x7F )
const ( SDR_SENSOR_STAT_LO_NC = 1 << 0 SDR_SENSOR_STAT_LO_CR = 1 << 1 SDR_SENSOR_STAT_LO_NR = 1 << 2 SDR_SENSOR_STAT_HI_NC = 1 << 3 SDR_SENSOR_STAT_HI_CR = 1 << 4 SDR_SENSOR_STAT_HI_NR = 1 << 5 )
const ( OemUnknown = OemID(0) OemHP = OemID(11) OemSun = OemID(42) OemNokia = OemID(94) OemBull = OemID(107) OemHitachi116 = OemID(116) OemNEC = OemID(119) OemToshiba = OemID(186) OemIntel = OemID(343) OemTatung = OemID(373) OemHitachi399 = OemID(399) OemDell = OemID(674) OemLMC = OemID(2168) OemRadiSys = OemID(4337) OemBroadcom = OemID(4413) OemMagnum = OemID(5593) OemTyan = OemID(6653) OemNewisys = OemID(9237) OemFujitsuSiemens = OemID(10368) OemAvocent = OemID(10418) OemPeppercon = OemID(10437) OemSupermicro = OemID(10876) OemOSA = OemID(11102) OemGoogle = OemID(11129) OemPICMG = OemID(12634) OemRaritan = OemID(13742) OemKontron = OemID(15000) OemPPS = OemID(16394) OemAMI = OemID(20974) OemNokiaSiemensNetworks = OemID(28458) OemSupermicro47488 = OemID(47488) )
IANA assigned manufacturer IDs
Variables ¶
var ( NetworkFunctionChassis = NetworkFunction(0x00) NetworkFunctionSensorEvent = NetworkFunction(0x04) NetworkFunctionApp = NetworkFunction(0x06) NetworkFunctionStorge = NetworkFunction(0x0A) NetworkFunctionTransport = NetworkFunction(0x0C) )
Network Function Codes per section 5.1
var ( ErrDeviceIdMustLess16 = errors.New("Device Id must be less or equal to 16 bytes length") ErrUnitNotSupport = errors.New("Unit not support, only support unsigned and 2's complement signed") ErrMZero = errors.New("M mustn't be 0") ErrIdStringLenNotMatch = errors.New("Length of the Id string is mismatch") ErrNotFoundTheSensorNum = errors.New("failed to found the SensorNumber") )
Functions ¶
func GetSensorStatDesc ¶
func GetSensorStatDesc(readingType SDRSensorReadingType, sensorType SDRSensorType, state2 uint8, state3 uint8) (string, []string)
must pass reading with read_valid is true
Types ¶
type ActivateSessionRequest ¶
type ActivateSessionRequest struct { AuthType uint8 PrivLevel uint8 AuthCode [16]uint8 InSeq [4]uint8 }
ActivateSessionRequest per section 22.17
type ActivateSessionResponse ¶
type ActivateSessionResponse struct { CompletionCode AuthType uint8 SessionID uint32 InboundSeq uint32 MaxPriv uint8 }
ActivateSessionResponse per section 22.17
type AuthCapabilitiesRequest ¶
AuthCapabilitiesRequest per section 22.13
type AuthCapabilitiesResponse ¶
type AuthCapabilitiesResponse struct { CompletionCode ChannelNumber uint8 AuthTypeSupport uint8 Status uint8 Reserved uint8 OEMID uint16 OEMAux uint8 }
AuthCapabilitiesResponse per section 22.13
type BootDevice ¶
type BootDevice uint8
func (BootDevice) String ¶
func (d BootDevice) String() string
type ChassisControl ¶
type ChassisControl uint8
func (ChassisControl) String ¶
func (c ChassisControl) String() string
type ChassisControlRequest ¶
type ChassisControlRequest struct {
ChassisControl
}
ChassisControlRequest per section 28.3
type ChassisControlResponse ¶
type ChassisControlResponse struct {
CompletionCode
}
ChassisControlResponse per section 28.3
type ChassisStatusRequest ¶
type ChassisStatusRequest struct{}
ChassisStatusRequest per section 28.2
type ChassisStatusResponse ¶
type ChassisStatusResponse struct { CompletionCode PowerState uint8 LastPowerEvent uint8 State uint8 FrontControlPanel uint8 }
ChassisStatusResponse per section 28.2
func (*ChassisStatusResponse) IsSystemPowerOn ¶
func (s *ChassisStatusResponse) IsSystemPowerOn() bool
func (*ChassisStatusResponse) PowerRestorePolicy ¶
func (s *ChassisStatusResponse) PowerRestorePolicy() uint8
func (*ChassisStatusResponse) String ¶
func (s *ChassisStatusResponse) String() string
func (*ChassisStatusResponse) UnmarshalBinary ¶
func (r *ChassisStatusResponse) UnmarshalBinary(buf []byte) error
UnmarshalBinary implementation to handle variable length Data
type Client ¶
type Client struct { *Connection // contains filtered or unexported fields }
Client provides common high level functionality around the underlying transport
func NewClient ¶
func NewClient(c *Connection) (*Client, error)
NewClient creates a new Client with the given Connection properties
func (*Client) CalSdrRecordValue ¶
func (*Client) Control ¶
func (c *Client) Control(ctl ChassisControl) error
Control sends a chassis power control command
func (*Client) DeviceID ¶
func (c *Client) DeviceID() (*DeviceIDResponse, error)
DeviceID get the Device ID of the BMC
func (*Client) GetReserveSDRRepoForReserveId ¶
func (c *Client) GetReserveSDRRepoForReserveId() (*ReserveRepositoryResponse, error)
func (*Client) GetSDR ¶
func (c *Client) GetSDR(reservationID uint16, recordID uint16) (sdr *sDRRecordAndValue, next uint16, err error)
Get SDR Command 33.12
func (*Client) GetSensorList ¶
func (c *Client) GetSensorList(reservationID uint16) ([]SdrSensorInfo, error)
func (*Client) RepositoryInfo ¶
func (c *Client) RepositoryInfo() (*SDRRepositoryInfoResponse, error)
RepositoryInfo get the Repository Info of the SDR
func (*Client) SetBootDevice ¶
func (c *Client) SetBootDevice(dev BootDevice) error
SetBootDevice is a wrapper around SetSystemBootOptionsRequest to configure the BootDevice per section 28.12 - table 28
type CloseSessionRequest ¶
type CloseSessionRequest struct {
SessionID uint32
}
CloseSessionRequest per section 22.19
type CloseSessionResponse ¶
type CloseSessionResponse struct {
CompletionCode
}
CloseSessionResponse per section 22.19
type CompletionCode ¶
type CompletionCode uint8
CompletionCode is the first byte in the data field of all IPMI responses
func (CompletionCode) Code ¶
func (c CompletionCode) Code() uint8
Code returns the CompletionCode as uint8
type Connection ¶
type Connection struct { Path string Hostname string Port int Username string Password string Interface string }
Connection properties for a Client
func (*Connection) LocalIP ¶
func (c *Connection) LocalIP() string
LocalIP returns the local (client) IP address of the Connection
func (*Connection) RemoteIP ¶
func (c *Connection) RemoteIP() string
RemoteIP returns the remote (bmc) IP address of the Connection
type DeviceIDResponse ¶
type DeviceIDResponse struct { CompletionCode DeviceID uint8 DeviceRevision uint8 FirmwareRevision1 uint8 FirmwareRevision2 uint8 IPMIVersion uint8 AdditionalDeviceSupport uint8 ManufacturerID OemID ProductID uint16 }
DeviceIDResponse per section 20.1
type GetSDRCommandRequest ¶
type GetSDRCommandResponse ¶
type GetSDRCommandResponse struct { CompletionCode NextRecordID uint16 ReadData []byte }
func (*GetSDRCommandResponse) MarshalBinary ¶
func (r *GetSDRCommandResponse) MarshalBinary() (data []byte, err error)
func (*GetSDRCommandResponse) UnmarshalBinary ¶
func (r *GetSDRCommandResponse) UnmarshalBinary(data []byte) error
type GetSensorReadingRequest ¶
type GetSensorReadingRequest struct {
SensorNumber uint8
}
type GetSensorReadingResponse ¶
type GetSensorReadingResponse struct { CompletionCode SensorReading uint8 ReadingAvail uint8 Data1 uint8 Data2 uint8 }
section 35.14
func (*GetSensorReadingResponse) UnmarshalBinary ¶
func (r *GetSensorReadingResponse) UnmarshalBinary(data []byte) error
35.14 Data2 is Optional, so we have to implement UnmarshalBinary manually
type Message ¶
type Message struct { AuthCode [16]byte Data []byte RequestID string // contains filtered or unexported fields }
Message encapsulates an IPMI message
func (*Message) CompletionCode ¶
func (m *Message) CompletionCode() CompletionCode
CompletionCode of an IPMI command response
func (*Message) NetFn ¶
func (m *Message) NetFn() NetworkFunction
NetFn returns the NetworkFunction portion of the NetFn/RsLUN field
type NetworkFunction ¶
type NetworkFunction uint8
NetworkFunction identifies the functional class of an IPMI message
type OemID ¶
type OemID uint16
OemID aka IANA assigned Enterprise Number per: http://www.iana.org/assignments/enterprise-numbers/enterprise-numbers Note that constants defined here are the same subset that ipmitool recognizes.
type ReserveRepositoryResponse ¶
type ReserveRepositoryResponse struct { CompletionCode ReservationId uint16 }
section 33.11
type ReserveSDRRepositoryRequest ¶
type ReserveSDRRepositoryRequest struct{}
type Response ¶
type Response interface {
Code() uint8
}
Response to an IPMI request must include at least a CompletionCode
type SDRCompactSensor ¶
type SDRCompactSensor struct { SDRRecordHeader Deviceid string // contains filtered or unexported fields }
func NewSDRCompactSensor ¶
func NewSDRCompactSensor(id uint16, name string) (*SDRCompactSensor, error)
func (*SDRCompactSensor) DeviceId ¶
func (r *SDRCompactSensor) DeviceId() string
func (*SDRCompactSensor) MarshalBinary ¶
func (r *SDRCompactSensor) MarshalBinary() (data []byte, err error)
func (*SDRCompactSensor) RecordId ¶
func (r *SDRCompactSensor) RecordId() uint16
func (*SDRCompactSensor) RecordType ¶
func (r *SDRCompactSensor) RecordType() SDRRecordType
func (*SDRCompactSensor) UnmarshalBinary ¶
func (r *SDRCompactSensor) UnmarshalBinary(data []byte) error
type SDRFruDeviceLocator ¶
type SDRFruDeviceLocator struct { SDRRecordHeader Deviceid string // contains filtered or unexported fields }
func NewSDRFruDeviceLocator ¶
func NewSDRFruDeviceLocator(id uint16, name string) (*SDRFruDeviceLocator, error)
func (*SDRFruDeviceLocator) DeviceId ¶
func (r *SDRFruDeviceLocator) DeviceId() string
func (*SDRFruDeviceLocator) MarshalBinary ¶
func (r *SDRFruDeviceLocator) MarshalBinary() (data []byte, err error)
func (*SDRFruDeviceLocator) RecordId ¶
func (r *SDRFruDeviceLocator) RecordId() uint16
func (*SDRFruDeviceLocator) RecordType ¶
func (r *SDRFruDeviceLocator) RecordType() SDRRecordType
type SDRFullSensor ¶
type SDRFullSensor struct { SDRRecordHeader Deviceid string // contains filtered or unexported fields }
func NewSDRFullSensor ¶
func NewSDRFullSensor(id uint16, name string) (*SDRFullSensor, error)
func (*SDRFullSensor) CalValue ¶
func (r *SDRFullSensor) CalValue(value float64) uint8
calculate the given value into the SDR reading value, using current M,B,Bexp,Rexp setting 36.3
func (*SDRFullSensor) DeviceId ¶
func (r *SDRFullSensor) DeviceId() string
func (*SDRFullSensor) GetMBExp ¶
func (r *SDRFullSensor) GetMBExp() (M int16, B int16, Bexp int8, Rexp int8)
func (*SDRFullSensor) MarshalBinary ¶
func (r *SDRFullSensor) MarshalBinary() (data []byte, err error)
func (*SDRFullSensor) RecordId ¶
func (r *SDRFullSensor) RecordId() uint16
func (*SDRFullSensor) RecordType ¶
func (r *SDRFullSensor) RecordType() SDRRecordType
func (*SDRFullSensor) SetMBExp ¶
func (r *SDRFullSensor) SetMBExp(M int16, B int16, Bexp int8, Rexp int8)
M: 10bit signed 2's complement B: 10bit signed 2's complement Bexp: 4bit signed 2's complement Rexp: 4bit signed 2's complement
func (*SDRFullSensor) UnmarshalBinary ¶
func (r *SDRFullSensor) UnmarshalBinary(data []byte) error
type SDRMCDeviceLoc ¶
type SDRMCDeviceLoc struct { SDRRecordHeader Deviceid string // contains filtered or unexported fields }
type SDRMcDeviceLocator ¶
type SDRMcDeviceLocator struct { SDRRecordHeader Deviceid string // contains filtered or unexported fields }
func NewSDRMcDeviceLocator ¶
func NewSDRMcDeviceLocator(id uint16, name string) (*SDRMcDeviceLocator, error)
func (*SDRMcDeviceLocator) DeviceId ¶
func (r *SDRMcDeviceLocator) DeviceId() string
func (*SDRMcDeviceLocator) MarshalBinary ¶
func (r *SDRMcDeviceLocator) MarshalBinary() (data []byte, err error)
func (*SDRMcDeviceLocator) RecordId ¶
func (r *SDRMcDeviceLocator) RecordId() uint16
func (*SDRMcDeviceLocator) RecordType ¶
func (r *SDRMcDeviceLocator) RecordType() SDRRecordType
type SDRRecord ¶
type SDRRecord interface { DeviceId() string RecordId() uint16 RecordType() SDRRecordType }
type SDRRecordHeader ¶
type SDRRecordHeader struct { Recordid uint16 SDRVersion uint8 Rtype SDRRecordType }
type SDRRecordType ¶
type SDRRecordType uint8
type SDRRepositoryInfoRequest ¶
type SDRRepositoryInfoRequest struct{}
DeviceIDRequest per section 33.9
type SDRRepositoryInfoResponse ¶
type SDRRepositoryInfoResponse struct { CompletionCode SDRVersion uint8 RecordCount uint16 FreeSpaceInBytes uint16 TimestampMostRecentAddition uint32 TimestampMostRecentErase uint32 OperationSupprot uint8 }
DeviceIDResponse per section 33.9
type SDRSensorReadingData2 ¶
type SDRSensorReadingData2 uint8
type SDRSensorReadingType ¶
type SDRSensorReadingType uint8
type SDRSensorType ¶
type SDRSensorType uint8
type SdrSensorInfo ¶
type SessionChallengeRequest ¶
SessionChallengeRequest per section 22.16
type SessionChallengeResponse ¶
type SessionChallengeResponse struct { CompletionCode TemporarySessionID uint32 Challenge [16]byte }
SessionChallengeResponse per section 22.16
type SessionPrivilegeLevelRequest ¶
type SessionPrivilegeLevelRequest struct {
PrivLevel uint8
}
SessionPrivilegeLevelRequest per section 22.18
type SessionPrivilegeLevelResponse ¶
type SessionPrivilegeLevelResponse struct { CompletionCode NewPrivilegeLevel uint8 }
SessionPrivilegeLevelResponse per section 22.18
type SetSystemBootOptionsRequest ¶
SetSystemBootOptionsRequest per section 28.12
func (*SetSystemBootOptionsRequest) MarshalBinary ¶
func (r *SetSystemBootOptionsRequest) MarshalBinary() ([]byte, error)
MarshalBinary implementation to handle variable length Data
func (*SetSystemBootOptionsRequest) UnmarshalBinary ¶
func (r *SetSystemBootOptionsRequest) UnmarshalBinary(buf []byte) error
UnmarshalBinary implementation to handle variable length Data
type SetSystemBootOptionsResponse ¶
type SetSystemBootOptionsResponse struct {
CompletionCode
}
SetSystemBootOptionsResponse per section 28.12
type Simulator ¶
type Simulator struct {
// contains filtered or unexported fields
}
Simulator for IPMI
func NewSimulator ¶
NewSimulator constructs a Simulator with the given addr
func (*Simulator) NewConnection ¶
func (s *Simulator) NewConnection() *Connection
NewConnection to this Simulator instance
func (*Simulator) SetHandler ¶
func (s *Simulator) SetHandler(netfn NetworkFunction, command Command, handler Handler)
SetHandler sets the command handler for the given netfn and command
type SystemBootOptionsRequest ¶
SystemBootOptionsRequest per section 28.13
type SystemBootOptionsResponse ¶
type SystemBootOptionsResponse struct { CompletionCode Version uint8 Param uint8 Data []uint8 }
SystemBootOptionsResponse per section 28.13
func (*SystemBootOptionsResponse) BootDeviceSelector ¶
func (r *SystemBootOptionsResponse) BootDeviceSelector() BootDevice
func (*SystemBootOptionsResponse) MarshalBinary ¶
func (r *SystemBootOptionsResponse) MarshalBinary() ([]byte, error)
MarshalBinary implementation to handle variable length Data
func (*SystemBootOptionsResponse) UnmarshalBinary ¶
func (r *SystemBootOptionsResponse) UnmarshalBinary(buf []byte) error
UnmarshalBinary implementation to handle variable length Data