[clam-devel] ConfigurationProxy: següent passa

David García Garzón david.garcia at upf.edu
Thu May 26 13:13:11 PDT 2011


Forwarded to the list, sorry, the original message from Xavi was in catalan.

A Dijous 26 Maig 2011 18:22:17, Xavier Serra Román va escriure:
> Ei David!
> l'altre dia vam parlar del camí a seguir amb el configuration i vas dir
> Add, Removes... Amb això vols dir per exemple:
> proxy["new_attribute"] = 'newvalue' ?
> Fins ara sempre consideravem això com a AttributeError. I en cas afirmatiu,
> com es fa? He vist el AddAttr_ de la interfície de DynamicType però pren
> dos valors enters i és protected
> 
> Bye!

We should concentrate first in being able to do the same things that we support 
right now with dummy: Plain type checked attributes but no optionality (the 
add/remove thing you asked) and no composite attributes. Looking at the source 
i still miss some features for the clam config proxy:
- Errors on accessing wrong attribs should match the ones raised by dummy
- implement __setitem__ to set the config value.
- Error on type missmatch al __setitem__
- keys()

Once this is done, comparing dummy and clam tests they should be quite 
uniform. We can postpone optional and composite attributes implementation 
while going forward to something that it is usable yet, that is, being able to 
inspect the configuration of an actual processing inside a network and 
reconfiguring it. So lets consider how to implement 
Clam_NetworkProxy::processingConfig, first to get the actual configuration, then 
to modify it (how to apply the configuration which was a tricky issue).

Or midterm goal is being able to build an stereo cable network like that:

net.source = "AudioSource"
net.source.NChannels = 2
net.sink = "AudioSink"
net.sink.NChannels = net.source.NChannels 
net.source[0] > net.sink[0] 
net.source[1] > net.sink[1] 


-- 
David García Garzón
(Work) david dot garcia at upf anotherdot edu
http://www.iua.upf.edu/~dgarcia



More information about the clam-devel mailing list