Prosody installation guide: diagnostic programs: switch

This program performs simple switching using the Aculab switch driver API. It cannot perform any configuration, but see also the program swcmd supplied with the switch driver which is much more powerful and is documented in the switch driver's documentation.

Go to directory $(TiNG)/diag/switch.

This is a standalone program that requires no Prosody facilities, so you can run it on a system which does not have Prosody installed (but it must have the Aculab switch driver installed and running).

Run switch with the appropriate options (the program is gen-LINUX_V6/switch or gen-WINNT_V6/switch depending on which operating system you are using).

Command line options are:

-c card Specifies the card whose switch driver is to perform the operations.

After any options, there must be a command. The command must be one of the following:

sample S:T
Samples the specified timeslot, printing the contents on hex. Only one sample is taken.
set S:T
Sets output stream S timeslot T to be unconnected.
set S:T V
Sets output stream S timeslot T to be connected to the fixed value V. This makes every sample on this timeslot be the specified value..
set S:T A:B
Sets output stream S timeslot T to be connected to the input stream A timeslot B.
show
Show all connections to output streams starting at zero and finishing when the switch driver reports an invalid stream.
show S
Show connections to all timeslots on output streams S.
show S:T
Show the connection, if any, to timeslot T on output streams S.

All numbers are specified in decimal by default, but can be specified in hex by prefixing 0x or in octal by prefixing 0. For example,

	$ gen-LINUX_V6/switch set 64:0
	$ gen-LINUX_V6/switch show 64:0
	$ gen-LINUX_V6/switch set 64:0 65:4
	$ gen-LINUX_V6/switch show 64:0
	64:0 65:4
	$ gen-LINUX_V6/switch set 64:0 128
	$ gen-LINUX_V6/switch show 64:0
	64:0 0x80

connects different sources to output stream 64, timeslot 0, showing each as it is performed. First the output is disconnected, then connected to input stream 65, timeslot 4, and then set to a fixed pattern.

The source code for this program is provided (switch.c).


This is one of the Prosody diagnostic programs .