beforeQuery and afterConfig are less-than-perfectly documented (after looking at the three relevant documents). The excuse for this is that the idea of batches of properties is normally used only when OpenCPI is used underneath an SCA core framework, where the higher level SCA APIs indeed have "batch" reading and writing of property values.

In any case, here is are paragraphs that should be in the docs somewhere:

   An implementation (in its OWD) can set the "readsync" or "writesync"
   attributes of some of its configuration properties.  This means that
   those properties are intended to be read and written atomically with
   all other properties with that same sync attribute.  For reading,
   atomically means that the implementation will implement and respond
   to the "beforeQuery" operation by taking a "snapshot" of these
   properties so that when they are individually read, the values are
   all consistent as they where at the time of the "beforeQuery"
   operation.  Similarly, for "writesync" properties, the
   implementation will essentially buffer up the individually written
   properties until an "afterConfigure" operation, and then apply them
   all atomically.

   This implies that a control application that sets and gets property
   values needs to know when beforeQuery and afterConfigure are
   needed.  Note that for implementations that don't bother
   implementing beforeQuery or afterConfigure, they are no-ops and
   ignored in any case.
   Thus beforeQuery can always be done before reading a set of
   properties and afterConfigure can be done after writing a set of
   properties.  In the control API, properties have a readSync() and
   writeSync() member functions to test for this attribute (soon to be
   released - these were previously internal-only, not API).


Let us know if this is not clear enough.

On 3/8/12 1:10 AM, Ziersch, Troy (Contractor) wrote:

*UNCLASSIFIED*

Hi,
Thanks for the earlier info Jim.
I'm not too clear on the relationship between ReadSync, BeforeQuery and Read Cycles in HDL workers.. Say I've got a HDL worker with three ULong properties with ReadSync=True because I want to be able to read three counters atomically. Because of the existence of the ReadSync property I'm assuming that that OCPI will automatically give the HDL worker a BeforeQuery command when I read these parameters. There are other assumptions I can make about the relationship between BeforeQuery commands and parameter reads but I'd just like to confirm before coding an assumption. The question is, is there an order I need to read the parameters in to get one BeforeQuery command followed by three reads?
Thanks,
Troy

*IMPORTANT*: This email remains the property of the Department of Defence and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email.



_______________________________________________
opencpi_dev mailing list
[email protected]
http://lists.opencpi.org/listinfo.cgi/opencpi_dev-opencpi.org

_______________________________________________
opencpi_dev mailing list
[email protected]
http://lists.opencpi.org/listinfo.cgi/opencpi_dev-opencpi.org

Reply via email to