[r799]: / branches / FeatureBranches / PrimaryHost / SparkplugB / Function Blocks / FB_RemoteEdge / FB_RemoteEdge / svnobj  Maximize  Restore  History

Download this file

20 lines (19 with data), 4.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{attribute 'call_after_init'}
FUNCTION_BLOCK FB_RemoteEdge IMPLEMENTS IRemoteEdge
VAR_INPUT
    itfPrimaryHost : IPrimaryHost;
    Name           : WSTRING;  //Leave blank if you are happy for this to be used as a pool EoN
END_VAR
VAR_OUTPUT
    {attribute 'no_copy'}
    itfRemoteEoN : IRemoteEdge := THIS^;
IF THIS^.itfGroupID <> 0 THEN
    IF __QUERYPOINTER( itfGroupID,
                       pGroupID ) THEN
        pGroupID^.RegisterEdge( THIS^ );
    END_IF
ELSIF THIS^.itfPrimaryHost <> 0 THEN
    IF __QUERYPOINTER( itfPrimaryHost,
                       pPrimary ) THEN
        pPrimary^.RegisterEdge( THIS^ );
END_IF