public SerialConnectionServicesController(TerminalController terminalController){
     _terminalController = terminalController;
     DriveServices = new Dictionary<byte, IService>();
     LEDServices = new Dictionary<byte, IService>();
     BumperServices = new Dictionary<byte, IService>();
     Bind();
 }
Esempio n. 2
0
 private void CreateActivitiesController(){
     InitPortsList();
     InitBaudList();
     var dataSource = new List<SerialConnectionBase>(){
                                                          new USB2UARTSerialConnection("NUL", 9600, Parity.None, 8, StopBits.One, Handshake.None, 300, 300),
                                                          new TelegesisETRX2Connection("NUL", 9600, Parity.None, 8, StopBits.One, Handshake.None, 100, 100),
                                                      };
     cbSerialConnectionProviders.DataSource = dataSource;
     _terminalController = new TerminalController(this, btnConnect, btnSendATCommand, txtATCommand, txtTerminal, cbSerialConnectionProviders, cbPorts, cbBaud);
     _activitiesController = new ActivitiesController(CreateServicesProvider(_terminalController));
 }
Esempio n. 3
0
 public ChartsForm(TerminalController terminalController){
     _terminalController = terminalController;
     InitializeComponent();
     lstDataHolders.DisplayMember = "Name";
     pictureBox.Image = new Bitmap(pictureBox.Width, pictureBox.Height);
     _g = Graphics.FromImage(pictureBox.Image);
     _dataHolders = new Dictionary<int, DataHolder>();
     _colorsList = InitColorsList();
     _gridPen = new Pen(new SolidBrush(Color.Gray));
     Bind();
     DrawAxes(0, pictureBox.Width);
     RefreshStartStopButton();
     RefreshMeasureFreqLabel();
 }
Esempio n. 4
0
 private ServiceProvider CreateServicesProvider(TerminalController terminalController){
     var serviceProvider = new ServiceProvider();
     var serialConnectionServicesController = new SerialConnectionServicesController(terminalController);
     serviceProvider.BumperPorts = new List<IService>{
                                                         bumperControl1,
                                                         bumperControl2,
                                                         serialConnectionServicesController.Add(new SerialConnectionBumperService("SC " + Lang.Res.Bumper, 1), 0),
                                                         serialConnectionServicesController.Add(new SerialConnectionBumperService("SC " + Lang.Res.Bumper, 2), 1)
                                                     };
     serviceProvider.LEDPorts = new List<IService>{
                                                      ledControl1,
                                                      ledControl2,
                                                      serialConnectionServicesController.Add(new SerialConnectionLEDService("SC" + Lang.Res.LED), 0)
                                                  };
     serviceProvider.DrivePorts = new List<IService>{
                                                        driveControl1, 
                                                        driveControl2,
                                                        serialConnectionServicesController.Add(new SerialConnectionDriveService("SC " + Lang.Res.Drive, 1), 0),
                                                        serialConnectionServicesController.Add(new SerialConnectionDriveService("SC " + Lang.Res.Drive, 2), 1)
                                                    };
     serviceProvider.MessengerPorts = new List<IService>{messengerEmulatorControl1};
     return serviceProvider;
 }