getNtp method

This operation gets the NTP settings from a device. If the device supports NTP, it shall be possible to get the NTP server settings through the getNtp command.

Access Class: READ_SYSTEM

Implementation

Future<NtpInformation> getNtp() async {
  loggy.debug('getNtp');

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

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

  return GetNtpResponse.fromJson(responseEnvelope.body.response!)
      .ntpInformation;
}