Skip to content

Commit 2e659b1

Browse files
author
sripp
committed
support FDBACK
1 parent 0effe4a commit 2e659b1

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 FDBACK : SystemFunctionBlockCall
9+
{
10+
public FDBACK(string instanceName,
11+
IOperationOrSignal on = null,
12+
IOperationOrSignal feedback = null,
13+
IOperationOrSignal qbad_fio = null,
14+
IOperationOrSignal ack_nec = null,
15+
IOperationOrSignal ack = null,
16+
IOperationOrSignal fdb_time = null,
17+
IOperationOrSignal q = null,
18+
IOperationOrSignal error = null,
19+
IOperationOrSignal ack_req = null,
20+
IOperationOrSignal diag = null) : base("FDBACK", instanceName, null)
21+
{
22+
Interface["ON"] = new IOperationOrSignalDirectionWrapper(on, Direction.Input);
23+
Interface["FEEDBACK"] = new IOperationOrSignalDirectionWrapper(feedback, Direction.Input);
24+
Interface["QBAD_FIO"] = new IOperationOrSignalDirectionWrapper(qbad_fio, Direction.Input);
25+
Interface["ACK_NEC"] = new IOperationOrSignalDirectionWrapper(ack_nec, Direction.Input);
26+
Interface["ACK"] = new IOperationOrSignalDirectionWrapper(ack, Direction.Input);
27+
Interface["FDB_TIME"] = new IOperationOrSignalDirectionWrapper(fdb_time, Direction.Input);
28+
Interface["Q"] = new IOperationOrSignalDirectionWrapper(q, Direction.Output);
29+
Interface["ERROR"] = new IOperationOrSignalDirectionWrapper(error, Direction.Output);
30+
Interface["ACK_REQ"] = new IOperationOrSignalDirectionWrapper(ack_req, Direction.Output);
31+
Interface["DIAG"] = new IOperationOrSignalDirectionWrapper(diag, Direction.Output);
32+
33+
SafetyTemplateString = @" <TemplateValue Name=""f_user_card"" Type=""Cardinality"">1</TemplateValue>
34+
<TemplateValue Name=""f_image_card"" Type=""Cardinality"">0</TemplateValue>";
35+
36+
Children.AddRange(Interface.Values.Where(x => x.OperationOrSignal != null).Select(x => x.OperationOrSignal));
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)