setNodeLocation method

Future<void> setNodeLocation(
  1. String location
)

Send the location to the device.

Implementation

Future<void> setNodeLocation(String location) {
  if (location.isEmpty || location.length > 16)
    throw 'invalid name: $location';
  this.location = location;
  final cmdData = [
    COMMAND_CLASS_NODE_NAMING,
    NODE_NAMING_NODE_LOCATION_SET,
    0x00, // ASCII characters 0 - 127
  ];
  cmdData.addAll(buildAsciiChars(location));
  return commandHandler!
      .request(ZwRequest(logger, id, buildSendDataRequest(id, cmdData)));
}