public async Task AddCommand(ScadaCommand command) { var commands = await this.StateManager.GetOrAddAsync <IReliableDictionary <string, List <ScadaCommand> > >("commands", TimeSpan.FromSeconds(60)); if (command.RegisterType == SCADA.Common.DataModel.RegisterType.BINARY_INPUT) { using (var tx = this.StateManager.CreateTransaction()) { if (await commands.GetCountAsync(tx) == 0) { await commands.SetAsync(tx, "scada", new List <ScadaCommand>(), TimeSpan.FromSeconds(60), CancellationToken.None); } await tx.CommitAsync(); } localCommands = new List <ScadaCommand>(); return; } AddLocalCommand(command); }
public async Task ExecuteCommand(ScadaCommand command) { var client = BuildClient(); await client.InvokeWithRetryAsync(x => x.Channel.ExecuteCommand(command)); }
public Task AddCommand(ScadaCommand command) { _fep.ExecuteCommand(command); return(Task.CompletedTask); }
public Task Commmand(ScadaCommand command) { var client = BuildClient(); return(client.InvokeWithRetryAsync(x => x.Channel.Commmand(command))); }
public Task ExecuteCommand(ScadaCommand command) { ServiceEventSource.Current.ServiceMessage(_context, "FEP - ExecuteCommand called!"); _addCommand(command); return(Task.CompletedTask); }
public void ExecuteCommand(ScadaCommand command) { processingManager.ExecuteWriteCommand(command.RegisterType, command.Index, command.Value); }
public void AddLocalCommand(ScadaCommand command) { localCommands.Add(command); }