mapper_signal mapper_device_add_signal ( mapper_device dev,
mapper_direction dir,
int num_instances,
const char * name,
int length,
char type,
const char * unit,
const void * minimum,
const void * maximum,
mapper_signal_update_handler * handler,
const void * user_data
)
mpr_sig_new(mpr_dev parent, mpr_dir dir, const char *name, int len, mpr_type type, const char *unit, const void *min, const void *max, int *num_inst, mpr_sig_handler *handler, int events)
void handler(mpr_sig sig, mpr_sig_evt evt, mpr_id inst, int len,
mpr_type type, const void *val, mpr_time t)
{
void *data = mpr_obj_get_prop_as_ptr((mpr_obj)sig, MPR_PROP_DATA, 0);
}
int main()
{
mpr_dev dev = mpr_dev_new("my_device", 0);
float mn = 20.f, mx = 20000.f;
mpr_sig sig = mpr_sig_new(dev, MPR_DIR_IN, "frequency", 1, MPR_FLT, "Hz",
&mn, &mx, NULL, handler, MPR_SIG_UPDATE);
void *data = ...;
mpr_obj_set_prop((mpr_obj)sig, MPR_PROP_DATA, NULL, 1, MPR_PTR, &data);
}
--
You received this message because you are subscribed to the Google Groups "dot_mapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dot_mapper+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dot_mapper/674b8028-e6e6-4cfe-90e8-5290dfe6194do%40googlegroups.com.
Hi Mathias, try this:
To unsubscribe from this group and stop receiving emails from it, send an email to dot_m...@googlegroups.com.