dcmi

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDCMITemperatureReadings

func FormatDCMITemperatureReadings(readings []DCMITemperatureReading) string

Types

type ActivateDCMIPowerLimitRequest

type ActivateDCMIPowerLimitRequest struct {
	Activate bool
}

func (*ActivateDCMIPowerLimitRequest) Command

func (*ActivateDCMIPowerLimitRequest) Pack

func (req *ActivateDCMIPowerLimitRequest) Pack() []byte

type ActivateDCMIPowerLimitResponse

type ActivateDCMIPowerLimitResponse struct {
}

func (*ActivateDCMIPowerLimitResponse) Format

func (res *ActivateDCMIPowerLimitResponse) Format() string

func (*ActivateDCMIPowerLimitResponse) Unpack

func (res *ActivateDCMIPowerLimitResponse) Unpack(msg []byte) error

type DCMITemperatureReading

type DCMITemperatureReading struct {
	TemperatureReading int8
	EntityInstance     types.EntityInstance
	EntityID           types.EntityID
}

type GetDCMIAssetTagRequest

type GetDCMIAssetTagRequest struct {
	Offset uint8
}

GetDCMIAssetTagRequest represents a "Get Asset Tag" request according to section 6.4.2 of the DCMI specification v1.5.

While the asset tag is allowed to be up to 64 bytes, each request will always return at most 16 bytes. The response also indicates the total length of the asset tag. If it is greater than 16 bytes, additional requests have to be performed, setting the offset accordingly.

func (*GetDCMIAssetTagRequest) Command

func (req *GetDCMIAssetTagRequest) Command() types.Command

func (*GetDCMIAssetTagRequest) Pack

func (req *GetDCMIAssetTagRequest) Pack() []byte

type GetDCMIAssetTagResponse

type GetDCMIAssetTagResponse struct {
	// At most 16 bytes of the asset tag, starting from the request's offset
	AssetTag []byte
	// The total length of the asset tag
	TotalLength uint8
}

func (*GetDCMIAssetTagResponse) Format

func (res *GetDCMIAssetTagResponse) Format() string

func (*GetDCMIAssetTagResponse) Unpack

func (res *GetDCMIAssetTagResponse) Unpack(msg []byte) error

type GetDCMICapParamRequest

type GetDCMICapParamRequest struct {
	ParamSelector types.DCMICapParamSelector
}

GetDCMICapParamRequest provides version information for DCMI and information about the mandatory and optional DCMI capabilities that are available on the particular platform.

The command is session-less and can be called similar to the Get Authentication Capability command. This command is a bare-metal provisioning command, and the availability of features does not imply the features are configured.

[DCMI specification v1.5] 6.1.1 Get DCMI Capabilities Info Command

func (*GetDCMICapParamRequest) Command

func (req *GetDCMICapParamRequest) Command() types.Command

func (*GetDCMICapParamRequest) Pack

func (req *GetDCMICapParamRequest) Pack() []byte

func (*GetDCMICapParamRequest) Unpack

func (req *GetDCMICapParamRequest) Unpack(msg []byte) error

type GetDCMICapParamResponse

type GetDCMICapParamResponse struct {
	MajorVersion  uint8
	MinorVersion  uint8
	ParamRevision uint8
	ParamData     []byte
}

func (*GetDCMICapParamResponse) Format

func (res *GetDCMICapParamResponse) Format() string

func (*GetDCMICapParamResponse) Pack

func (res *GetDCMICapParamResponse) Pack() []byte

func (*GetDCMICapParamResponse) Unpack

func (res *GetDCMICapParamResponse) Unpack(msg []byte) error

type GetDCMIConfigParamRequest

type GetDCMIConfigParamRequest struct {
	ParamSelector types.DCMIConfigParamSelector
	SetSelector   uint8 // use 00h for parameters that only have one set
}

[DCMI specification v1.5] 6.1.3 Get DCMI Configuration Parameters Command

func (*GetDCMIConfigParamRequest) Command

func (req *GetDCMIConfigParamRequest) Command() types.Command

func (*GetDCMIConfigParamRequest) Pack

func (req *GetDCMIConfigParamRequest) Pack() []byte

type GetDCMIConfigParamResponse

type GetDCMIConfigParamResponse struct {
	MajorVersion  uint8
	MinorVersion  uint8
	ParamRevision uint8
	ParamData     []byte
}

func (*GetDCMIConfigParamResponse) Format

func (res *GetDCMIConfigParamResponse) Format() string

func (*GetDCMIConfigParamResponse) Unpack

func (res *GetDCMIConfigParamResponse) Unpack(msg []byte) error

type GetDCMIMgmtControllerIdentifierRequest

type GetDCMIMgmtControllerIdentifierRequest struct {
	Offset uint8
}

[DCMI specification v1.5]: 6.4.6.1 Get Management Controller Identifier String Command

func (*GetDCMIMgmtControllerIdentifierRequest) Command

func (*GetDCMIMgmtControllerIdentifierRequest) Pack

type GetDCMIMgmtControllerIdentifierResponse

type GetDCMIMgmtControllerIdentifierResponse struct {
	// ID String Length Count of non-null characters starting from offset 0 up to the first null.
	// Note: The Maximum length of the Identifier String is specified as 64 bytes including the null character,
	// therefore the range for this return is 0-63.
	IDStrLength uint8

	IDStr []byte
}

func (*GetDCMIMgmtControllerIdentifierResponse) Format

func (*GetDCMIMgmtControllerIdentifierResponse) Unpack

type GetDCMIPowerLimitRequest

type GetDCMIPowerLimitRequest struct {
}

[DCMI specification v1.5]: 6.6.2 Get Power Limit

func (*GetDCMIPowerLimitRequest) Command

func (req *GetDCMIPowerLimitRequest) Command() types.Command

func (*GetDCMIPowerLimitRequest) Pack

func (req *GetDCMIPowerLimitRequest) Pack() []byte

type GetDCMIPowerLimitResponse

type GetDCMIPowerLimitResponse struct {
	ExceptionAction types.DCMIExceptionAction
	// Power Limit Requested in Watts
	PowerLimitRequested uint16
	// Maximum time taken to limit the power after the platform power has reached
	// the power limit before the Exception Action will be taken.
	CorrectionTimeLimitMilliSec uint32
	// Management application Statistics Sampling period in seconds
	StatisticsSamplingPeriodSec uint16
}

func (*GetDCMIPowerLimitResponse) Format

func (res *GetDCMIPowerLimitResponse) Format() string

func (*GetDCMIPowerLimitResponse) Unpack

func (res *GetDCMIPowerLimitResponse) Unpack(msg []byte) error

type GetDCMIPowerReadingRequest

type GetDCMIPowerReadingRequest struct {
}

GetDCMIPowerReadingRequest represents a "Get Power Reading" request according to section 6.6.1 of the DCMI specification v1.5.

Currently, only the basic "System Power Statistics" mode is supported, not the extended mode.

func (*GetDCMIPowerReadingRequest) Command

func (req *GetDCMIPowerReadingRequest) Command() types.Command

func (*GetDCMIPowerReadingRequest) Pack

func (req *GetDCMIPowerReadingRequest) Pack() []byte

type GetDCMIPowerReadingResponse

type GetDCMIPowerReadingResponse struct {
	// Current Power in watts
	CurrentPower uint16
	// Minimum Power over sampling duration in watts
	MinimumPower uint16
	// Maximum Power over sampling duration in watts
	MaximumPower uint16
	// Average Power over sampling duration in watts
	AveragePower uint16
	// IPMI Specification based Time Stamp
	//
	// For Mode 02h (not yet supported), the time stamp specifies the end of the
	// averaging window.
	Timestamp uint32
	// Statistics reporting time period
	//
	// For Mode 01h, time-frame in milliseconds, over which the controller
	// collects statistics. For Mode 02h (not yet supported), time-frame reflects
	// the Averaging Time period in units.
	ReportingPeriod uint32
	// True if power measurements are available, false otherwise.
	PowerMeasurementActive bool
}

GetDCMIPowerReadingResponse represents a response to a GetDCMIPowerReadingRequest.

func (*GetDCMIPowerReadingResponse) Format

func (res *GetDCMIPowerReadingResponse) Format() string

func (*GetDCMIPowerReadingResponse) Unpack

func (res *GetDCMIPowerReadingResponse) Unpack(msg []byte) error

type GetDCMISensorInfoRequest

type GetDCMISensorInfoRequest struct {
	SensorType types.SensorType
	EntityID   types.EntityID

	// 00h Retrieve information about all instances associated with Entity ID
	// 01h - FFh Retrieve only the information about particular instance.
	EntityInstance      types.EntityInstance
	EntityInstanceStart uint8
}

[DCMI specification v1.5]: 6.5.2 Get DCMI Sensor Info Command

func (*GetDCMISensorInfoRequest) Command

func (req *GetDCMISensorInfoRequest) Command() types.Command

func (*GetDCMISensorInfoRequest) Pack

func (req *GetDCMISensorInfoRequest) Pack() []byte

type GetDCMISensorInfoResponse

type GetDCMISensorInfoResponse struct {
	TotalEntityInstances uint8
	RecordsCount         uint8
	SDRRecordID          []uint16
}

func (*GetDCMISensorInfoResponse) Format

func (res *GetDCMISensorInfoResponse) Format() string

func (*GetDCMISensorInfoResponse) Unpack

func (res *GetDCMISensorInfoResponse) Unpack(msg []byte) error

type GetDCMITemperatureReadingsRequest

type GetDCMITemperatureReadingsRequest struct {
	SensorType          types.SensorType
	EntityID            types.EntityID
	EntityInstance      types.EntityInstance
	EntityInstanceStart uint8
}

[DCMI specification v1.5]: 6.7.3 Get Temperature Readings Command

func (*GetDCMITemperatureReadingsRequest) Command

func (*GetDCMITemperatureReadingsRequest) Pack

type GetDCMITemperatureReadingsResponse

type GetDCMITemperatureReadingsResponse struct {
	EntityID types.EntityID

	TotalEntityInstances     uint8
	TemperatureReadingsCount uint8
	TemperatureReadings      []DCMITemperatureReading
}

func (*GetDCMITemperatureReadingsResponse) Format

func (*GetDCMITemperatureReadingsResponse) Unpack

func (res *GetDCMITemperatureReadingsResponse) Unpack(msg []byte) error

type GetDCMIThermalLimitRequest

type GetDCMIThermalLimitRequest struct {
	EntityID       types.EntityID // Entity ID = 37h or 40h (Inlet Temperature)
	EntityInstance types.EntityInstance
}

[DCMI specification v1.5]: 6.7.1 Get Thermal Limit Command

func (*GetDCMIThermalLimitRequest) Command

func (req *GetDCMIThermalLimitRequest) Command() types.Command

func (*GetDCMIThermalLimitRequest) Pack

func (req *GetDCMIThermalLimitRequest) Pack() []byte

type GetDCMIThermalLimitResponse

type GetDCMIThermalLimitResponse struct {
	ExceptionAction_PowerOffAndLogSEL bool
	ExceptionAction_LogSELOnly        bool // ignored if ExceptionAction_PowerOffAndLogSEL is true

	// Temperature Limit set in units defined by the SDR record.
	// Note: the management controller is not required to check this parameter for validity against the SDR contents.
	TemperatureLimit uint8
	// Interval in seconds over which the temperature must continuously be sampled as exceeding the set limit
	// before the specified Exception Action will be taken.
	// Samples are taken at the rate specified by the sampling frequency value in
	// parameter #5 of the DCMI Capabilities parameters (see Table 6-3, DCMI Capabilities Parameters).
	ExceptionTimeSec uint16
}

func (*GetDCMIThermalLimitResponse) Format

func (res *GetDCMIThermalLimitResponse) Format() string

func (*GetDCMIThermalLimitResponse) Unpack

func (res *GetDCMIThermalLimitResponse) Unpack(msg []byte) error

type SetDCMIAssetTagRequest

type SetDCMIAssetTagRequest struct {
	// The offset is relative to the first character of the Asset Tag data.
	// Offset to write (0 to 62)
	// C9h shall be returned if offset >62, offset+bytes to write >63, or bytes to write >16.
	Offset uint8
	// Number of bytes to write (16 bytes maximum).
	// The command shall set the overall length of the Asset Tag (in bytes) to
	// the value (offset to write + bytes to write). Any pre-existing Asset Tag
	// bytes at offsets past that length are automatically deleted.
	WriteBytes uint8

	// The Asset Tag shall be encoded using either UTF-8 with Byte Order Mark or ASCII+Latin1 encoding.
	// The maximum size of the Asset Tag shall be 63 bytes, including Byte Order Mark, if provided.
	AssetTag []byte
}

[DCMI specification v1.5] 6.4.3 Set Asset Tag Command

func (*SetDCMIAssetTagRequest) Command

func (req *SetDCMIAssetTagRequest) Command() types.Command

func (*SetDCMIAssetTagRequest) Pack

func (req *SetDCMIAssetTagRequest) Pack() []byte

type SetDCMIAssetTagResponse

type SetDCMIAssetTagResponse struct {
	// Total Asset Tag Length.
	// This is the length in bytes of the stored Asset Tag after the Set operation has completed.
	// The Asset Tag length shall be set to the sum of the offset to write plus bytes to write.
	// For example, if offset to write is 32 and bytes to write is 4, the Total Asset Tag Length returned will be 36.
	TotalLength uint8
}

func (*SetDCMIAssetTagResponse) Format

func (res *SetDCMIAssetTagResponse) Format() string

func (*SetDCMIAssetTagResponse) Unpack

func (res *SetDCMIAssetTagResponse) Unpack(msg []byte) error

type SetDCMIConfigParamRequest

type SetDCMIConfigParamRequest struct {
	ParamSelector types.DCMIConfigParamSelector
	SetSelector   uint8 // use 00h for parameters that only have one set
	ParamData     []byte
}

[DCMI specification v1.5] 6.1.2 Set DCMI Configuration Parameters

func (*SetDCMIConfigParamRequest) Command

func (req *SetDCMIConfigParamRequest) Command() types.Command

func (*SetDCMIConfigParamRequest) Pack

func (req *SetDCMIConfigParamRequest) Pack() []byte

type SetDCMIConfigParamResponse

type SetDCMIConfigParamResponse struct {
}

func (*SetDCMIConfigParamResponse) Format

func (res *SetDCMIConfigParamResponse) Format() string

func (*SetDCMIConfigParamResponse) Unpack

func (res *SetDCMIConfigParamResponse) Unpack(msg []byte) error

type SetDCMIMgmtControllerIdentifierRequest

type SetDCMIMgmtControllerIdentifierRequest struct {
	Offset     uint8
	WriteBytes uint8
	IDStr      []byte // null-terminated identifier string
}

[DCMI specification v1.5] 6.4.6.2 Set Management Controller Identifier String Command

func (*SetDCMIMgmtControllerIdentifierRequest) Command

func (*SetDCMIMgmtControllerIdentifierRequest) Pack

type SetDCMIMgmtControllerIdentifierResponse

type SetDCMIMgmtControllerIdentifierResponse struct {
	// Total Management Controller Identifier length after the Set operation completes.
	// Length is offset plus bytes written (e.g. offset 32 and 4 bytes written → 36).
	TotalLength uint8
}

func (*SetDCMIMgmtControllerIdentifierResponse) Format

func (*SetDCMIMgmtControllerIdentifierResponse) Unpack

type SetDCMIPowerLimitRequest

type SetDCMIPowerLimitRequest struct {
	ExceptionAction types.DCMIExceptionAction
	// Power Limit Requested in Watts
	PowerLimitRequested uint16
	// Maximum time taken to limit the power after the platform power has reached
	// the power limit before the Exception Action will be taken.
	CorrectionTimeLimitMilliSec uint32
	// Management application Statistics Sampling period in seconds
	StatisticsSamplingPeriodSec uint16
}

func (*SetDCMIPowerLimitRequest) Command

func (req *SetDCMIPowerLimitRequest) Command() types.Command

func (*SetDCMIPowerLimitRequest) Pack

func (req *SetDCMIPowerLimitRequest) Pack() []byte

type SetDCMIPowerLimitResponse

type SetDCMIPowerLimitResponse struct {
}

func (*SetDCMIPowerLimitResponse) Format

func (res *SetDCMIPowerLimitResponse) Format() string

func (*SetDCMIPowerLimitResponse) Unpack

func (res *SetDCMIPowerLimitResponse) Unpack(msg []byte) error

type SetDCMIThermalLimitRequest

type SetDCMIThermalLimitRequest struct {
	EntityID       types.EntityID // Entity ID = 37h or 40h (Inlet Temperature)
	EntityInstance types.EntityInstance

	ExceptionAction_PowerOffAndLogSEL bool
	ExceptionAction_LogSELOnly        bool // ignored if ExceptionAction_PowerOffAndLogSEL is true

	TemperatureLimit uint8
	ExceptionTimeSec uint16
}

func (*SetDCMIThermalLimitRequest) Command

func (req *SetDCMIThermalLimitRequest) Command() types.Command

func (*SetDCMIThermalLimitRequest) Pack

func (req *SetDCMIThermalLimitRequest) Pack() []byte

type SetDCMIThermalLimitResponse

type SetDCMIThermalLimitResponse struct {
}

func (*SetDCMIThermalLimitResponse) Format

func (res *SetDCMIThermalLimitResponse) Format() string

func (*SetDCMIThermalLimitResponse) Unpack

func (res *SetDCMIThermalLimitResponse) Unpack(msg []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL