/// <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; } } }
/// <summary> /// Gets advanced info for the given sensor /// </summary> internal bool TryGetLoc(ISensorState sensorState, out FeedbackModule feedbackModule) { return(sensorIds.TryGetValue(sensorState, out feedbackModule)); }