Table of Contents

Class DeviceFirmware

Namespace
Bonsai.Harp
Assembly
Bonsai.Harp.dll

Represents a hardware control firmware image which can be uploaded into a Harp device.

public sealed class DeviceFirmware
Inheritance
DeviceFirmware
Inherited Members

Properties

Data

Gets the binary representation of the firmware to be installed on the device.

public byte[] Data { get; }

Property Value

byte[]

Metadata

Gets information about the firmware version and supported devices on which it can be installed.

public FirmwareMetadata Metadata { get; }

Property Value

FirmwareMetadata

Methods

FromFile(string)

Creates a DeviceFirmware object from the specified file in Intel HEX format using the default page size.

public static DeviceFirmware FromFile(string path)

Parameters

path string

The name of the file from which to create the DeviceFirmware.

Returns

DeviceFirmware

A new DeviceFirmware object representing the extracted binary firware blob, together with the metadata extracted from the firmware file name.

FromFile(string, int)

Creates a DeviceFirmware object from the specified file in Intel HEX format and a specified page size.

public static DeviceFirmware FromFile(string path, int pageSize)

Parameters

path string

The name of the file from which to create the DeviceFirmware.

pageSize int

The size of the memory blocks used to upload the device firmware.

Returns

DeviceFirmware

A new DeviceFirmware object representing the extracted binary firware blob, together with the metadata extracted from the firmware file name.

FromStream(string, Stream, int)

Creates a DeviceFirmware object extracted from the specified ASCII stream in Intel HEX format, the specified metadata string and page size.

public static DeviceFirmware FromStream(string metadata, Stream stream, int pageSize)

Parameters

metadata string

The firmware metadata encoded in a text string representation.

stream Stream

The ASCII stream in Intel HEX format from which to extract the device firmware.

pageSize int

The size of the memory blocks used to upload the device firmware.

Returns

DeviceFirmware

A new DeviceFirmware object representing the extracted binary firware blob, together with the metadata extracted from the firmware file name.