//override string ExecData::createSendData() { string sendData; sendData += createStartTag(TAG_EXECDATA); if (mAppId != "") { sendData += createTag(TAG_APPID, mAppId); } stringstream ss; if (mStartTime != 0) { ss << mStartTime; sendData += createTag(TAG_STARTTIME, ss.str()); ss.clear(); ss.str(""); } if (mExecTime != 0) { ss << mExecTime; sendData += createTag(TAG_EXECTIME, ss.str()); ss.clear(); ss.str(""); } if (mDeviceName[0] != "") { sendData += createTag(TAG_DEVICENAME_SELECTED, mDeviceName[0]); } if (mDeviceName[1] != "") { sendData += createTag(TAG_DEVICENAME, mDeviceName[1]); } if (mDeviceType[0] != 0) { ss << mDeviceType[0]; sendData += createTag(TAG_DEVICETYPE_SELECTED, ss.str()); ss.clear(); ss.str(""); } if (mDeviceType[1] != 0) { ss << mDeviceType[1]; sendData += createTag(TAG_DEVICETYPE, ss.str()); ss.clear(); ss.str(""); } if(mKernelNum != 0){ ss << mKernelNum; sendData += createTag(TAG_KERNELNUM, ss.str()); ss.clear(); ss.str(""); } //kernellist if (mKernelCodeList.size() != 0) { sendData += createStartTag(TAG_KERNELLIST); for (int i = 0; i < mKernelCodeList.size(); i++) { sendData += mKernelCodeList[i].createSendData(); } sendData += createEndTag(TAG_KERNELLIST); } sendData += createEndTag(TAG_EXECDATA); return sendData; }
string SocketData::createSendData(){ string sendData; sendData += createStartTag(TAG_SOCKETDATA); sendData += mSignal.createSendData(); sendData += createTag(TAG_SOCKETNAME, mName); if(mData != "") sendData += createTag(TAG_DATA, mData); sendData += mExecData.createSendData(); sendData += createEndTag(TAG_SOCKETDATA); return sendData; }
//override string KernelCode::createSendData() { string sendData; sendData += createStartTag(TAG_KERNEL); if (mName != "") sendData += createTag(TAG_KERNELNAME, mName); if (mHash != "") sendData += createTag(TAG_KERNELHASH, mHash); if (mFuncNum != 0) { stringstream ss; ss << mFuncNum; sendData += createTag(TAG_FUNCNUM, ss.str()); } //funclist sendData += createStartTag(TAG_FUNCLIST); for (int i = 0; i < mFuncDataList.size(); i++) { sendData += mFuncDataList[i].createSendData(); } sendData += createEndTag(TAG_FUNCLIST); sendData += createEndTag(TAG_KERNEL); return sendData; }