Forum rss-feed

Forum

Developers: cfilter - cfilterfunc_changed, not called

Most Recent

written by: TheTechnobear

ok, so following on from above...

Im pretty sure there is no access to the output in cfilter, unless you are processing an event.
I will stay will cfilter as I will want to do some key handling later.

but for this particular problem , where the light change is not associated with an eigenD event.

I thinking perhaps creating my only wire_t object, and keep a reference to this in my impl_t class, this will use event_data_buffer to send the light change? im trying to determine now how I link this wire, to light output im assuming through the cookie that I pass down into the cfilter?

Id appreciate some help if anyone is around, as there are virtually no comments in the code, and cannot find any example in eigenD doing something similar..

this is going to be hard to get open source devs doing this stuff...
it look me about 15 mins to get lib_lo working, about an hour to get a basic agent in, but when you get 'lost' in eigenD internals, hours fly away!



EDIT: CLOSED
(ive got it working now, thanks to some help from geert)

written by: TheTechnobear

Wed, 26 Jun 2013 21:44:33 +0100 BST

im trying to get my first agent running, and having a bit of an issue.

its based on cfilter, and I want to activates some lights based on an external event.

in my python wrapper I have:

self[1] = atom.Atom(names='outputs')
self[1][1] = bundles.Output(OUT_LIGHT, False, names='light output', protocols='revconnect')
self.output = bundles.Splitter(self.domain, self[1][1])
self.osc = osc_input(self.domain, self.output.cookie(), "client_%d" % ordinal,"9001")


which makes its way down to piw::cfilter_t constructor.

ive defined a cfilterfunc_t with the method cfilterfunc_changed() overridden, and this is connected via
cfilterctl_create()

finally I call changed() on cfilter_t when I want the lights to change.


so my hope, was the lights outputs would be on the cfilter, such that when changed() was called,
I would get back a call on my cfilterfunc_changed()

however, this is not happening, I know im called changed(), but I dont get a callback.

Ive tried lots of different things :)
but the truth is, im not sure if this is how is supposed to work, or not... or if I have the wiring up of the lights incorrect... ( I guess because Im a bit unclear what 'root' represents in cfilter etc)

any help would be much appreciated!









written by: TheTechnobear

Wed, 26 Jun 2013 22:24:30 +0100 BST

ok, so put some logging in cfilter, and it appears root has no children.
so I guess that means that roots-children ... are not the outputs!

i dont have any inputs so, Im now wondering if the children are supposed to be inputs!? but then that means, Ive no way of using changed () :o(

can cfilter only be used to produce output, when there are inputs??? (i no unsolicited outputs from a outside source)
do I have to use root_t, and do it from the ground up?


written by: TheTechnobear

Sat, 29 Jun 2013 23:44:24 +0100 BST

ok, so following on from above...

Im pretty sure there is no access to the output in cfilter, unless you are processing an event.
I will stay will cfilter as I will want to do some key handling later.

but for this particular problem , where the light change is not associated with an eigenD event.

I thinking perhaps creating my only wire_t object, and keep a reference to this in my impl_t class, this will use event_data_buffer to send the light change? im trying to determine now how I link this wire, to light output im assuming through the cookie that I pass down into the cfilter?

Id appreciate some help if anyone is around, as there are virtually no comments in the code, and cannot find any example in eigenD doing something similar..

this is going to be hard to get open source devs doing this stuff...
it look me about 15 mins to get lib_lo working, about an hour to get a basic agent in, but when you get 'lost' in eigenD internals, hours fly away!



EDIT: CLOSED
(ive got it working now, thanks to some help from geert)



Please log in to join the discussions