--- a/branches/FeatureBranches/refactorpayload/SparkplugB/Function Blocks/FB_SparkplugBSimple/FB_SparkplugBSimple/NBIRTH/GetEoNNodeBirthCertificate/svnobj
+++ b/branches/FeatureBranches/refactorpayload/SparkplugB/Function Blocks/FB_SparkplugBSimple/FB_SparkplugBSimple/NBIRTH/GetEoNNodeBirthCertificate/svnobj
@@ -1,5 +1,5 @@
-Gx_l½,!0…jüo¼#nˆyGÙæ·1System.StringL{f8a58466-d7f6-439f-bbb8-d4600e41d099}ImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocumentL{f3878285-8e4f-490b-bb1b-9acbb7eb04db}TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}	Id
-longTagText
xSysTimeRtc.SysTimeRtcHighResGet( pTimestamp := _Timestamp );”// incase you forgot to add bdSeq to AllMetricsList, I will add it for you`AllMetricsList.InsertElem( itfElement := NBIRTH,^                           itfPrecursor := 0 );V(* NBirth Sequence Metric => name "bdSeq", N	MetricDataType.Int64 => value BdSeq *)4NBirth.Name    := "bdSeq";RNBirth.Value   := LWT_BDSeq; // mandatory¶InitEncoderErr := _Encoder.InitializePayloadBeforeAddingMetrics( timestamp := _Timestamp );”(* Reset the internal _seqNum to one(!), and leave the call above as is *)"_NextSeqNum := 1;NIF InitEncoderErr = ERROR.NO_ERROR THEN–    (* Now all metrics which this node will ever report on, including BdSeq†	   this list should already be prepared in the main application *)†    AddAllMetricsListErr := AddAllMetrics( TimeStamp := _Timestamp,Œ                                           SendList := AllMetricsList,œ                                           AllMetricsList := AllMetricsList );n    GetEoNNodeBirthCertificate := AddAllMetricsListErr; n    IF GetEoNNodeBirthCertificate = ERROR.NO_ERROR THEN!¤        WriteDeviceLog( msgCtrlMask := UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),"¨                        msgFmtStr := 'SparkplugBSimple GetNBIRTHCertificate Succes',#N                        strArg := '' );$    ELSE%¦        WriteDeviceLog( msgCtrlMask := UDINT_TO_DWORD( CmpLog.LogClass.LOG_ERROR ),&¨                        msgFmtStr := 'SparkplugBSimple GetNBIRTHCertificate Failed','    END_IF(ELSE)b    GetEoNNodeBirthCertificate := InitEncoderErr;*ž    WriteDeviceLog( msgCtrlMask := UDINT_TO_DWORD( CmpLog.LogClass.LOG_ERROR ),+°                    msgFmtStr := 'SparkplugBSimple GetNBIRTHCertificate Failed to init',,F                    strArg := '' );-END_IF.Interface/L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}0(*1	NBIRTH2	3|	The NBIRTH message requires the following payload components.4²	"  The NBIRTH must include the a seq number in the payload and it must have a value of 0.5È	"  The NBIRTH must include a timestamp denoting the DateTime the message was sent from the EoN node.6”	"  The NBIRTH must include every metric the EoN node will ever report on. 7R	At a minimum these metrics must include:8&		o The metric name9.		o The metric datatype:*		o The current value;Î	"  If Template instances will be published by this EoN or any devices, all Template definitions must be<2	published in the NBIRTH.=È	"  A bdSeq number as a metric should be included in the payload. This should match the bdSeq number >Þ    provided in the MQTT CONNECT packet s LW&T payload (NDEATH). This allows backend applications to correlate ?Ú    NBIRTHs to NDEATHs. The bdSeq number should start at zero and increment by one on every new MQTT CONNECT.@OPTIONAL: AØ	The NBIRTH message can also include optional  Node Control  payload components. These are used by a backendBÈ	application to control aspects of the EoN node. The following are examples of Node Control metrics.CJ	"  Metric name:  Node Control/Reboot Dr		o Used by backend application(s) to reboot an EoN node.EL	"  Metric name:  Node Control/Rebirth F´		o Used by backend application(s) to request a new NBIRTH and DBIRTH(s) from an EoN node.GT	"  Metric name:  Node Control/Next Server HÌ		o Used by backend application(s) to request an EoN node to walk to the next MQTT Server in its list IH		in multi-MQTT Server environments.JP	"  Metric name:  Node Control/Scan rate KŽ		o Used by backed application(s) to modify a poll rate on an EoN node.LÒ	The NBIRTH message can also include optional  Properties  of an EoN node. The following are examples of M$	Property metrics.NT	"  Metric name:  Properties/Hardware Make O|		o Used to transmit the hardware manufacturer of the EoN nodePV	"  Metric name:  Properties/Hardware Model Qn		o Used to transmit the hardware model of the EoN nodeR>	"  Metric name:  Properties/OS Sr		o Used to transmit the operating system of the EoN nodeTN	"  Metric name:  Properties/OS Version Uf		o Used to transmit the OS version of the EoN nodeV*)WRMETHOD GetEoNNodeBirthCertificate : ERRORXVAR_INPUTYl    LWT_BDSeq : ULINT; // BDSeq of previous LWT NDEATHZEND_VAR[VAR_IN_OUT\P    NBIRTH         : FB_SparkplugUInt64;]È    AllMetricsList : LIST; // Contains a list of all metrics which will ever report on in this node ^VAR_B    InitEncoderErr       : ERROR;`B    AddSimpleMetricErr   : ERROR;aB    AddAllMetricsListErr : ERROR;ÐÐÐE$ÐÐ	
+Gx_lË,!0…jüoÊ#6ܦøÙæ·1System.StringL{f8a58466-d7f6-439f-bbb8-d4600e41d099}ImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocumentL{f3878285-8e4f-490b-bb1b-9acbb7eb04db}TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}	Id
+longTagText
xSysTimeRtc.SysTimeRtcHighResGet( pTimestamp := _Timestamp );”// incase you forgot to add bdSeq to AllMetricsList, I will add it for you`AllMetricsList.InsertElem( itfElement := NBIRTH,^                           itfPrecursor := 0 );V(* NBirth Sequence Metric => name "bdSeq", N	MetricDataType.Int64 => value BdSeq *)4NBirth.Name    := "bdSeq";TNBirth.UInt64   := LWT_BDSeq; // mandatory¶InitEncoderErr := _Encoder.InitializePayloadBeforeAddingMetrics( timestamp := _Timestamp );”(* Reset the internal _seqNum to one(!), and leave the call above as is *)"_NextSeqNum := 1;NIF InitEncoderErr = ERROR.NO_ERROR THEN–    (* Now all metrics which this node will ever report on, including BdSeq†	   this list should already be prepared in the main application *)†    AddAllMetricsListErr := AddAllMetrics( TimeStamp := _Timestamp,Œ                                           SendList := AllMetricsList,œ                                           AllMetricsList := AllMetricsList );n    GetEoNNodeBirthCertificate := AddAllMetricsListErr; n    IF GetEoNNodeBirthCertificate = ERROR.NO_ERROR THEN!¤        WriteDeviceLog( msgCtrlMask := UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),"¨                        msgFmtStr := 'SparkplugBSimple GetNBIRTHCertificate Succes',#N                        strArg := '' );$    ELSE%¦        WriteDeviceLog( msgCtrlMask := UDINT_TO_DWORD( CmpLog.LogClass.LOG_ERROR ),&¨                        msgFmtStr := 'SparkplugBSimple GetNBIRTHCertificate Failed','    END_IF(ELSE)b    GetEoNNodeBirthCertificate := InitEncoderErr;*ž    WriteDeviceLog( msgCtrlMask := UDINT_TO_DWORD( CmpLog.LogClass.LOG_ERROR ),+°                    msgFmtStr := 'SparkplugBSimple GetNBIRTHCertificate Failed to init',,F                    strArg := '' );-END_IF.Interface/L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}0(*1	NBIRTH2	3|	The NBIRTH message requires the following payload components.4²	"  The NBIRTH must include the a seq number in the payload and it must have a value of 0.5È	"  The NBIRTH must include a timestamp denoting the DateTime the message was sent from the EoN node.6”	"  The NBIRTH must include every metric the EoN node will ever report on. 7R	At a minimum these metrics must include:8&		o The metric name9.		o The metric datatype:*		o The current value;Î	"  If Template instances will be published by this EoN or any devices, all Template definitions must be<2	published in the NBIRTH.=È	"  A bdSeq number as a metric should be included in the payload. This should match the bdSeq number >Þ    provided in the MQTT CONNECT packet s LW&T payload (NDEATH). This allows backend applications to correlate ?Ú    NBIRTHs to NDEATHs. The bdSeq number should start at zero and increment by one on every new MQTT CONNECT.@OPTIONAL: AØ	The NBIRTH message can also include optional  Node Control  payload components. These are used by a backendBÈ	application to control aspects of the EoN node. The following are examples of Node Control metrics.CJ	"  Metric name:  Node Control/Reboot Dr		o Used by backend application(s) to reboot an EoN node.EL	"  Metric name:  Node Control/Rebirth F´		o Used by backend application(s) to request a new NBIRTH and DBIRTH(s) from an EoN node.GT	"  Metric name:  Node Control/Next Server HÌ		o Used by backend application(s) to request an EoN node to walk to the next MQTT Server in its list IH		in multi-MQTT Server environments.JP	"  Metric name:  Node Control/Scan rate KŽ		o Used by backed application(s) to modify a poll rate on an EoN node.LÒ	The NBIRTH message can also include optional  Properties  of an EoN node. The following are examples of M$	Property metrics.NT	"  Metric name:  Properties/Hardware Make O|		o Used to transmit the hardware manufacturer of the EoN nodePV	"  Metric name:  Properties/Hardware Model Qn		o Used to transmit the hardware model of the EoN nodeR>	"  Metric name:  Properties/OS Sr		o Used to transmit the operating system of the EoN nodeTN	"  Metric name:  Properties/OS Version Uf		o Used to transmit the OS version of the EoN nodeV*)WRMETHOD GetEoNNodeBirthCertificate : ERRORXVAR_INPUTYl    LWT_BDSeq : ULINT; // BDSeq of previous LWT NDEATHZEND_VAR[VAR_IN_OUT\\    NBIRTH         : FB_RemoteMetric; //Uint64]È    AllMetricsList : LIST; // Contains a list of all metrics which will ever report on in this node ^VAR_B    InitEncoderErr       : ERROR;`B    AddSimpleMetricErr   : ERROR;aB    AddAllMetricsListErr : ERROR;ÐÐÐE$ÐÐ	
 ­ÊÚÐ-
ÐÐ	
 ­ËÚÐ-ÐÐ	
 ­ÌÚÐ-ÐÐ