コード例 #1
0
 public void Configure(ProxyCommandHandler proxy, IDatabase database)
 {
     this.handler  = proxy;
     this.database = database;
     this.handler.BinaryCommandAccepted += handler_BinaryCommandAccepted;
     this.handler.AnalogCommandAccepted += handler_AnalogCommandAccepted;
 }
コード例 #2
0
ファイル: CommandHandlerControl.cs プロジェクト: bkearns/dnp3
 public void Configure(ProxyCommandHandler proxy, IMeasurementLoader loader)
 {
     this.handler = proxy;
     this.loader  = loader;
     this.handler.BinaryCommandAccepted += handler_BinaryCommandAccepted;
     this.handler.AnalogCommandAccepted += handler_AnalogCommandAccepted;
 }
コード例 #3
0
        public OutstationInstance(ProxyCommandHandler handler, EventedOutstationApplication application, IOutstation outstation, OutstationStackConfig config, string alias)
        {
            this.handler     = handler;
            this.application = application;
            this.outstation  = outstation;
            this.alias       = alias;

            this.cache = new MeasurementCache(config.databaseTemplate);
        }
コード例 #4
0
        public OutstationForm(IOutstation outstation, ProxyCommandHandler commandHandler)
        {
            InitializeComponent();

            this.outstation     = outstation;
            this.commandHandler = commandHandler;

            commandHandler.CommandProxy = this; // proxy commands to the form
        }
コード例 #5
0
ファイル: OutstationInstance.cs プロジェクト: bkearns/dnp3
        public OutstationInstance(ProxyCommandHandler handler, EventedOutstationApplication application, IOutstation outstation, OutstationStackConfig config, string alias)
        {
            this.handler     = handler;
            this.application = application;
            this.outstation  = outstation;
            this.alias       = alias;

            this.form = new OutstationForm(outstation, handler);
        }
コード例 #6
0
        public OutstationForm(IOutstation outstation, EventedOutstationApplication application, MeasurementCache cache, ProxyCommandHandler proxy, String alias)
        {
            InitializeComponent();

            this.outstation  = outstation;
            this.application = application;
            this.cache       = cache;
            this.proxy       = proxy;

            this.loader = new ProxyLoader(outstation, cache);

            this.Text = String.Format("DNP3 Outstation ({0})", alias);
            this.comboBoxTypes.DataSource = System.Enum.GetValues(typeof(MeasType));

            this.commandHandlerControl1.Configure(proxy, loader);

            this.comboBoxColdRestartMode.DataSource = System.Enum.GetValues(typeof(RestartMode));

            this.application.ColdRestart += application_ColdRestart;
            this.application.TimeWrite   += application_TimeWrite;

            this.CheckState();
        }