Device class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
-
Device({required String id, required String name, required String ident, String? flespiToken, String? modelId, Model? model, String? protocolId, InboundProtocol? protocol, Map<
String, dynamic> ? additionalFields, String? qrCode, String? linkQr, List<DeviceCommand> ? commands, List<Access> ? access, DeviceTelemetry? telemetry, String? visionProfileId, VisionProfile? visionProfile, PhoneNumber? phone, ModbusConfig? modbus, bool? isSuspended, HwModel? hwModel, String? hwModelId, String? macAddress, Map<String, dynamic> ? configParams, @DurationConverter() Duration? visionCaptureThreshold, List<Device> ? peripherals, String? localIpAddress}) -
constfactory
-
Device.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
access
→ List<
Access> ? -
The
accessof the device.no setterinherited -
additionalFields
→ Map<
String, dynamic> ? -
The
additionalFieldsof the device, only will return something when is imported from compatible source.no setterinherited -
commands
→ List<
DeviceCommand> ? -
The
commandsof the device.no setterinherited -
configParams
→ Map<
String, dynamic> ? -
configParamsis the configuration parameters received from the device, this information is used to configure the device.no setterinherited -
copyWith
→ $DeviceCopyWith<
Device> -
Create a copy of Device
with the given fields replaced by the non-null parameter values.
no setterinherited
- flespiToken → String?
-
The
flespiTokenof the device.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- hwModel → HwModel?
-
hwModelis the hardware model of the device.no setterinherited - hwModelId → String?
-
hwModelIdis the hardware model ID of the device.no setterinherited - id → String
-
no setterinherited
- ident → String
-
The
identof the device. Generally, for GPS devices means the IMEI, for other devices means the MAC address or randomly string.no setterinherited - isSuspended → bool?
-
isSuspendedif the asset is suspended.no setterinherited - linkQr → String?
-
The
linkQrof the device, means the QR code generated for auto-config of the Layrz Link app device.no setterinherited - localIpAddress → String?
-
localIpAddressis the local IP address of the device, used for local communication.no setterinherited - macAddress → String?
-
macAddressis the MAC address of the device.no setterinherited - modbus → ModbusConfig?
-
modbusis the configuration of the modbus device.no setterinherited - model → Model?
-
The
modelof the device.no setterinherited - modelId → String?
-
The
modelIdof the device.no setterinherited - name → String
-
The
nameof the device.no setterinherited -
peripherals
→ List<
Device> ? -
peripheralsis the list of peripherals of the device. Only used whenprotocol.operationModeis OperationMode.peripheral.no setterinherited - phone → PhoneNumber?
-
Is the phone number information linked to this device, can be null.
no setterinherited
- protocol → InboundProtocol?
-
The
protocolof the device.no setterinherited - protocolId → String?
-
The
protocolIdof the device. Only the IDno setterinherited - qrCode → String?
-
The
qrCodeof the device.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- telemetry → DeviceTelemetry?
-
Device last message, read the documentation of LastLocation for more information.
no setterinherited
- visionCaptureThreshold → Duration?
-
visionCaptureThresholdis the vision capture threshold of the device. This value is the threshold of the indicator displayed on Layrz Vision app.no setterinherited - visionProfile → VisionProfile?
-
The
visionProfileof the device.no setterinherited - visionProfileId → String?
-
The
visionProfileIdof the device. Only the IDno setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_Device value)) → TResult -
Available on Device, provided by the DevicePatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Device value)?) → TResult? -
Available on Device, provided by the DevicePatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_Device value)?, {required TResult orElse()}) → TResult -
Available on Device, provided by the DevicePatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String id, String name, String ident, String? flespiToken, String? modelId, Model? model, String? protocolId, InboundProtocol? protocol, Map< String, dynamic> ? additionalFields, String? qrCode, String? linkQr, List<DeviceCommand> ? commands, List<Access> ? access, DeviceTelemetry? telemetry, String? visionProfileId, VisionProfile? visionProfile, PhoneNumber? phone, ModbusConfig? modbus, bool? isSuspended, HwModel? hwModel, String? hwModelId, String? macAddress, Map<String, dynamic> ? configParams, Duration? visionCaptureThreshold, List<Device> ? peripherals, String? localIpAddress)?, {required TResult orElse()}) → TResult -
Available on Device, provided by the DevicePatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Device to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String id, String name, String ident, String? flespiToken, String? modelId, Model? model, String? protocolId, InboundProtocol? protocol, Map< String, dynamic> ? additionalFields, String? qrCode, String? linkQr, List<DeviceCommand> ? commands, List<Access> ? access, DeviceTelemetry? telemetry, String? visionProfileId, VisionProfile? visionProfile, PhoneNumber? phone, ModbusConfig? modbus, bool? isSuspended, HwModel? hwModel, String? hwModelId, String? macAddress, Map<String, dynamic> ? configParams, Duration? visionCaptureThreshold, List<Device> ? peripherals, String? localIpAddress)) → TResult -
Available on Device, provided by the DevicePatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String id, String name, String ident, String? flespiToken, String? modelId, Model? model, String? protocolId, InboundProtocol? protocol, Map< String, dynamic> ? additionalFields, String? qrCode, String? linkQr, List<DeviceCommand> ? commands, List<Access> ? access, DeviceTelemetry? telemetry, String? visionProfileId, VisionProfile? visionProfile, PhoneNumber? phone, ModbusConfig? modbus, bool? isSuspended, HwModel? hwModel, String? hwModelId, String? macAddress, Map<String, dynamic> ? configParams, Duration? visionCaptureThreshold, List<Device> ? peripherals, String? localIpAddress)?) → TResult? -
Available on Device, provided by the DevicePatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited