2021-08-15 20:07:12 +00:00
|
|
|
#ifndef cwFlowSys_h
|
|
|
|
#define cwFlowSys_h
|
|
|
|
|
|
|
|
namespace cw
|
|
|
|
{
|
|
|
|
namespace flow
|
|
|
|
{
|
|
|
|
|
2021-12-11 20:19:15 +00:00
|
|
|
typedef handle<struct flow_str> handle_t;
|
2021-08-15 20:07:12 +00:00
|
|
|
|
2021-12-19 17:10:35 +00:00
|
|
|
|
2024-01-13 15:16:37 +00:00
|
|
|
|
2021-12-19 17:10:35 +00:00
|
|
|
void print_abuf( const struct abuf_str* abuf );
|
|
|
|
void print_external_device( const external_device_t* dev );
|
2021-12-11 20:19:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
rc_t create( handle_t& hRef,
|
|
|
|
const object_t& classCfg,
|
|
|
|
const object_t& networkCfg,
|
|
|
|
external_device_t* deviceA = nullptr,
|
|
|
|
unsigned deviceN = 0);
|
2021-12-12 21:41:57 +00:00
|
|
|
|
2021-12-19 17:10:35 +00:00
|
|
|
rc_t destroy( handle_t& hRef );
|
|
|
|
|
2024-02-18 13:41:19 +00:00
|
|
|
unsigned preset_cfg_flags( handle_t h );
|
2021-12-19 17:10:35 +00:00
|
|
|
|
2021-12-12 21:41:57 +00:00
|
|
|
// Run one cycle of the network.
|
2021-12-19 17:10:35 +00:00
|
|
|
rc_t exec_cycle( handle_t h );
|
2021-12-12 21:41:57 +00:00
|
|
|
|
|
|
|
// Run the network to completion.
|
2024-04-22 20:02:40 +00:00
|
|
|
rc_t exec( handle_t h );
|
2021-08-15 20:07:12 +00:00
|
|
|
|
2021-12-26 03:16:00 +00:00
|
|
|
rc_t apply_preset( handle_t h, const char* presetLabel );
|
2024-02-08 16:17:26 +00:00
|
|
|
rc_t apply_dual_preset( handle_t h, const char* presetLabel_0, const char* presetLabel_1, double coeff );
|
2024-04-22 20:02:40 +00:00
|
|
|
rc_t apply_preset( handle_t h, const multi_preset_selector_t& multi_preset_sel );
|
2024-02-08 16:17:26 +00:00
|
|
|
|
2021-12-26 03:16:00 +00:00
|
|
|
|
|
|
|
rc_t set_variable_value( handle_t h, const char* inst_label, const char* var_label, unsigned chIdx, bool value );
|
|
|
|
rc_t set_variable_value( handle_t h, const char* inst_label, const char* var_label, unsigned chIdx, int value );
|
|
|
|
rc_t set_variable_value( handle_t h, const char* inst_label, const char* var_label, unsigned chIdx, unsigned value );
|
|
|
|
rc_t set_variable_value( handle_t h, const char* inst_label, const char* var_label, unsigned chIdx, float value );
|
|
|
|
rc_t set_variable_value( handle_t h, const char* inst_label, const char* var_label, unsigned chIdx, double value );
|
|
|
|
|
2023-01-05 12:26:25 +00:00
|
|
|
rc_t get_variable_value( handle_t h, const char* inst_label, const char* var_label, unsigned chIdx, bool& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, const char* inst_label, const char* var_label, unsigned chIdx, int& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, const char* inst_label, const char* var_label, unsigned chIdx, unsigned& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, const char* inst_label, const char* var_label, unsigned chIdx, float& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, const char* inst_label, const char* var_label, unsigned chIdx, double& valueRef );
|
|
|
|
|
2021-12-19 17:10:35 +00:00
|
|
|
void print_class_list( handle_t h );
|
|
|
|
void print_network( handle_t h );
|
2021-08-15 20:07:12 +00:00
|
|
|
|
2023-03-17 22:24:07 +00:00
|
|
|
rc_t test( const object_t* cfg );
|
2021-08-15 20:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|