Open Lighting Architecture
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ShowNetPackets.h
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU Library General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15  *
16  * ShowNetPackets.h
17  * Datagram definitions for libshownet
18  * Copyright (C) 2005-2009 Simon Newton
19  */
20 
21 #ifndef PLUGINS_SHOWNET_SHOWNETPACKETS_H_
22 #define PLUGINS_SHOWNET_SHOWNETPACKETS_H_
23 
24 #include "ola/BaseTypes.h"
25 
26 namespace ola {
27 namespace plugin {
28 namespace shownet {
29 
30 enum { SHOWNET_MAC_LENGTH = 6 };
31 enum { SHOWNET_NAME_LENGTH = 9 };
32 
34  uint8_t sigHi; // 0x80
35  uint8_t sigLo; // 0x8f
36  uint8_t ip[4]; // ip of sender
37  uint16_t netSlot[4]; // start channel of each slot
38  uint16_t slotSize[4]; // size of each slot
39  uint16_t indexBlock[5]; // index into data of each slot
40  uint8_t packetCountHi; // sequence number
41  uint8_t packetCountLo; // sequence number
42  uint8_t block[4]; // the last 2 items here have something to do with
43  // the channels that have passwords are.
44  char name[SHOWNET_NAME_LENGTH]; // name of console
45  uint8_t data[DMX_UNIVERSE_SIZE]; // data
46 } __attribute__((packed));
47 
48 typedef struct shownet_data_s shownet_data_packet;
49 
50 } // namespace shownet
51 } // namespace plugin
52 } // namespace ola
53 #endif // PLUGINS_SHOWNET_SHOWNETPACKETS_H_