Specifications

Node B would invoke readAdc(0), and then remotely invoke showResult(the-actual-ADC-reading-
goes-here) on node C.
The callout() function is most commonly used with the rpc() function. For example:
rpc(nodeB, 'callout', nodeC, 'showResult', 'readAdc' ,0)
Basically callout() allows you to have one node ask another node to do something, and then tell a third
node how it turned out.
This function normally returns True. It returns False only if it was unable to attempt the Remote
Procedure Call (for example, if the node is low on memory).
cbusRd(numToRead) – Read bytes in from the CBUS
This function returns a string of bytes read in from the currently selected CBUS device. Parameter
numToRead specifies how many bytes to read.
For more details on interfacing SNAP Nodes to external CBUS slave devices, refer to section 6.
cbusWr(str) – Write bytes out to the CBUS
This function writes the string of bytes specified by parameter str out to the currently selected CBUS
slave device.
This function returns None.
For more details on interfacing SNAP Nodes to external CBUS slave devices, refer to section 6.
chr(number) – Generate a single-character-string
Returns a single-character string based on the number given. For example, chr(0x41) returns the string
'A'.
crossConnect(endpoint1, endpoint2) – Tie two endpoints together
The SNAPpy switchboard is covered in section 5. Refer to included script “switchboard.py" to see the
possible values for endpoint1 and endpoint2.
5
See also function uniConnect() if what you really want is a one-sided data path.
5
Most platforms have two UARTs available, so with most SNAP Engines UART0 will connect to the USB port on a
SN163 board and UART1 will connect to the RS-232 port on any appropriate Synapse demonstration board. However the
RF300 SNAP Engine has only one UART – UART0 – and it comes out where UART1 normally comes out (to the RS-232
port, via GPIO pins 7 through 10). If you are working with RF300 SNAP Engines, be sure to adjust your code to reference
UART0 rather than UART1 for your RS-232 serial connections.
SNAP Reference Manual Document Number 600-0007K Page 45 of 202