MessageContainer class

The MessageContainer groups together messages of different types from one device. It contains one instance of each message. The container is then sent using stream to client of the library.

Constructors

MessageContainer({required String macAddress, required DateTime lastUpdate, required MessageSource source, int? lastMessageRssi, Map<IDType, BasicIDMessage>? basicIdMessages, LocationMessage? locationMessage, OperatorIDMessage? operatorIdMessage, SelfIDMessage? selfIdMessage, AuthMessage? authenticationMessage, SystemMessage? systemDataMessage})

Properties

authenticationMessage AuthMessage?
final
basicIdMessages Map<IDType, BasicIDMessage>?
final
hashCode int
The hash code for this object.
no setterinherited
lastMessageRssi int?
final
lastUpdate DateTime
final
locationMessage LocationMessage?
final
locationValid bool
no setter
macAddress String
final
operatorIdMessage OperatorIDMessage?
final
operatorIDSet bool
no setter
operatorIDValid bool
no setter
packSource MessageSource
no setter
preferredBasicIdMessage BasicIDMessage?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selfIdMessage SelfIDMessage?
final
serialNumberUasId String?
no setter
source MessageSource
final
systemDataMessage SystemMessage?
final
systemDataValid bool
no setter

Methods

containsUasId(String uasId) bool
Check if container contains basic id message with given uas id
copyWith({String? macAddress, int? lastMessageRssi, DateTime? lastUpdate, MessageSource? source, Map<IDType, BasicIDMessage>? basicIdMessage, LocationMessage? locationMessage, OperatorIDMessage? operatorIdMessage, SelfIDMessage? selfIdMessage, AuthMessage? authenticationMessage, SystemMessage? systemDataMessage}) MessageContainer
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
update({required ODIDMessage message, required int receivedTimestamp, required MessageSource source, int? rssi}) MessageContainer?
Returns new MessageContainer updated with message. Null is returned if update is refused, because it contains duplicate or corrupted data.

Operators

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