Hello
I am currently writing a library in which I have following structs
TYPEInput_com:  STRUCT    In_bitARRAY[0..15]OFBIT;    In_WordARRAY[0..10]OFWORD;    In_FloatARRAY[0..10]OFREAL  END_STRUCT;END_TYPETYPECom_protocol:  STRUCT    inputData   AT%I*      :Input_com;        ......  END_STRUCT;END_TYPE
My library includes getters/setters for reading/writing into the members of the struct. But nevertheless, when a user is adding my library into his project, he must define a variable of Com_protocol Type for setting up the address of the inputs
VAR  ST_InComm :PKR.Com_protocol; //(PKRisthenamespace)END_VAR
Thus, he can directly read data from the struct (and indirectly from the Inputs). This is something I would like to avoid because of safety reason, I would like to force him using the dedicated 'getters'
Is there a way to do this ?
I would appreciate any help on that matter.
kurvanov
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I am currently writing a library in which I have following structs
My library includes getters/setters for reading/writing into the members of the struct. But nevertheless, when a user is adding my library into his project, he must define a variable of Com_protocol Type for setting up the address of the inputs
Thus, he can directly read data from the struct (and indirectly from the Inputs). This is something I would like to avoid because of safety reason, I would like to force him using the dedicated 'getters'
Is there a way to do this ?
I would appreciate any help on that matter.
kurvanov