gotoHomePosition method

Future<bool> gotoHomePosition(
  1. String profileToken, {
  2. PtzSpeed? speed,
})

Operation to move the PTZ device to it's "home" position. The operation is supported if the HomeSupported element in the PTZNode is true.

ACCESS CLASS: ACTUATE

Implementation

Future<bool> gotoHomePosition(String profileToken, {PtzSpeed? speed}) async {
  loggy.debug('gotoHomePosition');

  final responseEnvelope = await transport.securedRequest(
      uri,
      soap.Body(
        request: PtzRequest.gotoHomePosition(
          profileToken,
          speed: speed,
        ),
      ));

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

  return true;
}