stop method

Future<bool> stop(
  1. String profileToken, {
  2. bool panTilt = true,
  3. bool zoom = true,
})

Operation to stop ongoing pan, tilt and zoom movements of absolute relative and continuous type. If no stop argument for pan, tilt or zoom is set, the device will stop all ongoing pan, tilt and zoom movements.

ACCESS CLASS: ACTUATE

Implementation

Future<bool> stop(String profileToken,
    {bool panTilt = true, bool zoom = true}) async {
  loggy.debug('stop');

  final responseEnvelope = await transport.securedRequest(
      uri,
      soap.Body(
        request: PtzRequest.stop(profileToken, panTilt: panTilt, zoom: zoom),
      ));

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

  return responseEnvelope.body.response?.containsKey('StopResponse') ?? false;
}