PDA

View Full Version : miscellaneous questions


korda
06-24-2008, 11:36 AM
1) why this call a) works and call b) does not?
a)
Python code (transmitting end):
rpc(myPortalAddr, 'functionOne', paramA, paramB)
C# code (receiving end):
public void functionOne(int line, int station)

b)
Python code (transmitting end):
rpc(myPortalAddr, 'functionOne', LocalAddr(), paramA, paramB)
C# code (receiving end):
public void functionOne(byte[] mac, int line, int station)

2) Can we get new gateway functions as follows:
- version number (access from client app and directly)
- "auto launch" and "terminating" gateway from a client app. It very inconvenient to start and terminate all programs separate

korda
06-24-2008, 11:41 AM
another function for new Gateway - could gateway internally automatically maintain connection with the bridge, and just provide connection status to the client on request? This including selection of usb/com port number and etc...

mgenti
06-24-2008, 11:53 AM
rpc(myPortalAddr, 'functionOne', LocalAddr(), paramA, paramB)


I believe the call is not working because "LocalAddr()" should be "localAddr()" the L is lower case and function names are case sensitive.


2) Can we get new gateway functions as follows:
- version number (access from client app and directly)
- "auto launch" and "terminating" gateway from a client app. It very inconvenient to start and terminate all programs separate

I'm not sure I understand the "auto launch" feature you are requesting. Are you asking for a way to start the SNAP Gateway application from a SNAP node? There is no way that we could start the application from a SNAP node since there has to be at least one application listening for that message.

mgenti
06-24-2008, 11:54 AM
another function for new Gateway - could gateway internally automatically maintain connection with the bridge, and just provide connection status to the client on request? This including selection of usb/com port number and etc...

Sorry, I'm not sure I understand this request either. Are you asking for method in the SNAP Gateway to determine which serial ports have SNAP nodes connected to them? Like the connection dialog in Portal scans the computers ports?

korda
06-24-2008, 11:57 AM
Sorry, my mistake it is a lower case 'localAddr()'. But this is not an answer I expected. Again, why call a) works and call b) does not, considering correction above?

Auto start gateway and termination - I meant of user application, able to do that.

korda
06-24-2008, 12:01 PM
Sorry, I'm not sure I understand this request either. Are you asking for method in the SNAP Gateway to determine which serial ports have SNAP nodes connected to them? Like the connection dialog in Portal scans the computers ports?

Yes, I think it would be advantageous to maintain all connections by "factory" made and tested software, instead of client application. And by all connections I mean radio and PC connection. Kind of background mode, just like you have between radios...

mgenti
06-24-2008, 03:31 PM
Yes, I think it would be advantageous to maintain all connections by "factory" made and tested software, instead of client application. And by all connections I mean radio and PC connection. Kind of background mode, just like you have between radios...

When you call the SNAP Gateway function "connectSerial" the serial connection to the bridge is maintained until the SNAP Gateway program is shutdown. Also, when you call "waitOnEvent" the network address passed is advertised to the bridge node so that other nodes can send messages to this address.

korda
06-24-2008, 04:25 PM
Sorry, my mistake it is a lower case 'localAddr()'. But this is not an answer I expected. Again, why call a) works and call b) does not, considering correction above?

Auto start gateway and termination - I meant of user application, able to do that.
What about problem with localAddr() not compatible with byte[] question?

mgenti
06-24-2008, 04:29 PM
But this is not an answer I expected. Again, why call a) works and call b) does not, considering correction above?


While that may not be the answer you expected it is VERY important to remember that function names, including builtins, are case sensitive and can cause the problem you are describing. It would not be the first time that we've seen code that looks "correct" and it was just a simple typo.

It appears that you are hitting the known SNAP Gateway bug with MAC and node network addresses containing non-printable ASCII characters that is fixed in our next release (see this thread (http://forums.synapse-wireless.com/showpost.php?p=187&postcount=2) for more details).


Auto start gateway and termination - I meant of user application, able to do that.

If I understand correctly what you are requesting then is that when a SNAP node calls a function on the SNAP Gateway address it should launch your program and then try and execute the function in your program? Also you would like a builtin SNAP Gateway function to terminate your user program?