kbanks
11-10-2008, 08:02 AM
(posted from a customer email)
I am trying to figure out what I am doing wrong. I am unable to access the methods on a node from the command line interface. I was able to do it at one time but right now I can only seem to access the base functions. For example, I have the default McastCounter loaded in both nodes name Main and Node (novel names). In theory I should be able to do:
Main.display2Digits(12)
But it does not take. I can view Main and double click on display2Digits to get the popup dialog box for parameters and it will change the LEDs but that’s it.
Any idea what I’ve overlooked? I have tried changing the Python Library Directory to a number of options without much luck.
The "<node name>.function" syntax is for Portal functions only.
The "auto-complete" feature is a clue to this. When you type "Main." in the Portal command line, you will notice that "display2digits" is not in the list.
Instead of the "<node name>." form, use one of the "rpc" forms:
In the rpc() call you can use the Node Address in quotes, or the Node Name without quotes.
rpc(Main, "display2digits", 42)
rpc("\x12\x34\x56", "display2digits", 42)
I am trying to figure out what I am doing wrong. I am unable to access the methods on a node from the command line interface. I was able to do it at one time but right now I can only seem to access the base functions. For example, I have the default McastCounter loaded in both nodes name Main and Node (novel names). In theory I should be able to do:
Main.display2Digits(12)
But it does not take. I can view Main and double click on display2Digits to get the popup dialog box for parameters and it will change the LEDs but that’s it.
Any idea what I’ve overlooked? I have tried changing the Python Library Directory to a number of options without much luck.
The "<node name>.function" syntax is for Portal functions only.
The "auto-complete" feature is a clue to this. When you type "Main." in the Portal command line, you will notice that "display2digits" is not in the list.
Instead of the "<node name>." form, use one of the "rpc" forms:
In the rpc() call you can use the Node Address in quotes, or the Node Name without quotes.
rpc(Main, "display2digits", 42)
rpc("\x12\x34\x56", "display2digits", 42)