Diff of /branches/timvh/example/CODESYS_Control/Plc Logic/AppLowMemory/FB_ParseRecipeData/svnobj [000000] .. [r76]  Maximize  Restore

Switch to side-by-side view

--- a
+++ b/branches/timvh/example/CODESYS_Control/Plc Logic/AppLowMemory/FB_ParseRecipeData/svnobj
@@ -0,0 +1,5 @@
+Gx_l#!0…jüo3~tWõ©áàNMSystem.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
longTagText&CASE _iParseStep OFR    0: // read file and write into buffer,        IF xParse THENB            xParsingBusy := TRUE;Š            (* open file from offset position and read into buffer *)d            (* buffer is already set in FB_Init *)‚            // in this case always go to the start of the buffer.>            _Xml.ClearBuffer();²            _result := _Xml.ReadFile(sFileName := szFilename, udiNextOffset := SEL(udiStartPos = 0, udiStartPos - 1, 0), BytesRead => _XmlFileBytesRead);V            IF _result = E_XmlError.Ok THEN8                _index := 0;D                _iIngredient := 0;8                _iText := 0;L                _xRecipeRead := FALSE;D                _iParseStep := 10;             ELSE D                _iParseStep := 99;!$            END_IF"		END_IF#J    10: // get all data of the recipe$        REPEAT%H            _sTag := _Xml.NextTag();&b            IF _Xml.SearchPos >= _Xml.Length THEN'*                EXIT;(P            ELSIF _sTag = '/recipe' THEN)8                // end found*F                _iParseStep := 100;+J                _xRecipeRead := TRUE;,t            ELSIF _Xml.sTagsSeek = '/recipe/preptime' THEN-–                stRecipe.usiPreperationTime := TO_USINT(_Xml.GetTagData());.t            ELSIF _Xml.sTagsSeek = '/recipe/cooktime' THEN/ˆ                stRecipe.usiCookTime := TO_USINT(_Xml.GetTagData());0v            ELSIF _Xml.sTagsSeek = '/recipe/totaltime' THEN1Š                stRecipe.usiTotalTime := TO_USINT(_Xml.GetTagData());2~            ELSIF _Xml.sTagsSeek = '/recipe/ingredient/li' THEN3’                stRecipe.asIngredient[_iIngredient] := _Xml.GetTagData();4b                _iIngredient := _iIngredient + 1;5~            ELSIF _Xml.sTagsSeek = '/recipe/recipetext/li' THEN6z                stRecipe.asText[_iText] := _Xml.GetTagData();7J                _iText := _iText + 1;8J        UNTIL _xRecipeRead END_REPEAT9       :0    99: // error occured;<        xParsingBusy := FALSE;<<        xParsingError := TRUE;=4        IF NOT xParse THEN>F            xParsingError := FALSE;?:            _iParseStep := 0;@        A     100: // doneB:        xParsingDone := TRUE;CD            xParsingDone := FALSE;DEND_CASEEInterfaceFL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}GBFUNCTION_BLOCK FB_ParseRecipeDataHVAR_INPUTI$    xParse : BOOL;Jš    udiStartPos : UDINT; // start pos where selected recipe data can be foundKEND_VARLVAR_OUTPUTM0    xParsingDone : BOOL;N0    xParsingBusy : BOOL;O2    xParsingError : BOOL;PVAR_IN_OUTQ2    stRecipe : ST_RECIPE;RVARS,	_Xml : FB_XmlControl;Tj	szFilename : STRING := './AppLowMemory/recipes.xml';U4	// select your buffertypeV–    _Buffer : ARRAY [0..xmlpac.GVL_Param_XmlControl.MaxFileSize-1] OF BYTE;WP    _xBufferInitialised : BOOL := FALSE;X$	_iParseStep: INT;Y@    _result : xmlpac.E_XmlError;Z@    _XmlFileBytesRead : __XWORD;["    _index : INT;\.    _iIngredient : INT;]"    _iText : INT;^    _>    _sTag : XmlPac.T_MaxString;`0    _xRecipeRead : BOOL;ab"UniqueIdGeneratorc150dPOULeveleL{8e575c5b-1d37-49c6-941b-5c0ec7874787}fStandardg ChildObjectGuidsh8System.Collections.ArrayListi,AddAttributeSubsequentjboolÐÐ-ÐÐ	E
+<ÐÐ
­EÚÐ-ÐÐ
­FÚÐ-ÐÐ
­GÚÐ-ÐÐ
­HÚÐ-ÐÐ
­IÚÐ-ÐÐ
­JÚÐ-ÐÐ
­ŒÚÐ-ÐÐ
­‹ÚÐ-ÐÐ
­KÚÐ-ÐÐ
­LÚÐ-ÐÐ
­MÚÐ-ÐÐ
­ÚÐ-ÐÐ
­’ÚÐ-ÐÐ
­ŠÚÐ-ÐÐ
­NÚÐ-ÐÐ
­OÚÐ-ÐÐ
­PÚÐ- ÐÐ
­QÚÐ-!ÐÐ
­DÚÐ-"ÐÐ
­	ÚÐ-#ÐÐ
­
+ÚÐ-$ÐÐ
­ÚÐ-%ÐÐ
­ÚÐ-&ÐÐ
­ˆÚÐ- ÐÐ
­‰ÚÐ-'ÐÐ
­‡ÚÐ-(ÐÐ
­€ÚÐ-)ÐÐ
­†ÚÐ-*ÐÐ
­ÚÐ-+ÐÐ
­ÚÐ-,ÐÐ
­ÚÐ--ÐÐ
­‚ÚÐ-.ÐÐ
­ƒÚÐ-/ÐÐ
­„ÚÐ-0ÐÐ
­$ÚÐ-1ÐÐ
­ÚÐ-2ÐÐ
­ŽÚÐ-3ÐÐ
­”ÚÐ-4ÐÐ
­•ÚÐ-5ÐÐ
­–ÚÐ-6ÐÐ
­ÚÐ-7ÐÐ
­…ÚÐ-!ÐÐ
­ÚÐ-8ÐÐ
­pÚÐ-9ÐÐ
­qÚÐ-:ÐÐ
­rÚÐ-;ÐÐ
­sÚÐ-<ÐÐ
­tÚÐ-=ÐÐ
­uÚÐ->ÐÐ
­vÚÐ-?ÐÐ
­wÚÐ-"ÐÐ
­xÚÐ-@ÐÐ
­yÚÐ-AÐÐ
­zÚÐ-;ÐÐ
­{ÚÐ-BÐÐ
­|ÚÐ-=ÐÐ
­}ÚÐ-CÐÐ
­~ÚÐ-?ÐÐ
­oÚÐ-"ÐÐ
­ÚÐ-DÐEFÐ	E
+ÐÐ
­RÚÐ-GÐÐ
­SÚÐ-HÐÐ
­lÚÐ-IÐÐ
­TÚÐ-JÐÐ
­gÚÐ-KÐÐ
­kÚÐ-LÐÐ
­hÚÐ-MÐÐ
­iÚÐ-NÐÐ
­jÚÐ-OÐÐ
­UÚÐ-KÐÐ
­VÚÐ-PÐÐ
­WÚÐ-QÐÐ
­XÚÐ-KÐÐ
­YÚÐ-RÐÐ
­ZÚÐ-SÐÐ
­[ÚÐ-TÐÐ
­\ÚÐ-UÐÐ
­]ÚÐ-VÐÐ
­^ÚÐ-WÐÐ
­_ÚÐ-XÐÐ
­`ÚÐ-YÐÐ
­aÚÐ-ZÐÐ
­bÚÐ-[ÐÐ
­‘ÚÐ-\ÐÐ
­“ÚÐ-]ÐÐ
­cÚÐ-^ÐÐ
­dÚÐ-_ÐÐ
­eÚÐ-`ÐÐ
­fÚÐ-KÐÐ
­ÚÐ-aÐb-cÐde-fghÐij­
\ No newline at end of file