RACKMOUNT 8x8 MATRIX SWITCHER
MSS-8
Sample C# Application
// A success bit of 0 indicates data returned successfully.
Byte success = ((byte[])ServerResponseData)[17];
bool bSuccess = false;
if (success == 0)
bSuccess = true;
Console.WriteLine(@"Response from with IP address: {0} with type: {1}
and success of: {2}",
ServerEp.Address.ToString(),
String.Format("{0:x2}", type), bSuccess.ToString());
/* Now we attempt to setup ports on the matrix switch.
* At this point all communication is
* directed on port 7000 of the matrix swicher's IP address
*/
IPEndPoint matrixSwitcherConnectionAddress = new IPEndPoint(ServerEp.Address, 7000);
/* Configure the Matrix switcher for input port 1 to be routed to port 5
* Format is [x]v[y] where x is input port and y is output port PLUS all
* commands must end with a period */
Console.WriteLine("\r\nConfigure input port 1 to be routed to port 5...");
bytes = Encoding.ASCII.GetBytes("1v5.");
client.Send(bytes, bytes.Length, matrixSwitcherConnectionAddress);
/* Pause the client, view the matrix switcher and note that output port 5
* has a source port of 1*/
PrintPortStatus(ref client, ref matrixSwitcherConnectionAddress, ref ServerEp);
System.Console.WriteLine("Press any key to continue.");
System.Console.ReadKey(); // Hit any key to continue
/* Configure input port 3 to route to all output ports.
* The format is [x]v[y] where x input port and y is output port PLUS all
* commands must end with a period */
Console.WriteLine("\r\nConfigure input port 3 to be routed to all output ports...");
www.ospreyvideo.com 10