Automatak.Simulator.DNP3.ChannelNode.ChannelNode C# (CSharp) Method

ChannelNode() public method

public ChannelNode ( IDNP3Config config, IChannel channel, ISimulatorNodeCallbacks callbacks, string alias ) : System
config IDNP3Config
channel IChannel
callbacks ISimulatorNodeCallbacks
alias string
return System
        public ChannelNode(IDNP3Config config, IChannel channel, ISimulatorNodeCallbacks callbacks, string alias)
        {
            this.config = config;
            this.channel = channel;
            this.callbacks = callbacks;
            this.alias = alias;

            this.callbacks.ChangeImage(IconIndex.Channel);

            this.masterFactory = new ActionNodeFactory("Add Master", cb => CreateMaster(cb));
            this.outstationFactory = new ActionNodeFactory("Add Outstation", cb => CreateOutstation(cb));

            this.channel.AddStateListener(state => callbacks.ChangeState(GetNodeState(state)));
        }