def set_ptz_position_async(self, ptz_desc, pan, tilt, zoom, **kwargs): """Async version of set_ptz_position()""" p = FloatValue(value=pan) t = FloatValue(value=tilt) z = FloatValue(value=zoom) ptz_position = ptz_pb2.PtzPosition(ptz=ptz_desc, pan=p, tilt=t, zoom=z) request = ptz_pb2.SetPtzPositionRequest(position=ptz_position) return self.call_async(self._stub.SetPtzPosition, request, self._set_ptz_position_from_response, self._ptz_error_from_response, **kwargs)
def set_ptz_position(self, ptz_desc, pan, tilt, zoom, **kwargs): """Set position of the specified ptz in PTZ-space""" p = FloatValue(value=pan) t = FloatValue(value=tilt) z = FloatValue(value=zoom) ptz_position = ptz_pb2.PtzPosition(ptz=ptz_desc, pan=p, tilt=t, zoom=z) request = ptz_pb2.SetPtzPositionRequest(position=ptz_position) return self.call(self._stub.SetPtzPosition, request, self._set_ptz_position_from_response, self._ptz_error_from_response, **kwargs)