How to use python actor in BCVTB
Hi, I was trying to learn how to use python actor in BCVTB. So I tried to take two constants ( x and y ), pass them as variables to python actor, add them using python script and plot a graph which should be a constant line. The python script that I have below gives me a TypeError. I can't seem to understand why '+' is not being recognised as an operand. I am also attaching the screenshots of individual actors and the system xml file. Can you please tell me where my problem lies ? My python script looks like:
class Main :
def fire(self) :
if not self.input.hasToken(0) :
return
t = self.input.get(0)
x = self.cons2.get(0)
y = int(t) + int(x)
self.output.broadcast(t)
But this gives me a TypeError.
What's
self.cons2
?