[r69]: / trunk / library / FB_XmlControl / ReadFile / svnobj  Maximize  Restore  History

Download this file

42 lines (42 with data), 3.9 kB

Gx_lN!0…jüo]3xÎÉíºÚ‰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
R(* should have valid pointer to buffer *)F// check if buffer is correctly setfIF Buffer.pStrBuf = 0 OR Buffer.BufferSize = 0 THENX    ReadFile := E_XmlError.ErrorNoBufferSet;    RETURN;END_IF// open fileÀ_result := File.Open(Filename := sFileName, FileAccessMode := SysFile.ACCESS_MODE.AM_READ_PLUS);&IF _result = 0 THENZ    // read from start or set offset in file.:    IF udiNextOffset = 0 THEN0        ToStartBuffer();    ELSE0        iSearchPos := 0;Ê        // Everytime the next offset is added to the total offset to read the file in multiple steps.f        iFileOffset := iFileOffset + udiNextOffset;Z        File.SetPos(TO___XWORD(iFileOffset));	END_IF¸	_result := File.Read(pString := Buffer.pStrBuf, Buffer.BufferSize, BytesRead => BytesRead); R    IF _result <> 0 OR BytesRead = 0 THEN!`        ReadFile := E_XmlError.ErrorReadingFile;"R    Buffer.Length := TO_UDINT(BytesRead);#"	(* close file *)$	File.Close();%ELSE&X    ReadFile := E_XmlError.ErrorReadingFile;'Interface(L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94})FMETHOD PUBLIC ReadFile : E_XMLError*VAR_INPUT+8    sFileName : STRING(255);,@    udiNextOffset : UDINT := 0; -END_VAR.VAR_OUTPUT/0    BytesRead : __XWORD;0VAR1\    _result : SysFile.SysTypes.RTS_IEC_RESULT;ÐÐÐEÐÐ	
­ÚÐ-
ÐÐ	
­8ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­	ÚÐ-ÐÐ	
­
ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­1ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­6ÚÐ-ÐÐ	
­7ÚÐ-ÐÐ	
­)ÚÐ-ÐÐ	
­/ÚÐ-ÐÐ	
­9ÚÐ-ÐÐ	
­*ÚÐ-ÐÐ	
­+ÚÐ-ÐÐ	
­'ÚÐ-ÐÐ	
­,ÚÐ-ÐÐ	
­-ÚÐ- ÐÐ	
­.ÚÐ-!ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-"ÐÐ	
­ÚÐ-#ÐÐ	
­ÚÐ-$ÐÐ	
­ÚÐ-%ÐÐ	
­ÚÐ-&ÐÐ	
­ÚÐ-Ð'(ÐEÐÐ	
­ÚÐ-)ÐÐ	
­ÚÐ-*ÐÐ	
­ÚÐ-+ÐÐ	
­ ÚÐ-,ÐÐ	
­!ÚÐ--ÐÐ	
­"ÚÐ-.ÐÐ	
­$ÚÐ-/ÐÐ	
­ÚÐ--ÐÐ	
­ÚÐ-0ÐÐ	
­ÚÐ-1ÐÐ	
­ÚÐ--