private bool DoBlowingEvent(int iIdxInPointLi) { bool bErg = false; try { BlowingEvent evBlowing = new BlowingEvent(); evBlowing.iCnvNr = pointLi[iIdxInPointLi].iCnvNr; j = findPoint("O2VOL_TOTAL",pointLi[iIdxInPointLi].iCnvNr); if (j >= 0) { evBlowing.O2TotalVol = pointLi[j].iDataValue; j = findPoint("BLOWING",pointLi[iIdxInPointLi].iCnvNr); if (j >= 0) { evBlowing.BlowingFlag = pointLi[j].iDataValue; sLfdEvtMsg = evBlowing.ToString(); mainGate.PushEvent(evBlowing); AddLogg(evBlowing.ToString()); bErg = true; } else { AddLogg("При BlowingEvent не найдена точка K" + pointLi[iIdxInPointLi].iCnvNr + " BLOWING"); } } else { AddLogg("При BlowingEvent не найдена точка K" + pointLi[iIdxInPointLi].iCnvNr + " O2VOL_TOTAL"); } } catch (Exception eXc) { sLfdEvtErr = eXc.Message; AddLogg("При BlowingEvent K" + pointLi[iIdxInPointLi].iCnvNr + " Exception: " + eXc.Message); } return bErg; }
public static int ReceiveMessage(string message) { BaseEvent be = new BlowingEvent(); m_message = new UDPMessage(); m_message = (UDPMessage) new SerializeTools().RestoreFromString(message, typeof (UDPMessage)); be = m_message.RestoreEventClass(BaseEvent.GetEvents()); InstantLogger.log(message, "", InstantLogger.TypeMessage.normal); InstantLogger.log(be.ToString(), "", InstantLogger.TypeMessage.normal); return 0; }