--- a/branches/FeatureBranches/refactorpayload/SparkplugB/Function Blocks/FB_Device/FB_Device_1/svnobj
+++ b/branches/FeatureBranches/refactorpayload/SparkplugB/Function Blocks/FB_Device/FB_Device_1/svnobj
@@ -1,6 +1,5 @@
-Gx_lá2!0…jüoF(—t†ls
-™¶(System.StringL{6f9dac99-8de1-4efc-8465-68ac443b7d08}SpecialFuncL{0db3d7bb-cde0-4416-9a7b-ce49a0124323}NoneImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocument	L{f3878285-8e4f-490b-bb1b-9acbb7eb04db}
-TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}Id
longTagTexthPluggedIntoEoN := IsPluggedIntoEoN( pEoN => _pEoN );Z_EoNOnline     := IsEoNOnline( pEoN := _pEoN,„                               PluggedIntoEoN := PluggedIntoEoN );,IF PluggedIntoEoN THENX    _MQTT( Client := _pEoN^._MQTT._Client );N    IF _MQTT.DCMDMessageReceived() THEN¤        _RecvDCMDMesg REF= _MQTT.GetDCMDMessage( MessageTopic => _RecvDCMDTopic );n        onDCMDMessage( pTopic := ADR( _RecvDCMDTopic ),f                       pMessage := _RecvDCMDMesg );    END_IFˆ    // IF EoN transitions from OFFLINE TO ONLINE we issue a rebirth.b    _PublishReBirth := _pEoN^.IsReDBirthNeeded();END_IF:_StateMachine( pEoN := _pEoN,>               pDevice := THIS, D               EoNName := EoNName,!d               IsPluggedIntoEoN := PluggedIntoEoN,"T               IsHealthy := DeviceHealthy,#T               DeviceName := _cDeviceName,$R               IsEoNOnline := _EoNOnline,%l               TimeToWait := TO_TIME( publishPeriod ),&T               Rebirth := _PublishReBirth,'p               arSparkplugBoolean := arSparkplugBoolean,(t               arSparkplugDateTime := arSparkplugDateTime,)h               arSparkplugFloat := arSparkplugFloat,*l               arSparkplugDouble := arSparkplugDouble,+d               arSparkplugInt8 := arSparkplugInt8,,h               arSparkplugInt16 := arSparkplugInt16,-h               arSparkplugInt32 := arSparkplugInt32,.h               arSparkplugInt64 := arSparkplugInt64,/h               arSparkplugUInt8 := arSparkplugUInt8,0l               arSparkplugUInt16 := arSparkplugUInt16,1l               arSparkplugUInt32 := arSparkplugUInt32,2l               arSparkplugUInt64 := arSparkplugUInt64,3d               arSparkplugUUID := arSparkplugUUID,4d               arSparkplugText := arSparkplugText,5l               arSparkplugString := arSparkplugString,6T               AllMetricsList := _Metrics,7\               SessionState => SessionState );82_PublishReBirth := FALSE;9Diag();:Interface;L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}<0{attribute 'reflection'}=hFUNCTION_BLOCK FB_Device IMPLEMENTS ISparkplugDevice>VAR_INPUT?f    DeviceName : WSTRING; // A name for this device@Ô    // Setting this value false will send a DDEATH, so all values will be shown bad on the Sparkplug SCADAAÈ    // Setting this value true will permit a DBIRTH to be sent, so all values will be shown healthy.BD    DeviceHealthy  : BOOL := TRUE;CŽ    ItfEoNInstance : ISparkplugDeviceProtocol; // Connect EoN instance DEND_VAREVAR_OUTPUTF4    PluggedIntoEoN : BOOL;G:    EoNName        : WSTRING;H¨    SessionState   : SparkplugSessionStateType := SparkplugSessionStateType.OFFLINE;IVAR_IN_OUTJt    arSparkplugBoolean  : ARRAY[*] OF FB_SparkplugBoolean;Kv    arSparkplugDateTime : ARRAY[*] OF FB_SparkplugDateTime;Lp    arSparkplugFloat    : ARRAY[*] OF FB_SparkplugFloat;Mr    arSparkplugDouble   : ARRAY[*] OF FB_SparkplugDouble;Nn    arSparkplugInt8     : ARRAY[*] OF FB_SparkplugInt8;Op    arSparkplugInt16    : ARRAY[*] OF FB_SparkplugInt16;Pp    arSparkplugInt32    : ARRAY[*] OF FB_SparkplugInt32;Qp    arSparkplugInt64    : ARRAY[*] OF FB_SparkplugInt64;Rp    arSparkplugUInt8    : ARRAY[*] OF FB_SparkplugUInt8;Sr    arSparkplugUInt16   : ARRAY[*] OF FB_SparkplugUInt16;Tr    arSparkplugUInt32   : ARRAY[*] OF FB_SparkplugUInt32;Ur    arSparkplugUInt64   : ARRAY[*] OF FB_SparkplugUInt64;Vn    arSparkplugUUID     : ARRAY[*] OF FB_SparkplugUUID;Wn    arSparkplugText     : ARRAY[*] OF FB_SparkplugText;Xr    arSparkplugString   : ARRAY[*] OF FB_SparkplugString;Y”    publishPeriod       : UINT; // eg: 5000 (Value is in milliseconds)    ZVAR[l    _cDeviceName    : WSTRING; // corrected devicename\<    _Element        : Element;]R    _pEoN           : POINTER TO FB_Edge;^6    _EoNOnline      : BOOL;_6    _Initialised    : BOOL;`Z    _TopicProvider  : FB_DeviceTopicProvider;aH    _MQTT           : FB_DeviceMQTT;bÄ    _Metrics        : LIST; // Complete List of all metrics the device will send during its "life"cX    _StateMachine   : FB_DeviceStateMachine;dT    _SparkplugB     : FB_SparkplugBSimple;eš    _Blob           : ARRAY[0..65535] OF BYTE; // buffer for encoded messagesfœ    _BlobSize       : UDINT;                   // current encoded message sizeg:    _Diag           : STRING;h    // DBirthiB    _CurrentPublishBirth  : UINT;jB    _LastPublishBirth     : UINT;kB    _StatusBirthPublished : BOOL;lB    _PublishBirth         : BOOL;mB    _PublishReBirth       : BOOL;nF    DBIRTHDone            : F_TRIG;o    // DDATAp>    _CurrentPublishData : UINT;q>    _LastPublishData    : UINT;r>    _PublishData        : BOOL;s    // DCMDtt    _RecvDCMDMesg  : REFERENCE TO FB_PayloadSimpleDecoder;uˆ    _RecvDCMDTopic : WSTRING(GC_Sparkplug.supported_string_lengths);v>    {attribute 'instance-path'}w0    {attribute 'noinit'}x$    _POU : STRING;y"UniqueIdGeneratorz7555{POULevel|L{8e575c5b-1d37-49c6-941b-5c0ec7874787}}Standard~ ChildObjectGuids8System.Collections.ArrayList€,AddAttributeSubsequentboolÐÐ-ÐÐ	E
--ÐÐ
­XÚÐ-ÐÐ
­YÚÐ-ÐÐ
­ZÚÐ-ÐÐ
­[ÚÐ-ÐÐ
­\ÚÐ-ÐÐ
­]ÚÐ-ÐÐ
­^ÚÐ-ÐÐ
­_ÚÐ-ÐÐ
­`ÚÐ-ÐÐ
­aÚÐ-ÐÐ
­bÚÐ-ÐÐ
­cÚÐ-ÐÐ
­dÚÐ-ÐÐ
­eÚÐ-ÐÐ
­fÚÐ-ÐÐ
­gÚÐ-ÐÐ
­hÚÐ-ÐÐ
­iÚÐ-ÐÐ
­jÚÐ- ÐÐ
­kÚÐ-!ÐÐ
­lÚÐ-"ÐÐ
­mÚÐ-#ÐÐ
­nÚÐ-$ÐÐ
­oÚÐ-%ÐÐ
­pÚÐ-&ÐÐ
­qÚÐ-'ÐÐ
­rÚÐ-(ÐÐ
­sÚÐ-)ÐÐ
­tÚÐ-*ÐÐ
­uÚÐ-+ÐÐ
­vÚÐ-,ÐÐ
­wÚÐ--ÐÐ
­xÚÐ-.ÐÐ
­yÚÐ-/ÐÐ
­zÚÐ-0ÐÐ
­{ÚÐ-1ÐÐ
­|ÚÐ-2ÐÐ
­}ÚÐ-3ÐÐ
­~ÚÐ-4ÐÐ
­ÚÐ-5ÐÐ
­€ÚÐ-6ÐÐ
­ÚÐ-7ÐÐ
­‚ÚÐ-ÐÐ
­ƒÚÐ-8ÐÐ
­ÚÐ-9Ð:;Ð	E
-@ÐÐ
­ÚÐ-<ÐÐ
­ÚÐ-=ÐÐ
­ÚÐ->ÐÐ
­ÚÐ-?ÐÐ
­ÚÐ-@ÐÐ
­ÚÐ-AÐÐ
­ÚÐ-BÐÐ
­ ÚÐ-CÐÐ
­!ÚÐ-DÐÐ
­"ÚÐ-EÐÐ
­#ÚÐ-FÐÐ
­$ÚÐ-GÐÐ
­%ÚÐ-HÐÐ
­&ÚÐ-DÐÐ
­'ÚÐ-IÐÐ
­(ÚÐ-JÐÐ
­)ÚÐ-KÐÐ
­*ÚÐ-LÐÐ
­+ÚÐ-MÐÐ
­,ÚÐ-NÐÐ
­-ÚÐ-OÐÐ
­.ÚÐ-PÐÐ
­/ÚÐ-QÐÐ
­0ÚÐ-RÐÐ
­1ÚÐ-SÐÐ
­2ÚÐ-TÐÐ
­3ÚÐ-UÐÐ
­4ÚÐ-VÐÐ
­5ÚÐ-WÐÐ
­6ÚÐ-XÐÐ
­7ÚÐ-YÐÐ
­8ÚÐ-DÐÐ
­9ÚÐ-ZÐÐ
­:ÚÐ-[ÐÐ
­;ÚÐ-\ÐÐ
­<ÚÐ-]ÐÐ
­=ÚÐ-^ÐÐ
­>ÚÐ-_ÐÐ
­?ÚÐ-`ÐÐ
­@ÚÐ-aÐÐ
­AÚÐ-bÐÐ
­BÚÐ-cÐÐ
­CÚÐ-dÐÐ
­DÚÐ-eÐÐ
­EÚÐ-fÐÐ
­FÚÐ-gÐÐ
­GÚÐ-hÐÐ
­HÚÐ-iÐÐ
­IÚÐ-jÐÐ
­JÚÐ-kÐÐ
­KÚÐ-lÐÐ
­LÚÐ-mÐÐ
­MÚÐ-nÐÐ
­NÚÐ-oÐÐ
­OÚÐ-pÐÐ
­PÚÐ-qÐÐ
­QÚÐ-rÐÐ
­RÚÐ-sÐÐ
­SÚÐ-tÐÐ
­TÚÐ-uÐÐ
­UÚÐ-vÐÐ
­VÚÐ-wÐÐ
­WÚÐ-xÐÐ
­
-ÚÐ-DÐy-zÐ{|-}~Ѐ­
\ No newline at end of file
+Gx_lÿ"!0…jüo6ƒ+¡W¯áSystem.StringL{6f9dac99-8de1-4efc-8465-68ac443b7d08}SpecialFuncL{0db3d7bb-cde0-4416-9a7b-ce49a0124323}NoneImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocument	L{f3878285-8e4f-490b-bb1b-9acbb7eb04db}
+TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}Id
longTagTexthPluggedIntoEoN := IsPluggedIntoEoN( pEoN => _pEoN );Z_EoNOnline     := IsEoNOnline( pEoN := _pEoN,„                               PluggedIntoEoN := PluggedIntoEoN );,IF PluggedIntoEoN THENX    _MQTT( Client := _pEoN^._MQTT._Client );N    IF _MQTT.DCMDMessageReceived() THEN¤        _RecvDCMDMesg REF= _MQTT.GetDCMDMessage( MessageTopic => _RecvDCMDTopic );n        onDCMDMessage( pTopic := ADR( _RecvDCMDTopic ),f                       pMessage := _RecvDCMDMesg );    END_IFˆ    // IF EoN transitions from OFFLINE TO ONLINE we issue a rebirth.b    _PublishReBirth := _pEoN^.IsReDBirthNeeded();END_IF:_StateMachine( pEoN := _pEoN,>               pDevice := THIS, D               EoNName := EoNName,!d               IsPluggedIntoEoN := PluggedIntoEoN,"T               IsHealthy := DeviceHealthy,#T               DeviceName := _cDeviceName,$R               IsEoNOnline := _EoNOnline,%l               TimeToWait := TO_TIME( publishPeriod ),&T               Rebirth := _PublishReBirth,'T               AllMetricsList := _Metrics,(\               SessionState => SessionState );)2_PublishReBirth := FALSE;*Diag();+Interface,L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}-0{attribute 'reflection'}.hFUNCTION_BLOCK FB_Device IMPLEMENTS ISparkplugDevice/VAR_INPUT0f    DeviceName : WSTRING; // A name for this device1Ô    // Setting this value false will send a DDEATH, so all values will be shown bad on the Sparkplug SCADA2È    // Setting this value true will permit a DBIRTH to be sent, so all values will be shown healthy.3D    DeviceHealthy  : BOOL := TRUE;4Ž    ItfEoNInstance : ISparkplugDeviceProtocol; // Connect EoN instance 5END_VAR6VAR_OUTPUT74    PluggedIntoEoN : BOOL;8:    EoNName        : WSTRING;9¨    SessionState   : SparkplugSessionStateType := SparkplugSessionStateType.OFFLINE;:VAR_IN_OUT;”    publishPeriod       : UINT; // eg: 5000 (Value is in milliseconds)    <VAR=l    _cDeviceName    : WSTRING; // corrected devicename><    _Element        : Element;?R    _pEoN           : POINTER TO FB_Edge;@6    _EoNOnline      : BOOL;A6    _Initialised    : BOOL;BZ    _TopicProvider  : FB_DeviceTopicProvider;CH    _MQTT           : FB_DeviceMQTT;DÄ    _Metrics        : LIST; // Complete List of all metrics the device will send during its "life"EX    _StateMachine   : FB_DeviceStateMachine;FT    _SparkplugB     : FB_SparkplugBSimple;Gš    _Blob           : ARRAY[0..65535] OF BYTE; // buffer for encoded messagesHœ    _BlobSize       : UDINT;                   // current encoded message sizeI:    _Diag           : STRING;J    // DBirthKB    _CurrentPublishBirth  : UINT;LB    _LastPublishBirth     : UINT;MB    _StatusBirthPublished : BOOL;NB    _PublishBirth         : BOOL;OB    _PublishReBirth       : BOOL;PF    DBIRTHDone            : F_TRIG;Q    // DDATAR>    _CurrentPublishData : UINT;S>    _LastPublishData    : UINT;T>    _PublishData        : BOOL;U    // DCMDVt    _RecvDCMDMesg  : REFERENCE TO FB_PayloadSimpleDecoder;Wˆ    _RecvDCMDTopic : WSTRING(GC_Sparkplug.supported_string_lengths);X>    {attribute 'instance-path'}Y0    {attribute 'noinit'}Z$    _POU : STRING;["UniqueIdGenerator\7555]POULevel^L{8e575c5b-1d37-49c6-941b-5c0ec7874787}_Standard` ChildObjectGuidsa8System.Collections.ArrayListb,AddAttributeSubsequentcboolÐÐ-ÐÐ	E
+ÐÐ
­XÚÐ-ÐÐ
­YÚÐ-ÐÐ
­ZÚÐ-ÐÐ
­[ÚÐ-ÐÐ
­\ÚÐ-ÐÐ
­]ÚÐ-ÐÐ
­^ÚÐ-ÐÐ
­_ÚÐ-ÐÐ
­`ÚÐ-ÐÐ
­aÚÐ-ÐÐ
­bÚÐ-ÐÐ
­cÚÐ-ÐÐ
­dÚÐ-ÐÐ
­eÚÐ-ÐÐ
­fÚÐ-ÐÐ
­gÚÐ-ÐÐ
­hÚÐ-ÐÐ
­iÚÐ-ÐÐ
­jÚÐ- ÐÐ
­kÚÐ-!ÐÐ
­lÚÐ-"ÐÐ
­mÚÐ-#ÐÐ
­nÚÐ-$ÐÐ
­oÚÐ-%ÐÐ
­pÚÐ-&ÐÐ
­€ÚÐ-'ÐÐ
­ÚÐ-(ÐÐ
­‚ÚÐ-ÐÐ
­ƒÚÐ-)ÐÐ
­ÚÐ-*Ð+,Ð	E
+1ÐÐ
­ÚÐ--ÐÐ
­ÚÐ-.ÐÐ
­ÚÐ-/ÐÐ
­ÚÐ-0ÐÐ
­ÚÐ-1ÐÐ
­ÚÐ-2ÐÐ
­ÚÐ-3ÐÐ
­ ÚÐ-4ÐÐ
­!ÚÐ-5ÐÐ
­"ÚÐ-6ÐÐ
­#ÚÐ-7ÐÐ
­$ÚÐ-8ÐÐ
­%ÚÐ-9ÐÐ
­&ÚÐ-5ÐÐ
­'ÚÐ-:ÐÐ
­7ÚÐ-;ÐÐ
­8ÚÐ-5ÐÐ
­9ÚÐ-<ÐÐ
­:ÚÐ-=ÐÐ
­;ÚÐ->ÐÐ
­<ÚÐ-?ÐÐ
­=ÚÐ-@ÐÐ
­>ÚÐ-AÐÐ
­?ÚÐ-BÐÐ
­@ÚÐ-CÐÐ
­AÚÐ-DÐÐ
­BÚÐ-EÐÐ
­CÚÐ-FÐÐ
­DÚÐ-GÐÐ
­EÚÐ-HÐÐ
­FÚÐ-IÐÐ
­GÚÐ-JÐÐ
­HÚÐ-KÐÐ
­IÚÐ-LÐÐ
­JÚÐ-MÐÐ
­KÚÐ-NÐÐ
­LÚÐ-OÐÐ
­MÚÐ-PÐÐ
­NÚÐ-QÐÐ
­OÚÐ-RÐÐ
­PÚÐ-SÐÐ
­QÚÐ-TÐÐ
­RÚÐ-UÐÐ
­SÚÐ-VÐÐ
­TÚÐ-WÐÐ
­UÚÐ-XÐÐ
­VÚÐ-YÐÐ
­WÚÐ-ZÐÐ
­
+ÚÐ-5Ð[-\Ð]^-_`aÐbc­
\ No newline at end of file