private IEnumerable <Tag> CommonInterfaceTagsFrom(IControllerTag controllerTag) { string jobTagName = TagName.CommonInterface(parent: null).Job(); Tag jobTag = controllerTag.Tag.GetChildTagUnderPath(jobTagName); if (jobTag == null) { yield break; } foreach (Tag tag in jobTag.Childs.Where(t => !string.Equals(t.NestedName, NamingConventions.CmdList))) { yield return(tag); } }
private IEnumerable <Impl.Command> CreateCommands(IControllerTag controllerTag, Controller controller) { int commandIndex = 0; foreach (Command command in controllerTag.GetCommands()) { string tagPath = TagName.CommonInterface(parent: null).Job().CmdList().CmdList(commandIndex); Tag tag = controllerTag.Tag.GetChildTagUnderPath(tagPath); if (tag == null) { continue; } var commandImpl = new Impl.Command(controller, command, tag.Childs.ToReadOnly()); yield return(commandImpl); commandIndex++; } }
/// <summary> /// Gets the mode tag and returns it. /// </summary> /// <returns>A <see cref="VP.FF.PT.Common.PlcCommunication.Tag"/> instance.</returns> public Tag GetModeTag() { return(_tag.GetChildTagUnderPath(TagName.CommonInterface(parent: null).Job().Mode())); }