Arduino serial protocol handler.

Constants

maxDataLength → int

Maximum size of optional data passed to write.

const maxPacketSize - packetOverhead
maxPacketSize → int

Maximum size of any one data packet, including any overhead.

const 64
packetOverhead → int

Overhead used for size, command, ackknowldgement, and fletch16 bytes.

const 5

Static Methods

fletcher16(List<int> data, int length) → int

Calculates the Fletcher 16bit checksum over the first length bytes of data.

Constructors

ArdProto(SerialPort port, {bool debug: false})

Properties

bytesOut → int

Number of non-acknowldged, outstanding bytes.

read-only
debug → bool

Enables debug logging.

read / write
hashCode → int

Get a hash code for this object.

read-only, inherited
onAction → Stream<KnobAction>

Stream of actions reported by the arduino.

read-only
port → SerialPort

Communications port with the arduino.

read-only
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

close() → Future

Closes the protocol.

log(msg) → dynamic

Prints a debug message to the stdout.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() → String

Returns a string representation of this object.

inherited
write(int command, [List<int> data = const []]) → Future<bool>

Writes a command and optional data to the port.