Full documentation for this and the send message protocol can be found in your FS instalation directory.
Every message sent to be the server must be 9bytes long.
and start with F,S,O,D which converted into bytes is 70,83,79,68
byte 0: “F”
byte 1: “S”
byte 2: “O”
byte 3: “D”
byte 4 and 5 : Command code 2,0 is blackout
byte 6 : button state : 0 or 255 (0 = on release, 255 = on click) or Fader value: 0 to 255 (green rows in the table)
byte 7 and 8 : argument (for later use)
you will notice i have sent the blackout command twice
{70,83,79,68,2,0,255,0,0}
{70,83,79,68,2,0,0,0,0}
FS uses the commands the same as mouse clicks, Click and release. This is useful when using Flash buttons. The text in bold is 255 for click, 0 is for release.
Here is some example code in c# to make FS blackout
Code: Select all
using System.IO;
using System.Net;
using System.Net.Sockets;
TcpClient client = new TcpClient();
IPEndPoint serverEndPoint = new IPEndPoint(IPAddress.Parse("192.168.2.1"), 3332);
client.Connect(serverEndPoint);
NetworkStream clientStream = client.GetStream();
//F,S,O,D,Blackout,Spare,Click,Spare,Spare
byte[] buffer =new byte[9] {70,83,79,68,2,0,255,0,0};
clientStream.Write(buffer, 0, buffer.Length);
clientStream.Flush();
//F,S,O,D,Blackout,Spare,Release,Spare,Spare
byte[] buffer2 = new byte[9] { 70, 83, 79, 68, 2, 0, 0, 0, 0 };
clientStream.Write(buffer2, 0, buffer2.Length);
clientStream.Flush();