Diff of /branches/FeatureBranches/PrimaryHost/SparkplugB/Function Blocks/FB_RemoteEdge/FB_RemoteEdge/ProcessNDATA/svnobj [r807] .. [r808]  Maximize  Restore

Switch to side-by-side view

--- a/branches/FeatureBranches/PrimaryHost/SparkplugB/Function Blocks/FB_RemoteEdge/FB_RemoteEdge/ProcessNDATA/svnobj
+++ b/branches/FeatureBranches/PrimaryHost/SparkplugB/Function Blocks/FB_RemoteEdge/FB_RemoteEdge/ProcessNDATA/svnobj
@@ -1,139 +1,119 @@
-Gx_l‹5!0…jüot([¹­ï£'õSystem.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
B// 1. pMessage is already decoded¤// 2. For each metric already in the edge try to find it in the NDATA.MetricList, ^      // Not Found? => set to Status.NotBirthed.	  // Found? => nothingj_Metrics.ItterateRestart(HasNext => existingHasNext);0WHILE existingHasNext DOª	_Metrics.ItterateNext(itfElement => itfExistingElement, HasNext => existingHasNext);:	MetricFoundInNDATA := FALSE;€	IF __QUERYINTERFACE(itfExistingElement, itfExistingMetric) THENV		pMessage.GetFirstMetric( name => newName,N								 MetricValid => newMetricValid,@								 HasNext => newHasNext);œ		MetricFoundInNDATA := newMetricValid AND (newName = itfExistingMetric.Name);`		WHILE newHasNext AND NOT MetricFoundInNDATA DOX			pMessage.GetNextMetric(  name => newName,P									 MetricValid => newMetricValid,B									 HasNext => newHasNext);ž			MetricFoundInNDATA := newMetricValid AND (newName = itfExistingMetric.Name); 		END_WHILE!	END_IF">	IF NOT MetricFoundInNDATA THEN#l		itfExistingMetric.Status := MetricStatus.NotBirthed;$END_WHILE%|// 3. For each metric in the NDATA, try to find it in the edge&F  // Found? ==> metric.ProcessNDATA'.  // NotFound ==> Error(RpMessage.GetFirstMetric( name => newName,)\	                     datatype => newdatatype,*B						 timestamp => newtimestamp,+@						 valueString => newString,,<						 valueLreal => newLreal,-8						 valueReal => newreal,.@						 valueVarInt => newVarInt,/J						 MetricValid => newMetricValid,0<						 HasNext => newHasNext);12                         2LTHIS^.GetMetricbyName( DeviceId:= "", 3Z                       MetricName:= newName, 4f                       Metric=> itfExistingMetric, 5N                       GetTimestamp=> ,6f                       xError=> MetricNotExisting, 7D                       eError=> );8.                       92IF MetricNotExisting THEN:&    xError := TRUE;;f    eError := Error.OhMy_ThatShouldNotHaveHappened;<~    WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),=Š                    'PrimaryHost ProcessNDATA MetricNotExisting: %s',>˜                    TO_STRING( Error.OhMy_ThatShouldNotHaveHappened ) );    ?ELSE@J	// update one as it allready excistsAP    Update( Metric := itfExistingMetric,B8            Name := newName,CH            DataType := newdatatype,DZ            Status := MetricStatus.ONLINE_OK,EL            Timestamp := newtimestamp,FB            String_ := newString,G@            LReal_ :=  newLreal,H:            Real_ := newreal,IF            VarInt :=  newVarInt );JEND_IFK\WHILE newHasNext AND NOT MetricFoundInNDATA DOLR	pMessage.GetNextMetric( name => newName,Mh                            datatype => newdatatype,Nl                            timestamp => newtimestamp,Oj                            valueString => newString,Pf                            valueLreal => newLreal,Qb                            valueReal => newreal,Rj                            valueVarInt => newVarInt,St                            MetricValid => newMetricValid,Tf                            HasNext => newHasNext);U8                            VP	THIS^.GetMetricbyName( DeviceId := "", Wd                           MetricName := newName, Xp                           Metric => itfExistingMetric, YV                           GetTimestamp=> ,Z`						   xError=> MetricNotExisting, eError=> );[6                           \4	IF MetricNotExisting THEN].        xError := TRUE;^n        eError := Error.OhMy_ThatShouldNotHaveHappened;_†        WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),`’                        'PrimaryHost ProcessNDATA MetricNotExisting: %s',aœ                        TO_STRING( Error.OhMy_ThatShouldNotHaveHappened ) );  b
-	ELSEc		//update onedX        Update( Metric := itfExistingMetric,e@                Name := newName,fP                DataType := newdatatype,gb                Status := MetricStatus.ONLINE_OK,hT                Timestamp := newtimestamp,iJ                String_ := newString,jH                LReal_ :=  newLreal,kB                Real_ := newreal,lN                VarInt :=  newVarInt );m                 nInterfaceoL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}p&METHOD ProcessNDATAqVAR_INPUTrD    itfPrimaryHost : IPrimaryHost;sEND_VARtVAR_IN_OUTu‚    pMessage : FB_PayloadSimpleDecoder; // already decoded pleasevVAR_OUTPUTw$    xError : BOOL;x&    eError : Error;yVARz8	existingHasNext     : BOOL;{@	itfExistingElement  : IElement;|J	itfExistingMetric   : IRemoteMetric;}8	MetricNotExisting   : BOOL;~	8	newHasNext          : BOOL;€8	newMetricValid      : BOOL;8	MetricFoundInNDATA  : BOOL;‚>	newName             : WSTRING;ƒL	newdatatype         : MetricDataType;„D	newtimestamp        : T_DateTime;…Œ	newString           : WSTRING(gc_sparkplug.supported_string_lengths);†:	newLreal            : LREAL;‡8	newreal             : REAL;ˆJ	newVarInt           : DecodedVarInt;‰b	pPrimaryHost        : POINTER TO FB_PrimaryHost;Šh	AllocdMetric        : REFERENCE TO FB_RemoteMetric;‹d	pExistingMetric     : POINTER TO FB_RemoteMetric;Œ    P    itfAllocdMetric     : IRemoteMetric;ÐÐÐEfÐÐ	
+Gx_l¹-!0…jüo"±T(Äv©ü’System.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
B// 1. pMessage is already decoded¤// 2. For each metric already in the edge try to find it in the NDATA.MetricList, <      // Not Found? => nothing.	  // Found? => nothing|// 3. For each metric in the NDATA, try to find it in the edgeF  // Found? ==> metric.ProcessNDATA.  // NotFound ==> ErrorRpMessage.GetFirstMetric( name => newName,\	                     datatype => newdatatype,B						 timestamp => newtimestamp,@						 valueString => newString,<						 valueLreal => newLreal,8						 valueReal => newreal,@						 valueVarInt => newVarInt,J						 MetricValid => newMetricValid,<						 HasNext => newHasNext);2                         LTHIS^.GetMetricbyName( DeviceId:= "",  Z                       MetricName:= newName, !f                       Metric=> itfExistingMetric, "N                       GetTimestamp=> ,#f                       xError=> MetricNotExisting, $D                       eError=> );%.                       &2IF MetricNotExisting THEN'&    xError := TRUE;(f    eError := Error.OhMy_ThatShouldNotHaveHappened;)~    WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),*Ø                    'PrimaryHost ProcessNDATA MetricNotExisting but haven$'t implemeneted NCMD/Rebirth: %s',+˜                    TO_STRING( Error.OhMy_ThatShouldNotHaveHappened ) );    ,ELSE-J	// update one as it allready excists.P    Update( Metric := itfExistingMetric,/8            Name := newName,0H            DataType := newdatatype,1Z            Status := MetricStatus.ONLINE_OK,2L            Timestamp := newtimestamp,3B            String_ := newString,4@            LReal_ :=  newLreal,5:            Real_ := newreal,6F            VarInt :=  newVarInt );7END_IF8\WHILE newHasNext AND NOT MetricFoundInNDATA DO9R	pMessage.GetNextMetric( name => newName,:h                            datatype => newdatatype,;l                            timestamp => newtimestamp,<j                            valueString => newString,=f                            valueLreal => newLreal,>b                            valueReal => newreal,?j                            valueVarInt => newVarInt,@t                            MetricValid => newMetricValid,Af                            HasNext => newHasNext);B8                            CP	THIS^.GetMetricbyName( DeviceId := "", Dd                           MetricName := newName, Ep                           Metric => itfExistingMetric, FV                           GetTimestamp=> ,G`						   xError=> MetricNotExisting, eError=> );H6                           I4	IF MetricNotExisting THENJ.        xError := TRUE;Kn        eError := Error.OhMy_ThatShouldNotHaveHappened;L†        WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),Mà                        'PrimaryHost ProcessNDATA MetricNotExisting but haven$'t implemeneted NCMD/Rebirth: %s',N˜                        TO_STRING( Error.OhMy_ThatShouldNotHaveHappened ) );O
+	ELSEP		//update oneQX        Update( Metric := itfExistingMetric,R@                Name := newName,SP                DataType := newdatatype,Tb                Status := MetricStatus.ONLINE_OK,UT                Timestamp := newtimestamp,VJ                String_ := newString,WH                LReal_ :=  newLreal,XB                Real_ := newreal,YN                VarInt :=  newVarInt );Z                 [	END_IF\END_WHILE]Interface^L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}_&METHOD ProcessNDATA`VAR_INPUTaD    itfPrimaryHost : IPrimaryHost;bEND_VARcVAR_IN_OUTd‚    pMessage : FB_PayloadSimpleDecoder; // already decoded pleaseeVAR_OUTPUTf$    xError : BOOL;g&    eError : Error;hVARi8	existingHasNext     : BOOL;j@	itfExistingElement  : IElement;kJ	itfExistingMetric   : IRemoteMetric;l8	MetricNotExisting   : BOOL;m	n8	newHasNext          : BOOL;o8	newMetricValid      : BOOL;p8	MetricFoundInNDATA  : BOOL;q>	newName             : WSTRING;rL	newdatatype         : MetricDataType;sD	newtimestamp        : T_DateTime;tŒ	newString           : WSTRING(gc_sparkplug.supported_string_lengths);u:	newLreal            : LREAL;v8	newreal             : REAL;wJ	newVarInt           : DecodedVarInt;xb	pPrimaryHost        : POINTER TO FB_PrimaryHost;yh	AllocdMetric        : REFERENCE TO FB_RemoteMetric;zd	pExistingMetric     : POINTER TO FB_RemoteMetric;{    |P    itfAllocdMetric     : IRemoteMetric;ÐÐÐERÐÐ	
 ­ªÚÐ-
ÐÐ	
 ­«ÚÐ-ÐÐ	
 ­¬ÚÐ-ÐÐ	
 ­­ÚÐ-ÐÐ	
 ­®ÚÐ-ÐÐ	
-­¯ÚÐ-ÐÐ	
-­°ÚÐ-ÐÐ	
-­±ÚÐ-ÐÐ	
-­²ÚÐ-ÐÐ	
-­³ÚÐ-ÐÐ	
-­´ÚÐ-ÐÐ	
-­µÚÐ-ÐÐ	
-­¶ÚÐ-ÐÐ	
-­·ÚÐ-ÐÐ	
-­¹ÚÐ-ÐÐ	
-­ºÚÐ-ÐÐ	
-­»ÚÐ-ÐÐ	
-­¼ÚÐ-ÐÐ	
-­½ÚÐ-ÐÐ	
-­¾ÚÐ- ÐÐ	
-­¿ÚÐ-!ÐÐ	
-­ÀÚÐ-"ÐÐ	
-­ÁÚÐ-#ÐÐ	
-­ÂÚÐ-!ÐÐ	
-­ÃÚÐ-$ÐÐ	
 ­ÄÚÐ-ÐÐ	
-­ÅÚÐ-%ÐÐ	
-­ÆÚÐ-&ÐÐ	
-­ÇÚÐ-'ÐÐ	
-­ÈÚÐ-(ÐÐ	
-­ÉÚÐ-)ÐÐ	
-­ÊÚÐ-*ÐÐ	
-­ËÚÐ-+ÐÐ	
-­ÌÚÐ-,ÐÐ	
-­ÍÚÐ--ÐÐ	
-­ÎÚÐ-.ÐÐ	
-­ÏÚÐ-/ÐÐ	
-­ÐÚÐ-0ÐÐ	
-­ÑÚÐ-1ÐÐ	
-­ÒÚÐ-2ÐÐ	
-­ÓÚÐ-3ÐÐ	
-­ÔÚÐ-4ÐÐ	
-­ÕÚÐ-5ÐÐ	
-­ÖÚÐ-6ÐÐ	
-­×ÚÐ-7ÐÐ	
-­ØÚÐ-8ÐÐ	
-­ÙÚÐ-9ÐÐ	
-­)ÚÐ-:ÐÐ	
-­êÚÐ-;ÐÐ	
-­:ÚÐ-<ÐÐ	
-­;ÚÐ-=ÐÐ	
-­9ÚÐ->ÐÐ	
-­ëÚÐ-?ÐÐ	
-­ìÚÐ-@ÐÐ	
-­íÚÐ-AÐÐ	
-­îÚÐ-BÐÐ	
-­ïÚÐ-CÐÐ	
-­ðÚÐ-DÐÐ	
-­ñÚÐ-EÐÐ	
-­òÚÐ-FÐÐ	
-­óÚÐ-GÐÐ	
-­ôÚÐ-HÐÐ	
-­õÚÐ-IÐÐ	
-­öÚÐ-JÐÐ	
+­ÅÚÐ-ÐÐ	
+­ÆÚÐ-ÐÐ	
+­ÇÚÐ-ÐÐ	
+­ÈÚÐ-ÐÐ	
+­ÉÚÐ-ÐÐ	
+­ÊÚÐ-ÐÐ	
+­ËÚÐ-ÐÐ	
+­ÌÚÐ-ÐÐ	
+­ÍÚÐ-ÐÐ	
+­ÎÚÐ-ÐÐ	
+­ÏÚÐ-ÐÐ	
+­ÐÚÐ-ÐÐ	
+­ÑÚÐ-ÐÐ	
+­ÒÚÐ-ÐÐ	
+­ÓÚÐ- ÐÐ	
+­ÔÚÐ-!ÐÐ	
+­ÕÚÐ-"ÐÐ	
+­ÖÚÐ-#ÐÐ	
+­×ÚÐ-$ÐÐ	
+­ØÚÐ-%ÐÐ	
+­ÙÚÐ-&ÐÐ	
+­)ÚÐ-'ÐÐ	
+­êÚÐ-(ÐÐ	
+­:ÚÐ-)ÐÐ	
+­;ÚÐ-*ÐÐ	
+­9ÚÐ-+ÐÐ	
+­ëÚÐ-,ÐÐ	
+­ìÚÐ--ÐÐ	
+­íÚÐ-.ÐÐ	
+­îÚÐ-/ÐÐ	
+­ïÚÐ-0ÐÐ	
+­ðÚÐ-1ÐÐ	
+­ñÚÐ-2ÐÐ	
+­òÚÐ-3ÐÐ	
+­óÚÐ-4ÐÐ	
+­ôÚÐ-5ÐÐ	
+­õÚÐ-6ÐÐ	
+­öÚÐ-7ÐÐ	
 ­÷ÚÐ-ÐÐ	
-­øÚÐ-KÐÐ	
-­ùÚÐ-LÐÐ	
-­úÚÐ-MÐÐ	
-­ûÚÐ-NÐÐ	
-­üÚÐ-OÐÐ	
-­ýÚÐ-PÐÐ	
-­þÚÐ-QÐÐ	
-­ÿÚÐ-RÐÐ	
-­ÚÐ-SÐÐ	
-­ÚÐ-TÐÐ	
-­ÚÐ-UÐÐ	
-­ÚÐ-VÐÐ	
-­ÚÐ-WÐÐ	
-­ÚÐ-XÐÐ	
-­ÚÐ-YÐÐ	
-­ÚÐ-ZÐÐ	
-­ÚÐ-[ÐÐ	
-­	ÚÐ-\ÐÐ	
-­<ÚÐ-]ÐÐ	
-­=ÚÐ-^ÐÐ	
-­>ÚÐ-_ÐÐ	
-­?ÚÐ-`ÐÐ	
-­+ÚÐ-aÐÐ	
-­ÚÐ-bÐÐ	
-­ÚÐ-cÐÐ	
-­ÚÐ-dÐÐ	
-­ÚÐ-eÐÐ	
-­ÚÐ-fÐÐ	
-­ ÚÐ-gÐÐ	
-­!ÚÐ-hÐÐ	
-­"ÚÐ-iÐÐ	
-­#ÚÐ-jÐÐ	
-­$ÚÐ-kÐÐ	
-­%ÚÐ-lÐÐ	
-­&ÚÐ-mÐÐ	
-­'ÚÐ-!ÐÐ	
-­(ÚÐ-$ÐnoÐE"ÐÐ	
-­‰ÚÐ-pÐÐ	
-­ŠÚÐ-qÐÐ	
-­‹ÚÐ-rÐÐ	
-­ŒÚÐ-sÐÐ	
-­ÚÐ-tÐÐ	
-­ŽÚÐ-uÐÐ	
-­ÚÐ-sÐÐ	
-­ÚÐ-vÐÐ	
-­‘ÚÐ-wÐÐ	
-­’ÚÐ-xÐÐ	
-­“ÚÐ-sÐÐ	
-­”ÚÐ-yÐÐ	
-­•ÚÐ-zÐÐ	
-­–ÚÐ-{ÐÐ	
-­—ÚÐ-|ÐÐ	
-­˜ÚÐ-}ÐÐ	
-­™ÚÐ-~ÐÐ	
-­šÚÐ-ÐÐ	
-­›ÚÐ-€ÐÐ	
-­œÚÐ-ÐÐ	
-­ÚÐ-‚ÐÐ	
-­žÚÐ-ƒÐÐ	
-­ŸÚÐ-„ÐÐ	
-­ ÚÐ-…ÐÐ	
-­¡ÚÐ-†ÐÐ	
-­¢ÚÐ-‡ÐÐ	
-­£ÚÐ-ˆÐÐ	
-­¤ÚÐ-~ÐÐ	
-­¥ÚÐ-‰ÐÐ	
-­¦ÚÐ-ŠÐÐ	
-­§ÚÐ-‹ÐÐ	
-­¨ÚÐ-ŒÐÐ	
-­©ÚÐ-ÐÐ	
-­ÚÐ-s
\ No newline at end of file
+­øÚÐ-8ÐÐ	
+­ùÚÐ-9ÐÐ	
+­úÚÐ-:ÐÐ	
+­ûÚÐ-;ÐÐ	
+­üÚÐ-<ÐÐ	
+­ýÚÐ-=ÐÐ	
+­þÚÐ->ÐÐ	
+­ÿÚÐ-?ÐÐ	
+­ÚÐ-@ÐÐ	
+­ÚÐ-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ÐÐ	
+­'ÚÐ-[ÐÐ	
+­(ÚÐ-\Ð]^ÐE"ÐÐ	
+­‰ÚÐ-_ÐÐ	
+­ŠÚÐ-`ÐÐ	
+­‹ÚÐ-aÐÐ	
+­ŒÚÐ-bÐÐ	
+­ÚÐ-cÐÐ	
+­ŽÚÐ-dÐÐ	
+­ÚÐ-bÐÐ	
+­ÚÐ-eÐÐ	
+­‘ÚÐ-fÐÐ	
+­’ÚÐ-gÐÐ	
+­“ÚÐ-bÐÐ	
+­”ÚÐ-hÐÐ	
+­•ÚÐ-iÐÐ	
+­–ÚÐ-jÐÐ	
+­—ÚÐ-kÐÐ	
+­˜ÚÐ-lÐÐ	
+­™ÚÐ-mÐÐ	
+­šÚÐ-nÐÐ	
+­›ÚÐ-oÐÐ	
+­œÚÐ-pÐÐ	
+­ÚÐ-qÐÐ	
+­žÚÐ-rÐÐ	
+­ŸÚÐ-sÐÐ	
+­ ÚÐ-tÐÐ	
+­¡ÚÐ-uÐÐ	
+­¢ÚÐ-vÐÐ	
+­£ÚÐ-wÐÐ	
+­¤ÚÐ-mÐÐ	
+­¥ÚÐ-xÐÐ	
+­¦ÚÐ-yÐÐ	
+­§ÚÐ-zÐÐ	
+­¨ÚÐ-{ÐÐ	
+­©ÚÐ-|ÐÐ	
+­ÚÐ-b
\ No newline at end of file