Open Lighting Architecture  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RDMControllerInterface.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  * RDMControllerInterface.h
17  * A RDM Controller that sends a single message at a time.
18  * Copyright (C) 2010 Simon Newton
19  */
20 
29 #ifndef INCLUDE_OLA_RDM_RDMCONTROLLERINTERFACE_H_
30 #define INCLUDE_OLA_RDM_RDMCONTROLLERINTERFACE_H_
31 
32 #include <ola/Callback.h>
33 #include <ola/rdm/RDMCommand.h>
34 #include <ola/rdm/RDMReply.h>
35 #include <ola/rdm/RDMResponseCodes.h>
36 #include <ola/rdm/UIDSet.h>
37 
38 namespace ola {
39 namespace rdm {
40 
53 
59 inline void RunRDMCallback(RDMCallback *callback, RDMStatusCode status_code) {
60  ola::rdm::RDMReply reply(status_code);
61  callback->Run(&reply);
62 }
63 
69 
74  public:
75  virtual ~RDMControllerInterface() {}
76 
95  virtual void SendRDMRequest(RDMRequest *request,
96  RDMCallback *on_complete) = 0;
97 };
98 
99 
105  public:
107 
109 
115  virtual void RunFullDiscovery(RDMDiscoveryCallback *callback) = 0;
116 
122  virtual void RunIncrementalDiscovery(RDMDiscoveryCallback *callback) = 0;
123 };
124 } // namespace rdm
125 } // namespace ola
126 #endif // INCLUDE_OLA_RDM_RDMCONTROLLERINTERFACE_H_