Welcome to part 2 of the series on property kinds in REDHAWK!
Previously we had a brief look at the property
property kind — a simple way of adding a public, end-user controlled interface to your Device or Component. Now we will extend the design with two very different behaviors: using the Pass on command line
flag for the property
kind and the allocation
kind.
The Pass on Command Line flag provides a mechanism for a pre-initialization value different than the property’s default; by making the property Read Only, we can effectively bake in property values at the Node or Waveform level. For our Device then, we will make the number of returned samples be editable from our Node’s preferences. Once the Node and its Device are running, that property will not be able to change. Another use case for this scenario is having a generic Device several similar pieces of attached equipment. The number of attached equipment might change from Node to Node, but the Device itself only needs to know how many to look for once it initializes.
At the other end of the spectrum, the Allocation kind will expose some of the power of REDHAWK vs. other alternatives: hardware reservation. We will modify our Device to have an allocation property that will serve two purposes. First, it lets an end-user (Waveform, in our case) specify a required sampling frequency. And second, it allows the allocation and deallocation process to “reserve” the hardware for that user. We’ll explore that concept in detail using an included Waveform and a standard component.
We’ll be continuing where we left off on Part 1, so pick up the Code Blocks and finish it first if you are going to be following along with this tutorial.
Enjoy!
Looking for the REDHAWK 1.9-1.10 version? Here.