Setting Component Property from REDHAWK Control Panel

192 Views Asked by At

I'm working on a REDHAWK control panel. I've been able to bind an SCA Component property to an SWT Text widget and keep them in sync. However, I cannot find a method to set an SCA Component property from a REDHAWK control panel. For example, I am trying to set the value of a simple float property in an SCA Component after an SWT Button widget is pressed (using a SelectionEvent).

Is this something that I should expect to be able to do? If so, how? I dug through the gov.redhawk.core code, but didn't have any luck.

Thanks!

1

There are 1 best solutions below

0
On

In order to update component property you will need to get a locked reference to the SCA simple property. This is done as follows

ScaModelCommand.excute(property, new ScaModelCommand(){
      @Override
      execute()
      {   
              property.setValue(newValue)
      }
});