27 #ifndef INCLUDE_OLAD_PLUGINADAPTOR_H_
28 #define INCLUDE_OLAD_PLUGINADAPTOR_H_
31 #include <ola/Clock.h>
34 #include <ola/io/SelectServerInterface.h>
35 #include <olad/OlaServer.h>
57 const std::string *instance_name);
63 bool delete_on_close =
false);
125 return m_port_broker;
136 const std::string *m_instance_name;
141 #endif // INCLUDE_OLAD_PLUGINADAPTOR_H_
Definition: PortBroker.h:40
A 0 arg, single use callback that returns void.
Definition: Callback.h:157
bool UnregisterDevice(class AbstractDevice *device) const
Unregister a device.
Definition: PluginAdaptor.cpp:120
Definition: Preferences.h:343
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
A container for the exported variables.
Definition: ExportMap.h:324
A BidirectionalFileDescriptor that also generates notifications when closed.
Definition: Descriptor.h:282
A 0 argument callback which can be called multiple times.
Definition: Callback.h:129
Export variables on the http server.
ola::thread::timeout_id RegisterRepeatingTimeout(unsigned int ms, Callback0< bool > *closure)
Execute a callback periodically.
Definition: PluginAdaptor.cpp:80
void * timeout_id
A timeout handle which can later be used to cancel a timeout.
Definition: SchedulerInterface.h:34
Keeps track of OLA's devices.
Definition: DeviceManager.h:61
void RemoveWriteDescriptor(ola::io::WriteFileDescriptor *descriptor)
Remove a WriteFileDescriptor for write-events.
Definition: PluginAdaptor.cpp:75
bool RegisterDevice(class AbstractDevice *device) const
Register a device.
Definition: PluginAdaptor.cpp:116
The interface for the SelectServer.
Definition: SelectServerInterface.h:42
Definition: PluginAdaptor.h:41
ola::thread::timeout_id RegisterSingleTimeout(unsigned int ms, SingleUseCallback0< void > *closure)
Execute a callback after a certain time interval.
Definition: PluginAdaptor.cpp:92
Represents a file descriptor that supports reading data.
Definition: Descriptor.h:140
void DrainCallbacks()
Run all callbacks until there are none left.
Definition: PluginAdaptor.cpp:112
Definition: Preferences.h:145
const std::string InstanceName()
Return the instance name for the OLA server.
Definition: PluginAdaptor.cpp:132
void RemoveTimeout(ola::thread::timeout_id id)
Cancel an existing timeout.
Definition: PluginAdaptor.cpp:104
bool AddReadDescriptor(ola::io::ReadFileDescriptor *descriptor)
Register a ReadFileDescriptor for read-events.
Definition: PluginAdaptor.cpp:49
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
void Execute(ola::BaseCallback0< void > *closure)
Execute the supplied callback at some point in the future.
Definition: PluginAdaptor.cpp:108
Represents a file descriptor that supports writing data.
Definition: Descriptor.h:170
const TimeStamp * WakeUpTime() const
The time when this SelectServer was woken up.
Definition: PluginAdaptor.cpp:128
bool AddWriteDescriptor(ola::io::WriteFileDescriptor *descriptor)
Register a WriteFileDescriptor for write-events.
Definition: PluginAdaptor.cpp:70
PluginAdaptor(class DeviceManager *device_manager, ola::io::SelectServerInterface *select_server, ExportMap *export_map, class PreferencesFactory *preferences_factory, class PortBrokerInterface *port_broker, const std::string *instance_name)
Create a new PluginAdaptor.
Definition: PluginAdaptor.cpp:35
class Preferences * NewPreference(const std::string &name) const
Create a new preferences container.
Definition: PluginAdaptor.cpp:124
void RemoveReadDescriptor(ola::io::ReadFileDescriptor *descriptor)
Remove a ReadFileDescriptor for read-events.
Definition: PluginAdaptor.cpp:60