nodescan icon indicating copy to clipboard operation
nodescan copied to clipboard

Python data_trigger.py

Open arnoschn opened this issue 10 years ago • 2 comments

Hello,

when running the data_trigger.py example I get the following error:

TypeError: No registered converter was able to produce a C++ rvalue of type ns::DataTrigger::ProcessReturnCode from this Python object of type bool

I guess the ProcessReturnCode is not defined for python?

Cheers

arnoschn avatar Nov 14 '14 10:11 arnoschn

I think defining this for the python extension should be it!?

enum_<ns::DataTrigger::ProcessReturnCode>("ProcessReturnCode")
.value("NoMoreToProcess",0)
.value("CanProcessAgain",1)
.value("ConnectionEnd",2)
.export_values();

Not 100% sure but I will try to compile it and see.

arnoschn avatar Nov 14 '14 10:11 arnoschn

Yes I think this is the good approach. I'll try this and keep you updated. (P.S.: as you can see regression tests need to be improved... !)

aguinet avatar Nov 17 '14 12:11 aguinet