[r803]: / branches / FeatureBranches / PrimaryHost / SparkplugB / Function Blocks / FB_RemoteDevice / FB_RemoteDevice / svnobj  Maximize  Restore  History

Download this file

15 lines (14 with data), 3.7 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{attribute 'call_after_init'}
FUNCTION_BLOCK FB_RemoteDevice IMPLEMENTS IRemoteDevice
VAR_INPUT
    itfPrimaryHost : IPrimaryHost;
    Name           : WSTRING;     //Leave blank if you are happy for this to be used as a pool Device
END_VAR
VAR_OUTPUT
    {attribute 'no_copy'}
    itfRemoteDevice : IRemoteDevice := THIS^;
IF THIS^.itfPrimaryHost <> 0 THEN
    IF __QUERYPOINTER( itfPrimaryHost, pPrimary ) THEN
        pPrimary^.RegisterDevice( THIS^ );
    END_IF
END_IF