[r679]: / branches / i-campbell / mqttsparkplugb / SparkplugB / Functions / FindChanges / svnobj  Maximize  Restore  History

Download this file

5 lines (5 with data), 21.4 kB

Gx_lёS!0┘jЭo4xіэGgФҐ)е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
longTagTextDFindChanges     := ERROR.NO_ERROR;2ErrorDetected   := FALSE;2ChangeDetected  := FALSE;*NumberOfChanges := 0;vSysTimeRtc.SysTimeRtcHighResGet( pTimestamp := Timestamp );TFOR Index := LOWER_BOUND( arSparkplugInt8,┌                          1 ) TO UPPER_BOUND( arSparkplugBoolean,h                                              1 ) DOX    IF arSparkplugBoolean[Index].Notify THENN        AddMetricError := pSparkplugB^.√            _Encoder.AddMetric( TimeStamp                     := Timestamp,І                                SparkPlugObject               := arSparkplugBoolean[Index],є                                AllMetricsWhichWillEverReport := AllMetricsList );`        IF AddMetricError <> ERROR.NO_ERROR THENX            FindChanges   := AddMetricError; D            ErrorDetected := TRUE;!        END_IF"^        NumberOfChanges := NumberOfChanges + 1;#l        arSparkplugBoolean[Index].AcknowledgeNotify();$    END_IF%END_FOR&└                          1 ) TO UPPER_BOUND( arSparkplugDateTime,'Z    IF arSparkplugDateTime[Index].Notify THEN(╦                                SparkPlugObject               := arSparkplugDateTime[Index],)n        arSparkplugDateTime[Index].AcknowledgeNotify();*~                          1 ) TO UPPER_BOUND( arSparkplugFloat,+T    IF arSparkplugFloat[Index].Notify THEN,╡                                SparkPlugObject               := arSparkplugFloat[Index],-h        arSparkplugFloat[Index].AcknowledgeNotify();.─                          1 ) TO UPPER_BOUND( arSparkplugDouble,/V    IF arSparkplugDouble[Index].Notify THEN0Є                                SparkPlugObject               := arSparkplugDouble[Index],1j        arSparkplugDouble[Index].AcknowledgeNotify();2|                          1 ) TO UPPER_BOUND( arSparkplugInt8,3R    IF arSparkplugInt8[Index].Notify THEN4╟                                SparkPlugObject               := arSparkplugInt8[Index],5f        arSparkplugInt8[Index].AcknowledgeNotify();6~                          1 ) TO UPPER_BOUND( arSparkplugInt16,7T    IF arSparkplugInt16[Index].Notify THEN8╡                                SparkPlugObject               := arSparkplugInt16[Index],9h        arSparkplugInt16[Index].AcknowledgeNotify();:~                          1 ) TO UPPER_BOUND( arSparkplugInt32,;T    IF arSparkplugInt32[Index].Notify THEN<╡                                SparkPlugObject               := arSparkplugInt32[Index],=h        arSparkplugInt32[Index].AcknowledgeNotify();>~                          1 ) TO UPPER_BOUND( arSparkplugInt64,?T    IF arSparkplugInt64[Index].Notify THEN@╡                                SparkPlugObject               := arSparkplugInt64[Index],Ah        arSparkplugInt64[Index].AcknowledgeNotify();B~                          1 ) TO UPPER_BOUND( arSparkplugUInt8,CT    IF arSparkplugUInt8[Index].Notify THEND╡                                SparkPlugObject               := arSparkplugUInt8[Index],Eh        arSparkplugUInt8[Index].AcknowledgeNotify();F─                          1 ) TO UPPER_BOUND( arSparkplugUInt16,GV    IF arSparkplugUInt16[Index].Notify THENHЄ                                SparkPlugObject               := arSparkplugUInt16[Index],Ij        arSparkplugUInt16[Index].AcknowledgeNotify();J─                          1 ) TO UPPER_BOUND( arSparkplugUInt32,KV    IF arSparkplugUInt32[Index].Notify THENLЄ                                SparkPlugObject               := arSparkplugUInt32[Index],Mj        arSparkplugUInt32[Index].AcknowledgeNotify();N─                          1 ) TO UPPER_BOUND( arSparkplugUInt64,OV    IF arSparkplugUInt64[Index].Notify THENPЄ                                SparkPlugObject               := arSparkplugUInt64[Index],Qj        arSparkplugUInt64[Index].AcknowledgeNotify();R|                          1 ) TO UPPER_BOUND( arSparkplugUUID,SR    IF arSparkplugUUID[Index].Notify THENT╟                                SparkPlugObject               := arSparkplugUUID[Index],Uf        arSparkplugUUID[Index].AcknowledgeNotify();V|                          1 ) TO UPPER_BOUND( arSparkplugText,WR    IF arSparkplugText[Index].Notify THENX╟                                SparkPlugObject               := arSparkplugText[Index],Yf        arSparkplugText[Index].AcknowledgeNotify();Z─                          1 ) TO UPPER_BOUND( arSparkplugString,[V    IF arSparkplugString[Index].Notify THEN\Є                                SparkPlugObject               := arSparkplugString[Index],]j        arSparkplugString[Index].AcknowledgeNotify();^RChangeDetected := (NumberOfChanges <> 0);_Interface`L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}a(*b╗    Parses every Array Element and adds it to the Encoder metrics List if the Element notifies a change (the value has been changed during runtime).c▓    When the Element has been processed, the notifier gets acknowledged. dR    Be sure to run this code continously!e*)f${attribute 'hide'}g8FUNCTION FindChanges : ERRORhVAR_IN_OUTit    arSparkplugBoolean  : ARRAY[*] OF FB_SparkplugBoolean;jv    arSparkplugDateTime : ARRAY[*] OF FB_SparkplugDateTime;kp    arSparkplugFloat    : ARRAY[*] OF FB_SparkplugFloat;lr    arSparkplugDouble   : ARRAY[*] OF FB_SparkplugDouble;mn    arSparkplugInt8     : ARRAY[*] OF FB_SparkplugInt8;np    arSparkplugInt16    : ARRAY[*] OF FB_SparkplugInt16;op    arSparkplugInt32    : ARRAY[*] OF FB_SparkplugInt32;pp    arSparkplugInt64    : ARRAY[*] OF FB_SparkplugInt64;qp    arSparkplugUInt8    : ARRAY[*] OF FB_SparkplugUInt8;rr    arSparkplugUInt16   : ARRAY[*] OF FB_SparkplugUInt16;sr    arSparkplugUInt32   : ARRAY[*] OF FB_SparkplugUInt32;tr    arSparkplugUInt64   : ARRAY[*] OF FB_SparkplugUInt64;un    arSparkplugUUID     : ARRAY[*] OF FB_SparkplugUUID;vn    arSparkplugText     : ARRAY[*] OF FB_SparkplugText;wr    arSparkplugString   : ARRAY[*] OF FB_SparkplugString;x═    AllMetricsList      : LIST; // AllMetricsList in which the changes are addedyEND_VARzVAR_INPUT{b    pSparkplugB : POINTER TO FB_SparkplugBSimple;|VAR_OUTPUT}     ChangeDetected  : BOOL;  // At least one Signal change has been detected;~d    ErrorDetected   : BOOL;  // Some Error OccuredІ    NumberOfChanges : UDINT; // Number of detected changes, each changes reflects 1 Signal ─VAR│4    Index          : DINT;┌@    TimeStamp      : T_DateTime;┐6    AddMetricError : ERROR;└"UniqueIdGenerator┘1274├POULevel┤L{8e575c5b-1d37-49c6-941b-5c0ec7874787}┬Standard┴ ChildObjectGuids┼8System.Collections.ArrayList▀,AddAttributeSubsequent▄boolпп-пп	E
ёпп
ґызп-пп
ґззп-пп
ґшзп-пп
ґэзп-пп
ґщзп-пп
ґчзп-пп
ґъзп-пп
ґЮзп-пп
ґАзп-пп
ґБзп-пп
ґЦзп-пп
ґДзп-пп
ґЕзп-пп
ґФзп-пп
ґГзп-пп
ґХзп-пп
ґИзп- пп
ґЙзп-!пп
ґКзп-пп
ґЛзп-"пп
ґМзп-#пп
ґНзп-$пп
ґОзп-%пп
ґПзп-пп
ґЯзп-пп
ґРзп-&пп
ґСзп-пп
ґТзп-'пп
ґУзп-пп
ґЖзп-пп
ґВзп-(пп
ґЬзп-пп
ґЫзп-пп
ґЗзп-пп
ґШзп-пп
ґЭзп- пп
ґЩзп-!пп
ґЧзп-пп
ґЪзп-"пп
ґзп-)пп
ґзп-$пп
ґзп-%пп
ґзп-пп
ґзп-пп
ґзп-*пп
ґзп-пп
ґзп-+пп
ґзп-пп
ґ	зп-пп
ґ
зп-,пп
ґзп-пп
ґзп-пп
ґ
зп-пп
ґзп-пп
ґзп- пп
ґзп-!пп
ґзп-пп
ґзп-"пп
ґзп--пп
ґзп-$пп
ґзп-%пп
ґзп-пп
ґзп-пп
ґзп-.пп
ґзп-пп
ґзп-/пп
ґзп-пп
ґзп-пп
ґзп-0пп
ґзп-пп
ґзп-пп
ґ зп-пп
ґ!зп-пп
ґ"зп- пп
ґ#зп-!пп
ґ$зп-пп
ґ%зп-"пп
ґ&зп-1пп
ґ'зп-$пп
ґ(зп-%пп
ґ)зп-пп
ґ*зп-пп
ґ+зп-2пп
ґ,зп-пп
ґ-зп-3пп
ґ.зп-пп
ґ/зп-пп
ґ0зп-4пп
ґ1зп-пп
ґ2зп-пп
ґ3зп-пп
ґ4зп-пп
ґ5зп- пп
ґ6зп-!пп
ґ7зп-пп
ґ8зп-"пп
ґ9зп-5пп
ґ:зп-$пп
ґ;зп-%пп
ґ<зп-пп
ґ=зп-пп
ґ>зп-6пп
ґ?зп-пп
ґ@зп-7пп
ґAзп-пп
ґBзп-пп
ґCзп-8пп
ґDзп-пп
ґEзп-пп
ґFзп-пп
ґGзп-пп
ґHзп- пп
ґIзп-!пп
ґJзп-пп
ґKзп-"пп
ґLзп-9пп
ґ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зп-пп
ґnзп- пп
ґoзп-!пп
ґpзп-пп
ґqзп-"пп
ґrзп-Aпп
ґsзп-$пп
ґtзп-%пп
ґuзп-пп
ґvзп-пп
ґwзп-Bпп
ґxзп-пп
ґyзп-Cпп
ґzзп-пп
ґ{зп-пп
ґ|зп-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пп
ґ╦зп-eпп
ґ╧зп-fпп
ґ╨зп-gпп
ґ╩зп-hпп
ґ╪зп-iпп
ґҐзп-jпп
ґ╬зп-kпп
ґ©зп-lпп
ґюзп-mпп
ґазп-nпп
ґбзп-oпп
ґцзп-pпп
ґдзп-qпп
ґезп-rпп
ґфзп-sпп
ґгзп-tпп
ґхзп-uпп
ґизп-vпп
ґйзп-wпп
ґкзп-xпп
ґлзп-yпп
ґмзп-zпп
ґнзп-{пп
ґозп-yпп
ґпзп-|пп
ґязп-}пп
ґрзп-~пп
ґсзп-пп
ґтзп-yпп
ґузп-─пп
ґжзп-│пп
ґвзп-┌пп
ґьзп-┐пп
ґзп-yп└-┘п├┤-┬┴┼п▀▄ґ