示例#1
0
        /// <summary>
        /// Default ctor
        /// </summary>
        public LocoBufferCommandStationState(ILocoBufferCommandStation entity, RailwayState railwayState, string[] addressSpaces)
            : base(entity, railwayState, addressSpaces)
        {
            var splb = new SerialPortLocoBuffer();

            splb.PortName      = entity.ComPortName;
            lb                 = splb;
            lb.PreviewMessage += MessageProcessor;
            client             = new Client(lb, railwayState, this, railwayState.Dispatcher, Log);
            client.Idle       += (s, x) =>
            {
                networkIdle = true;
                RefreshIdle();
            };
        }
 public override object Visit(ILocoBufferCommandStation entity, GridContext data)
 {
     return(new LocoBufferCommandStationSettings(entity, data));
 }
示例#3
0
 public virtual TReturn Visit(ILocoBufferCommandStation entity, TData data)
 {
     return(Visit((ICommandStation)entity, data));
 }
示例#4
0
 public override IEntityState Visit(ILocoBufferCommandStation entity, RailwayState data)
 {
     return(new LocoBufferCommandStationState(entity, data, Empty <string> .Array));
 }