I am currently writing a library in which I have following structs
In_bit ARRAY [0..15] OF BIT;
In_Word ARRAY [0..10] OF WORD;
In_Float ARRAY [0..10] OF REAL
inputData AT%I* : Input_com;
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
ST_InComm : PKR.Com_protocol; // (PKR is the namespace)
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.
Log in to post a comment.