91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

onvif client Discovery實現

發布時間:2020-06-30 13:15:15 來源:網絡 閱讀:4280 作者:llf_17 欄目:編程語言

省略:onvif client soapRemoteDiscoveryBindingProxy 由 gsoap C++ 方式生成


#include "soapRemoteDiscoveryBindingProxy.h"

#include "RemoteDiscoveryBinding.nsmap"

#include<string>

using namespace  std;



SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__Probe(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsdd__ProbeType *wsdd__Probe)

{ struct __wsdd__Probe soap_tmp___wsdd__Probe;

if (soap_action == NULL)

soap_action = "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/Probe";

soap_tmp___wsdd__Probe.wsdd__Probe = wsdd__Probe;

soap_begin(soap);

soap_set_version(soap, 2); /* SOAP1.2 */

soap->encodingStyle = NULL;

soap_serializeheader(soap);

soap_serialize___wsdd__Probe(soap, &soap_tmp___wsdd__Probe);

if (soap_begin_count(soap))

return soap->error;

if (soap->mode & SOAP_IO_LENGTH)

{ if (soap_envelope_begin_out(soap)

|| soap_putheader(soap)

|| soap_body_begin_out(soap)

|| soap_put___wsdd__Probe(soap, &soap_tmp___wsdd__Probe, "-wsdd:Probe", "")

|| soap_body_end_out(soap)

|| soap_envelope_end_out(soap))

return soap->error;

}

if (soap_end_count(soap))

return soap->error;

if (soap_connect(soap, soap_endpoint, soap_action)

|| soap_envelope_begin_out(soap)

|| soap_putheader(soap)

|| soap_body_begin_out(soap)

|| soap_put___wsdd__Probe(soap, &soap_tmp___wsdd__Probe, "-wsdd:Probe", "")

|| soap_body_end_out(soap)

|| soap_envelope_end_out(soap)

|| soap_end_send(soap))

return soap_closesock(soap);

return SOAP_OK;

}



SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__ProbeMatches(struct soap *soap, struct __wsdd__ProbeMatches *_param_1)

{

soap_default___wsdd__ProbeMatches(soap, _param_1);

soap_begin(soap);

if (soap_begin_recv(soap)

|| soap_envelope_begin_in(soap)

|| soap_recv_header(soap)

|| soap_body_begin_in(soap))

return soap_closesock(soap);

soap_get___wsdd__ProbeMatches(soap, _param_1, "-wsdd:ProbeMatches", NULL);

if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)

soap->error = SOAP_OK;

if (soap->error

|| soap_body_end_in(soap)

|| soap_envelope_end_in(soap)

|| soap_end_recv(soap))

return soap_closesock(soap);

return soap_closesock(soap);

}

int main()  

{  

struct soap *soap;

struct wsdd__ProbeType req; 

struct __wsdd__ProbeMatches resp;

struct wsdd__ScopesType sScope;

struct SOAP_ENV__Header header;

int count = 0;

int result = 0; 


char guid_string[100];


soap = soap_new(); 

if (soap == NULL)

{

return -1;

}

 

soap_set_namespaces(soap, namespaces); 


soap->recv_timeout = 3; //超過x秒鐘沒有數據就退出

soap_default_SOAP_ENV__Header(soap, &header);

 

header.wsa__MessageID = guid_string;

header.wsa__To = "urn:schemas-xmlsoap-org:ws:2005:04:discovery";

header.wsa__Action = "http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe";

soap->header = &header;


soap_default_wsdd__ScopesType(soap, &sScope);

sScope.__item = "";

soap_default_wsdd__ProbeType(soap, &req);

req.Scopes = &sScope;

req.Types = "dn:NetworkVideoTransmitter";

  

  result = soap_send___wsdd__Probe(soap, "soap.udp://239.255.255.250:3702", NULL, &req);

int i = 0,nFindDev=0;

while (i++<10)

{

printf("soap_discovery_recv...\n");

result = soap_recv___wsdd__ProbeMatches(soap,&resp);

if (result == SOAP_OK)

{


if (!(soap->header))

{

printf("continue++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");

continue;

}

nFindDev++;


cout << "=========================================" << endl;

 

cout << "Match size:" << resp.wsdd__ProbeMatches->__sizeProbeMatch << endl;

cout << "xsd-unsignedInt:" << resp.wsdd__ProbeMatches->ProbeMatch->MetadataVersion << endl;

cout << "scopes item:" << resp.wsdd__ProbeMatches->ProbeMatch->Scopes->__item << endl;

cout << "QName:" << resp.wsdd__ProbeMatches->ProbeMatch->Types << endl;

cout << "xsd:string:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.Address << endl;

cout << "xsd:QName:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.PortType << endl;

cout << "wsa:ServiceNameType:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.ServiceName << endl;

cout << "sequence of elements:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.__size << endl;

cout << "xsd:anyType:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.__anyAttribute << endl;

cout << "endpoint any:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.__any << endl;

cout << "wsdd:UriListType:" << resp.wsdd__ProbeMatches->ProbeMatch->XAddrs << endl;


}

else

printf("2soap error: %d, %s, %s@@@@@@@@@@@\n", soap->error, *soap_faultcode(soap), *soap_faultstring(soap)); 

break;



}

printf("exit while,find dev:%d\n", nFindDev);

// remove deserialized class instances (C++ only)

soap_destroy(soap);


// clean up and remove deserialized data

soap_end(soap); 


////////////////////////////////////////////////////////////////////////////

soap_free(soap);//detach and free runtime context

soap_done(soap); // detach context (last use and no longer in scope)

  

    return result;   





向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

额尔古纳市| 即墨市| 施甸县| 黎城县| 丰原市| 孟州市| 阳朔县| 大石桥市| 新营市| 清徐县| 鱼台县| 清水河县| 调兵山市| 石狮市| 田东县| 扶绥县| 崇左市| 开平市| 彝良县| 赤壁市| 上虞市| 扶余县| 根河市| 雷波县| 修武县| 射阳县| 定日县| 阳信县| 外汇| 邳州市| 神木县| 沁阳市| 天水市| 平度市| 崇文区| 常山县| 赣州市| 合山市| 黑水县| 奇台县| 虎林市|