storage

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFRUDataLength2Big

func ReadFRUDataLength2Big(cc types.CompletionCode) bool

Types

type AddSELEntryRequest

type AddSELEntryRequest struct {
	SEL *types.SEL
}

31.6 Add SEL Entry Command

func (*AddSELEntryRequest) Command

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

func (*AddSELEntryRequest) Pack

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

type AddSELEntryResponse

type AddSELEntryResponse struct {
	RecordID uint16 // Record ID for added record, LS Byte first
}

func (*AddSELEntryResponse) Format

func (res *AddSELEntryResponse) Format() string

func (*AddSELEntryResponse) Unpack

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

type ClearSELRequest

type ClearSELRequest struct {
	ReservationID        uint16 // LS Byte first
	GetErasureStatusFlag bool
}

31.9 Clear SEL Command

func (*ClearSELRequest) Command

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

func (*ClearSELRequest) Pack

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

type ClearSELResponse

type ClearSELResponse struct {
	ErasureProgressStatus uint8
}

func (*ClearSELResponse) Format

func (res *ClearSELResponse) Format() string

func (*ClearSELResponse) Unpack

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

type DeleteSELEntryRequest

type DeleteSELEntryRequest struct {
	ReservationID uint16
	RecordID      uint16
}

31.8 Delete SEL Entry Command

func (*DeleteSELEntryRequest) Command

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

func (*DeleteSELEntryRequest) Pack

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

type DeleteSELEntryResponse

type DeleteSELEntryResponse struct {
	RecordID uint16
}

func (*DeleteSELEntryResponse) Format

func (res *DeleteSELEntryResponse) Format() string

func (*DeleteSELEntryResponse) Unpack

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

type GetDeviceSDRInfoRequest

type GetDeviceSDRInfoRequest struct {
	// true: Get SDR count. This returns the total number of SDRs in the device.
	// false: Get Sensor count. This returns the number of sensors implemented on LUN this command was addressed to.
	GetSDRCount bool
}

35.2 Get Device SDR Info Command. Returns general information about sensors in a Dynamic Sensor Device.

func (*GetDeviceSDRInfoRequest) Command

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

func (*GetDeviceSDRInfoRequest) Pack

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

type GetDeviceSDRInfoResponse

type GetDeviceSDRInfoResponse struct {
	Count uint8

	// 0b = static sensor population. The number of sensors handled by this
	// device is fixed, and a query shall return records for all sensors.
	//
	// 1b = dynamic sensor population. This device may have its sensor
	// population vary during "run time" (defined as any time other that
	// when an install operation is in progress).
	DynamicSensorPopulation bool

	LUN3HasSensors bool
	LUN2HasSensors bool
	LUN1HasSensors bool
	LUN0HasSensors bool

	// Four byte timestamp, or counter. Updated or incremented each time the
	// sensor population changes. This field is not provided if the flags indicate a
	// static sensor population.
	SensorPopulationChangeIndicator uint32
	// contains filtered or unexported fields
}

func (*GetDeviceSDRInfoResponse) Format

func (res *GetDeviceSDRInfoResponse) Format() string

func (*GetDeviceSDRInfoResponse) Unpack

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

type GetDeviceSDRRequest

type GetDeviceSDRRequest struct {
	ReservationID uint16
	RecordID      uint16
	ReadOffset    uint8
	ReadBytes     uint8 // FFh means read entire record
}

35.3 Get Device SDR Command. Returns SDR information for a Sensor Device (typically a satellite management controller). Can return any SDR type, not just 01h/02h. Optional for Static Sensor Devices; mandatory for Dynamic Sensor Devices. Format matches SDR Repository records.

func (*GetDeviceSDRRequest) Command

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

func (*GetDeviceSDRRequest) Pack

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

type GetDeviceSDRResponse

type GetDeviceSDRResponse struct {
	NextRecordID uint16
	RecordData   []byte
}

func (*GetDeviceSDRResponse) Format

func (res *GetDeviceSDRResponse) Format() string

func (*GetDeviceSDRResponse) Unpack

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

type GetFRUInventoryAreaInfoRequest

type GetFRUInventoryAreaInfoRequest struct {
	FRUDeviceID uint8
}

v2.0§34.1 Get FRU Inventory Area Info Command. Returns the FRU Inventory Area size in bytes.

func (*GetFRUInventoryAreaInfoRequest) Command

func (*GetFRUInventoryAreaInfoRequest) Pack

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

func (*GetFRUInventoryAreaInfoRequest) Unpack

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

type GetFRUInventoryAreaInfoResponse

type GetFRUInventoryAreaInfoResponse struct {
	AreaSizeBytes         uint16
	DeviceAccessedByWords bool // false: bytes; true: words (bit 0, v2.0§34.1 Table 34-2)
}

func (*GetFRUInventoryAreaInfoResponse) Format

func (*GetFRUInventoryAreaInfoResponse) Pack

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

func (*GetFRUInventoryAreaInfoResponse) Unpack

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

type GetSDRRepoAllocInfoRequest

type GetSDRRepoAllocInfoRequest struct {
}

33.10 Get SDR Repository Allocation Info Command

func (*GetSDRRepoAllocInfoRequest) Command

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

func (*GetSDRRepoAllocInfoRequest) Pack

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

type GetSDRRepoAllocInfoResponse

type GetSDRRepoAllocInfoResponse struct {
	PossibleAllocUnits uint16
	AllocUnitsSize     uint16 // Allocation unit size in bytes. 0000h indicates unspecified.
	FreeAllocUnits     uint16
	LargestFreeBlock   uint16
	MaximumRecordSize  uint8
}

func (*GetSDRRepoAllocInfoResponse) Format

func (res *GetSDRRepoAllocInfoResponse) Format() string

func (*GetSDRRepoAllocInfoResponse) Pack

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

func (*GetSDRRepoAllocInfoResponse) Unpack

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

type GetSDRRepoInfoRequest

type GetSDRRepoInfoRequest struct {
}

33.9 Get SDR Repository Info Command

func (*GetSDRRepoInfoRequest) Command

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

func (*GetSDRRepoInfoRequest) Pack

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

type GetSDRRepoInfoResponse

type GetSDRRepoInfoResponse struct {
	SDRVersion             uint8  // version number of the SDR command set for the SDR Device. 51h for this specification.
	RecordCount            uint16 // LS Byte first
	FreeSpaceBytes         uint16 // LS Byte first
	MostRecentAdditionTime time.Time
	MostRecentEraseTime    time.Time

	SDROperationSupport SDROperationSupport
}

func (*GetSDRRepoInfoResponse) Format

func (res *GetSDRRepoInfoResponse) Format() string

func (*GetSDRRepoInfoResponse) Pack

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

func (*GetSDRRepoInfoResponse) Unpack

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

type GetSDRRequest

type GetSDRRequest struct {
	ReservationID uint16 // LS Byte first
	RecordID      uint16 // LS Byte first
	ReadOffset    uint8  // Offset into record
	ReadBytes     uint8  // FFh means read entire record
}

33.12 Get SDR Command

func (*GetSDRRequest) Command

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

func (*GetSDRRequest) Pack

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

func (*GetSDRRequest) Unpack

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

type GetSDRResponse

type GetSDRResponse struct {
	NextRecordID uint16
	RecordData   []byte
}

func (*GetSDRResponse) Format

func (res *GetSDRResponse) Format() string

func (*GetSDRResponse) Pack

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

func (*GetSDRResponse) Unpack

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

type GetSELAllocInfoRequest

type GetSELAllocInfoRequest struct {
}

func (*GetSELAllocInfoRequest) Command

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

func (*GetSELAllocInfoRequest) Pack

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

type GetSELAllocInfoResponse

type GetSELAllocInfoResponse struct {
	PossibleAllocUnits uint16
	AllocUnitsSize     uint16 // Allocation unit size in bytes. 0000h indicates unspecified.
	FreeAllocUnits     uint16
	LargestFreeBlock   uint16
	MaximumRecordSize  uint8
}

func (*GetSELAllocInfoResponse) Format

func (res *GetSELAllocInfoResponse) Format() string

func (*GetSELAllocInfoResponse) Unpack

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

type GetSELEntryRequest

type GetSELEntryRequest struct {
	// LS Byte first. Only required for partial Get. Use 0000h otherwise.
	ReservationID uint16

	// SEL Record ID, LS Byte first.
	//  0000h = GET FIRST ENTRY
	//  FFFFh = GET LAST ENTRY
	RecordID uint16

	// Offset into record
	Offset uint8

	// FFh means read entire record.
	ReadBytes uint8
}

31.5 Get SEL Entry Command

func (*GetSELEntryRequest) Command

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

func (*GetSELEntryRequest) Pack

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

type GetSELEntryResponse

type GetSELEntryResponse struct {
	NextRecordID uint16
	Data         []byte // Record Data, 16 bytes for entire record, at least 1 byte
}

func (*GetSELEntryResponse) Format

func (res *GetSELEntryResponse) Format() string

func (*GetSELEntryResponse) Unpack

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

type GetSELInfoRequest

type GetSELInfoRequest struct {
}

GetSELInfoRequest (31.2) command returns the number of entries in the SEL.

func (*GetSELInfoRequest) Command

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

func (*GetSELInfoRequest) Pack

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

type GetSELInfoResponse

type GetSELInfoResponse struct {
	SELVersion         uint8
	Entries            uint16
	FreeBytes          uint16
	RecentAdditionTime time.Time
	RecentEraseTime    time.Time
	OperationSupport   SELOperationSupport
}

func (*GetSELInfoResponse) Format

func (res *GetSELInfoResponse) Format() string

func (*GetSELInfoResponse) Unpack

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

type GetSELTimeRequest

type GetSELTimeRequest struct {
}

31.10 Get SEL Time Command

func (*GetSELTimeRequest) Command

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

func (*GetSELTimeRequest) Pack

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

type GetSELTimeResponse

type GetSELTimeResponse struct {
	// Present Timestamp clock reading
	Time time.Time
}

func (*GetSELTimeResponse) Format

func (res *GetSELTimeResponse) Format() string

func (*GetSELTimeResponse) Unpack

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

type GetSELTimeUTCOffsetRequest

type GetSELTimeUTCOffsetRequest struct {
}

31.11a Get SEL Time UTC Offset. Retrieves the UTC offset (timezone) associated with SEL Time.

func (*GetSELTimeUTCOffsetRequest) Command

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

func (*GetSELTimeUTCOffsetRequest) Pack

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

type GetSELTimeUTCOffsetResponse

type GetSELTimeUTCOffsetResponse struct {
	// signed integer for the offset in minutes from UTC to SEL Time.
	MinutesOffset int16
}

func (*GetSELTimeUTCOffsetResponse) Format

func (res *GetSELTimeUTCOffsetResponse) Format() string

func (*GetSELTimeUTCOffsetResponse) Unpack

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

type ReadFRUDataRequest

type ReadFRUDataRequest struct {
	FRUDeviceID uint8
	ReadOffset  uint16
	ReadCount   uint8
}

34.2 Read FRU Data Command

func (*ReadFRUDataRequest) Command

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

func (*ReadFRUDataRequest) Pack

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

func (*ReadFRUDataRequest) Unpack

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

type ReadFRUDataResponse

type ReadFRUDataResponse struct {
	CountReturned uint8
	Data          []byte
}

func (*ReadFRUDataResponse) Format

func (res *ReadFRUDataResponse) Format() string

func (*ReadFRUDataResponse) Pack

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

func (*ReadFRUDataResponse) Unpack

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

type ReserveDeviceSDRRepoRequest

type ReserveDeviceSDRRepoRequest struct {
}

35.4 Reserve Device SDR Repository Command. Obtains a Reservation ID.

func (*ReserveDeviceSDRRepoRequest) Command

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

func (*ReserveDeviceSDRRepoRequest) Pack

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

type ReserveDeviceSDRRepoResponse

type ReserveDeviceSDRRepoResponse struct {
	ReservationID uint16
}

func (*ReserveDeviceSDRRepoResponse) Format

func (res *ReserveDeviceSDRRepoResponse) Format() string

func (*ReserveDeviceSDRRepoResponse) Unpack

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

type ReserveSDRRepoRequest

type ReserveSDRRepoRequest struct {
}

func (*ReserveSDRRepoRequest) Command

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

func (*ReserveSDRRepoRequest) Pack

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

type ReserveSDRRepoResponse

type ReserveSDRRepoResponse struct {
	ReservationID uint16
}

func (*ReserveSDRRepoResponse) Format

func (res *ReserveSDRRepoResponse) Format() string

func (*ReserveSDRRepoResponse) Pack

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

func (*ReserveSDRRepoResponse) Unpack

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

type ReserveSELRequest

type ReserveSELRequest struct {
}

func (*ReserveSELRequest) Command

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

func (*ReserveSELRequest) Pack

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

type ReserveSELResponse

type ReserveSELResponse struct {
	ReservationID uint16
}

func (*ReserveSELResponse) Format

func (res *ReserveSELResponse) Format() string

func (*ReserveSELResponse) Unpack

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

type SDROperationSupport

type SDROperationSupport struct {
	Overflow                     bool
	SupportModalSDRRepoUpdate    bool // A modal SDR Repository is only updated when the controller is in an SDR Repository update mode.
	SupportNonModalSDRRepoUpdate bool // A non-modal SDR Repository can be written to at any time
	SupportDeleteSDR             bool
	SupportPartialAddSDR         bool
	SupportReserveSDRRepo        bool
	SupportGetSDRRepoAllocInfo   bool
}

type SELOperationSupport

type SELOperationSupport struct {
	Overflow        bool
	DeleteSEL       bool
	PartialAddSEL   bool
	ReserveSEL      bool
	GetSELAllocInfo bool
}

type SetSELTimeRequest

type SetSELTimeRequest struct {
	Time time.Time
}

31.11 Set SEL Time Command

func (*SetSELTimeRequest) Command

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

func (*SetSELTimeRequest) Pack

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

type SetSELTimeResponse

type SetSELTimeResponse struct {
}

func (*SetSELTimeResponse) Format

func (res *SetSELTimeResponse) Format() string

func (*SetSELTimeResponse) Unpack

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

type SetSELTimeUTCOffsetRequest

type SetSELTimeUTCOffsetRequest struct {
	// signed integer for the offset in minutes from UTC to SEL Time. (ranges from -1440 to 1440)
	MinutesOffset int16
}

31.11a Set SEL Time UTC Offset. Sets the UTC offset (timezone) associated with SEL Time.

func (*SetSELTimeUTCOffsetRequest) Command

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

func (*SetSELTimeUTCOffsetRequest) Pack

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

type SetSELTimeUTCOffsetResponse

type SetSELTimeUTCOffsetResponse struct {
}

func (*SetSELTimeUTCOffsetResponse) Format

func (res *SetSELTimeUTCOffsetResponse) Format() string

func (*SetSELTimeUTCOffsetResponse) Unpack

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

type WriteFRUDataRequest

type WriteFRUDataRequest struct {
	FRUDeviceID uint8
	WriteOffset uint16
	WriteData   []byte
}

34.3 Write FRU Data Command. Low-level direct write to the FRU Inventory Info area; does not interpret or validate data semantics or formatting.

func (*WriteFRUDataRequest) Command

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

func (*WriteFRUDataRequest) Pack

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

type WriteFRUDataResponse

type WriteFRUDataResponse struct {
	CountWritten uint8
}

func (*WriteFRUDataResponse) Format

func (res *WriteFRUDataResponse) Format() string

func (*WriteFRUDataResponse) Unpack

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

Jump to

Keyboard shortcuts

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