|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DeviceService
The DeviceService interface defines the DeviceService concept. A DeviceService is an extension of ControlService which encapsulates multiple Controls.The DeviceService provides a uniform mechanism for accessing a heterogeneous grouping of Controls. In other words a DeviceService is a container for Commands, Measurements, and Signals, which has a simple, well- defined manner in which to access them.
Device,
ControlService| Field Summary | |
|---|---|
static int |
ACTIVE
Define the ACTIVE state value. |
static int |
ALIVE
Define the ALIVE state value. |
static java.lang.String[] |
ALL_COMMANDS
Comprehensive list of all the command ids. |
static java.lang.String[] |
ALL_MEASUREMENTS
Comprehensive list of all the measurement ids. |
static java.lang.String[] |
ALL_SIGNALS
Comprehensive list of all the signal ids. |
static short |
AUTOSTART
Define the AUTOSTART style value. |
static short |
BLOCKPROCESSING
Define the BLOCKPROCESSING style value. |
static java.lang.String |
Capabilities
Defines the Capabilities measurement. |
static java.lang.String |
CAPABILITIES_EXTERNAL_KEY
Defines the Capabilities measurement. |
static java.lang.String |
CAPABILITIES_GET_EXTERNAL_KEY
Defines the Capabilities measurement. |
static java.lang.String |
CAPABILITIES_READ_EXTERNAL_KEY
Defines the Capabilities measurement. |
static java.lang.String |
CAPABILITIES_WRITE_EXTERNAL_KEY
Defines the Capabilities measurement. |
static java.lang.String |
Configuration
Defines the Configuration measurement. |
static java.lang.String |
CONFIGURATION_DATA_KEY
Define the configuration data key (String) constant. |
static java.lang.String |
CONFIGURATION_EXTERNAL_KEY
Defines the Configuration measurement. |
static java.lang.String |
CONFIGURATION_GET_EXTERNAL_KEY
Defines the Configuration measurement. |
static java.lang.String |
CONFIGURATION_READ_EXTERNAL_KEY
Defines the Configuration measurement. |
static java.lang.String |
CONFIGURATION_WRITE_EXTERNAL_KEY
Defines the Configuration measurement. |
static int |
CONNECTED
Define the CONNECTED state value. |
static int |
CREATED
Define the CREATED state value. |
static int |
DEAD
Define the DEAD state value. |
static java.lang.String |
ERROR_EXTERNAL_KEY
Define the error external key (String) constant. |
static short |
EVENPROCESSING
Define the EVENPROCESSING style value. |
static java.lang.String |
EXECUTE_EXTERNAL_KEY
Define the execute (String) constant. |
static java.lang.String |
GET_EXTERNAL_KEY
Define the get (String) constant. |
static short |
INITIALIZEMEASUREMENTS
Define the INITIALIZEMEASUREMENTS style value. |
static java.lang.String |
KEYS_DATA_KEY
Define the keys data key (String) constant. |
static short |
NULL
Define the NULL style value. |
static java.lang.String |
READ_EXTERNAL_KEY
Define the read (String) constant. |
static java.lang.String |
RECEIVED_KEY_DATA_KEY
Define the received key data key (String) constant. |
static java.lang.String |
SERVICE_NAME
Define the OSGi service name. |
static java.lang.String |
SET_EXTERNAL_KEY
Define the set external key (String) constant. |
static java.lang.String |
SOURCE_DATA_KEY
Define the source data key (String) constant. |
static int |
STARTED
Define the STARTED state value. |
static java.lang.String |
STATE_DATA_KEY
Define the state data key (String) constant. |
static java.lang.String |
STATE_OLD_DATA_KEY
Define the state old data key (String) constant. |
static java.lang.String |
Status
Defines the Status measurement. |
static java.lang.String |
STATUS_EXTERNAL_KEY
Defines the Status measurement. |
static java.lang.String |
STATUS_GET_EXTERNAL_KEY
Defines the Status measurement. |
static java.lang.String |
STATUS_READ_EXTERNAL_KEY
Defines the Status measurement. |
static java.lang.String |
STATUS_WRITE_EXTERNAL_KEY
Defines the Status measurement. |
static java.lang.String |
TIMESTAMP_DATA_KEY
Define the timestamp data key (String) constant. |
static java.lang.String |
TRIGGER_EXTERNAL_KEY
Define the trigger (String) constant. |
static java.lang.String |
VALUE_DATA_KEY
Define the value data key (String) constant. |
static java.lang.String |
VALUE_OLD_DATA_KEY
Define the value old data key (String) constant. |
static java.lang.String |
WRITE_EXTERNAL_KEY
Define the write (String) constant. |
| Method Summary | |
|---|---|
void |
addDeviceListener(DeviceListener deviceListener)
Adds the specified listener to receive device listener notification. |
java.util.Enumeration |
elements()
Perform the elements method and return the Enumeration result. |
void |
exit()
Request the device to exit. |
ControlService |
get(java.lang.String key)
Perform the get method and return the ControlService result. |
CommandService |
getCommand(java.lang.String key)
Perform the getCommand method and return the CommandService result. |
java.util.Dictionary |
getConfigurationInformation()
Gets the configuration information. |
MeasurementService |
getMeasurement(java.lang.String key)
Perform the getMeasurement method and return the MeasurementService result. |
NotificationService |
getNotificationService()
Gets the notification service value. |
SignalService |
getSignal(java.lang.String key)
Perform the getSignal method and return the SignalService result. |
int |
getState()
Gets the int state of the DeviceService. |
TransportService |
getTransport()
Gets the Transport transport property value. |
boolean |
isStarted()
Gets the started (boolean) value. |
void |
put(java.lang.String key,
ControlService control)
Perform the put action method. |
void |
remove(java.lang.String key)
Perform the remove action method. |
void |
removeDeviceListener(DeviceListener deviceListener)
Removes the specified listener from receiving device listener notification. |
void |
send(MessageService message)
Perform the send action method. |
void |
setConfigurationInformation(java.util.Dictionary configurationInformation)
Set the configuration information. |
void |
setNotificationService(NotificationService notificationService)
Sets the notification service value. |
void |
setTransport(TransportService transport)
Sets the Transport transport property value. |
void |
start()
Request the device to start. |
void |
stop()
Request the device to stop. |
| Methods inherited from interface org.eclipse.soda.dk.device.service.ControlService |
|---|
getKey |
| Field Detail |
|---|
static final java.lang.String SERVICE_NAME
static final short AUTOSTART
static final short NULL
static final short INITIALIZEMEASUREMENTS
static final short EVENPROCESSING
static final short BLOCKPROCESSING
static final java.lang.String GET_EXTERNAL_KEY
static final java.lang.String READ_EXTERNAL_KEY
static final java.lang.String WRITE_EXTERNAL_KEY
static final java.lang.String SET_EXTERNAL_KEY
static final java.lang.String EXECUTE_EXTERNAL_KEY
static final java.lang.String ERROR_EXTERNAL_KEY
static final java.lang.String TRIGGER_EXTERNAL_KEY
static final java.lang.String VALUE_DATA_KEY
static final java.lang.String KEYS_DATA_KEY
static final java.lang.String VALUE_OLD_DATA_KEY
static final java.lang.String STATE_DATA_KEY
static final java.lang.String STATE_OLD_DATA_KEY
static final java.lang.String TIMESTAMP_DATA_KEY
static final java.lang.String SOURCE_DATA_KEY
static final java.lang.String CONFIGURATION_DATA_KEY
static final java.lang.String RECEIVED_KEY_DATA_KEY
static final java.lang.String[] ALL_COMMANDS
static final java.lang.String[] ALL_MEASUREMENTS
static final java.lang.String[] ALL_SIGNALS
static final java.lang.String Capabilities
static final java.lang.String CAPABILITIES_EXTERNAL_KEY
static final java.lang.String CAPABILITIES_GET_EXTERNAL_KEY
GET_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String CAPABILITIES_READ_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String CAPABILITIES_WRITE_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
WRITE_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String Configuration
static final java.lang.String CONFIGURATION_EXTERNAL_KEY
static final java.lang.String CONFIGURATION_GET_EXTERNAL_KEY
GET_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String CONFIGURATION_READ_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String CONFIGURATION_WRITE_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
WRITE_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String Status
static final java.lang.String STATUS_EXTERNAL_KEY
static final java.lang.String STATUS_GET_EXTERNAL_KEY
GET_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String STATUS_READ_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String STATUS_WRITE_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
WRITE_EXTERNAL_KEY,
Constant Field Valuesstatic final int ACTIVE
static final int ALIVE
static final int CONNECTED
static final int CREATED
static final int DEAD
static final int STARTED
| Method Detail |
|---|
void addDeviceListener(DeviceListener deviceListener)
deviceListener - The org.eclipse.soda.dk.device.service.DeviceListener listener to be added.removeDeviceListener(DeviceListener)java.util.Enumeration elements()
Enumeration result.
This method returns an enumeration of the Controls contained within the DeviceService.
Enumeration) value.void exit()
NOTE: When running under OSGi bundles, only Device Bundle Activator should be calling this method.
ControlService get(java.lang.String key)
ControlService result.
This method returns the ControlService contained within the DeviceService, whose key matches the
key argument.
key - java.lang.String
CommandService getCommand(java.lang.String key)
CommandService result.
This method returns the CommandService contained within the DeviceService, whose key matches the
key argument.
Some implementations of this method will throw a ClassCastException if the
ControlService found is not a CommandService.
key - String
CommandService) value.java.util.Dictionary getConfigurationInformation()
setConfigurationInformation(Dictionary)MeasurementService getMeasurement(java.lang.String key)
MeasurementService result.
This method returns the MeasurementService contained within the DeviceService, whose key matches the
key argument.
Some implementations of this method will throw a ClassCastException if the
ControlService found is not a MeasurementService.
key - String
NotificationService getNotificationService()
NotificationService) value.setNotificationService(NotificationService)SignalService getSignal(java.lang.String key)
SignalService result.
This method returns the SignalService contained within the DeviceService, whose key matches the
key argument.
Some implementations of this method will throw a ClassCastException if the
ControlService found is not a SignalService.
key - String
int getState()
TransportService getTransport()
Transport transport property value.
This method returns a reference to the TransportService used by this DeviceService
setTransport(TransportService)boolean isStarted()
boolean) value.
void put(java.lang.String key,
ControlService control)
NOTE: Normally, application code should not be using this method.
key - java.lang.Stringcontrol - org.eclipse.soda.dk.device.service.ControlServicevoid remove(java.lang.String key)
NOTE: Normally, application code should not be using this method.
key - java.lang.Stringvoid removeDeviceListener(DeviceListener deviceListener)
deviceListener - The org.eclipse.soda.dk.device.service.DeviceListener listener to be removed.addDeviceListener(DeviceListener)void send(MessageService message)
NOTE: Normally, application code should not be using this method.
message - org.eclipse.soda.dk.message.service.MessageServicevoid setConfigurationInformation(java.util.Dictionary configurationInformation)
configurationInformation - Set the configuration information,getConfigurationInformation()void setNotificationService(NotificationService notificationService)
NotificationService)
parameter.
notificationService - The notification service (NotificationService).getNotificationService()void setTransport(TransportService transport)
Transport transport property value.
This method sets the TransportService which will be used by this DeviceService
NOTE: When running under OSGi bundles, only Device Bundle Activator should be calling this method.
transport - The transport (TransportService) parameter.getTransport()void start()
NOTE: When running under OSGi bundles, only Device Bundle Activator should be calling this method.
void stop()
NOTE: When running under OSGi bundles, only Device Bundle Activator should be calling this method.
|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||