void MainForm::changeEquipmentStatus(int index,int labelIndex,int data){ if(index<equipmentsList.length()){ EquipmentWidget*e=equipmentsList.at(index); if(e->updateLableValue(labelIndex,data)){ addLogInfo(index,labelIndex,data,""); } if(labelIndex==2&&data>0){ linkHostFailCount++; if(linkHostFailCount>Config::linkHostFailMaxCount){ ui->widget_8->setLinkStatu(1,true); } }else if(labelIndex==2&&data==0){ linkHostFailCount=0; ui->widget_8->setLinkStatu(1,false); } } }
bool CLogThread::queueLog(IEspContext & context,const char* serviceName, const char* request, const char* response) { IProperties* pProperties = context.queryRequestParameters(); StringBuffer UserID, UserRealm, UserReference, peer; if(pProperties != NULL && pProperties->hasProp("userid_")) UserID.appendf("%s",pProperties->queryProp("userid_")); else context.getUserID(UserID); if(pProperties != NULL && pProperties->hasProp("fqdn_")) UserRealm.appendf("%s",pProperties->queryProp("fqdn_")); else context.getRealm(UserRealm); Owned<IPropertyTree> pLogTreeInfo = createPTreeFromXMLString(request, ipt_none, ptr_none); IArrayOf<IEspLogInfo> LogArray; addLogInfo(LogArray, *pLogTreeInfo.get()); if(pProperties != NULL && pProperties->hasProp("referencecode_")) { //lets manually add the reference number.... IClientLogInfo& LogInfoTransaction = addLogInfoElement(LogArray); LogInfoTransaction.setName("referencenumber"); LogInfoTransaction.setValue(pProperties->queryProp("referencecode_")); } LOG_INFO _LogStruct(serviceName,-1,false); return queueLog(UserID.str(), UserRealm.str() , context.getPeer(peer).str(),_LogStruct, LogArray ); }
bool CLogThread::queueLog(const char *user, const char *realm, const char *peer, const char* serviceName,const char* GUID, int RecordsReturned, IPropertyTree& logInfo) { IArrayOf<IEspLogInfo> LogArray; addLogInfo(LogArray, logInfo); LOG_INFO _LogInfo(serviceName,GUID, RecordsReturned,false); return queueLog(user, realm, peer, _LogInfo, LogArray); }
bool CLogThread::queueLog(IEspContext & context,const char* serviceName,int RecordsReturned,bool bBlind,bool bEncrypt, IArrayOf<IEspLogInfo>& LogArray, IInterface& logInfo, IConstModelLogInformation* pModelLogInfo) { LOG_INFO _LogStruct(serviceName,RecordsReturned,bBlind); _LogStruct.Encrypt = bEncrypt; serializeRequest(context,logInfo,_LogStruct.RequestStr); Owned<IPropertyTree> pLogTreeInfo = createPTreeFromXMLString(_LogStruct.RequestStr.str(), ipt_none, ptr_none); addLogInfo(LogArray,*pLogTreeInfo.get()); return queueLog(context,_LogStruct, LogArray,pModelLogInfo); }
bool MainForm::changeEquipmentStatusById(int id,int labelIndex,int data){ for(int i=0;i<ConfigXml::addrs.length();i++){ if(ConfigXml::addrs.at(i)->slaveId==id){ EquipmentWidget*e=this->equipmentsList.at(i); if(e->updateLableValue(labelIndex,data)){ addLogInfo(i,labelIndex,data,""); } } } }
bool CLogThread::queueLog(IEspContext & context,LOG_INFO& _LogStruct, IArrayOf<IEspLogInfo>& LogArray, IPropertyTree& logInfo) { //This appends the tree structure into the correct format... addLogInfo(LogArray,logInfo); return queueLog(context,_LogStruct, LogArray); ; }