Debian Codegraph @

interfaces/artnet/common.h

raw symbols SCIP
1 /*
2 * This library is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2.1 of the License, or (at your option) any later version.
6 *
7 * This library 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 GNU
10 * Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with this library; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15 *
16 * common.c
17 * Constants required for both internally and externally
18 * Copyright (C) 2004-2006 Simon Newton
19 */
20
21 #ifndef ARTNET_COMMON_H
22 #define ARTNET_COMMON_H
23
24 /*
25 * libartnet error codes
26 */
27 enum {
28 ARTNET_EOK = 0,
29 ARTNET_ENET = -1, // network error
30 ARTNET_EMEM = -2, // memory error
31 ARTNET_EARG = -3, // argument error
32 ARTNET_ESTATE = -4, // state error
33 ARTNET_EACTION = -5, // invalid action
34 };
35
36
37 /*
38 * The maximum ports per node built into the ArtNet protocol.
39 * This is always 4. Don't change it unless you really know what your doing
40 */
41 enum { ARTNET_MAX_PORTS = 4 };
42
43 /**
44 * The length of the short name field. Always 18
45 */
46 enum { ARTNET_SHORT_NAME_LENGTH = 18 };
47
48 /**
49 * The length of the long name field. Always 64
50 */
51 enum { ARTNET_LONG_NAME_LENGTH = 64 };
52
53 /**
54 * The length of the report field. Always 64
55 */
56 enum { ARTNET_REPORT_LENGTH = 64 };
57
58 /**
59 * The length of the DMX field. Always 512
60 */
61 enum { ARTNET_DMX_LENGTH = 512 };
62
63 /*
64 * Number of bytes in a RDM UID
65 */
66 enum { ARTNET_RDM_UID_WIDTH = 6 };
67
68 /*
69 * Length of the hardware address
70 */
71 enum { ARTNET_MAC_SIZE = 6 };
72
73 /*
74 * Length of the ESTA field
75 */
76 enum { ARTNET_ESTA_SIZE = 2 };
77
78 /*
79 * Length of the IP field
80 */
81 enum { ARTNET_IP_SIZE = 4 };
82
83 #endif