getDiscoveryMode method

Future<String> getDiscoveryMode()

This operation gets the discovery mode of a device. See Section 7.2 for the definition of the different device discovery modes. The device shall support retrieval of the discovery mode setting through the GetDiscoveryMode command.

Access Class: READ_SYSTEM

Implementation

Future<String> getDiscoveryMode() async {
  loggy.debug('getDiscoveryMode');

  final responseEnvelope = await transport.securedRequest(
      uri,
      soap.Body(
        request: DeviceManagementRequest.getDiscoveryMode(),
      ));

  if (responseEnvelope.body.hasFault) {
    throw Exception(responseEnvelope.body.fault.toString());
  }

  return GetDiscoveryModeResponse.fromJson(responseEnvelope.body.response!)
      .discoveryMode;
}