# example config file for bluebox distributor
# version 0.2 date 2006-11-29
# Copyright (C) 2006-2007 Stefan Schuermans <stefan@blinkenarea.org>
# Copyleft: GNU public license V2.0 - http://www.gnu.org/copyleft/gpl.html
# a BlinkenArea project - http://www.blinkenarea.org/



# general options

# verbose mode
# if enabled, every received datagram and data output to devices is reported
# if enabled, errors while sending data to devices will be reported
# enabling this option is a major impact on performance
#verbose=no
verbose=no



# input-options
input

# listen
# IP and port to listen on
#listen=0.0.0.0:2323
listen=0.0.0.0:2323

# timeout in seconds
# if no frame is received for this number of seconds the pixels are turned off
#timeout=3
timeout=3

# timeout interval in seconds
# if a timeout is detected the turn off commands are sent using this interval
#timeout_interval=1
timeout_interval=1



# mapping-options
# mapping from grayscale values to PWM values is done as follows:
#  PWM := ((grayscale / 255) * spread + base)[clamped to 0..1] ^ gamma * 127
mapping

# base brightness
# the mapping from grayscale values to PWM values is calculated based on this
#base=0.0
base=0.0

# brightness spread
# the mapping from grayscale values to PWM values is calculated based on this
#spread=1.0
spread=1.0

# gamma correction
# the mapping from grayscale values to PWM values is calculated based on this
#gamma=1.0
gamma=1.0



# output-options
# every frame is output as UDP packets to <dev_cnt> destination devices (e.g. BlueDataDistributors)
# the data for a device consists of the data for <ser_cnt> serial ports at this device
# the data for a serial port consists of a <command> byte (128..255) and the data for <pix_cnt> pixels (0..127)
# the data for a pixel is a byte with the brightness of this pixel
# if no datagram has been received for <timeout> seconds the <turn_off> byte is sent to the devices
output

# bind
# IP and port to bind to
#bind=0.0.0.0:2342
bind=0.0.0.0:2342

# IP addresses of the devices
# the IP address of device <dev_no> is: ip_base + dev_no * ip_step
#ip_base=10
ip_base=10.23.42.0
#ip_step=0.0.0.1
ip_step=0.0.0.1

# destination port
# the UDP port the devices listen on
#dest_port=2342
dest_port=2342

# number of devices
# e.g. the number of BlueDataDistributors connected to the output LAN
#dev_cnt=7
dev_cnt=7

# number of serial ports per device
# e.g. the number of serial ports at each BlueDataDistributor
#ser_cnt=32
ser_cnt=32

# number of pixels per serial port
# e.g. the number of pixels connected to each serial port
#pix_cnt=4
pix_cnt=4

# command byte
# this command byte is prepended to the pixel values on every serial port
#command=0x82
command=0x82

# turn off byte
# this byte is sent to the serial ports to turn off the pixels
#turn_off=0x80
turn_off=0x80

# suffix byte
# this byte is appended to the pixel values and the turn off byte
# e.g. to ensure that single bits are on the wire (to enable synchronization to the baudrate)
#suffix=0x55
suffix=0x55

# suffix count
# number of suffix bytes appended to the pixel values and the turn off byte
#suffix_cnt=1
suffix_cnt=1



# format-options
format

# format file
# contains the format of the display and the logical number of the pixels
# first line must be of format "<width> <height>"
#   e.g. "98 7"
# <height> lines with <widht> whitespace-separated pixel fields must follow
# pixel fields must have the format "<dev_no>-<ser_no>-<pixel_no>"
#   the number must be in decimal format and my be prepended with additional '0's
#   e.g. "0-5-23" for the 24th pixel at the 6th serial port of the first device
# pixel field may also be "-" if a pixel has to be ignored
#file=bluebox.bd_fmt
file=bluebox.bd_fmt

