Versions in this module Expand all Collapse all v0 v0.12.2 Jan 19, 2026 v0.12.1 Dec 22, 2025 v0.12.0 Nov 8, 2025 v0.11.2 Sep 12, 2025 v0.11.1 Sep 6, 2025 v0.11.0 Sep 2, 2025 Changes in this version + const IPMI_SENSOR_READING_CMD + const IPMI_SENSOR_READING_NETFN + const IPMI_SENSOR_RECORD_CMD + const IPMI_SENSOR_RECORD_NETFN + var ErrNotLinearised = errors.New("only linearised sensors have a linearisation formula") + type Client interface + Close func() error + DCMIPowerReading func() (*PowerReading, error) + Do func(r *Request) (*Response, error) + LanIP func() (*string, error) + SensorReadings func(records []*FullSensorRecord) (map[*FullSensorRecord]float64, error) + SensorRecords func() ([]*FullSensorRecord, error) + func NewClient(c *Config) (Client, error) + type Config struct + DevNum int + Logger *slog.Logger + Timeout time.Duration + type ConversionFactors struct + B int16 + BExp int8 + M int16 + RExp int8 + func (f *ConversionFactors) ConvertReading(raw int16) float64 + type FullSensorRecord struct + Accuracy int16 + AccuracyExp uint8 + BaseUnit SensorUnit + Identity string + Linearisation Linearisation + ModifierUnit SensorUnit + Number uint8 + Tolerance uint8 + func (r *FullSensorRecord) DecodeFromBytes(data []uint8) error + type Linearisation uint8 + const LinearisationCube + const LinearisationCubeRt + const LinearisationE + const LinearisationExp10 + const LinearisationExp2 + const LinearisationInverse + const LinearisationLinear + const LinearisationLn + const LinearisationLog10 + const LinearisationLog2 + const LinearisationNonLinear + const LinearisationSqr + const LinearisationSqrt + func (l Linearisation) Description() string + func (l Linearisation) IsLinear() bool + func (l Linearisation) IsLinearised() bool + func (l Linearisation) IsNonLinear() bool + func (l Linearisation) Lineariser() (Lineariser, error) + func (l Linearisation) String() string + type Lineariser interface + Linearise func(v float64) float64 + type LineariserFunc func(float64) float64 + func (l LineariserFunc) Linearise(f float64) float64 + type Request struct + Addr uintptr + AddrLen uint + Msg ipmiMsg + Msgid int + type Response struct + Ccode uint8 + Data [1024]uint8 + DataLen int32 + type SensorUnit uint8 + const SensorUnitAmps + const SensorUnitBecquerel + const SensorUnitBits + const SensorUnitBytes + const SensorUnitCandela + const SensorUnitCelsius + const SensorUnitCentimeters + const SensorUnitCharacters + const SensorUnitCollisions + const SensorUnitColorTempKelvin + const SensorUnitCorrectableErrors + const SensorUnitCoulombs + const SensorUnitCubicCentimeters + const SensorUnitCubicFeet + const SensorUnitCubicFeetPerMinute + const SensorUnitCubicInches + const SensorUnitCubicMeters + const SensorUnitCycles + const SensorUnitDays + const SensorUnitDecibels + const SensorUnitDecibelsAFilter + const SensorUnitDecibelsCFilter + const SensorUnitDwords + const SensorUnitErrors + const SensorUnitFahrenheit + const SensorUnitFarad + const SensorUnitFatal + const SensorUnitFeet + const SensorUnitFeetPounds + const SensorUnitFluidOunces + const SensorUnitGauss + const SensorUnitGigabits + const SensorUnitGigabytes + const SensorUnitGilberts + const SensorUnitGrams + const SensorUnitGravities + const SensorUnitGray + const SensorUnitHenry + const SensorUnitHertz + const SensorUnitHits + const SensorUnitHours + const SensorUnitInches + const SensorUnitJoules + const SensorUnitKelvin + const SensorUnitKilobits + const SensorUnitKilobytes + const SensorUnitKilopascals + const SensorUnitLiters + const SensorUnitLumen + const SensorUnitLux + const SensorUnitMegabits + const SensorUnitMegabytes + const SensorUnitMemoryLines + const SensorUnitMessages + const SensorUnitMeters + const SensorUnitMicrofarad + const SensorUnitMicroseconds + const SensorUnitMillihenry + const SensorUnitMillimeters + const SensorUnitMilliseconds + const SensorUnitMils + const SensorUnitMinutes + const SensorUnitMisses + const SensorUnitMoles + const SensorUnitNewtons + const SensorUnitNits + const SensorUnitOhms + const SensorUnitOunceInches + const SensorUnitOunces + const SensorUnitOverflows + const SensorUnitPackets + const SensorUnitPartsPerMillion + const SensorUnitPounds + const SensorUnitPoundsPerSquareInch + const SensorUnitQwords + const SensorUnitRadians + const SensorUnitResets + const SensorUnitRetries + const SensorUnitRevolutions + const SensorUnitRotationsPerMinute + const SensorUnitSeconds + const SensorUnitSiemens + const SensorUnitSieverts + const SensorUnitSteradians + const SensorUnitUncorrectableErrors + const SensorUnitUnderruns + const SensorUnitVoltamperes + const SensorUnitVolts + const SensorUnitWatts + const SensorUnitWeeks + const SensorUnitWords + func (s SensorUnit) String() string + func (s SensorUnit) Symbol() string + type StringDecoder interface + Decode func(b []byte, c int) (string, int, error) + type StringDecoderFunc func([]byte, int) (string, int, error) + func (f StringDecoderFunc) Decode(b []byte, c int) (string, int, error) + type StringEncoding uint8 + const StringEncoding8BitAsciiLatin1 + const StringEncodingBCDPlus + const StringEncodingPacked6BitAscii + const StringEncodingUnicode + func (e StringEncoding) Decoder() (StringDecoder, error) + func (e StringEncoding) Description() string + func (e StringEncoding) String() string v0.10.2 Aug 7, 2025 v0.10.1 Jul 22, 2025 v0.10.0 Jul 20, 2025 Changes in this version + const IPMICTL_RECEIVE_MSG_TRUNC + const IPMICTL_SEND_COMMAND + const IPMICTL_SET_GETS_EVENTS_CMD + const IPMI_BMC_CHANNEL + const IPMI_DCMI + const IPMI_DCMI_ACTIVATED + const IPMI_DCMI_GETRED + const IPMI_LAN + const IPMI_LANP_IP_ADDR + const IPMI_NETFN_DCGRP + const IPMI_NETFN_TRANSPORT + const IPMI_SYSTEM_INTERFACE_ADDR_TYPE + const NFDBits — darwin/amd64, linux/amd64, windows/amd64 + func FDClr(fd uintptr, p *unix.FdSet) + func FDIsSet(fd uintptr, p *unix.FdSet) bool + func FDSet(fd uintptr, p *unix.FdSet) + func FDZero(p *unix.FdSet) — darwin/amd64, linux/amd64, windows/amd64 + type IPMIClient struct + BMCAddr ipmiSystemInterfaceAddr + DevFile *os.File + Logger *slog.Logger + func NewIPMIClient(devNum int, logger *slog.Logger) (*IPMIClient, error) + func (i *IPMIClient) Close() error + func (i *IPMIClient) Do(req *ipmiReq, t time.Duration) (*ipmiResp, error) + func (i *IPMIClient) LanIP(timeout time.Duration) (*string, error) + func (i *IPMIClient) PowerReading(timeout time.Duration) (*PowerReading, error) + type Msg struct + Cmd uint8 + Data uintptr + DataLen uint16 + Lun uint8 + Netfn uint8 + TargetCmd uint8 + type PowerReading struct + Activated bool + Average uint16 + Current uint16 + Maximum uint16 + Minimum uint16