2010-11-12 16:16:22 +01:00
|
|
|
#ifndef __DEFINES_H_
|
|
|
|
#define __DEFINES_H_
|
2010-11-15 12:44:10 +01:00
|
|
|
|
2011-05-08 19:19:13 +02:00
|
|
|
// four minutes should be enough (seconds)
|
|
|
|
// timeout set to two seconds for testing purposes
|
2010-11-16 20:27:22 +01:00
|
|
|
#define BUFTIMEOUT 2
|
2010-11-15 18:18:28 +01:00
|
|
|
|
2010-11-16 20:27:22 +01:00
|
|
|
#define NUMBUFS 1000
|
2010-11-15 12:44:10 +01:00
|
|
|
|
2011-05-12 12:39:13 +02:00
|
|
|
#define REMOTE_IP "127.0.0.1"
|
2013-09-22 14:34:25 +02:00
|
|
|
#define REMOTE_PORT 4422
|
2011-05-12 12:39:13 +02:00
|
|
|
|
2011-05-12 17:14:46 +02:00
|
|
|
|
2013-09-22 14:34:25 +02:00
|
|
|
#define HASH "s2j\n8<18< "
|
2011-05-12 17:14:46 +02:00
|
|
|
// one byte number + 10 character hash plus newline
|
|
|
|
#define HEADEROFFSET 12
|
2010-11-15 12:44:10 +01:00
|
|
|
|
|
|
|
// 12 windows per floor, 7 floors, Value:Alpha
|
2010-11-12 16:16:22 +01:00
|
|
|
#define WIDTH 12
|
|
|
|
#define HEIGHT 7
|
2013-09-22 14:34:25 +02:00
|
|
|
#define CHANNELS 4
|
2010-11-15 12:44:10 +01:00
|
|
|
|
|
|
|
#define WINDOWOFFSET (WIDTH*CHANNELS+1)*HEIGHT
|
|
|
|
|
|
|
|
// 8 segments per window, 12 segments per floor, RGBA
|
|
|
|
#define SEGNUM 8
|
2010-11-12 16:16:22 +01:00
|
|
|
#define SEGWIDTH 12
|
2010-11-15 12:44:10 +01:00
|
|
|
#define SEGCHANNELS 4
|
2010-11-12 16:16:22 +01:00
|
|
|
|
2011-05-12 17:14:46 +02:00
|
|
|
#define BUFLEN HEADEROFFSET+WINDOWOFFSET+(SEGNUM*SEGCHANNELS+1)*SEGWIDTH
|
2010-11-15 18:18:28 +01:00
|
|
|
|
2010-11-12 16:16:22 +01:00
|
|
|
// not used for simplicity
|
|
|
|
//#define SEGHEIGHT 1
|
|
|
|
|
|
|
|
struct frame_t
|
|
|
|
{
|
2010-11-17 12:38:53 +01:00
|
|
|
unsigned char z;
|
|
|
|
unsigned char windows[HEIGHT][WIDTH][CHANNELS];
|
|
|
|
unsigned char segments[SEGWIDTH][SEGNUM][SEGCHANNELS];
|
2013-07-20 18:14:54 +02:00
|
|
|
// int windows[HEIGHT][WIDTH][CHANNELS];
|
|
|
|
// int segments[SEGWIDTH][SEGNUM][SEGCHANNELS];
|
2010-11-17 12:38:53 +01:00
|
|
|
};
|
|
|
|
|
2010-11-12 16:43:27 +01:00
|
|
|
#endif
|