View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#157
Originally Posted by ossipena View Post
how in the hell can I add
RTCOM_EL_EVENT_SET_FIELD
to RTComEl -object with python?!?
RTCOM_EL_EVENT_SET_FIELD isn't a function so it won't appear in any library - it's a macro that is processed and replaced in C apps by the preprocessor before it gets compiled.

event.h defines it thus:
Code:
#define RTCOM_EL_EVENT_SET_FIELD(ev, FIELD, value) \
    do {\
        (ev)->_mask |= _is_set_ ## FIELD; \
        (ev)->fld_ ## FIELD = value;\ 
    } while(0)
So, looking at the line "rtcomm_eventlogger.RTCOM_EL_EVENT_SET_FIELD (ev, is_read, TRUE)", you'd want to do, instead, something like:
ev._mask |= _is_set_is_read
ev.fld_is_read = True

Something like that anyway, I'm pretty **** at all this

P.S. Rtcomm-eventlogger source may help

Gah, after waking up: it's a struct, so you may need to define it in ctypes...

Last edited by qwerty12; 2010-05-10 at 09:18.
 

The Following 2 Users Say Thank You to qwerty12 For This Useful Post: