1.pThreadPool->QueueRequest((int (*)(void*))Inspection_Action, pSInspectionDevice);
2.void * Inspection_Action(void * arg)
3.调用 _CInspection.InspectionStart
else if (strDeviceModel == "MA5680T" )
{
CInspectionMA5680T _CInspection;
_CInspection.setDeviceInfo(_SInspectionDevice);
_CInspection.InspectionStart(_v_Cmd_t);
}
4.int CInspectionMA5680T::InspectionStart(SCmd _SCmd){
MapTelnetInfo _MapTelnetInfo;
int iRet = GetInspectionTelnetInfo(_MapTelnetInfo);
....
}
5.int CInspectionMA5680T::GetInspectionTelnetInfo(MapTelnetInfo &_MapTelnetInfo){
CIfTelnet *cit = new CIfTelnet;
iRet = cit->TelnetConnect(...);
if(0 == iRet){
...cit->SendCommand(....);
}
}
数据结构:
struct SCmd
{
int m_iCmdCode;
string m_strCmdDesc;
string m_strCmdType;
v_Threshold_t m_vThreshold;
};
kafka--消息,
webservice-xml,
socket-自定义消息
restful-json
soap-xml
自定义-socket
SOAP与REST-API的区别