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

Download this file

19 lines (18 with data), 3.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
// Set all Edge metrics to offline and Edge.isQualityOK = FALSE
/// Set all Device metric to offline and each device.isQualityOK = FALSE
_devices.ItterateRestart(hasnext => existingHasNextDevice);
WHILE existingHasNextDevice DO
    IF __QUERYINTERFACE(itfExistingElement, itfExistingDevice) THEN
        itfExistingDevice.QualityOK := FALSE;
//NDEATH certificate is received -> it tells which Edge FROM which group has "died"
//ProcessNDEATH :
//     Mark the edge status as "EdgeOffline"
//     Every Metric in the edge list should be se to "stale"
//     Every child Device should be counted as "DeviceOffline"
//     Every Metric in each Device should be set to "stale"
METHOD ProcessNDEATH
VAR
    existingHasNextDevice : BOOL;
	existingHasNextMetric : BOOL;
	itfExistingElement  : IElement;
	itfExistingDevice   : IRemoteDevice;