DeviceManager.h
Go to the documentation of this file.
69 * If more custom behaviour is required then this method can be used to up-cast to the appropriate
73 template <class RequestClass> ErrorCode createRequest(const String& devid, RequestClass*& request)
Controller * findController(const String &id)
Definition: DeviceManager.h:45
ErrorCode createRequest(const String &devid, Request *&request)
void registerDeviceClass(const Device::Factory &devclass)
Device classes call this to register themselves.
const char * c_str() const
Get a constant (un-modifiable) pointer to String content.
Definition: WString.h:616
String toString(ErrorCode err)
ErrorCode stop()
Definition: IOControl/include/IO/Controller.h:25
Handles requests for a specific device; the requests are executed by the relevant controller...
Definition: Libraries/IOControl/include/IO/Device.h:35
Abstract class which allows device instances to be created.
Definition: Libraries/IOControl/include/IO/Device.h:44
bool canStop() const
void invokeCallback(Request &request)
invoke the callback, if one is registered
Definition: DeviceManager.h:98
ErrorCode createRequest(const String &devid, RequestClass *&request)
Definition: DeviceManager.h:73
Json json
void setCallback(Request::Callback callback)
set the callback handler function for all I/O requests
Definition: DeviceManager.h:89
A Controller is responsible for serialising requests for a physical bus.
Definition: IOControl/include/IO/Controller.h:41
Request represents a single user request/response over a bus.
Definition: IOControl/include/IO/Request.h:75
Definition: DeviceManager.h:31
void start()
DeviceManager devmgr
Device * findDevice(const String &id)
ErrorCode begin(JsonObjectConst config)
Load device config and create device tree.
void registerController(Controller &controller)
Controllers register themselves so they can be located.
ErrorCode handleMessage(JsonObject json, Request::Callback callback)
ErrorCode end()
1.8.13