Hi Nigel,
Our approach leans toward making XML-based apps similar to workers (i.e.
hierarchy).
And it turned out to be straightforward, so it will be checked in this week.
There is simply another constructor for the API::Property class that
takes an Application reference rather than a Worker one.
Note that until we have proper hierarchical property naming (e.g. an
assembly has an explicit map from exposed properties to
the underlying worker properties), the names for these properties must
be explicit, e.g. "<instance-name>:<property>".
Thanks for prodding/prioritizing/voting on a "FIXME"...
On 6/24/12 9:34 PM, Merritt, Nigel (Contractor) wrote:
Fast property access [SEC=UNCLASSIFIED]
*UNCLASSIFIED*
In the discussion last week, it was mentioned that fast access to
properties existed already, which is true when the components are
manually created in code. However when using the XML method, the
OcpiApplicationApi is the only interface and this does not contain
functions to access the properties directly, it has the comment:
"// FIXME: add cached/efficient property methods like workers have"
It would be great to have a function that returned a
Ocpi::Api::Property class so that the application can get one for each
property requiring fast access, however from the comment above it
looks like the intention is to use the OCPI_DATA_TYPE macro to provide
functions for each data type?
Could you explain the intended interface and give a rough idea (if
known) of timescale. I am looking at possibly adding this in this
from the point of view of getting the Property instance as mentioned
above but this may not be the intended direction for OpenCPI.
Nigel
*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