in sample_app/onvif_camera_mock/artifacts/onvif_srvd/src/ServicePTZ.cpp [288:318]
int PTZBindingService::ContinuousMove(_tptz__ContinuousMove *tptz__ContinuousMove, _tptz__ContinuousMoveResponse &tptz__ContinuousMoveResponse)
{
UNUSED(tptz__ContinuousMoveResponse);
DEBUG_MSG("PTZ: %s\n", __FUNCTION__);
ServiceContext* ctx = (ServiceContext*)this->soap->user;
if (tptz__ContinuousMove == NULL) {
return SOAP_OK;
}
if (tptz__ContinuousMove->Velocity == NULL) {
return SOAP_OK;
}
if (tptz__ContinuousMove->Velocity->PanTilt == NULL) {
return SOAP_OK;
}
if (tptz__ContinuousMove->Velocity->PanTilt->x > 0) {
system(ctx->get_ptz_node()->get_move_right().c_str());
} else if (tptz__ContinuousMove->Velocity->PanTilt->x < 0) {
system(ctx->get_ptz_node()->get_move_left().c_str());
}
if (tptz__ContinuousMove->Velocity->PanTilt->y > 0) {
system(ctx->get_ptz_node()->get_move_up().c_str());
} else if (tptz__ContinuousMove->Velocity->PanTilt->y < 0) {
system(ctx->get_ptz_node()->get_move_down().c_str());
}
return SOAP_OK;
}