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.

Implementation

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

  final envelope = await transport.sendRequest(
      uri,
      transport.securedEnvelope(
          soap.PtzRequest.gotoHomePosition(profileToken, speed)));

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

  return true;
}