def set_ptz_velocity(self, ptz_desc, pan, tilt, zoom, **kwargs): """Set velocity of the specified ptz in PTZ-space""" p = FloatValue(value=pan) t = FloatValue(value=tilt) z = FloatValue(value=zoom) ptz_velocity = ptz_pb2.PtzVelocity(ptz=ptz_desc, pan=p, tilt=t, zoom=z) request = ptz_pb2.SetPtzVelocityRequest(velocity=ptz_velocity) return self.call(self._stub.SetPtzVelocity, request, self._set_ptz_velocity_from_response, self._ptz_error_from_response, **kwargs)
def set_ptz_velocity_async(self, ptz_desc, pan, tilt, zoom, **kwargs): """Async version of set_ptz_velocity()""" p = FloatValue(value=pan) t = FloatValue(value=tilt) z = FloatValue(value=zoom) ptz_velocity = ptz_pb2.PtzVelocity(ptz=ptz_desc, pan=p, tilt=t, zoom=z) request = ptz_pb2.SetPtzVelocityRequest(velocity=ptz_velocity) return self.call_async(self._stub.SetPtzVelocity, request, self._set_ptz_velocity_from_response, self._ptz_error_from_response, **kwargs)