public interface DeviceService
Modifier and Type | Method and Description |
---|---|
void |
addConfigListener(ConfigListener listener)
Adds a configuration listener notified when the config of the device changes.
|
void |
removeConfigListener(ConfigListener listener)
Removes a configuration listener.
|
void |
setEvent(byte[] data)
Sets events.
|
void |
setState(byte[] data)
Sets the state of Device.
|
void |
setSubEvent(String subEvent,
byte[] data)
Sets sub-events.
|
void addConfigListener(ConfigListener listener) throws IOException
listener
- the right ConfigListener that will get notifiedIOException
- on subscription error to the config topicvoid removeConfigListener(ConfigListener listener) throws IOException
listener
- the right ConfigListener that will get notifiedIOException
- on subscription error to the config topicvoid setEvent(byte[] data) throws IOException
data
- application-dependent event dataIOException
- on connection issues and errors of communicationvoid setState(byte[] data) throws IOException
data
- application-dependent state dataIOException
- on connection issues and errors of communicationvoid setSubEvent(String subEvent, byte[] data) throws IOException
subEvent
- the wanted sub-folder of eventsdata
- application-dependent sub-event dataIOException
- on connection issues and errors of communication