예제 #1
0
        /// <summary>
        /// QueryObjects reply.
        /// </summary>
        protected override void OnQueryObjects(Reply reply)
        {
            var firstPortNumber = 1;

            foreach (var row in reply.Rows)
            {
                var module = new FeedbackModule(Client, row.Id, railwayState, firstPortNumber);
                module.RequestView();
                firstPortNumber = module.LastPortNumber + 1;
                foreach (var sensor in module.Sensors)
                {
                    sensorIds[sensor] = module;
                }
            }
        }
예제 #2
0
 /// <summary>
 /// Gets advanced info for the given sensor
 /// </summary>
 internal bool TryGetLoc(ISensorState sensorState, out FeedbackModule feedbackModule)
 {
     return(sensorIds.TryGetValue(sensorState, out feedbackModule));
 }