3,882
社区成员




struct _tptz__AbsoluteMove *AbsoluteMove;
struct _tptz__AbsoluteMoveResponse *AbsoluteMoveResponse;
AbsoluteMove = (_tptz__AbsoluteMove*)soap_malloc(soap, sizeof(struct _tptz__AbsoluteMove));
AbsoluteMoveResponse = (_tptz__AbsoluteMoveResponse*)soap_malloc(soap, sizeof(struct _tptz__AbsoluteMoveResponse));
soap_default__tptz__AbsoluteMove(soap, AbsoluteMove);//内存清零
soap_default__tptz__AbsoluteMoveResponse(soap, AbsoluteMoveResponse);
AbsoluteMove->ProfileToken = trt__GetProfilesResponse.Profiles->token;
AbsoluteMove->Position = (tt__PTZVector*)soap_malloc(soap, sizeof(struct tt__PTZVector));
AbsoluteMove->Position->PanTilt = (tt__Vector2D*)soap_malloc(soap, sizeof(struct tt__Vector2D));
AbsoluteMove->Position->PanTilt->x = -0.9798;//P这里是随便写的几个数
AbsoluteMove->Position->PanTilt->y = 0.6768;//T
AbsoluteMove->Position->PanTilt->space = (char*)soap_malloc(soap, 128);
strcpy(AbsoluteMove->Position->PanTilt->space, "http://www.onvif.org/ver10/schema");
AbsoluteMove->Speed = (tt__PTZSpeed*)soap_malloc(soap, sizeof(struct tt__PTZSpeed));
AbsoluteMove->Speed->PanTilt = (tt__Vector2D*)soap_malloc(soap, sizeof(struct tt__Vector2D));;
AbsoluteMove->Speed->PanTilt->x = 1.0;//P方向转速
AbsoluteMove->Speed->PanTilt->y = 1.0;//T方向转速
AbsoluteMove->Speed->PanTilt->space = (char*)soap_malloc(soap, 128);
strcpy(AbsoluteMove->Speed->PanTilt->space, "http://www.onvif.org/ver10/schema");
AbsoluteMove->Position->Zoom = (tt__Vector1D*)soap_malloc(soap, sizeof(struct tt__Vector1D));
AbsoluteMove->Position->Zoom->x = 0.7646;//Z
AbsoluteMove->Position->Zoom->space = (char*)soap_malloc(soap, 128);
strcpy(AbsoluteMove->Position->Zoom->space, "http://www.onvif.org/ver10/schema");
AbsoluteMove->Speed->Zoom = (tt__Vector1D*)soap_malloc(soap, sizeof(struct tt__Vector1D));;
AbsoluteMove->Speed->Zoom->x = 1.0;//Z缩放速度
AbsoluteMove->Speed->Zoom->space = (char*)soap_malloc(soap, 128);
strcpy(AbsoluteMove->Speed->Zoom->space, "http://www.onvif.org/ver10/schema");
soap_wsse_add_UsernameTokenDigest(soap, "", UserName.c_str(), PassWord.c_str());
int ret = soap_call___tptz__AbsoluteMove(soap, capa_resp.Capabilities->PTZ->XAddr, NULL, AbsoluteMove, AbsoluteMoveResponse);
if (ret == SOAP_OK)
{
printf("AbsoluteMove----OK\n");
}