Hello Paul,
thank you for the reply.
I tried and it works!
The only downside is that I have to pass a variable for each input. Since I have a struct like this in my C code,
typedef struct _input{
//Ingressi sulla Lizard
bool start1_sw;
bool start2_sw;
bool ih_tuning_fault;
bool ih_overcurrent_fault;
bool ih_check_control;
bool aux_voltage;
bool df_encoder1;
bool df_encoder2;
//Ingressi sull'IOExpander
bool start1_ext;
bool start2_ext;
bool pwr_bit0_ext;
bool pwr_bit1_ext;
bool pwr_bit2_ext;
bool pwr_bit3_ext;
bool pwr_bit4_ext;
bool pwr_bit5_ext;
bool pwr_bit6_ext;
bool presssure_sw;
bool temperature_sw;
bool slide1_in;
bool slide1_out;
bool slide2_in;
bool slide2_out;
bool driver1_fault;
bool driver2_fault;
} input_t;
The function in C to pass all input is:
static void GUI_UpdateInputState( const void* aData )
{
input_t Input = *((input_t*)aData);
/* only in case that the device driver is still initialized and the worker
thread is still running, the data should be provided to the device class
- otherwise, a new autoobject will be created and a new worker thread
started... */
ApplicationDeviceClass device = EwGetAutoObject( &ApplicationDevice, ApplicationDeviceClass );
ApplicationDeviceClass__UpdateInput( device,
Input.start1_sw,
Input.start2_sw,
Input.ih_tuning_fault,
Input.ih_overcurrent_fault,
Input.ih_check_control,
Input.aux_voltage,
Input.df_encoder1,
Input.df_encoder2,
Input.start1_ext,
Input.start2_ext,
Input.pwr_bit0_ext,
Input.pwr_bit1_ext,
Input.pwr_bit2_ext,
Input.pwr_bit3_ext,
Input.pwr_bit4_ext,
Input.pwr_bit5_ext,
Input.pwr_bit6_ext,
Input.presssure_sw,
Input.temperature_sw,
Input.slide1_in,
Input.slide1_out,
Input.slide2_in,
Input.slide2_out,
Input.driver1_fault,
Input.driver2_fault);
}
And the corresponding in Embedded Wizard has lot of arguments:

I wondered if it would be possible to replicate the struct in Embedded Wizard, to make passing variables easier and clearer. I currently have a property of type bool for each input.
