Open Lighting Architecture  0.10.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
E131Sender.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15  *
16  * E131Sender.h
17  * Interface for the E131Sender class, this abstracts the encapsulation and
18  * sending of DMP PDUs contained within E131PDUs.
19  * Copyright (C) 2007 Simon Newton
20  */
21 
22 #ifndef LIBS_ACN_E131SENDER_H_
23 #define LIBS_ACN_E131SENDER_H_
24 
25 #include "ola/network/Socket.h"
26 #include "libs/acn/DMPPDU.h"
27 #include "libs/acn/E131Header.h"
28 #include "libs/acn/PreamblePacker.h"
29 #include "libs/acn/Transport.h"
30 #include "libs/acn/UDPTransport.h"
31 
32 namespace ola {
33 namespace acn {
34 
35 class DMPInflator;
36 
37 class E131Sender {
38  public:
40  class RootSender *root_sender);
41  ~E131Sender() {}
42 
43  bool SendDMP(const E131Header &header, const DMPPDU *pdu);
44  bool SendDiscoveryData(const E131Header &header, const uint8_t *data,
45  unsigned int data_size);
46 
47  static bool UniverseIP(uint16_t universe,
48  class ola::network::IPV4Address *addr);
49 
50  private:
51  ola::network::UDPSocket *m_socket;
52  PreamblePacker m_packer;
53  OutgoingUDPTransportImpl m_transport_impl;
54  class RootSender *m_root_sender;
55 
57 };
58 } // namespace acn
59 } // namespace ola
60 #endif // LIBS_ACN_E131SENDER_H_
Definition: E131Sender.h:37
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
Definition: Socket.h:235
Definition: UDPTransport.h:62
Represents a IPv4 Address.
Definition: IPV4Address.h:55
Definition: E131Header.h:35
Definition: PreamblePacker.h:35
Definition: RootSender.h:32
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Definition: DMPPDU.h:39