/// <summary> /// /// </summary> /// <param name="modem"></param> /// <param name="state"></param> private void modemGenericEventHandler(IModem modem, comm.consts.modemState state) { //if (this.shareStatus != null) { // this.shareStatus(this, string.Format("{0} - {1}", modem.name, state.ToString()), common.logger.logLevel.Information); //} this.doShareStatus(string.Format("{0} - {1}", modem.name, state.ToString()), common.logger.logLevel.Information); }
/// <summary> /// /// </summary> /// <param name="modem"></param> /// <param name="e"></param> private void modemSignalChanged(IModem modem, modemSingnalChangesEventArgs e) { if (this.signalShanged != null) { this.signalShanged(modem, e); } }
/// <summary> /// /// </summary> /// <param name="modem"></param> /// <param name="smsPublished"></param> private void doPublishedSMS(IModem modem, sms smsPublished) { if (this.publishingSMS != null) { this.publishingSMS(this, modem, smsPublished); } }
private string strChallengePhrase = ""; // Challenge phrase as received by ;PQ: command public ProtocolInitial(IModem Parent, ref TChannelProperties strNewChannel) { ObjModem = Parent; stcChannel = strNewChannel; Globals.strConnectedCallsign = strNewChannel.RemoteCallsign; // Set the global callsign for use by Radar Globals.strConnectedGridSquare = ""; // and clear the connected Grid square strSID = "[Paclink-" + Application.ProductVersion + "-" + SSIDTag() + "B2FIHM$]"; ProtocolStateChange(EProtocolStates.Connected); } // New
public Parser(IModem modem, char cr = '\r', char lf = '\n') { TokenCrLf = BuildToken(CR, LF); this.Modem = modem; this.DataLink = this.Modem.DataLink; this.State = eModemState.COMMAND_STATE; SetLineChars(cr, lf); this.DataLink.OnDataReceive += DataLink_OnDataReceive; }
/// <summary> /// /// </summary> private void publishFromBench() { this.doShareStatus("Starting publishing...", common.logger.logLevel.Information); sms[] localSetOfSMSToSend = null; while (true) { if (!this.instMre.WaitOne(new TimeSpan(0, 0, 5))) { continue; } //* Collecting set of sms to publish lock (this.smsBench) { if (this.smsBench.Count == 0) { this.doShareStatus("SMS bench found empty", common.logger.logLevel.Information); this.instMre.Reset(); this.doShareStatus("SMS publishing halted!", common.logger.logLevel.Information); localSetOfSMSToSend = null; continue; } else { if (localSetOfSMSToSend == null) { this.doShareStatus("SMS publishing started...", common.logger.logLevel.Information); } int presentBatchSize = this.smsBench.Count >= 10 ? 10 : this.smsBench.Count; localSetOfSMSToSend = new sms[presentBatchSize]; this.smsBench.CopyTo(0, localSetOfSMSToSend, 0, presentBatchSize); this.smsBench.RemoveRange(0, presentBatchSize); } } if (localSetOfSMSToSend != null) { IModem instModem = null; for (int indx = 0; indx < localSetOfSMSToSend.Length; indx++) { instModem = transports.modemPool.getModem(); instModem.sendSms(localSetOfSMSToSend[indx]); //this.doPublishedSMS(instModem, localSetOfSMSToSend[ indx ]); } } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void modemErrorReceived(IModem modem, modemErrorEventArgs e) { if (modem != null) { this.doShareStatus(string.Format("{0} - {1}: {2}", modem.name, e.modemState.ToString(), e.errorMessage) , common.logger.logLevel.Information); } else { this.doShareStatus(string.Format("{0} - {1}: {2}", "#Not Configured#", e.modemState.ToString(), e.errorMessage) , common.logger.logLevel.Information); } }
private void Form1_Load(object sender, EventArgs e) { modem = new Modem(); modem.Ring += new EventHandler <RingEventArgs>(modem_Ring); try { modem.Open(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public NotificationService(INotificationManager notificationManager, int notificationCreationFrequencyInMinutes, int notificationSendingFrequencyInMinutes, IModem modem, bool sendAndReceiveSms, int notificationClosingFrequencyInMinutes, int periodOfModemCheckConnectionInSeconds, IPersonContactRepository personContactRepository, int delayStartForNotificationTimersInSeconds, ILogger logger) { this.notificationManager = notificationManager; this.logger = logger; this.notificationCreationFrequencyInMinutes = notificationCreationFrequencyInMinutes; this.notificationSendingFrequencyInMinutes = notificationSendingFrequencyInMinutes; this.notificationClosingFrequencyInMinutes = notificationClosingFrequencyInMinutes; this.personContactRepository = personContactRepository; this.sendAndReceiveSms = sendAndReceiveSms; this.modem = modem; this.periodOfModemCheckConnectionInSeconds = periodOfModemCheckConnectionInSeconds; this.delayStartForNotificationTimersInSeconds = delayStartForNotificationTimersInSeconds; }
public DialupControllerBase(IModem modem, TSL_ALertUnitPhoneViewModel unit) { if (modem == null) { throw new ArgumentNullException(nameof(modem)); } if (unit == null) { throw new ArgumentNullException(nameof(unit)); } this.Modem = modem; this.Unit = unit; Status = eDialupStatus.None; this.Trys = 0; }
public void signalChanged(IModem modem, modemSingnalChangesEventArgs e) { if (this.InvokeRequired) { this.Invoke(new dlgModemSignalHandler(this.signalChanged), new object[] { modem, e }); } else { if (this.modemDetailControl == null) { this.modemDetailControl = new Dictionary <string, modemDetails>(); modemDetails instModemDetailControl = new modemDetails(); instModemDetailControl.setDetails(modem.name, modem.settings.portName, e.changedStrength, e.maxStrength); instModemDetailControl.Name = string.Format("modemDetail_{0}", modem.id); instModemDetailControl.signalColor = e.signalColor; this.panelStatus.Controls.Add(instModemDetailControl); instModemDetailControl.Dock = DockStyle.Left; instModemDetailControl.BringToFront(); this.modemDetailControl.Add(modem.id.ToString(), instModemDetailControl); } else { modemDetails instModemDetailControl = null; this.modemDetailControl.TryGetValue(modem.id.ToString(), out instModemDetailControl); //instModemDetailControl.setDetails(modem.name, modem.settings.portName, e.changedStrength, e.maxStrength); //instModemDetailControl.Name = string.Format("modemDetail_{0}", modem.id); if (instModemDetailControl != null) { instModemDetailControl.signalStrength = e.changedStrength; instModemDetailControl.signalColor = e.signalColor; } //this.panelStatus.Controls.Add(instModemDetailControl); //instModemDetailControl.Dock = DockStyle.Left; } } }
public DialogPactorConnect(IModem objSender, ref TChannelProperties Channel) { // This call is required by the Windows Form Designer... _objModem = objSender; stcChannel = Channel; blnLoading = true; InitializeComponent(); _cmbCallSigns.Name = "cmbCallSigns"; _cmbFrequencies.Name = "cmbFrequencies"; _Label1.Name = "Label1"; _Label2.Name = "Label2"; _lblUSB.Name = "lblUSB"; _lblBusy.Name = "lblBusy"; _Label4.Name = "Label4"; _btnConnect.Name = "btnConnect"; _btnCancel.Name = "btnCancel"; _btnHelp.Name = "btnHelp"; _lblPMBOType.Name = "lblPMBOType"; _chkResumeDialog.Name = "chkResumeDialog"; } // New
public GsmController(ILogger <GsmController> logger, IModem modem) { _logger = logger; this.modem = modem; }
public TSL_Parser(IModem modem) : base(modem) { }
public ModemsController(IModem modemSvc) { _modemSvc = modemSvc; }
/// <summary> /// /// </summary> /// <param name="modem"></param> /// <param name="state"></param> public void addModemDetails(IModem modem, modemState state) { }
/// <summary> /// /// </summary> /// <param name="modem"></param> /// <param name="e"></param> public void signalChanged(IModem modem, modemSingnalChangesEventArgs e) { lock (this) { (this.MdiParent as parentForm).signalChanged(modem, e); } }
public InitScript(Modem.IModem Modem) { this.modem = Modem; }
/// <summary> /// /// </summary> /// <param name="modem"></param> public static void close(IModem modem) { throw new NotImplementedException(); }
public PrepareController(IModem modem, TSL_ALertUnitPhoneViewModel unit) : base(modem, unit) { }
/// <summary> /// /// </summary> /// <param name="modem"></param> /// <param name="e"></param> static void instPublisher_signalChanged(IModem modem, modemSingnalChangesEventArgs e) { parentFormManager.signalChanged(modem, e); }
public static void signalChanged(IModem modem, modemSingnalChangesEventArgs e) { lock (instParentForm) { instParentForm.signalChanged(modem, e); } }
/// <summary> /// /// </summary> /// <param name="modem"></param> /// <param name="state"></param> private void modemSmsEventHandler(IModem modem, sms smsEntity) { this.doPublishedSMS(modem, smsEntity); }
public ModemClient(IModem modem) { _modem = modem; }