CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Thu Nov 14, 2019 5:56 pm

All times are UTC+01:00

Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Mar 16, 2016 8:35 am 

Joined: Wed Sep 09, 2015 1:44 pm
Posts: 21
I am currently writing a library in which I have following structs
TYPE Input_com:
      In_bit ARRAY [0..15] OF BIT;
      In_Word ARRAY [0..10] OF WORD;
      In_Float ARRAY [0..10] OF REAL
TYPE Com_protocol:
      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.

Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+01:00

Who is online

Users browsing this forum: No registered users and 5 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited