Table of Contents

Class HarpCommand

Namespace
Bonsai.Harp
Assembly
Bonsai.Harp.dll

Provides static methods for creating Harp command messages.

public static class HarpCommand
Inheritance
HarpCommand
Inherited Members

Methods

Read(int, PayloadType)

Returns a HarpMessage read command for the specified address and payload type.

public static HarpMessage Read(int address, PayloadType payloadType)

Parameters

address int

The address of the register to read.

payloadType PayloadType

The type of data available in the register.

Returns

HarpMessage

A valid HarpMessage read command with the specified address and payload type.

ReadByte(int)

Returns a HarpMessage read command for an 8-bit unsigned integer register with the specified address.

public static HarpMessage ReadByte(int address)

Parameters

address int

The address of the register to read.

Returns

HarpMessage

A valid HarpMessage read command for an 8-bit unsigned integer register with the specified address.

ReadInt16(int)

Returns a HarpMessage read command for a 16-bit signed integer register with the specified address.

public static HarpMessage ReadInt16(int address)

Parameters

address int

The address of the register to read.

Returns

HarpMessage

A valid HarpMessage read command for a 16-bit signed integer register with the specified address.

ReadInt32(int)

Returns a HarpMessage read command for a 32-bit signed integer register with the specified address.

public static HarpMessage ReadInt32(int address)

Parameters

address int

The address of the register to read.

Returns

HarpMessage

A valid HarpMessage read command for a 32-bit signed integer register with the specified address.

ReadInt64(int)

Returns a HarpMessage read command for a 64-bit signed integer register with the specified address.

public static HarpMessage ReadInt64(int address)

Parameters

address int

The address of the register to read.

Returns

HarpMessage

A valid HarpMessage read command for a 64-bit signed integer register with the specified address.

ReadSByte(int)

Returns a HarpMessage read command for an 8-bit signed integer register with the specified address.

public static HarpMessage ReadSByte(int address)

Parameters

address int

The address of the register to read.

Returns

HarpMessage

A valid HarpMessage read command for an 8-bit signed integer register with the specified address.

ReadSingle(int)

Returns a HarpMessage read command for a single-precision floating point register with the specified address.

public static HarpMessage ReadSingle(int address)

Parameters

address int

The address of the register to read.

Returns

HarpMessage

A valid HarpMessage read command for a single-precision floating point register with the specified address.

ReadUInt16(int)

Returns a HarpMessage read command for a 16-bit unsigned integer register with the specified address.

public static HarpMessage ReadUInt16(int address)

Parameters

address int

The address of the register to read.

Returns

HarpMessage

A valid HarpMessage read command for a 16-bit unsigned integer register with the specified address.

ReadUInt32(int)

Returns a HarpMessage read command for a 32-bit unsigned integer register with the specified address.

public static HarpMessage ReadUInt32(int address)

Parameters

address int

The address of the register to read.

Returns

HarpMessage

A valid HarpMessage read command for a 32-bit unsigned integer register with the specified address.

ReadUInt64(int)

Returns a HarpMessage read command for a 64-bit unsigned integer register with the specified address.

public static HarpMessage ReadUInt64(int address)

Parameters

address int

The address of the register to read.

Returns

HarpMessage

A valid HarpMessage read command for a 64-bit unsigned integer register with the specified address.

Write(int, PayloadType, ArraySegment<byte>)

Returns a HarpMessage write command with the specified address, and payload data stored in the specified array segment.

public static HarpMessage Write(int address, PayloadType payloadType, ArraySegment<byte> payload)

Parameters

address int

The address of the register to which the Harp message refers to.

payloadType PayloadType

The type of data available in the message payload.

payload ArraySegment<byte>

An array segment containing the raw binary representation of the payload data.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

Write(int, PayloadType, params byte[])

Returns a HarpMessage write command with the specified address, and payload.

public static HarpMessage Write(int address, PayloadType payloadType, params byte[] payload)

Parameters

address int

The address of the register to which the Harp message refers to.

payloadType PayloadType

The type of data available in the message payload.

payload byte[]

The raw binary representation of the payload data.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteByte(int, byte)

Returns a HarpMessage write command with the specified address, and a single value 8-bit unsigned integer payload.

public static HarpMessage WriteByte(int address, byte value)

Parameters

address int

The address of the register to which the Harp message refers to.

value byte

The value to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteByte(int, params byte[])

Returns a HarpMessage write command with the specified address, and an array payload of 8-bit unsigned integers.

public static HarpMessage WriteByte(int address, params byte[] values)

Parameters

address int

The address of the register to which the Harp message refers to.

values byte[]

The values to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteInt16(int, short)

Returns a HarpMessage write command with the specified address, and a single value 16-bit signed integer payload.

public static HarpMessage WriteInt16(int address, short value)

Parameters

address int

The address of the register to which the Harp message refers to.

value short

The value to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteInt16(int, params short[])

Returns a HarpMessage write command with the specified address, and an array payload of 16-bit signed integers.

public static HarpMessage WriteInt16(int address, params short[] values)

Parameters

address int

The address of the register to which the Harp message refers to.

values short[]

The values to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteInt32(int, int)

Returns a HarpMessage write command with the specified address, and a single value 32-bit signed integer payload.

public static HarpMessage WriteInt32(int address, int value)

Parameters

address int

The address of the register to which the Harp message refers to.

value int

The value to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteInt32(int, params int[])

Returns a HarpMessage write command with the specified address, and an array payload of 32-bit signed integers.

public static HarpMessage WriteInt32(int address, params int[] values)

Parameters

address int

The address of the register to which the Harp message refers to.

values int[]

The values to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteInt64(int, long)

Returns a HarpMessage write command with the specified address, and a single value 64-bit signed integer payload.

public static HarpMessage WriteInt64(int address, long value)

Parameters

address int

The address of the register to which the Harp message refers to.

value long

The value to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteInt64(int, params long[])

Returns a HarpMessage write command with the specified address, and an array payload of 64-bit signed integers.

public static HarpMessage WriteInt64(int address, params long[] values)

Parameters

address int

The address of the register to which the Harp message refers to.

values long[]

The values to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteSByte(int, sbyte)

Returns a HarpMessage write command with the specified address, and a single value 8-bit signed integer payload.

public static HarpMessage WriteSByte(int address, sbyte value)

Parameters

address int

The address of the register to which the Harp message refers to.

value sbyte

The value to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteSByte(int, params sbyte[])

Returns a HarpMessage write command with the specified address, and an array payload of 8-bit signed integers.

public static HarpMessage WriteSByte(int address, params sbyte[] values)

Parameters

address int

The address of the register to which the Harp message refers to.

values sbyte[]

The values to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteSingle(int, params float[])

Returns a HarpMessage write command with the specified address, and an array payload of single-precision floating point numbers.

public static HarpMessage WriteSingle(int address, params float[] values)

Parameters

address int

The address of the register to which the Harp message refers to.

values float[]

The values to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteUInt16(int, ushort)

Returns a HarpMessage write command with the specified address, and a single value 16-bit unsigned integer payload.

public static HarpMessage WriteUInt16(int address, ushort value)

Parameters

address int

The address of the register to which the Harp message refers to.

value ushort

The value to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteUInt16(int, params ushort[])

Returns a HarpMessage write command with the specified address, and an array payload of 16-bit unsigned integers.

public static HarpMessage WriteUInt16(int address, params ushort[] values)

Parameters

address int

The address of the register to which the Harp message refers to.

values ushort[]

The values to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteUInt32(int, uint)

Returns a HarpMessage write command with the specified address, and a single value 32-bit unsigned integer payload.

public static HarpMessage WriteUInt32(int address, uint value)

Parameters

address int

The address of the register to which the Harp message refers to.

value uint

The value to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteUInt32(int, params uint[])

Returns a HarpMessage write command with the specified address, and an array payload of 32-bit unsigned integers.

public static HarpMessage WriteUInt32(int address, params uint[] values)

Parameters

address int

The address of the register to which the Harp message refers to.

values uint[]

The values to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteUInt64(int, ulong)

Returns a HarpMessage write command with the specified address, and a single value 64-bit unsigned integer payload.

public static HarpMessage WriteUInt64(int address, ulong value)

Parameters

address int

The address of the register to which the Harp message refers to.

value ulong

The value to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.

WriteUInt64(int, params ulong[])

Returns a HarpMessage write command with the specified address, and an array payload of 64-bit unsigned integers.

public static HarpMessage WriteUInt64(int address, params ulong[] values)

Parameters

address int

The address of the register to which the Harp message refers to.

values ulong[]

The values to be stored in the payload.

Returns

HarpMessage

A valid HarpMessage write command with the specified address and payload.