dco_decode_device_host method
DeviceHost
dco_decode_device_host(
- dynamic raw
)
override
Implementation
@protected
DeviceHost dco_decode_device_host(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
final arr = raw as List<dynamic>;
if (arr.length != 4)
throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
return DeviceHost(
addr: dco_decode_String(arr[0]),
port: dco_decode_u_16(arr[1]),
readTimeout: dco_decode_opt_box_autoadd_u_64(arr[2]),
writeTimeout: dco_decode_opt_box_autoadd_u_64(arr[3]),
);
}