Open Lighting Architecture 0.10.9
Loading...
Searching...
No Matches
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>
36#include <ola/rdm/UIDSet.h>
37
38namespace ola {
39namespace rdm {
40
53
59inline 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
124} // namespace rdm
125} // namespace ola
126#endif // INCLUDE_OLA_RDM_RDMCONTROLLERINTERFACE_H_
Classes that represent RDM commands.
Enums representing the states of a response. This is generated from the proto file.
A set of UIDs.
The base class for all 1 argument callbacks.
Definition Callback.h:982
The interface that can send RDM commands, as well as perform discovery operations.
Definition RDMControllerInterface.h:104
virtual void RunFullDiscovery(RDMDiscoveryCallback *callback)=0
Start a full discovery operation.
virtual void RunIncrementalDiscovery(RDMDiscoveryCallback *callback)=0
Start an incremental discovery operation.
The interface that can send RDMRequest.
Definition RDMControllerInterface.h:73
virtual void SendRDMRequest(RDMRequest *request, RDMCallback *on_complete)=0
Send a RDM command.
RDM Commands that represent requests (GET, SET or DISCOVER).
Definition RDMCommand.h:234
void RunRDMCallback(RDMCallback *callback, RDMStatusCode status_code)
A helper message to run a RDMCallback with the given status code.
Definition RDMControllerInterface.h:59
RDMStatusCode
RDM Status Codes.
Definition RDMResponseCodes.h:45
ola::BaseCallback1< void, RDMReply * > RDMCallback
The callback run when a RDM request completes.
Definition RDMControllerInterface.h:52
ola::BaseCallback1< void, const ola::rdm::UIDSet & > RDMDiscoveryCallback
The callback run when a discovery operation completes.
Definition RDMControllerInterface.h:68
The namespace containing all OLA symbols.
Definition Credentials.cpp:44
Holds the final state of an RDM request.
Definition RDMReply.h:43