Open Lighting Architecture: include/ola/rdm/RDMPacket.h Source File

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
RDMPacket.h
Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 *
16 * RDMPacket.h
17 * Structures and constants used with RDM Packets.
18 * Copyright (C) 2005 Simon Newton
19 */
20
28#ifndef INCLUDE_OLA_RDM_RDMPACKET_H_
29#define INCLUDE_OLA_RDM_RDMPACKET_H_
30
31#include <stdint.h>
32#include <ola/rdm/UID.h>
33
34namespace ola {
35namespace rdm {
36
37static const uint8_t START_CODE = 0xcc;
38static const uint8_t SUB_START_CODE = 0x01;
39static const unsigned int CHECKSUM_LENGTH = 2;
40
41
42// Don't use anything other than uint8_t here otherwise we can get alignment
43// issues.
44 typedef struct {
45 uint8_t sub_start_code;
46 uint8_t message_length;
47 uint8_t destination_uid[UID::UID_SIZE];
48 uint8_t source_uid[UID::UID_SIZE];
49 uint8_t transaction_number;
50 uint8_t port_id;
51 uint8_t message_count;
52 uint8_t sub_device[2];
53 uint8_t command_class;
54 uint8_t param_id[2];
55 uint8_t param_data_length;
56} RDMCommandHeader;
57} // namespace rdm
58} // namespace ola
59#endif // INCLUDE_OLA_RDM_RDMPACKET_H_
UID.h
A RDM unique identifier (UID).
ola::rdm::UID::UID_SIZE
@ UID_SIZE
Definition UID.h:260
ola::rdm
PLASA E1.20 Remote Device Management.
Definition AckTimerResponder.cpp:38
ola
The namespace containing all OLA symbols.
Definition Credentials.cpp:44
ola::rdm::RDMCommandHeader
Definition RDMPacket.h:44