|
1 | | -using System.Linq; |
2 | | -using TiaCodegen.Commands.Functions.Base; |
3 | | -using TiaCodegen.Enums; |
4 | | -using TiaCodegen.Interfaces; |
5 | | - |
6 | | -namespace TiaCodegen.Commands.Functions |
7 | | -{ |
8 | | - public class TOFFCall : SystemFunctionBlockCall |
9 | | - { |
10 | | - public TOFFCall(string instanceName, |
11 | | - IOperationOrSignal pt = null, |
12 | | - IOperationOrSignal q = null, |
13 | | - IOperationOrSignal et = null) : base("TOFF", instanceName, null) |
14 | | - { |
15 | | - Interface["PT"] = new IOperationOrSignalDirectionWrapper(pt, Direction.Input); |
16 | | - Interface["Q"] = new IOperationOrSignalDirectionWrapper(q, Direction.Output); |
17 | | - Interface["ET"] = new IOperationOrSignalDirectionWrapper(et, Direction.Output); |
18 | | - |
19 | | - TemplateValueName = "time_type"; |
20 | | - TemplateValueType = "Type"; |
21 | | - TemplateValue = "Time"; |
22 | | - HasNoEn = true; |
23 | | - |
24 | | - SafetyTemplateString = @" <TemplateValue Name=""f_user_card"" Type=""Cardinality"">1</TemplateValue> |
25 | | - <TemplateValue Name=""f_image_card"" Type=""Cardinality"">0</TemplateValue> |
26 | | - <TemplateValue Name=""f_imageclassic_card"" Type=""Cardinality"">0</TemplateValue> |
27 | | - <TemplateValue Name=""f_imageplus_card"" Type=""Cardinality"">0</TemplateValue> |
28 | | - <TemplateValue Name=""codedbool_type"" Type=""Type"">DInt</TemplateValue>"; |
29 | | - |
30 | | - Children.AddRange(Interface.Values.Where(x => x.OperationOrSignal != null).Select(x => x.OperationOrSignal)); |
31 | | - } |
32 | | - } |
33 | | -} |
| 1 | +using System.Linq; |
| 2 | +using TiaCodegen.Commands.Functions.Base; |
| 3 | +using TiaCodegen.Enums; |
| 4 | +using TiaCodegen.Interfaces; |
| 5 | + |
| 6 | +namespace TiaCodegen.Commands.Functions |
| 7 | +{ |
| 8 | + public class TOFCall : SystemFunctionBlockCall |
| 9 | + { |
| 10 | + public TOFCall(string instanceName, |
| 11 | + IOperationOrSignal pt = null, |
| 12 | + IOperationOrSignal q = null, |
| 13 | + IOperationOrSignal et = null) : base("TOF", instanceName, null) |
| 14 | + { |
| 15 | + Interface["PT"] = new IOperationOrSignalDirectionWrapper(pt, Direction.Input); |
| 16 | + Interface["Q"] = new IOperationOrSignalDirectionWrapper(q, Direction.Output); |
| 17 | + Interface["ET"] = new IOperationOrSignalDirectionWrapper(et, Direction.Output); |
| 18 | + |
| 19 | + TemplateValueName = "time_type"; |
| 20 | + TemplateValueType = "Type"; |
| 21 | + TemplateValue = "Time"; |
| 22 | + HasNoEn = true; |
| 23 | + |
| 24 | + SafetyTemplateString = @" <TemplateValue Name=""f_user_card"" Type=""Cardinality"">1</TemplateValue> |
| 25 | + <TemplateValue Name=""f_image_card"" Type=""Cardinality"">0</TemplateValue> |
| 26 | + <TemplateValue Name=""f_imageclassic_card"" Type=""Cardinality"">0</TemplateValue> |
| 27 | + <TemplateValue Name=""f_imageplus_card"" Type=""Cardinality"">0</TemplateValue> |
| 28 | + <TemplateValue Name=""codedbool_type"" Type=""Type"">DInt</TemplateValue>"; |
| 29 | + |
| 30 | + Children.AddRange(Interface.Values.Where(x => x.OperationOrSignal != null).Select(x => x.OperationOrSignal)); |
| 31 | + } |
| 32 | + } |
| 33 | +} |
0 commit comments