Command class

Constructors

Command({required String commandId, required String commandName, required Map<String, dynamic> args})

Properties

args → Map<String, dynamic>
args is the arguments of the command.
final
commandId → String
commandId is the Layrz ID to refer to this command. This ID is unique in the Layrz ecosystem and should be used to send the ACK.
final
commandName → String
commandName is the name of the command.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

formatAck(String response) → String
formatAck formats the ACK message to send to the Layrz ecosystem.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toPacket() → String
toPacket converts the Command to a raw message following this structure: commandId;commandName;args;crc16
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromPackets(String raw) → List<Command>
fromPackets creates a List<Command> from a raw message following this structure: commandId;commandName;args;crc16