private CSTAEventCause_t ReadCause(IStructReader reader) { try { logger.Info("CSTAConferencedParser.ReadCause: BaseStream.Position={0};BaseStream.Length={1};", reader.BaseStream.Position, reader.BaseStream.Length); if ((reader.BaseStream.Length - reader.BaseStream.Position) >= 4) { logger.Info("CSTAConferencedParser.ReadCause: read event cause from stream..."); int value = reader.ReadInt32(); logger.Info("CSTAConferencedParser.ReadCause: value={0}", value); if (Enum.IsDefined(typeof(CSTAEventCause_t), value)) { CSTAEventCause_t cause = (CSTAEventCause_t)value; logger.Info("CSTAConferencedParser.ReadCause: cause={0}", cause); return(cause); } } } catch (Exception err) { logger.Error(string.Format("Error in CSTAConferencedParser.ReadCause: {0}", err)); } return(CSTAEventCause_t.EC_NONE); }
public ATTEvent_t Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { logger.Info("ATTLoggedOnParser.Parse: eventType=ATT_LOGGED_ON"); object result; if (reader.TryReadStruct(typeof(ATTLoggedOnEvent_t), out result)) { logger.Info("ATTLoggedOnParser.Parse: successfully read LoggedOn event!"); ATTLoggedOnEvent_t loggedOnEvent = (ATTLoggedOnEvent_t)result; logger.Info("ATTLoggedOnParser.Parse: loggedOnEvent.workMode={0}", loggedOnEvent.workMode); ATTEvent_t attEvent = new ATTEvent_t() { eventType = (ushort)eventType }; attEvent.u.loggedOnEvent = loggedOnEvent; return(attEvent); } } catch (Exception err) { logger.Error(string.Format("Error in ATTLoggedOnParser.Parse: {0}", err)); } return(null); }
public CSTAConfirmationEvent Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { object result; logger.Info("CSTAQueryDndConfParser.Parse: eventType=CSTA_QUERY_DND_CONF"); logger.Info("CSTAQueryDndConfParser.Parse: try to read the CSTAQueryDndConfEvent_t confirmation event..."); if (reader.TryReadStruct(typeof(CSTAQueryDndConfEvent_t), out result)) { logger.Info("CSTAQueryDndConfParser.Parse: successfully read the CSTAQueryDndConfEvent_t confirmation event!"); CSTAQueryDndConfEvent_t queryDnd = (CSTAQueryDndConfEvent_t)result; CSTAConfirmationEvent cstaConfirmation = new CSTAConfirmationEvent { u = { queryDnd = queryDnd } }; return(cstaConfirmation); } } catch (Exception err) { logger.Error(string.Format("Error in CSTAQueryDndConfParser.Parse: {0}", err)); } return(null); }
public CSTAUnsolicitedEvent Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { object result; logger.Info("CSTANetworkReachedParser.Parse: eventType=CSTA_NETWORK_REACHED"); logger.Info("CSTANetworkReachedParser.Parse: try to read the CSTANetworkReachedEvent_t unsolicited event..."); if (reader.TryReadStruct(typeof(CSTANetworkReachedEvent_t), out result)) { logger.Info("CSTANetworkReachedParser.Parse: successfully read the CSTANetworkReachedEvent_t unsolicited event!"); CSTANetworkReachedEvent_t networkReached = (CSTANetworkReachedEvent_t)result; CSTAUnsolicitedEvent cstaUnsolicited = new CSTAUnsolicitedEvent { u = { networkReached = networkReached } }; return(cstaUnsolicited); } } catch (Exception err) { logger.Error(string.Format("Error in CSTANetworkReachedParser.Parse: {0}", err)); } return(null); }
public CSTAConfirmationEvent Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { object result; logger.Info("CSTAMakePredictiveCallConfParser.Parse: eventType=CSTA_MAKE_PREDICTIVE_CALL_CONF"); logger.Info("CSTAMakePredictiveCallConfParser.Parse: try to read the CSTAMakePredictiveCallConfEvent_t confirmation event..."); if (reader.TryReadStruct(typeof(CSTAMakePredictiveCallConfEvent_t), out result)) { logger.Info("CSTAMakePredictiveCallConfParser.Parse: successfully read the CSTAMakePredictiveCallConfEvent_t confirmation event!"); CSTAMakePredictiveCallConfEvent_t makePredictiveCall = (CSTAMakePredictiveCallConfEvent_t)result; CSTAConfirmationEvent cstaConfirmation = new CSTAConfirmationEvent { u = { makePredictiveCall = makePredictiveCall } }; return(cstaConfirmation); } } catch (Exception err) { logger.Error(string.Format("Error in CSTAMakePredictiveCallConfParser.Parse: {0}", err)); } return(null); }
public ATTEvent_t Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { logger.Info("ATTSingleStepTransferCallConfParser.Parse: eventType=ATT_SINGLE_STEP_TRANSFER_CALL_CONF"); object result; if (reader.TryReadStruct(typeof(ATTSingleStepTransferCallConfEvent_t), out result)) { ATTSingleStepTransferCallConfEvent_t ssTransferCallConf = (ATTSingleStepTransferCallConfEvent_t)result; ATTEvent_t attEvent = new ATTEvent_t() { eventType = (ushort)eventType }; attEvent.u.ssTransferCallConf = ssTransferCallConf; return(attEvent); } } catch (Exception err) { logger.Error(string.Format("Error in ATTSingleStepTransferCallConfParser.Parse: {0}", err)); } return(null); }
public ATTEvent_t Parse(IStructReader reader) { try { logger.Info("ATTConnectionClearedParser.Parse: eventType=ATT_CONNECTION_CLEARED"); ATTConnectionClearedEvent_t connectionCleared = new ATTConnectionClearedEvent_t { userInfo = ReadUserToUserInfo(reader), deviceHistory = ReadDeviceHistory(reader) }; ATTEvent_t attEvent = new ATTEvent_t() { eventType = (ushort)eventType }; attEvent.u.connectionCleared = connectionCleared; return(attEvent); } catch (Exception err) { logger.Error(string.Format("Error in ATTConnectionClearedParser.Parse: {0}", err)); } return(null); }
public CSTAUnsolicitedEvent Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { object result; logger.Info("CSTAEstablishedParser.Parse: eventType=CSTA_ESTABLISHED"); logger.Info("CSTAEstablishedParser.Parse: try to read the CSTAEstablishedEvent_t unsolicited event..."); if (reader.TryReadStruct(typeof(CSTAEstablishedEvent_t), out result)) { logger.Info("CSTAEstablishedParser.Parse: successfully read the CSTAEstablishedEvent_t unsolicited event!"); CSTAEstablishedEvent_t established = (CSTAEstablishedEvent_t)result; logger.Info("CSTAEstablishedParser.Parse: answeringDevice=" + established.answeringDevice.deviceID.device + ";callingDevice=" + established.callingDevice.deviceID.device + ";calledDevice=" + established.calledDevice.deviceID.device + ";"); CSTAUnsolicitedEvent cstaUnsolicited = new CSTAUnsolicitedEvent { u = { established = established } }; return(cstaUnsolicited); } } catch (Exception err) { logger.Error(string.Format("Error in CSTAEstablishedParser.Parse: {0}", err)); } return(null); }
public ATTEvent_t Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { logger.Info("ATTMonitorStopOnCallConfParser.Parse: eventType=ATT_MONITOR_STOP_ON_CALL_CONF"); object result; if (reader.TryReadStruct(typeof(ATTMonitorStopOnCallConfEvent_t), out result)) { ATTMonitorStopOnCallConfEvent_t monitorStopOnCall = (ATTMonitorStopOnCallConfEvent_t)result; ATTEvent_t attEvent = new ATTEvent_t() { eventType = (ushort)eventType }; attEvent.u.monitorStopOnCall = monitorStopOnCall; return(attEvent); } } catch (Exception err) { logger.Error(string.Format("Error in ATTMonitorStopOnCallConfParser.Parse: {0}", err)); } return(null); }
private ATTUCID_t ReadUCID(IStructReader reader) { try { object result; logger.Info("ATTConferencedParser.ReadUCID: read ATTUCID_t from stream..."); if (reader.TryReadStruct(typeof(ATTUCID_t), out result)) { logger.Info("ATTConferencedParser.ReadUCID: successfully read the ATTUCID_t!"); ATTUCID_t ucid = (ATTUCID_t)result; logger.Info("ATTConferencedParser.ReadUCID: ucid={0};", ucid.value); return(ucid); } } catch (Exception err) { logger.Error(string.Format("Error in ATTConferencedParser.ReadUCID: {0}", err)); } return(new ATTUCID_t()); }
private CalledDeviceID_t ReadDistributingVDN(IStructReader reader) { try { object result; logger.Info("ATTConferencedParser.ReadDistributingVDN: read CalledDeviceID_t from stream..."); if (reader.TryReadStruct(typeof(CalledDeviceID_t), out result)) { logger.Info("ATTConferencedParser.ReadDistributingVDN: successfully read the CalledDeviceID_t!"); CalledDeviceID_t distributingVDN = (CalledDeviceID_t)result; logger.Info("ATTConferencedParser.ReadDistributingVDN: distributingVDN.deviceID={0};distributingVDN.deviceIDType={1};distributingVDN.deviceIDStatus={2};", distributingVDN.value.deviceID.device, distributingVDN.value.deviceIDType, distributingVDN.value.deviceIDStatus); return(distributingVDN); } } catch (Exception err) { logger.Error(string.Format("Error in ATTConferencedParser.ReadDistributingVDN: {0}", err)); } return(new CalledDeviceID_t()); }
public ATTEvent_t Parse(IStructReader reader) { try { logger.Info("ATTConferencedParser.Parse: eventType=ATT_CONFERENCED"); ATTConferencedEvent_t conferencedEvent = new ATTConferencedEvent_t { originalCallInfo = ReadOriginalCallInfo(reader), distributingDevice = ReadDistributingDevice(reader), ucid = ReadUCID(reader), trunkList = ReadTrunkList(reader), deviceHistory = ReadDeviceHistory(reader), distributingVDN = ReadDistributingVDN(reader) }; ATTEvent_t attEvent = new ATTEvent_t() { eventType = (ushort)eventType }; attEvent.u.conferencedEvent = conferencedEvent; return(attEvent); } catch (Exception err) { logger.Error(string.Format("Error in ATTConferencedParser.Parse: {0}", err)); } return(null); }
public CSTAUnsolicitedEvent Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { object result; logger.Info("CSTAMessageWaitingParser.Parse: eventType=CSTA_MESSAGE_WAITING"); logger.Info("CSTAMessageWaitingParser.Parse: try to read the CSTAMessageWaitingEvent_t unsolicited event..."); if (reader.TryReadStruct(typeof(CSTAMessageWaitingEvent_t), out result)) { logger.Info("CSTAMessageWaitingParser.Parse: successfully read the CSTAMessageWaitingEvent_t unsolicited event!"); CSTAMessageWaitingEvent_t messageWaiting = (CSTAMessageWaitingEvent_t)result; CSTAUnsolicitedEvent cstaUnsolicited = new CSTAUnsolicitedEvent { u = { messageWaiting = messageWaiting } }; return(cstaUnsolicited); } } catch (Exception err) { logger.Error(string.Format("Error in CSTAMessageWaitingParser.Parse: {0}", err)); } return(null); }
private ConnectionID_t ReadSecondaryOldCall(IStructReader reader) { try { object result; logger.Info("CSTAConferencedParser.ReadSecondaryOldCall: try to read secondary old call from stream..."); if (reader.TryReadStruct(typeof(ConnectionID_t), out result)) { logger.Info("CSTAConferencedParser.ReadSecondaryOldCall: successfully read secondary old call from stream!"); ConnectionID_t secondaryOldCall = (ConnectionID_t)result; logger.Info("CSTAConferencedParser.ReadSecondaryOldCall: secondaryOldCall.callID={0};secondaryOldCall.deviceID.device={1};secondaryOldCall.devIDType={2};", secondaryOldCall.callID, secondaryOldCall.deviceID.device, secondaryOldCall.devIDType); return(secondaryOldCall); } } catch (Exception err) { logger.Error(string.Concat("Error in CSTAConferencedParser.ReadSecondaryOldCall: ", err.ToString())); } return(new ConnectionID_t()); }
public CSTAConfirmationEvent Parse(IStructReader reader) { try { logger.Info("CSTAConferenceCallConfParser.Parse: eventType=CSTA_CONFERENCE_CALL_CONF"); CSTAConferenceCallConfEvent_t conferenceCall = new CSTAConferenceCallConfEvent_t { newCall = ReadNewCall(reader), connList = ReadConnList(reader) }; CSTAConfirmationEvent cstaConfirmation = new CSTAConfirmationEvent { u = { conferenceCall = conferenceCall } }; return(cstaConfirmation); } catch (Exception err) { logger.Error(string.Concat("Error in CSTAConferenceCallConfParser.Parse: ", err.ToString())); } return(null); }
public CSTAConfirmationEvent Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { object result; logger.Info("CSTASetAgentStateConfParser.Parse: eventType=CSTA_SET_AGENT_STATE_CONF"); logger.Info("CSTASetAgentStateConfParser.Parse: try to read the CSTASetAgentStateConfEvent_t confirmation event..."); if (reader.TryReadStruct(typeof(CSTASetAgentStateConfEvent_t), out result)) { logger.Info("CSTASetAgentStateConfParser.Parse: successfully read the CSTASetAgentStateConfEvent_t confirmation event!"); CSTASetAgentStateConfEvent_t setAgentState = (CSTASetAgentStateConfEvent_t)result; CSTAConfirmationEvent cstaConfirmation = new CSTAConfirmationEvent { u = { setAgentState = setAgentState } }; return(cstaConfirmation); } return(null); } catch (Exception err) { logger.Error(string.Format("Error in CSTASetAgentStateConfParser.Parse: {0}", err)); } return(null); }
private ConnectionID_t ReadNewCall(IStructReader reader) { try { object result; logger.Info("CSTAConferenceCallConfParser.ReadNewCall: try to read new call from stream..."); if (reader.TryReadStruct(typeof(ConnectionID_t), out result)) { logger.Info("CSTAConferenceCallConfParser.ReadNewCall: successfully read new call from stream!"); ConnectionID_t newCall = (ConnectionID_t)result; logger.Info("CSTAConferenceCallConfParser.ReadNewCall: newCall.callID={0};newCall.deviceID.device={1};newCall.devIDType={2};", newCall.callID, newCall.deviceID.device, newCall.devIDType); return(newCall); } } catch (Exception err) { logger.Error(string.Format("Error in CSTAConferenceCallConfParser.ReadNewCall: {0}", err)); } return(new ConnectionID_t()); }
public ATTEvent_t Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { logger.Info("ATTChargeAdviceParser.Parse: eventType=ATT_CHARGE_ADVICE"); object result; if (reader.TryReadStruct(typeof(ATTChargeAdviceEvent_t), out result)) { ATTChargeAdviceEvent_t chargeAdviceEvent = (ATTChargeAdviceEvent_t)result; ATTEvent_t attEvent = new ATTEvent_t() { eventType = (ushort)eventType }; attEvent.u.chargeAdviceEvent = chargeAdviceEvent; return(attEvent); } } catch (Exception err) { logger.Error(string.Format("Error in ATTChargeAdviceParser.Parse: {0}", err)); } return(null); }
public ACSConfirmationEvent Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { logger.Info("ACSOpenStreamConfParser.Parse: eventType=ACS_OPEN_STREAM_CONF"); logger.Info("ACSOpenStreamConfParser.Parse: try to read the ACSOpenStreamConfEvent_t confirmation event..."); object result; if (reader.TryReadStruct(typeof(ACSOpenStreamConfEvent_t), out result)) { logger.Info("ACSOpenStreamConfParser.Parse: successfully read the ACSOpenStreamConfEvent_t confirmation event!"); ACSOpenStreamConfEvent_t acsopen = (ACSOpenStreamConfEvent_t)result; ACSConfirmationEvent acsConfirmation = new ACSConfirmationEvent(); acsConfirmation.u.acsopen = acsopen; return(acsConfirmation); } return(null); } catch (Exception err) { logger.Error(string.Format("Error in ACSOpenStreamConfParser.Parse: {0}", err)); } return(null); }
private DeviceID_t ReadTrunkMember(IStructReader reader) { try { object result; logger.Info("ATTNetworkReachedParser.ReadTrunkMember: read DeviceID_t from stream..."); if (reader.TryReadStruct(typeof(DeviceID_t), out result)) { logger.Info("ATTNetworkReachedParser.ReadTrunkMember: successfully read the DeviceID_t!"); DeviceID_t trunkMember = (DeviceID_t)result; logger.Info("ATTNetworkReachedParser.ReadTrunkMember: trunkMember.Device={0}", trunkMember.device); return(trunkMember); } } catch (Exception err) { logger.Error(string.Format("Error in ATTNetworkReachedParser.ReadTrunkMember: {0}", err)); } return(new DeviceID_t()); }
private ATTUserToUserInfo_t ReadUserToUserInfo(IStructReader reader) { try { object result; logger.Info("ATTConnectionClearedParser.ReadUserToUserInfo: try to read user to user info from stream..."); if (reader.TryReadStruct(typeof(ATTUserToUserInfo_t), out result)) { logger.Info("ATTConnectionClearedParser.ReadUserToUserInfo: successfully read user to user info from stream!"); ATTUserToUserInfo_t userInfo = (ATTUserToUserInfo_t)result; logger.Info("ATTConnectionClearedParser.ReadUserToUserInfo: userInfo.type={0};userInfo.length={1};userInfo.data={2};", userInfo.type, userInfo.length, Encoding.Default.GetString(userInfo.data)); return(userInfo); } } catch (Exception err) { logger.Error(string.Format("Error in ATTConnectionClearedParser.ReadUserToUserInfo: {0}", err)); } return(new ATTUserToUserInfo_t()); }
public ATTEvent_t Parse(IStructReader reader) { try { logger.Info("ATTNetworkReachedParser.Parse: eventType=ATT_NETWORK_REACHED"); ATTNetworkReachedEvent_t networkReachedEvent = new ATTNetworkReachedEvent_t { progressLocation = ReadProgressLocation(reader), progressDescription = ReadProgressDescription(reader), trunkGroup = ReadTrunkGroup(reader), trunkMember = ReadTrunkMember(reader), deviceHistory = ReadDeviceHistory(reader) }; ATTEvent_t attEvent = new ATTEvent_t() { eventType = (ushort)eventType }; attEvent.u.networkReachedEvent = networkReachedEvent; return(attEvent); } catch (Exception err) { logger.Error(string.Format("Error in ATTNetworkReachedParser.Parse: {0}", err)); } return(null); }
public ATTEvent_t Parse(IStructReader reader) { try { logger.Info("ATTDivertedParser.Parse: eventType=ATT_DIVERTED"); ATTDivertedEvent_t divertedEvent = new ATTDivertedEvent_t { deviceHistory = ReadDeviceHistory(reader) }; ATTEvent_t attEvent = new ATTEvent_t() { eventType = (ushort)eventType }; attEvent.u.divertedEvent = divertedEvent; return(attEvent); } catch (Exception err) { logger.Error(string.Format("Error in ATTDivertedParser.Parse: {0}", err)); } return(null); }
private ATTProgressDescription_t ReadProgressDescription(IStructReader reader) { try { ATTProgressDescription_t progressDescription = new ATTProgressDescription_t(); logger.Info("ATTNetworkReachedParser.ReadProgressDescription: read progress description..."); int intProgressDescription = reader.ReadInt32(); logger.Info("ATTNetworkReachedParser.ReadProgressDescription: ProgressDescription={0}", intProgressDescription); if (Enum.IsDefined(typeof(ATTProgressDescription_t), intProgressDescription)) { progressDescription = (ATTProgressDescription_t)intProgressDescription; logger.Info("ATTNetworkReachedParser.ReadProgressDescription: progressDescription={0}", progressDescription); } return(progressDescription); } catch (Exception err) { logger.Error(string.Format("Error in ATTNetworkReachedParser.ReadProgressDescription: {0}", err)); } return(ATTProgressDescription_t.PD_NONE); }
public ATTEvent_t Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { logger.Info("ATTTransferCallConfParser.Parse: eventType=ATT_TRANSFER_CALL_CONF"); object result; if (reader.TryReadStruct(typeof(ATTTransferCallConfEvent_t), out result)) { logger.Info("ATTTransferCallConfParser.Parse: successfully read transfer call confirmation event!"); ATTTransferCallConfEvent_t transferCall = (ATTTransferCallConfEvent_t)result; logger.Info("ATTTransferCallConfParser.Parse: transferCall.ucid.value={0};", transferCall.ucid.value); ATTEvent_t attEvent = new ATTEvent_t() { eventType = (ushort)eventType }; attEvent.u.transferCall = transferCall; return(attEvent); } } catch (Exception err) { logger.Error(string.Format("Error in ATTTransferCallConfParser.Parse: {0}", err)); } return(null); }
public ATTEvent_t Parse(IStructReader reader) { try { logger.Info("ATTSingleStepConferenceCallConfParser.Parse: eventType=ATT_SINGLE_STEP_CONFERENCE_CALL_CONF"); ATTSingleStepConferenceCallConfEvent_t ssconference = new ATTSingleStepConferenceCallConfEvent_t { newCall = ReadNewCall(reader), connList = ReadConnList(reader), ucid = ReadUCID(reader) }; ATTEvent_t attEvent = new ATTEvent_t(); attEvent.u.ssconference = ssconference; return(attEvent); } catch (Exception err) { logger.Error(string.Format("Error in ATTSingleStepConferenceCallConfParser.Parse: {0}", err)); } return(null); }
public CSTAUnsolicitedEvent Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { object result; logger.Info("CSTACallInformationParser.Parse: eventType=CSTA_CALL_INFORMATION"); logger.Info("CSTACallInformationParser.Parse: try to read the CSTACallInformationEvent_t unsolicited event..."); if (reader.TryReadStruct(typeof(CSTACallInformationEvent_t), out result)) { logger.Info("CSTACallInformationParser.Parse: successfully read the CSTACallInformationEvent_t unsolicited event!"); CSTACallInformationEvent_t callInformation = (CSTACallInformationEvent_t)result; CSTAUnsolicitedEvent cstaUnsolicited = new CSTAUnsolicitedEvent { u = { callInformation = callInformation } }; return(cstaUnsolicited); } } catch (Exception err) { logger.Error(string.Format("Error in CSTACallInformationParser.Parse: {0}", err)); } return(null); }
public CSTAUnsolicitedEvent Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { object result; logger.Info("CSTABackInServiceParser.Parse: eventType=CSTA_BACK_IN_SERVICE"); logger.Info("CSTABackInServiceParser.Parse: try to read the CSTABackInServiceEvent_t unsolicited event..."); if (reader.TryReadStruct(typeof(CSTABackInServiceEvent_t), out result)) { logger.Info("CSTABackInServiceParser.Parse: successfully read the CSTABackInServiceEvent_t unsolicited event!"); CSTABackInServiceEvent_t backInService = (CSTABackInServiceEvent_t)result; CSTAUnsolicitedEvent cstaUnsolicited = new CSTAUnsolicitedEvent { u = { backInService = backInService } }; return(cstaUnsolicited); } } catch (Exception err) { logger.Error(string.Format("Error in CSTABackInServiceParser.Parse: {0}", err)); } return(null); }
public ATTEvent_t Parse(IStructReader reader) { Logger logger = LogManager.GetLogger("TSAPIClient"); try { logger.Info("ATTQueryTgConfParser.Parse: eventType=ATT_QUERY_TG_CONF"); object result; if (reader.TryReadStruct(typeof(ATTQueryTgConfEvent_t), out result)) { ATTQueryTgConfEvent_t queryTg = (ATTQueryTgConfEvent_t)result; ATTEvent_t attEvent = new ATTEvent_t() { eventType = (ushort)eventType }; attEvent.u.queryTg = queryTg; return(attEvent); } } catch (Exception err) { logger.Error(string.Format("Error in ATTQueryTgConfParser.Parse: {0}", err)); } return(null); }
private LocalConnectionState_t ReadLocalConnectionInfo(IStructReader reader) { try { logger.Info("CSTAConferencedParser.ReadLocalConnectionInfo: BaseStream.Position={0};BaseStream.Length={1};", reader.BaseStream.Position, reader.BaseStream.Length); if ((reader.BaseStream.Length - reader.BaseStream.Position) >= 4) { logger.Info("CSTAConferencedParser.ReadLocalConnectionInfo: read local connection state from stream..."); int value = reader.ReadInt32(); logger.Info("CSTAConferencedParser.ReadLocalConnectionInfo: value={0}", value); if (Enum.IsDefined(typeof(LocalConnectionState_t), value)) { LocalConnectionState_t localConnectionInfo = (LocalConnectionState_t)value; logger.Info("CSTAConferencedParser.ReadLocalConnectionInfo: localConnectionInfo={0}", localConnectionInfo); return(localConnectionInfo); } } } catch (Exception err) { logger.Error(string.Format("Error in CSTAConferencedParser.ReadLocalConnectionInfo: {0}", err)); } return(LocalConnectionState_t.CS_NONE); }