public void updateData(ICommand[] outputStates)
{
var channelValues = new byte[outputStates.Length];
//Make sure that editing the output buffer is thread safe
lock (buffer)
{
//copy the lighting commands to the DMX Buffer
for (int i = 0; i < outputStates.Length; i++)
{
_8BitCommand command = outputStates[i] as _8BitCommand;
//Reset the channel if the command is null
if (command == null)
{
// State reset
buffer[i + 1] = 0;
continue;
}
//Copy the new intensity value to the output buffer
buffer[i + 1] = command.CommandValue;
}
}
}