MiIOPacket class
Represent a packet in MiIO LAN protocol.
The packet is immutable and unmodifiable once constructed.
- Annotations
-
- @immutable
Properties
-
binary
→ List<
int> -
Binary form of packet.
final
-
checksum
→ List<
int> -
128 bits MD5 checksum.
final
- deviceId → int
-
32 bits device ID.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
16 bits length.
final
-
payload
→ Map<
String, dynamic> ? -
Variable sized payload.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stamp → int
-
32 bits stamp.
final
-
token
→ List<
int> ? -
128 bits device token.
final
- unknown → int
-
32 bits unknown field.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- hello → MiIOPacket
-
The "hello" packet.
final
Static Methods
-
build(
int deviceId, List< int> token, {Map<String, dynamic> ? payload, int? stamp}) → Future<MiIOPacket> - Build an outgoing packet.
-
decrypt(
List< int> packet, List<int> token) → Future<List< int> > -
encrypt(
List< int> payload, List<int> token) → Future<List< int> > -
parse(
List< int> binary, {List<int> ? token}) → Future<MiIOPacket> - Parse incoming packet.