In REDHAWK IDE (v2.12), I am trying to use fcalc component for some math calculations. I tried to follow an example in the doc by putting math.sin(a+b)+random.random() in the equation field, but I got the following error:
CF.PropertySetPackage.InvalidConfiguration: Failure: . Properties: equation
IDL:CF/PropertySet/InvalidConfiguration:1.0
I also tried other math functions, such as sqrt. However, none of them worked. It is very hard to add any modules in the import field as well.
Did I do anything wrong while using this fcalc component?
It appears that the property change listener is not being triggered for the initial property configuration when launched in the IDE sandbox. There are several workarounds:
importproperty after launching the component, which will trigger the property change listener. Addingtimeto the list of imports, for example, will then importmathandrandomas well.Use the Python sandbox instead of the IDE sandbox
The warning is expected and just indicates that you can't use
random()in the equation without the full namespacerandom.random()because it would conflict with therandomlibrary.rh.fcalcin a waveform in a domain