That is very simple to do then, you just need to set up a TCP Client in C# and listen for messages from the Unreal Engine on a local port (Eg. 127.0.0.1:666). There is a simple example
hereThe packets for the LEDWiz are fairly simple, so you need to implement two commands (SPA and PBA). These are explained in detail in the readme.txt included in the SDK archive. But in basic terms SPA turns LED's on and off, and PBA sets the intensity or brightness of LED's (a value between 0 to 49)
So the packets may look like this (and sending the data in "ASCII" packets would work fine, but it would obviously be faster if done with binary instead. But for simplicity sake I will show it in ASCII.
"SBA:LEDWizId,Bank0,Bank1,Bank2,Bank3,PulseSpeed"
To turn all LED's on LEDWiz Id 0 (Let's assume you only have one LEDWiz so Id will always be zero)
"SBA:0,255,255,255,255,2"
To turn all LED's off
"SBA:0,0,0,0,0,2"
Those numbers are just binary values that represent the state of the LED's in a bank. There are 4 banks each with 8 LED's (Total of 32). If you open up Windows Calculater (with scientific mode turned on), enter "255" then select "Bin" it will show 8 bits turned on (11111111) meaning turn on all LED's for that bank. Say we only want every second LED lit in the first bank. (01010101) type that in Calculator in Bin mode then select Dec for decimal. That is "85", so the command will look like this.
"SBA:0,85,0,0,0,2"
So in other words you need to use binary operations to turn LED's on and off.
Here is a function that simplfies the process of setting the bits. It's a function that can recieve an array of 32 bools with one for each LED (true or false for on and off) and pack them into the 4 integer banks to send to the LEDWiz.
public void SetLEDState(int id, bool[] state, int pulseSpeed)
{
int i = 0;
uint[] bank = { 0, 0, 0, 0 };
for (; i < state.Length && i < 8; i++)
if (state[i]) bank[0] |= (uint)(1 << i);
for (; i < state.Length && i < 16; i++)
if (state[i]) bank[1] |= (uint)(1 << (i - 8));
for (; i < state.Length && i < 24; i++)
if (state[i]) bank[2] |= (uint)(1 << (i - 16));
for (; i < state.Length; i++)
if (state[i]) bank[3] |= (uint)(1 << (i - 24));
if(id < NumDevices)
LWZ_SBA(DeviceHandles[id], bank[0], bank[1], bank[2], bank[3], pulseSpeed);
}
Next you have the PBA command which accepts 32 values each a value from 1 to 49 to set the brightness of each LED using PWM. A value of zero will turn it off.
A PBA packet could look like this
"PBA:LEDWizId,32 Brightness Values,PulseSpeed"
So to set all the LED's to full brightness a packet may look like this
"PBA:0,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,0"
Obviously using ASCII to send the data will be rather slow, but sending the above in binary instead will only take 35 bytes instead of 103 bytes using ASCII like above.