-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStructFB1.cs
More file actions
48 lines (41 loc) · 1.03 KB
/
StructFB1.cs
File metadata and controls
48 lines (41 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#region Copyright
//
// Copyright (c) Phoenix Contact GmbH & Co. KG. All rights reserved.
// Licensed under the MIT. See LICENSE file in the project root for full license information.
//
#endregion Copyright
using Eclr;
using Iec61131.Engineering.Prototypes.Methods;
using Iec61131.Engineering.Prototypes.Types;
using Iec61131.Engineering.Prototypes.Variables;
namespace DocuSharedNativeLibrary
{
[FunctionBlock]
public class StructFB1
{
[Input]
public int IN1;
[Input]
public int IN2;
[Output]
public InfoStruct INFO;
[Initialization]
public void __Init()
{
INFO.Init();
}
[Execution]
public void __Process()
{
StructFB1NativeMethods.Calculate(ref INFO, IN1, IN2);
}
}
[Native]
internal static class StructFB1NativeMethods
{
public static void Calculate(ref InfoStruct info, int valueA, int valueB)
{
// Implementation in native code
}
}
}