Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
As I am writing my my own FileFactory Library. Therefore I want to check which functionalities the target runtime has.
That way the filefactory can "adapt" to the target which makes the library more flexible and more user friendly.
To achieve this, I have read into the CAA File library and the function FILE.GetProperty suits this purpose perfectly.
I linked "File Acces" 3.5.7.0, which depends on "CAA File" 3.5.11.0
According to the documentation, the function works very straightforward;
Ouput (DWORD) := FILE.GetProperty( in := Input (WORD) );
To test this functionality i wrote a little testprogram to see if the function returns the targets capabilities;
//InsertFileAccessinLibraryManagerPROGRAMGetProperty
  PDIRNAME : DWORD; // A1
  PRENAME : DWORD; // A2
  PCOPY : DWORD; // A3
  PSETATTRIBUTE : DWORD; // A4
  PFILENAME83 : DWORD; // A100
  PCAPITALLETTERS : DWORD; //A101
  PABSOLUTEPATH : DWORD; // A200
  PDRIVELETTER : DWORD; // A201
 Â
  //severaldeclarationsmissinginglobalconstantslist3.5.11.0 ?
  MIA210 : DWORD; //210
  MIA211 : DWORD;//211
  MIA212 : DWORD;//212
  PNETWORKDRIVES : DWORD; // A300 END_VARDIRNAME     :=FILE.GetProperty(wProperty :=FILE.gc_PDIRNAME);    //   Support of function block FILE_DirRenamePRENAME    :=FILE.GetProperty(wProperty :=FILE.gc_PRENAME);    //  Support of function block FILE_RenamePCOPY     :=FILE.GetProperty(wProperty :=FILE.gc_PCOPY);      //  Support of function block FILE_CopyPSETATTRIBUTE  :=FILE.GetProperty(wProperty :=FILE.gc_PSETATTRIBUTE);  //  Support of function block FILE_SetAttributePFILENAME83   :=FILE.GetProperty(wProperty :=FILE.gc_PFILENAME83);    //  Restriction of the directory and file names to 8.3 formatPCAPITALLETTERS :=FILE.GetProperty(wProperty :=FILE.gc_PCAPITALLETTERS);  //  Restriction on capital letters for directory and file namesPABSOLUTEPATH   :=FILE.GetProperty(wProperty :=FILE.gc_PABSOLUTEPATH);  //  Restriction on absolute path specificationPDRIVELETTER   :=FILE.GetProperty(wProperty :=FILE.gc_PDRIVELETTER);  //  Support of drive letters//missingconstants?
MIA210 :=FILE.GetProperty(wProperty :=210); //Support of Resolver Syntax for file namesMIA211 :=FILE.GetProperty(wProperty :=211); //Support of FTP-Client functionsMIA212 :=FILE.GetProperty(wProperty :=212); //Support of Http-Client functionsPNETWORKDRIVES :=FILE.GetProperty(wProperty :=FILE.gc_PNETWORKDRIVES);Â Â //Â Â
Now, I ran this code on target x86 non RT, x64 non RT and RPi3, all v3.5.11.0, without ANY of the anwsers becoming "1" at runtime on all 3runtimes.
I assume this cannot be correct behaviour, am I doing something wrong? If so, what am I doing wrong?
I checked the input on the function and I think that works fine, the function has a valid argument and is called correct.
Q1: Can someone check my findings on the non-performing of the FILE.GetProperty function?
Q2: Are the 3 constants missing by design? E.G.;
MIA210 := FILE.GetProperty(wProperty := 210 ); //Support of Resolver Syntax for file names
MIA211 := FILE.GetProperty(wProperty := 211 ); //Support of FTP-Client functions
MIA212 := FILE.GetProperty(wProperty := 212 ); //Support of Http-Client functions
Many Thanx!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. Some info from CODESYS bug-tracker about CAA File:
GetProperty: "This function will not be implemented, because the 3S CAA implementation should behave in teh same way on all plattforms and there is no need to retrieve implementation properties.
The function will be removed (or hidden) during the next rework of the CAA libs." (CDS-20219)
FTP/HTTP - not implemented (CDS-2697 and etc.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Everybody,
As I am writing my my own FileFactory Library. Therefore I want to check which functionalities the target runtime has.
That way the filefactory can "adapt" to the target which makes the library more flexible and more user friendly.
To achieve this, I have read into the CAA File library and the function FILE.GetProperty suits this purpose perfectly.
I linked "File Acces" 3.5.7.0, which depends on "CAA File" 3.5.11.0
According to the documentation, the function works very straightforward;
Ouput (DWORD) := FILE.GetProperty( in := Input (WORD) );
with
Input = List of global constants which act as question
Output = Anwser 0 or 1 (as DWORD) to input question
https://help.codesys.com/webapp/CAA-File%2FFunctions%2FGetProperty;product=CAA_FILE;version=3.5.11.0
To test this functionality i wrote a little testprogram to see if the function returns the targets capabilities;
Now, I ran this code on target x86 non RT, x64 non RT and RPi3, all v3.5.11.0, without ANY of the anwsers becoming "1" at runtime on all 3runtimes.
I assume this cannot be correct behaviour, am I doing something wrong? If so, what am I doing wrong?
I checked the input on the function and I think that works fine, the function has a valid argument and is called correct.
Q1: Can someone check my findings on the non-performing of the FILE.GetProperty function?
Q2: Are the 3 constants missing by design? E.G.;
MIA210 := FILE.GetProperty(wProperty := 210 ); //Support of Resolver Syntax for file names
MIA211 := FILE.GetProperty(wProperty := 211 ); //Support of FTP-Client functions
MIA212 := FILE.GetProperty(wProperty := 212 ); //Support of Http-Client functions
Many Thanx!
Hi. Some info from CODESYS bug-tracker about CAA File:
GetProperty: "This function will not be implemented, because the 3S CAA implementation should behave in teh same way on all plattforms and there is no need to retrieve implementation properties.
The function will be removed (or hidden) during the next rework of the CAA libs." (CDS-20219)
FTP/HTTP - not implemented (CDS-2697 and etc.)
Hi,
Thanks fo the anwser. Topic closed
Ps.
I have no access to the bugtracker.