Diff of /branches/FeatureBranches/PrimaryHost/SparkplugB/Function Blocks/FB_RemoteDevice/FB_RemoteDevice/ProcessDDATA/svnobj [000000] .. [r808]  Maximize  Restore

Switch to side-by-side view

--- a
+++ b/branches/FeatureBranches/PrimaryHost/SparkplugB/Function Blocks/FB_RemoteDevice/FB_RemoteDevice/ProcessDDATA/svnobj
@@ -0,0 +1,118 @@
+Gx_l4,!0…jüo;!¯P€ÓÑ
+â$ëô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 xDATA.MetricList, <      // Not Found? => nothing.	  // Found? => nothing|// 3. For each metric in the xDATA, try to find it in the edgeF  // Found? ==> metric.ProcessxDATA.  // 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                         ZTHIS^.GetMetricbyName( MetricName:= newName,  f                       Metric=> itfExistingMetric, !N                       GetTimestamp=> ,"f                       xError=> MetricNotExisting, #D                       eError=> );$.                       %2IF MetricNotExisting THEN&&    xError := TRUE;'F    eError := Error.notimplemented;(~    WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),)Ø                    'PrimaryHost ProcessDDATA MetricNotExisting but haven$'t implemeneted NCMD/Rebirth: %s',*x                    TO_STRING( Error.notimplemented ) );    +ELSE,J	// update one as it allready excists-P    Update( Metric := itfExistingMetric,.8            Name := newName,/H            DataType := newdatatype,0Z            Status := MetricStatus.ONLINE_OK,1L            Timestamp := newtimestamp,2B            String_ := newString,3@            LReal_ :=  newLreal,4:            Real_ := newreal,5F            VarInt :=  newVarInt );6END_IF7&WHILE newHasNext DO8R	pMessage.GetNextMetric( name => newName,9h                            datatype => newdatatype,:l                            timestamp => newtimestamp,;j                            valueString => newString,<f                            valueLreal => newLreal,=b                            valueReal => newreal,>j                            valueVarInt => newVarInt,?t                            MetricValid => newMetricValid,@f                            HasNext => newHasNext);A8                            B^	THIS^.GetMetricbyName( MetricName := newName, Cp                           Metric => itfExistingMetric, DV                           GetTimestamp=> ,E`						   xError=> MetricNotExisting, eError=> );F6                           G4	IF MetricNotExisting THENH.        xError := TRUE;IN        eError := Error.notimplemented;J†        WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),Kà                        'PrimaryHost ProcessDDATA MetricNotExisting but haven$'t implemeneted NCMD/Rebirth: %s',L€                        TO_STRING( Error.notimplemented ) );    M
+	ELSEN		//update oneOX        Update( Metric := itfExistingMetric,P@                Name := newName,QP                DataType := newdatatype,Rb                Status := MetricStatus.ONLINE_OK,ST                Timestamp := newtimestamp,TJ                String_ := newString,UH                LReal_ :=  newLreal,VB                Real_ := newreal,WN                VarInt :=  newVarInt );X                 Y	END_IFZEND_WHILE[Interface\L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}]&METHOD ProcessDDATA^VAR_INPUT_D    itfPrimaryHost : IPrimaryHost;`END_VARaVAR_IN_OUTb‚    pMessage : FB_PayloadSimpleDecoder; // already decoded pleasecVAR_OUTPUTd$    xError : BOOL;e&    eError : Error;fVARg8	existingHasNext     : BOOL;h@	itfExistingElement  : IElement;iJ	itfExistingMetric   : IRemoteMetric;j8	MetricNotExisting   : BOOL;k	l8	newHasNext          : BOOL;m8	newMetricValid      : BOOL;n8	MetricFoundInNDATA  : BOOL;o>	newName             : WSTRING;pL	newdatatype         : MetricDataType;qD	newtimestamp        : T_DateTime;rŒ	newString           : WSTRING(gc_sparkplug.supported_string_lengths);s:	newLreal            : LREAL;t8	newreal             : REAL;uJ	newVarInt           : DecodedVarInt;vb	pPrimaryHost        : POINTER TO FB_PrimaryHost;wh	AllocdMetric        : REFERENCE TO FB_RemoteMetric;xd	pExistingMetric     : POINTER TO FB_RemoteMetric;y    zP    itfAllocdMetric     : IRemoteMetric;ÐÐÐEPÐÐ	
+­ªÚÐ-
ÐÐ	
+­«ÚÐ-ÐÐ	
+­¬ÚÐ-ÐÐ	
+­­ÚÐ-ÐÐ	
+­®ÚÐ-ÐÐ	
+­ÄÚÐ-ÐÐ	
+­ÅÚÐ-ÐÐ	
+­ÆÚÐ-ÐÐ	
+­ÇÚÐ-ÐÐ	
+­ÈÚÐ-ÐÐ	
+­ÉÚÐ-ÐÐ	
+­ÊÚÐ-ÐÐ	
+­ËÚÐ-ÐÐ	
+­ÌÚÐ-ÐÐ	
+­ÍÚÐ-ÐÐ	
+­ÎÚÐ-ÐÐ	
+­ÏÚÐ-ÐÐ	
+­ÐÚÐ-ÐÐ	
+­ÑÚÐ-ÐÐ	
+­ÒÚÐ-ÐÐ	
+­ÔÚÐ- ÐÐ	
+­ÕÚÐ-!ÐÐ	
+­ÖÚÐ-"ÐÐ	
+­×ÚÐ-#ÐÐ	
+­ØÚÐ-$ÐÐ	
+­ÙÚÐ-%ÐÐ	
+­)ÚÐ-&ÐÐ	
+­êÚÐ-'ÐÐ	
+­:ÚÐ-(ÐÐ	
+­;ÚÐ-)ÐÐ	
+­9ÚÐ-*ÐÐ	
+­ëÚÐ-+ÐÐ	
+­ìÚÐ-,ÐÐ	
+­íÚÐ--ÐÐ	
+­îÚÐ-.ÐÐ	
+­ïÚÐ-/ÐÐ	
+­ðÚÐ-0ÐÐ	
+­ñÚÐ-1ÐÐ	
+­òÚÐ-2ÐÐ	
+­óÚÐ-3ÐÐ	
+­ôÚÐ-4ÐÐ	
+­õÚÐ-5ÐÐ	
+­öÚÐ-6ÐÐ	
+­÷ÚÐ-ÐÐ	
+­øÚÐ-7ÐÐ	
+­ùÚÐ-8ÐÐ	
+­úÚÐ-9ÐÐ	
+­ûÚÐ-:ÐÐ	
+­üÚÐ-;ÐÐ	
+­ýÚÐ-<ÐÐ	
+­þÚÐ-=ÐÐ	
+­ÿÚÐ->ÐÐ	
+­ÚÐ-?ÐÐ	
+­ÚÐ-@ÐÐ	
+­ÚÐ-AÐÐ	
+­ÚÐ-BÐÐ	
+­ÚÐ-CÐÐ	
+­ÚÐ-DÐÐ	
+­ÚÐ-EÐÐ	
+­ÚÐ-FÐÐ	
+­	ÚÐ-GÐÐ	
+­aÚÐ-HÐÐ	
+­bÚÐ-IÐÐ	
+­cÚÐ-JÐÐ	
+­dÚÐ-KÐÐ	
+­+ÚÐ-LÐÐ	
+­ÚÐ-MÐÐ	
+­ÚÐ-NÐÐ	
+­ÚÐ-OÐÐ	
+­ÚÐ-PÐÐ	
+­ÚÐ-QÐÐ	
+­ ÚÐ-RÐÐ	
+­!ÚÐ-SÐÐ	
+­"ÚÐ-TÐÐ	
+­#ÚÐ-UÐÐ	
+­$ÚÐ-VÐÐ	
+­%ÚÐ-WÐÐ	
+­&ÚÐ-XÐÐ	
+­'ÚÐ-YÐÐ	
+­(ÚÐ-ZÐ[\ÐE"ÐÐ	
+­@ÚÐ-]ÐÐ	
+­AÚÐ-^ÐÐ	
+­BÚÐ-_ÐÐ	
+­CÚÐ-`ÐÐ	
+­DÚÐ-aÐÐ	
+­EÚÐ-bÐÐ	
+­FÚÐ-`ÐÐ	
+­GÚÐ-cÐÐ	
+­HÚÐ-dÐÐ	
+­IÚÐ-eÐÐ	
+­JÚÐ-`ÐÐ	
+­KÚÐ-fÐÐ	
+­LÚÐ-gÐÐ	
+­MÚÐ-hÐÐ	
+­NÚÐ-iÐÐ	
+­OÚÐ-jÐÐ	
+­PÚÐ-kÐÐ	
+­QÚÐ-lÐÐ	
+­RÚÐ-mÐÐ	
+­SÚÐ-nÐÐ	
+­TÚÐ-oÐÐ	
+­UÚÐ-pÐÐ	
+­VÚÐ-qÐÐ	
+­WÚÐ-rÐÐ	
+­XÚÐ-sÐÐ	
+­YÚÐ-tÐÐ	
+­ZÚÐ-uÐÐ	
+­[ÚÐ-kÐÐ	
+­\ÚÐ-vÐÐ	
+­]ÚÐ-wÐÐ	
+­^ÚÐ-xÐÐ	
+­_ÚÐ-yÐÐ	
+­`ÚÐ-zÐÐ	
+­ÚÐ-`
\ No newline at end of file