Documentation ¶
Index ¶
- Variables
- type ArgumentError
- type Arguments
- type Client
- type Command
- type CommandError
- type CompletionCode
- type EventType
- type GetChassisStatusCommand
- func (c *GetChassisStatusCommand) Code() uint8
- func (c *GetChassisStatusCommand) Marshal() ([]byte, error)
- func (c *GetChassisStatusCommand) Name() string
- func (c *GetChassisStatusCommand) NetFnRsLUN() NetFnRsLUN
- func (c *GetChassisStatusCommand) String() string
- func (c *GetChassisStatusCommand) Unmarshal(buf []byte) ([]byte, error)
- type GetDeviceIDCommand
- func (c *GetDeviceIDCommand) Code() uint8
- func (c *GetDeviceIDCommand) Marshal() ([]byte, error)
- func (c *GetDeviceIDCommand) Name() string
- func (c *GetDeviceIDCommand) NetFnRsLUN() NetFnRsLUN
- func (c *GetDeviceIDCommand) String() string
- func (c *GetDeviceIDCommand) Unmarshal(buf []byte) ([]byte, error)
- type GetPOHCounterCommand
- func (c *GetPOHCounterCommand) Code() uint8
- func (c *GetPOHCounterCommand) Marshal() ([]byte, error)
- func (c *GetPOHCounterCommand) Name() string
- func (c *GetPOHCounterCommand) NetFnRsLUN() NetFnRsLUN
- func (c *GetPOHCounterCommand) PowerOnHours() time.Duration
- func (c *GetPOHCounterCommand) String() string
- func (c *GetPOHCounterCommand) Unmarshal(buf []byte) ([]byte, error)
- type GetSDRCommand
- type GetSDRRepositoryInfoCommand
- func (c *GetSDRRepositoryInfoCommand) Code() uint8
- func (c *GetSDRRepositoryInfoCommand) Marshal() ([]byte, error)
- func (c *GetSDRRepositoryInfoCommand) Name() string
- func (c *GetSDRRepositoryInfoCommand) NetFnRsLUN() NetFnRsLUN
- func (c *GetSDRRepositoryInfoCommand) String() string
- func (c *GetSDRRepositoryInfoCommand) Unmarshal(buf []byte) ([]byte, error)
- type GetSELEntryCommand
- func (c *GetSELEntryCommand) Code() uint8
- func (c *GetSELEntryCommand) Marshal() ([]byte, error)
- func (c *GetSELEntryCommand) Name() string
- func (c *GetSELEntryCommand) NetFnRsLUN() NetFnRsLUN
- func (c *GetSELEntryCommand) String() string
- func (c *GetSELEntryCommand) Unmarshal(buf []byte) ([]byte, error)
- type GetSELInfoCommand
- type GetSensorReadingCommand
- func (c *GetSensorReadingCommand) Code() uint8
- func (c *GetSensorReadingCommand) IsValid() bool
- func (c *GetSensorReadingCommand) Marshal() ([]byte, error)
- func (c *GetSensorReadingCommand) Name() string
- func (c *GetSensorReadingCommand) NetFnRsLUN() NetFnRsLUN
- func (c *GetSensorReadingCommand) String() string
- func (c *GetSensorReadingCommand) ThresholdStatus() ThresholdStatus
- func (c *GetSensorReadingCommand) Unmarshal(buf []byte) ([]byte, error)
- type GetSessionInfoCommand
- func (c *GetSessionInfoCommand) Code() uint8
- func (c *GetSessionInfoCommand) Marshal() ([]byte, error)
- func (c *GetSessionInfoCommand) Name() string
- func (c *GetSessionInfoCommand) NetFnRsLUN() NetFnRsLUN
- func (c *GetSessionInfoCommand) String() string
- func (c *GetSessionInfoCommand) Unmarshal(buf []byte) ([]byte, error)
- type GetSystemRestartCauseCommand
- func (c *GetSystemRestartCauseCommand) Code() uint8
- func (c *GetSystemRestartCauseCommand) Marshal() ([]byte, error)
- func (c *GetSystemRestartCauseCommand) Name() string
- func (c *GetSystemRestartCauseCommand) NetFnRsLUN() NetFnRsLUN
- func (c *GetSystemRestartCauseCommand) String() string
- func (c *GetSystemRestartCauseCommand) Unmarshal(buf []byte) ([]byte, error)
- type MessageError
- type NetFn
- type NetFnRsLUN
- type PrivilegeLevel
- type RawCommand
- func (c *RawCommand) Code() uint8
- func (c *RawCommand) Input() []byte
- func (c *RawCommand) Marshal() ([]byte, error)
- func (c *RawCommand) Name() string
- func (c *RawCommand) NetFnRsLUN() NetFnRsLUN
- func (c *RawCommand) Output() []byte
- func (c *RawCommand) String() string
- func (c *RawCommand) Unmarshal(buf []byte) ([]byte, error)
- type ReserveSDRRepositoryCommand
- func (c *ReserveSDRRepositoryCommand) Code() uint8
- func (c *ReserveSDRRepositoryCommand) Marshal() ([]byte, error)
- func (c *ReserveSDRRepositoryCommand) Name() string
- func (c *ReserveSDRRepositoryCommand) NetFnRsLUN() NetFnRsLUN
- func (c *ReserveSDRRepositoryCommand) String() string
- func (c *ReserveSDRRepositoryCommand) Unmarshal(buf []byte) ([]byte, error)
- type ReserveSELCommand
- type SDR
- type SDRCommonSensor
- type SDRCompactSensor
- type SDRFRUDeviceLocator
- type SDRFullSensor
- type SDRType
- type SELEventRecord
- func (r *SELEventRecord) Data() []byte
- func (r *SELEventRecord) Description() string
- func (r *SELEventRecord) GetEventTriggerReading() (uint8, bool)
- func (r *SELEventRecord) GetEventTriggerThreshold() (uint8, bool)
- func (r *SELEventRecord) ID() uint16
- func (r *SELEventRecord) IsAssertionEvent() bool
- func (r *SELEventRecord) Type() SELType
- func (r *SELEventRecord) Unmarshal(buf []byte) ([]byte, error)
- type SELNonTimestampedOEMRecord
- type SELRecord
- type SELTimestampedOEMRecord
- type SELType
- type SensorType
- type ThresholdStatus
- type Timestamp
- type UnitType
- type Version
Constants ¶
This section is empty.
Variables ¶
var ErrNotSupportedIPMI error = &MessageError{Message: "Not Supported IPMI"}
Functions ¶
This section is empty.
Types ¶
type ArgumentError ¶
type ArgumentError struct { Value interface{} // Argument that has a problem Message string // Error message }
An ArgumentError suggests that the arguments are wrong
func (*ArgumentError) Error ¶
func (e *ArgumentError) Error() string
type Arguments ¶
type Arguments struct { Version Version // IPMI version to use Network string // See net.Dial parameter (The default is `udp`) Address string // See net.Dial parameter Timeout time.Duration // Each connect/read-write timeout (The default is 5sec) Retries uint // Number of retries (The default is `0`) Username string // Remote server username Password string // Remote server password PrivilegeLevel PrivilegeLevel // Session privilege level (The default is `Administrator`) CipherSuiteID uint // ID of cipher suite, See Table 22-20 (The default is `0` which no auth and no encrypt) // Will allow to get analog sensor readings of a discrete sensor // (For details, see to freeipmi's same name option) Discretereading bool }
An argument for creating an IPMI Client
type CommandError ¶
type CommandError struct { CompletionCode CompletionCode Command Command }
A CommandError suggests that command execution has failed
func (*CommandError) Error ¶
func (e *CommandError) Error() string
type CompletionCode ¶
type CompletionCode uint8
Completion Code (Section 5.2)
const ( CompletionOK CompletionCode = 0x00 CompletionUnspecifiedError CompletionCode = 0xff CompletionNodeBusy CompletionCode = iota + 0xc0 CompletionInvalidCommand CompletionInvalidCommandForLUN CompletionTimeout CompletionOutOfSpace CompletionReservationCancelled CompletionRequestDataTruncated CompletionRequestDataInvalidLength CompletionRequestDataFieldExceedEd CompletionParameterOutOfRange CompletionCantReturnDataBytes CompletionRequestDataNotPresent CompletionInvalidDataField CompletionIllegalSendorOrRecord CompletionCantBeProvided CompletionDuplicatedRequest CompletionSDRInUpdateMode CompletionFirmwareUpdateMode CompletionBMCInitialization CompletionInsufficientPrivilege CompletionNotSupportedPresentState CompletionIllegalCommandDisabled )
func (CompletionCode) String ¶
func (c CompletionCode) String() string
type EventType ¶
type EventType uint8
Event/Reading Type (Table 42-2)
func (EventType) IsSensorSpecific ¶
func (EventType) IsThreshold ¶
func (EventType) IsUnspecified ¶
type GetChassisStatusCommand ¶
type GetChassisStatusCommand struct { // Response Data PowerIsOn bool PowerOverload bool PowerInterlock bool PowerFault bool PowerControlFault bool PowerRestorePolicy uint8 // (See Table 28-3) LastPowerEventACFailed bool LastPowerEventOverload bool LastPowerEventInterlock bool LastPowerEventFault bool LastPowerEventCommand bool ChassisIntrusionActive bool FrontPanelLockoutActive bool DriveFault bool CoolingFanFault bool }
Get Chassis Status Command (Section 28.2)
func (*GetChassisStatusCommand) Code ¶
func (c *GetChassisStatusCommand) Code() uint8
func (*GetChassisStatusCommand) Marshal ¶
func (c *GetChassisStatusCommand) Marshal() ([]byte, error)
func (*GetChassisStatusCommand) Name ¶
func (c *GetChassisStatusCommand) Name() string
func (*GetChassisStatusCommand) NetFnRsLUN ¶
func (c *GetChassisStatusCommand) NetFnRsLUN() NetFnRsLUN
func (*GetChassisStatusCommand) String ¶
func (c *GetChassisStatusCommand) String() string
type GetDeviceIDCommand ¶
type GetDeviceIDCommand struct { // Response Data DeviceID uint8 DeviceRevision uint8 DeviceProvidesSDRs bool DeviceAvailable bool FirmwareMajorRevision uint8 FirmwareMinorRevision uint8 IPMIVersion uint8 SupportDeviceSensor bool SupportDeviceSDRRepo bool SupportDeviceSEL bool SupportDeviceFRU bool SupportDeviceChassis bool }
Get Device ID Command (Section 20.1)
func (*GetDeviceIDCommand) Code ¶
func (c *GetDeviceIDCommand) Code() uint8
func (*GetDeviceIDCommand) Marshal ¶
func (c *GetDeviceIDCommand) Marshal() ([]byte, error)
func (*GetDeviceIDCommand) Name ¶
func (c *GetDeviceIDCommand) Name() string
func (*GetDeviceIDCommand) NetFnRsLUN ¶
func (c *GetDeviceIDCommand) NetFnRsLUN() NetFnRsLUN
func (*GetDeviceIDCommand) String ¶
func (c *GetDeviceIDCommand) String() string
type GetPOHCounterCommand ¶
Get POH Counter Command (Section 28.14)
func (*GetPOHCounterCommand) Code ¶
func (c *GetPOHCounterCommand) Code() uint8
func (*GetPOHCounterCommand) Marshal ¶
func (c *GetPOHCounterCommand) Marshal() ([]byte, error)
func (*GetPOHCounterCommand) Name ¶
func (c *GetPOHCounterCommand) Name() string
func (*GetPOHCounterCommand) NetFnRsLUN ¶
func (c *GetPOHCounterCommand) NetFnRsLUN() NetFnRsLUN
func (*GetPOHCounterCommand) PowerOnHours ¶
func (c *GetPOHCounterCommand) PowerOnHours() time.Duration
func (*GetPOHCounterCommand) String ¶
func (c *GetPOHCounterCommand) String() string
type GetSDRCommand ¶
type GetSDRCommand struct { // Request Data ReservationID uint16 RecordID uint16 RecordOffset uint8 ReadBytes uint8 // Response Data NextRecordID uint16 RecordData []byte }
Get SDR Command (Section 33.12)
func (*GetSDRCommand) Code ¶
func (c *GetSDRCommand) Code() uint8
func (*GetSDRCommand) Marshal ¶
func (c *GetSDRCommand) Marshal() ([]byte, error)
func (*GetSDRCommand) Name ¶
func (c *GetSDRCommand) Name() string
func (*GetSDRCommand) NetFnRsLUN ¶
func (c *GetSDRCommand) NetFnRsLUN() NetFnRsLUN
func (*GetSDRCommand) String ¶
func (c *GetSDRCommand) String() string
type GetSDRRepositoryInfoCommand ¶
type GetSDRRepositoryInfoCommand struct { // Response Data SDRVersion uint8 // (0x01: IPMIv1.0, 0x51: IPMIv1.5, 0x02: IPMIv2.0) RecordCount uint16 }
Get SDR Repository Info Command (Section 33.9)
func (*GetSDRRepositoryInfoCommand) Code ¶
func (c *GetSDRRepositoryInfoCommand) Code() uint8
func (*GetSDRRepositoryInfoCommand) Marshal ¶
func (c *GetSDRRepositoryInfoCommand) Marshal() ([]byte, error)
func (*GetSDRRepositoryInfoCommand) Name ¶
func (c *GetSDRRepositoryInfoCommand) Name() string
func (*GetSDRRepositoryInfoCommand) NetFnRsLUN ¶
func (c *GetSDRRepositoryInfoCommand) NetFnRsLUN() NetFnRsLUN
func (*GetSDRRepositoryInfoCommand) String ¶
func (c *GetSDRRepositoryInfoCommand) String() string
type GetSELEntryCommand ¶
type GetSELEntryCommand struct { // Request Data ReservationID uint16 RecordID uint16 RecordOffset uint8 ReadBytes uint8 // Response Data NextRecordID uint16 RecordData []byte }
Get SEL Entry Command (Section 31.5)
func (*GetSELEntryCommand) Code ¶
func (c *GetSELEntryCommand) Code() uint8
func (*GetSELEntryCommand) Marshal ¶
func (c *GetSELEntryCommand) Marshal() ([]byte, error)
func (*GetSELEntryCommand) Name ¶
func (c *GetSELEntryCommand) Name() string
func (*GetSELEntryCommand) NetFnRsLUN ¶
func (c *GetSELEntryCommand) NetFnRsLUN() NetFnRsLUN
func (*GetSELEntryCommand) String ¶
func (c *GetSELEntryCommand) String() string
type GetSELInfoCommand ¶
type GetSELInfoCommand struct { // Response Data SELVersion uint8 Entries uint16 FreeSpace uint16 LastAddTime uint32 LastDelTime uint32 SupportAllocInfo bool SupportReserve bool SupportPartialAdd bool SupportDelete bool Overflow bool }
Get SEL Info (Section 31.2)
func (*GetSELInfoCommand) Code ¶
func (c *GetSELInfoCommand) Code() uint8
func (*GetSELInfoCommand) Marshal ¶
func (c *GetSELInfoCommand) Marshal() ([]byte, error)
func (*GetSELInfoCommand) Name ¶
func (c *GetSELInfoCommand) Name() string
func (*GetSELInfoCommand) NetFnRsLUN ¶
func (c *GetSELInfoCommand) NetFnRsLUN() NetFnRsLUN
func (*GetSELInfoCommand) String ¶
func (c *GetSELInfoCommand) String() string
type GetSensorReadingCommand ¶
type GetSensorReadingCommand struct { // Request Data RsLUN uint8 SensorNumber uint8 // Response Data SensorReading uint8 ScanningDisabled bool EventDisabled bool SensorData2 uint8 SensorData3 uint8 }
Get Sensor Reading Command (Section 35.14)
func (*GetSensorReadingCommand) Code ¶
func (c *GetSensorReadingCommand) Code() uint8
func (*GetSensorReadingCommand) IsValid ¶
func (c *GetSensorReadingCommand) IsValid() bool
Returns `true` if `SensorReading` is valid.
func (*GetSensorReadingCommand) Marshal ¶
func (c *GetSensorReadingCommand) Marshal() ([]byte, error)
func (*GetSensorReadingCommand) Name ¶
func (c *GetSensorReadingCommand) Name() string
func (*GetSensorReadingCommand) NetFnRsLUN ¶
func (c *GetSensorReadingCommand) NetFnRsLUN() NetFnRsLUN
func (*GetSensorReadingCommand) String ¶
func (c *GetSensorReadingCommand) String() string
func (*GetSensorReadingCommand) ThresholdStatus ¶
func (c *GetSensorReadingCommand) ThresholdStatus() ThresholdStatus
Returns the threshold status if sensor is threshold-base.
type GetSessionInfoCommand ¶
type GetSessionInfoCommand struct { // Request Data SessionIndex uint8 // Request Type (0x00: Current , 0xN: Nth active, 0xfe: By handle , 0xff: By ID) SessionID uint32 // Session ID or Handle // Response Data SessionHandle uint8 SessionSlotCount uint8 ActiveSessionCount uint8 UserID uint8 PrivilegeLevel PrivilegeLevel ChannelType uint8 // (0x00: IPMI v1.5, 0x01: IPMI v2.0) ChannelNumber uint8 ConsoleIP net.IP ConsoleMAC net.HardwareAddr ConsolePort uint16 }
Get Session Info Command (Section 22.20)
func (*GetSessionInfoCommand) Code ¶
func (c *GetSessionInfoCommand) Code() uint8
func (*GetSessionInfoCommand) Marshal ¶
func (c *GetSessionInfoCommand) Marshal() ([]byte, error)
func (*GetSessionInfoCommand) Name ¶
func (c *GetSessionInfoCommand) Name() string
func (*GetSessionInfoCommand) NetFnRsLUN ¶
func (c *GetSessionInfoCommand) NetFnRsLUN() NetFnRsLUN
func (*GetSessionInfoCommand) String ¶
func (c *GetSessionInfoCommand) String() string
type GetSystemRestartCauseCommand ¶
type GetSystemRestartCauseCommand struct { // Response Data RestartCause uint8 // (See Table 28-11) }
Get System Restart Cause Command (Section 28.11)
func (*GetSystemRestartCauseCommand) Code ¶
func (c *GetSystemRestartCauseCommand) Code() uint8
func (*GetSystemRestartCauseCommand) Marshal ¶
func (c *GetSystemRestartCauseCommand) Marshal() ([]byte, error)
func (*GetSystemRestartCauseCommand) Name ¶
func (c *GetSystemRestartCauseCommand) Name() string
func (*GetSystemRestartCauseCommand) NetFnRsLUN ¶
func (c *GetSystemRestartCauseCommand) NetFnRsLUN() NetFnRsLUN
func (*GetSystemRestartCauseCommand) String ¶
func (c *GetSystemRestartCauseCommand) String() string
type MessageError ¶
type MessageError struct { Cause error // Cause of the error Message string // Error message Detail string // Detail of the error for debugging }
A MessageError suggests that the received message is wrong or is not obtained
func (*MessageError) Error ¶
func (e *MessageError) Error() string
type NetFnRsLUN ¶
type NetFnRsLUN uint8
Network Function and Logical Unit Number
func NewNetFnRsLUN ¶
func NewNetFnRsLUN(netFn NetFn, rsLUN uint8) NetFnRsLUN
func (NetFnRsLUN) NetFn ¶
func (n NetFnRsLUN) NetFn() NetFn
func (NetFnRsLUN) RsLUN ¶
func (n NetFnRsLUN) RsLUN() uint8
type PrivilegeLevel ¶
type PrivilegeLevel uint8
Channel Privilege Levels. (Section 6.8)
const ( PrivilegeCallback PrivilegeLevel = iota + 1 PrivilegeUser PrivilegeOperator PrivilegeAdministrator )
func (PrivilegeLevel) String ¶
func (p PrivilegeLevel) String() string
type RawCommand ¶
type RawCommand struct {
// contains filtered or unexported fields
}
func NewRawCommand ¶
func NewRawCommand(name string, code uint8, fn NetFnRsLUN, input []byte) *RawCommand
func (*RawCommand) Code ¶
func (c *RawCommand) Code() uint8
func (*RawCommand) Input ¶
func (c *RawCommand) Input() []byte
func (*RawCommand) Marshal ¶
func (c *RawCommand) Marshal() ([]byte, error)
func (*RawCommand) Name ¶
func (c *RawCommand) Name() string
func (*RawCommand) NetFnRsLUN ¶
func (c *RawCommand) NetFnRsLUN() NetFnRsLUN
func (*RawCommand) Output ¶
func (c *RawCommand) Output() []byte
func (*RawCommand) String ¶
func (c *RawCommand) String() string
type ReserveSDRRepositoryCommand ¶
type ReserveSDRRepositoryCommand struct { // Response Data ReservationID uint16 }
Reserve SDR Repository Command (Section 33.11)
func (*ReserveSDRRepositoryCommand) Code ¶
func (c *ReserveSDRRepositoryCommand) Code() uint8
func (*ReserveSDRRepositoryCommand) Marshal ¶
func (c *ReserveSDRRepositoryCommand) Marshal() ([]byte, error)
func (*ReserveSDRRepositoryCommand) Name ¶
func (c *ReserveSDRRepositoryCommand) Name() string
func (*ReserveSDRRepositoryCommand) NetFnRsLUN ¶
func (c *ReserveSDRRepositoryCommand) NetFnRsLUN() NetFnRsLUN
func (*ReserveSDRRepositoryCommand) String ¶
func (c *ReserveSDRRepositoryCommand) String() string
type ReserveSELCommand ¶
type ReserveSELCommand struct { // Response Data ReservationID uint16 }
Reserve SEL Command (Section 31.4)
func (*ReserveSELCommand) Code ¶
func (c *ReserveSELCommand) Code() uint8
func (*ReserveSELCommand) Marshal ¶
func (c *ReserveSELCommand) Marshal() ([]byte, error)
func (*ReserveSELCommand) Name ¶
func (c *ReserveSELCommand) Name() string
func (*ReserveSELCommand) NetFnRsLUN ¶
func (c *ReserveSELCommand) NetFnRsLUN() NetFnRsLUN
func (*ReserveSELCommand) String ¶
func (c *ReserveSELCommand) String() string
type SDR ¶
type SDR interface { // Returns record type Type() SDRType // Returns record id ID() uint16 // Returns bytes of the record key and body Data() []byte }
Sensor Data Record
func SDRGetAllRecordsRepo ¶
Returns all sensor records from SDR repository.
type SDRCommonSensor ¶
type SDRCommonSensor struct { OwnerID uint8 OwnerLUN uint8 ChannelNumber uint8 SensorNumber uint8 Entity struct { ID uint8 // (See Table 43-13) Instance uint8 Logical bool } SensorInitialization struct { Scanning bool EventGen bool InitSensorType bool InitHysteresis bool InitThresholds bool InitEvents bool InitScanning bool } SensorCapabilities struct { EventMessage uint8 Threshold uint8 Hysteresis uint8 AutoRearm bool Ignore bool } SensorType SensorType EventReadingType uint8 // (See Table 42-1) Mask struct { AssertionOrLowerThreshold uint16 // (See 15-16 byte in Table 43-1) DeassertionOrUpperThreshold uint16 // (See 17-18 byte in Table 43-1) DiscreteOrReadableThreshold uint16 // (See 19-20 byte in Table 43-1) } SensorUnits struct { Percentage bool Modifier uint8 RateUnit uint8 Analog uint8 BaseType UnitType ModifierType UnitType } // contains filtered or unexported fields }
Intersection of FullSensor and CompactSensor
func (*SDRCommonSensor) Data ¶
func (r *SDRCommonSensor) Data() []byte
func (*SDRCommonSensor) ID ¶
func (r *SDRCommonSensor) ID() uint16
func (*SDRCommonSensor) Type ¶
func (r *SDRCommonSensor) Type() SDRType
func (*SDRCommonSensor) UnitString ¶
func (r *SDRCommonSensor) UnitString() string
type SDRCompactSensor ¶
type SDRCompactSensor struct { SDRCommonSensor Count uint8 ModifierType uint8 // (0: numeric, 1: alpha) ModifierOffset uint8 EntityInstance uint8 // (0: same, 1: increments) } Threshold struct { PositiveHysteresis uint8 NegativeHysteresis uint8 } OEM uint8 IDType uint8 IDLength uint8 IDString []byte }
Compact Sensor Record (Section 43.2)
func (*SDRCompactSensor) SensorID ¶
func (r *SDRCompactSensor) SensorID() string
type SDRFRUDeviceLocator ¶
type SDRFRUDeviceLocator struct { SlaveAddress uint8 DeviceID uint8 BusID uint8 AccessLUN uint8 Logical bool ChannelNumber uint8 DeviceType uint8 DeviceTypeModifier uint8 Entity struct { ID uint8 Instance uint8 } OEM uint8 IDType uint8 IDLength uint8 IDString []byte // contains filtered or unexported fields }
FRU Device Locator Record (Section 43.8)
func (*SDRFRUDeviceLocator) Data ¶
func (r *SDRFRUDeviceLocator) Data() []byte
func (*SDRFRUDeviceLocator) ID ¶
func (r *SDRFRUDeviceLocator) ID() uint16
func (*SDRFRUDeviceLocator) SensorID ¶
func (r *SDRFRUDeviceLocator) SensorID() string
func (*SDRFRUDeviceLocator) Type ¶
func (r *SDRFRUDeviceLocator) Type() SDRType
type SDRFullSensor ¶
type SDRFullSensor struct { SDRCommonSensor Linearization uint8 M int16 Tolerance uint8 B int16 Accuracy uint16 AccuracyExp uint8 RExp int8 BExp int8 AnalogFlags struct { NominalRead bool NormalMax bool NormalMin bool } NominalRead uint8 NormalMax uint8 NormalMin uint8 SensorMax uint8 SensorMin uint8 Threshold struct { UpperNonRecover uint8 UpperCrit uint8 UpperNonCrit uint8 LowerNonRecover uint8 LowerCrit uint8 LowerNonCrit uint8 PositiveHysteresis uint8 NegativeHysteresis uint8 } OEM uint8 IDType uint8 IDLength uint8 IDString []byte }
Full Sensor Record (Section 43.1)
func (*SDRFullSensor) ConvertSensorReading ¶
func (r *SDRFullSensor) ConvertSensorReading(value uint8) float64
Returns converted sensor reading.
func (*SDRFullSensor) IsAnalogReading ¶
func (r *SDRFullSensor) IsAnalogReading() bool
Returns `true` if sensor has an analog reading.
func (*SDRFullSensor) IsThresholdBaseSensor ¶
func (r *SDRFullSensor) IsThresholdBaseSensor() bool
Returns `true` if sensor is threshold-base.
func (*SDRFullSensor) SensorID ¶
func (r *SDRFullSensor) SensorID() string
type SDRType ¶
type SDRType uint8
Sensor Data Record Type
const ( SDRTypeFullSensor SDRType = 0x01 SDRTypeCompactSensor SDRType = 0x02 SDRTypeEventOnlySensor SDRType = 0x03 SDRTypeEntityAssociation SDRType = 0x08 SDRTypeDeviceEntityAssociation SDRType = 0x09 SDRTypeGenericDeviceLocator SDRType = 0x10 SDRTypeFRUDeviceLocator SDRType = 0x11 SDRTypeMCDeviceLocator SDRType = 0x12 SDRTypeMCConfirmation SDRType = 0x13 SDRTypeBMCMessageChannelInfo SDRType = 0x14 SDRTypeOEM SDRType = 0xc0 )
type SELEventRecord ¶
type SELEventRecord struct { RecordID uint16 RecordType SELType Timestamp Timestamp GeneratorID uint16 EvMRev uint8 SensorType SensorType SensorNumber uint8 EventType EventType EventDir uint8 EventData1 uint8 // (Table 29-6) EventData2 uint8 // (Table 29-6) EventData3 uint8 // (Table 29-6) // contains filtered or unexported fields }
SEL Event Record (Section 32.1)
func (*SELEventRecord) Data ¶
func (r *SELEventRecord) Data() []byte
func (*SELEventRecord) Description ¶
func (r *SELEventRecord) Description() string
Returns event description.
func (*SELEventRecord) GetEventTriggerReading ¶
func (r *SELEventRecord) GetEventTriggerReading() (uint8, bool)
Returns trigger reading of threshold-base sensor.
func (*SELEventRecord) GetEventTriggerThreshold ¶
func (r *SELEventRecord) GetEventTriggerThreshold() (uint8, bool)
Returns trigger threshold value of threshold-base sensor.
func (*SELEventRecord) ID ¶
func (r *SELEventRecord) ID() uint16
func (*SELEventRecord) IsAssertionEvent ¶
func (r *SELEventRecord) IsAssertionEvent() bool
Returns `true'` if it is assertion event.
func (*SELEventRecord) Type ¶
func (r *SELEventRecord) Type() SELType
type SELNonTimestampedOEMRecord ¶
type SELNonTimestampedOEMRecord struct { RecordID uint16 RecordType SELType OEM []byte // contains filtered or unexported fields }
Non-Timestamped OEM SEL record (Section 32.3)
func (*SELNonTimestampedOEMRecord) Data ¶
func (r *SELNonTimestampedOEMRecord) Data() []byte
func (*SELNonTimestampedOEMRecord) ID ¶
func (r *SELNonTimestampedOEMRecord) ID() uint16
func (*SELNonTimestampedOEMRecord) Type ¶
func (r *SELNonTimestampedOEMRecord) Type() SELType
type SELRecord ¶
type SELRecord interface { // Returns record type Type() SELType // Returns record id ID() uint16 // Returns bytes of the record key and body Data() []byte }
Sensor Event Log Record
type SELTimestampedOEMRecord ¶
type SELTimestampedOEMRecord struct { RecordID uint16 RecordType SELType Timestamp Timestamp ManufacturerID uint32 OEMDefined []byte // contains filtered or unexported fields }
Timestamped OEM SEL record (Section 32.2)
func (*SELTimestampedOEMRecord) Data ¶
func (r *SELTimestampedOEMRecord) Data() []byte
func (*SELTimestampedOEMRecord) ID ¶
func (r *SELTimestampedOEMRecord) ID() uint16
func (*SELTimestampedOEMRecord) Type ¶
func (r *SELTimestampedOEMRecord) Type() SELType
type SELType ¶
type SELType uint8
Sensor Event Log Record Type
func (SELType) IsNonTimestampedOEM ¶
func (SELType) IsTimestampedOEM ¶
type SensorType ¶
type SensorType uint8
Sensor Type (Table 42-3)
func (SensorType) String ¶
func (t SensorType) String() string
type ThresholdStatus ¶
type ThresholdStatus string
const ( // Normal operating ranges ThresholdStatusOK ThresholdStatus = "ok" // Lower Non-Recoverable ThresholdStatusLNR ThresholdStatus = "lnr" // Lower Critical ThresholdStatusLCR ThresholdStatus = "lcr" // Lower Non-Critical ThresholdStatusLNC ThresholdStatus = "lnc" // Upper Non-Recoverable ThresholdStatusUNR ThresholdStatus = "unr" // Upper Critical ThresholdStatusUCR ThresholdStatus = "ucr" // Upper Non-Critical ThresholdStatusUNC ThresholdStatus = "unc" )
func NewThresholdStatus ¶
func NewThresholdStatus(status uint8) ThresholdStatus
Returns threshold status of threshold-base sensor.
type Timestamp ¶
type Timestamp struct {
Value uint32
}
Timestamp (Section 37)