Re: [Discuss OpenCPI] Accessing Complex Properties (struct) of A Worker

From: James Kulp <jek_at_parera.com>
Date: Sat, 25 Apr 20 08:13:07 -0400

I'll put forth a more restricted answer.  The ACI can read volatile
property values of all types, whole and in part.
In all cases you can get the value returned as a formatted string
according to the documented textual format.
When the values being read (whole or part) are scalars or
arrays/sequences of scalars, they can also be read directly as binary
values.

These restrictions come down to the fact that OpenCPI does not perform
data type code generation for the ACI.

One idea that has been floated is to use Google's flatbuffers for this
purpose.

Jim




On 4/24/20 8:41 PM, Davis Hoover wrote:
> The ACI has support for retrieving values for *single members* of a struct
> property in their primitive type, but not *all* members in their primitive
> type. Only all members as a string representation of the entire property.
> The string can then be manually parsed. One example of such usage is here:
> https://gitlab.com/opencpi/opencpi/-/blob/develop/projects/assets/hdl/cards/fmcomms_2_3_rx.rcc/include/worker_prop_parsers_ad9361_config_proxy.h#L144
>
> From your description it sounds like your property is volatile, for which
> your concern of consecutive reads is valid. If the property is not volatile
> or readable, then this concern would not entirely be valid, but would
> certainly have other considerations.
>
> ---------- Forwarded message ---------
> From: Brian Padalino <bpadalino_at_gmail.com>
> Date: Fri, Apr 24, 2020 at 5:54 PM
> Subject: [Discuss OpenCPI] Accessing Complex Properties (struct) of A Worker
> To: <discuss_at_lists.opencpi.org>
>
>
> I have an application where multiple items need to be read out at the same
> time for a single property. They are intimately related to each other. So
> I have a structure property with multiple members. I have a readsync setup
> so that I can set all the members at once based on some internal states.
> But it's very important that they all be updated at the same time.
> Multiple reads are not useful.
>
> I saw section 7.1.7.1 of the Application Development guide:
>
> https://opencpi.github.io/OpenCPI_Application_Development.pdf
>
> But it's unclear how to get all the values of the struct out at once. Is
> this possible? Am I just reading that document incorrectly?
>
> Thanks,
> Brian
>


Received on Sat Apr 25 2020 - 12:13:07 CDT

This archive was generated by hypermail 2.3.0 : Fri Jun 05 2026 - 08:45:25 CDT