Documentation
¶
Index ¶
- func AssertFirmwareIsCompatibleWithHardware(fwHw string, fwMajorRevs []int, hwName string, hwMajor int) error
- func LoadFirmware(c If, file string, chunkSize uint, timeout time.Duration, ...) (restartingNow bool, err error)
- func LoadFirmwareBinaryFromFile(c If, file string, chunkSize uint, timeout time.Duration, ...) (restartingNow bool, err error)
- func LoadFirmwareFromBuffer(c If, buffer []byte, chunkSize uint, timeout time.Duration, ...) (restartingNow bool, err error)
- type FirmwareAlreadyPresentError
- type HardwareInventory
- type If
- type ParameterIsReadProtectedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertFirmwareIsCompatibleWithHardware ¶
func AssertFirmwareIsCompatibleWithHardware(fwHw string, fwMajorRevs []int, hwName string, hwMajor int) error
AssertFirmwareIsCompatibleWithHardware checks if the firmware specified by fwHw and fwMajorRevs is compatible with hardware hwName, hwMajor
func LoadFirmware ¶
func LoadFirmware(c If, file string, chunkSize uint, timeout time.Duration, prog func(bytes uint, msg string)) (restartingNow bool, err error)
LoadFirmware loads a binary from a firmware package file to the device. Checks first if the firmware is compatible with the device. Checks then if the device's firmware version is the same timeout is for each chunk
func LoadFirmwareBinaryFromFile ¶
func LoadFirmwareBinaryFromFile(c If, file string, chunkSize uint, timeout time.Duration, prog func(bytes uint, msg string)) (restartingNow bool, err error)
LoadFirmwareBinaryFromFile loads new firmware from file into the device device timeout is for each chunk
func LoadFirmwareFromBuffer ¶
func LoadFirmwareFromBuffer(c If, buffer []byte, chunkSize uint, timeout time.Duration, prog func(bytes uint, msg string)) (restartingNow bool, err error)
LoadFirmwareFromBuffer loads a binary from a firmware package in memory to the device. Checks first if the firmware is compatible with the device. Checks then if the device's firmware version is the same timeout is for each chunk
Types ¶
type FirmwareAlreadyPresentError ¶
type FirmwareAlreadyPresentError struct {
}
FirmwareAlreadyPresentError is returned by LoadFirmware as a dummy error
func (*FirmwareAlreadyPresentError) Error ¶
func (e *FirmwareAlreadyPresentError) Error() string
Error returns the error string for FirmwareAlreadyPresentError
type HardwareInventory ¶
type HardwareInventory struct {
PartNumber string
SerialNumber string
MajorVersion uint32
CustomExtension map[string]string // may contain e.g. customer part number
}
HardwareInventory represents the hardware inventory information
type If ¶
type If interface {
IdentifyFirmware(timeout time.Duration) (name string, version string, err error)
LoadFirmware(file string, chunkSize uint, timeout time.Duration, prog func(bytes uint, msg string)) (restartingNow bool, err error)
LoadFirmwareFromBuffer(buffer []byte, chunkSize uint, timeout time.Duration, prog func(bytes uint, msg string)) (restartingNow bool, err error)
LoadFirmwareBinaryFromFile(file string, chunkSize uint, timeout time.Duration, prog func(bytes uint, msg string)) (restartingNow bool, err error)
LoadFirmwareBinary(r *bufio.Reader, chunkSize uint, timeout time.Duration, prog func(bytes uint, msg string)) (restartingNow bool, err error)
IdentifyHardware(timeout time.Duration) (*HardwareInventory, error)
ProgramHardwareIdentification(i *HardwareInventory, timeout time.Duration) error
ReadPartition(timeout time.Duration, partitionName string, offset uint32, w *bufio.Writer, prog func(bytes uint, msg string)) (err error)
SetPersistentParameter(name string, value string, timeout time.Duration) (bool, error)
GetPersistentParameter(name string, timeout time.Duration) (value string, err error)
ResetReason(timeout time.Duration) (reason string, err error)
Restart(timeout time.Duration) (restartingNow bool, err error)
StreamLogs(streamTimeout time.Duration, infoCb func(msg string)) (io.ReadCloser, error)
GetParameterSet(timeout time.Duration, namespace string) ([]byte, error)
LoadParameterSet(timeout time.Duration, namespace string, data []byte) ([]byte, error)
ReplCommand(cmd string, timeout time.Duration) (response string, err error)
ChangeAPIPassword(newPassword string, timeout time.Duration) error
Close()
}
If represents a client for the io4edge core functions Implemented by pbcore and httpscore packages
type ParameterIsReadProtectedError ¶
type ParameterIsReadProtectedError struct {
}
ParameterIsReadProtectedError is returned by SetPersistentParameter if the parameter is read protected
func (*ParameterIsReadProtectedError) Error ¶
func (e *ParameterIsReadProtectedError) Error() string