[r891]: / branches / develop / mqttsparkplug / mqttsparkplug / Sparkplug™ MQTT edge and host / Function Blocks / FB_RemoteEdge / FB_RemoteEdge / svnobj  Maximize  Restore  History

Download this file

31 lines (29 with data), 5.6 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
{attribute 'call_after_init'}
    itfGroupID     : IGroupID; // if this is a pool EoN, it will be set by the primary node.  if not then attach it yourself to the correct groupID
    // TRUE when metric value is representative of the remote value. 
    // FALSE when Edge or Device dies, or when Host is OFFLINE
    isQualityOK : BOOL;
VAR
    pGroupID : POINTER TO FB_GroupID;
    pPrimary : POINTER TO FB_PrimaryHost;
    _devices : List; // OF FB_RemoteDevice
    _metrics : List; // OF FB_Metric
    //IElement
    _itfPrev : IElement;
    _itfNext : IElement;
    _itfList : IList;
    
	// IMessageSource
	_IMessageSource_published  : BOOL; // TRUE when publish is complete.  Is set false automatically in PublihserDone/PublisherError, but you can set it false yourself if you want5
    // NCMD
    _PleasePublishNCMD : BOOL;
    _publishingNCMD    : BOOL;
    _SparkplugB        : FB_SparkplugBSimple;
    _TopicProvider     : FB_EdgeTopicProvider;
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