kurvanov - 2016-03-16

Hello
I am currently writing a library in which I have following structs

TYPE Input_com:
   STRUCT
      In_bit ARRAY [0..15] OF BIT;
      In_Word ARRAY [0..10] OF WORD;
      In_Float ARRAY [0..10] OF REAL
   END_STRUCT;
END_TYPE
TYPE Com_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;  // (PKR is the namespace)
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