[r815]: / branches / FeatureBranches / refactorpayload / SparkplugB / Function Blocks / FB_SparkplugBSimple / FB_SparkplugBSimple / NDEATH / GetEoNNodeDeathCertificate / svnobj  Maximize  Restore  History

Download this file

20 lines (18 with data), 5.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
(*  
    NDEATH 
 Death certificate for EoN nodes.
    
    that the NDEATH event can be associated with the NBIRTH. Since this is typically published by the MQTT Server
    - Always request this before requesting the Node Birth Payload, pass this sequence to NBIRTH
    ;                      // Un-encoded NDEATH Metric for external storage purpose, contains BSeqNumber for usage with NBIRTH
SysTimeRtc.SysTimeRtcHighResGet( pTimestamp := _Timestamp );
InitEncoderErr := _Encoder.InitializePayloadBeforeAddingMetrics( timestamp := _Timestamp );
    AddSimpleMetricErr := AddMetricSimple( TimeStamp := _Timestamp,
                                           AllMetricsList := AllMetricsList );
    GetEoNNodeDeathCertificate := AddSimpleMetricErr;
    IF GetEoNNodeDeathCertificate = ERROR.NO_ERROR THEN
                        msgFmtStr := 'SparkplugBSimple GetNDEATHCertificate Succes',
                        strArg := '' );
    END_IF
ELSE
    GetEoNNodeDeathCertificate := InitEncoderErr;
END_IF