|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DeviceOrbProcess
Abstract ORB process on:
Method Summary | |
---|---|
String |
action(long telescopeId,
String name,
String parameters)
Invokes the specified device-specific action. |
void |
commandBlind(long telescopeId,
String command,
boolean raw)
Transmits an arbitrary string to the device and does not wait for a response. |
boolean |
commandBoolean(long telescopeId,
String command,
boolean raw)
Transmits an arbitrary string to the device and waits for a boolean response. |
String |
commandString(long telescopeId,
String command,
boolean raw)
Transmits an arbitrary string to the device and waits for a string response. |
String |
getDescription(long telescopeId)
Returns a description of the driver, such as manufacturer and model number. |
List<Entity> |
getDeviceList()
Returns connected devices as entity list. |
String |
getDeviceName(Locale locale,
long deviceId)
Returns the name given to device. |
String |
getDriverInfo()
Returns a descriptive and version information about AstroDevice Server. |
String |
getDriverVersion()
Returns a string containing only the major and minor version of the AstroDevice Server. |
short |
getInterfaceVersion()
Returns the AstroDevice protocol version number that this device supports. |
String |
getPluginName(Locale locale,
long deviceId)
Returns the name given to astroDeviceServer plug-in responsible for managing the device. |
List<String> |
getSupportedActions(long telescopeId)
Returns the list of action names supported by this driver. |
boolean |
isConnected(long telescopeId)
Checks whether the device is connected. |
void |
setConnected(long telescopeId,
boolean connected)
Sets TRUE to connect to the device. |
void |
showSetupDialog(long telescopeId)
Launches a configuration dialog box for the driver. |
Method Detail |
---|
String getPluginName(Locale locale, long deviceId) throws RemoteException
locale
- Locale for select messages in the language of user.deviceId
- Device identifier.
RemoteException
- Exception if an error occurred.String getDeviceName(Locale locale, long deviceId) throws RemoteException
locale
- Locale for select messages in the language of user.deviceId
- Device identifier.
RemoteException
- Exception if an error occurred.String getDriverInfo() throws RemoteException
This string may contain line endings and may be hundreds to thousands of characters long. It
is intended to display detailed information on the AstroDevice Server, including version and
copyright data. See the getDescription(long)
method for information on the telescope
itself. To get the driver version in a parseable string, use the getDriverVersion()
method.
RemoteException
- Exception if an error occurred.String getDriverVersion() throws RemoteException
This must be in the form "n.n". It should not to be confused with the
getInterfaceVersion()
method, which is the version of this specification supported
by the server.
RemoteException
- Exception if an error occurred.short getInterfaceVersion() throws RemoteException
Clients can detect legacy V1 drivers by trying to call this method. If the driver raises an error, it is a V1 driver. V1 did not specify this return value. A driver may also return a value of 1. In other words, a raised error or a return value of 1 indicates that the driver is a V1 driver.
RemoteException
- Exception if an error occurred.List<Entity> getDeviceList() throws RemoteException
RemoteException
- Exception if an error occurred.String getDescription(long telescopeId) throws RemoteException
telescopeId
- Telescope identifier.
RemoteException
- Exception if an error occurred.
DriverException
- Must throw an exception if description unavailable.void showSetupDialog(long telescopeId) throws RemoteException
telescopeId
- Telescope identifier.
RemoteException
- Exception if an error occurred.
MethodNotImplementedException
- Must throw an exception if setup dialog is
unavailable.boolean isConnected(long telescopeId) throws RemoteException
telescopeId
- Telescope identifier.
TRUE
if the device is connected and FALSE
if the device is
disconnected.
RemoteException
- Exception if an error occurred.
DriverException
- Must throw exception if unsuccessful.void setConnected(long telescopeId, boolean connected) throws RemoteException
TRUE
to connect to the device. Sets FALSE
to disconnect from
the device.
telescopeId
- Telescope identifier.connected
- TRUE
if for connect the device and FALSE
for
disconnect the device.
RemoteException
- Exception if an error occurred.
DriverException
- Must throw exception if unsuccessful.void commandBlind(long telescopeId, String command, boolean raw) throws RemoteException
telescopeId
- Telescope identifier.command
- Literal command string to be transmitted.raw
- If set to TRUE
the string is transmitted 'as-is'. If set to
FALSE
then protocol framing characters may be added prior to
transmission.
RemoteException
- Exception if an error occurred.boolean commandBoolean(long telescopeId, String command, boolean raw) throws RemoteException
telescopeId
- Telescope identifier.command
- Literal command string to be transmitted.raw
- If set to TRUE
the string is transmitted 'as-is'. If set to
FALSE
then protocol framing characters may be added prior to
transmission.
RemoteException
- Exception if an error occurred.String commandString(long telescopeId, String command, boolean raw) throws RemoteException
telescopeId
- Telescope identifier.command
- Literal command string to be transmitted.raw
- If set to TRUE
the string is transmitted 'as-is'. If set to
FALSE
then protocol framing characters may be added prior to
transmission.
RemoteException
- Exception if an error occurred.String action(long telescopeId, String name, String parameters) throws RemoteException
This method is intended for use in all current and future device types and to avoid name clashes, management of action names is important from day 1. A two-part naming convention will be adopted - DeviceType:UniqueActionName where:
It is recommended that UniqueActionNames should be a maximum of 16 characters for legibility. Should the same function and UniqueActionName be supported by more than one type of device, the reserved DeviceType of “General” will be used. Action names will be case insensitive, so FilterWheel:SelectWheel, filterwheel:selectwheel and FILTERWHEEL:SELECTWHEEL will all refer to the same action.
The names of all supported actions must bre returned in the
getSupportedActions(long)
method.
Suppose filter wheels start to appear with automatic wheel changers; new actions could be “FilterWheel:QueryWheels” and “FilterWheel:SelectWheel”. The former returning a formatted list of wheel names and the second taking a wheel name and making the change, returning appropriate values to indicate success or failure.
telescopeId
- Telescope identifier.name
- A well known name agreed by interested parties that represents the action to be
carried out.parameters
- List of required parameters or NULL
value if none are
required.
RemoteException
- Exception if an error occurred.
MethodNotImplementedException
- Throws this exception if no actions are suported.
ActionNotImplementedException
- It is intended that the
getSupportedActions(long)
method will inform clients of driver
capabilities, but the driver must still throw an ASCOM.ActionNotImplemented
exception if it is asked to perform an action that it does not support.List<String> getSupportedActions(long telescopeId) throws RemoteException
This method must return an empty list if no actions are supported. Please do not throw a PropertyNotImplementedException.
This is an aid to client authors and testers who would otherwise have to repeatedly poll the
driver to determine its capabilities. Returned action names may be in mixed case to enhance
presentation but will be recognised case insensitively in the
action(long, String, String)
method.
An array list collection has been selected as the vehicle for action names in order to make it easier for clients to determine whether a particular action is supported. Since the collection is also ennumerable it is easy to use constructs such as For Each ... to operate on members without having to be concerned about how many members are in the collection.
telescopeId
- Telescope identifier.
RemoteException
- Exception if an error occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |