Difference between revisions of "Device (Java)"
From Neurotech Software Development Kit
NateColeman (talk | contribs) |
NateColeman (talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div class="header"> | <div class="header"> | ||
<div class="subTitle">ru.neurotech.neurosdk</div> | <div class="subTitle">ru.neurotech.neurosdk</div> |
Revision as of 07:25, 25 April 2018
ru.neurotech.neurosdk
Contents
Class Device
- java.lang.Object
-
- ru.neurotech.neurosdk.Device
-
public class <span class="typeNameLabel">Device</span> extends java.lang.Object
-
- <a name="field.summary">
</a>
Field Summary
Fields Modifier and Type Field and Description <a href="../../../ru/neurotech/common/SubscribersNotifier.html" title="class in ru.neurotech.common">SubscribersNotifier</a><<a href="../../../ru/neurotech/neurosdk/parameters/ParameterName.html" title="enum in ru.neurotech.neurosdk.parameters">ParameterName</a>>
<a href="../../../ru/neurotech/neurosdk/Device.html#parameterChanged">parameterChanged</a>
Subscribe this event to receive notifications about changes of device parameters
- <a name="method.summary">
</a>
Method Summary
All Methods <a href="javascript:show(2);">Instance Methods</a> <a href="javascript:show(8);">Concrete Methods</a> Modifier and Type Method and Description <a href="../../../ru/neurotech/neurosdk/channels/ChannelInfo.html" title="interface in ru.neurotech.neurosdk.channels">ChannelInfo</a>[]
<a href="../../../ru/neurotech/neurosdk/Device.html#channels--">channels</a>()
Returns information about supported channels Check this information before creation of channel.<a href="../../../ru/neurotech/neurosdk/parameters/Command.html" title="enum in ru.neurotech.neurosdk.parameters">Command</a>[]
<a href="../../../ru/neurotech/neurosdk/Device.html#commands--">commands</a>()
Returns supported commands of devicevoid
<a href="../../../ru/neurotech/neurosdk/Device.html#connect--">connect</a>()
Tries to establish connection with device Check DeviceState parameter or subscribe parameterChanged event for operation resultvoid
<a href="../../../ru/neurotech/neurosdk/Device.html#disconnect--">disconnect</a>()
Disconnects from device Check DeviceState parameter or subscribe parameterChanged event for operation resultboolean
<a href="../../../ru/neurotech/neurosdk/Device.html#execute-ru.neurotech.neurosdk.parameters.Command-">execute</a>(<a href="../../../ru/neurotech/neurosdk/parameters/Command.html" title="enum in ru.neurotech.neurosdk.parameters">Command</a> cmd)
Tries to execute command and returns value indicating operations success.void
<a href="../../../ru/neurotech/neurosdk/Device.html#finalize--">finalize</a>()
<a href="../../../ru/neurotech/neurosdk/parameters/Parameter.html" title="class in ru.neurotech.neurosdk.parameters">Parameter</a>[]
<a href="../../../ru/neurotech/neurosdk/Device.html#parameters--">parameters</a>()
Returns all available parameters of device, their types and access rights<ParamType>
ParamType<a href="../../../ru/neurotech/neurosdk/Device.html#readParam-ru.neurotech.neurosdk.parameters.ParameterName-">readParam</a>(<a href="../../../ru/neurotech/neurosdk/parameters/ParameterName.html" title="enum in ru.neurotech.neurosdk.parameters">ParameterName</a> param)
Return value of specified parameter of device.boolean
<a href="../../../ru/neurotech/neurosdk/Device.html#setParam-ru.neurotech.neurosdk.parameters.ParameterName-java.lang.Object-">setParam</a>(<a href="../../../ru/neurotech/neurosdk/parameters/ParameterName.html" title="enum in ru.neurotech.neurosdk.parameters">ParameterName</a> param,
java.lang.Object value)
Sets value for specified parameter and returns value indicating success of operation.- <a name="methods.inherited.from.class.java.lang.Object">
</a>
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
- <a name="methods.inherited.from.class.java.lang.Object">
</a>
- <a name="field.summary">
</a>
-
- <a name="field.detail">
</a>
Field Detail
<a name="parameterChanged"> </a>
-
parameterChanged
public final <a href="../../../ru/neurotech/common/SubscribersNotifier.html" title="class in ru.neurotech.common">SubscribersNotifier</a><<a href="../../../ru/neurotech/neurosdk/parameters/ParameterName.html" title="enum in ru.neurotech.neurosdk.parameters">ParameterName</a>> parameterChanged
Subscribe this event to receive notifications about changes of device parameters
-
- <a name="method.detail">
</a>
Method Detail
<a name="finalize--"> </a>
-
finalize
public void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
<a name="connect--"> </a>
-
connect
public void connect()
Tries to establish connection with device Check DeviceState parameter or subscribe parameterChanged event for operation result
<a name="disconnect--"> </a>
-
disconnect
public void disconnect()
Disconnects from device Check DeviceState parameter or subscribe parameterChanged event for operation result
<a name="channels--"> </a>
-
channels
public <a href="../../../ru/neurotech/neurosdk/channels/ChannelInfo.html" title="interface in ru.neurotech.neurosdk.channels">ChannelInfo</a>[] channels()
Returns information about supported channelsCheck this information before creation of channel. If device does not support channel,
channel object won't be initialized with it- Returns:
- Array of channel info objects
<a name="commands--"> </a>
-
commands
public <a href="../../../ru/neurotech/neurosdk/parameters/Command.html" title="enum in ru.neurotech.neurosdk.parameters">Command</a>[] commands()
Returns supported commands of device- Returns:
- Array of supported commands
<a name="parameters--"> </a>
-
parameters
public <a href="../../../ru/neurotech/neurosdk/parameters/Parameter.html" title="class in ru.neurotech.neurosdk.parameters">Parameter</a>[] parameters()
Returns all available parameters of device, their types and access rights- Returns:
- Array of available parameters
<a name="execute-ru.neurotech.neurosdk.parameters.Command-"> </a>
-
execute
public boolean execute(<a href="../../../ru/neurotech/neurosdk/parameters/Command.html" title="enum in ru.neurotech.neurosdk.parameters">Command</a> cmd)
Tries to execute command and returns value indicating operations success. Will throw if device does not support specified command. To get supported commands call commands() method- Parameters:
cmd
- Command to execute- Returns:
- Operation success indicator
- Throws:
java.lang.UnsupportedOperationException
<a name="readParam-ru.neurotech.neurosdk.parameters.ParameterName-"> </a>
-
readParam
public <ParamType> ParamType readParam(<a href="../../../ru/neurotech/neurosdk/parameters/ParameterName.html" title="enum in ru.neurotech.neurosdk.parameters">ParameterName</a> param)
Return value of specified parameter of device. Will throw if parameter does not present indevice. To get supported parameters and type information for parameter call parameters()
method. It returns Parameter object which consists of parameter name, type and access mode- Parameters:
param
- ParameterName to read- Returns:
- Parameter value
- Throws:
java.lang.UnsupportedOperationException
<a name="setParam-ru.neurotech.neurosdk.parameters.ParameterName-java.lang.Object-"> </a>
-
setParam
public boolean setParam(<a href="../../../ru/neurotech/neurosdk/parameters/ParameterName.html" title="enum in ru.neurotech.neurosdk.parameters">ParameterName</a> param, java.lang.Object value)
Sets value for specified parameter and returns value indicating success of operation. Willthrow if parameter does not present in device or has only Read access mode. To get supported parameters and type information for parameter call parameters() method. It returns Parameter
object which consists of parameter name, type and access mode- Parameters:
param
- Name of parameter to setvalue
- Parameter value- Returns:
- Operation success
- Throws:
java.lang.UnsupportedOperationException
-
- <a name="field.detail">
</a>
<a name="navbar.bottom">
</a>
<a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a>
<a name="navbar.bottom.firstrow"> </a>
<script type="text/javascript"> </script>
- Summary:
- Nested |
- <a href="#field.summary">Field</a> |
- Constr |
- <a href="#method.summary">Method</a>
- Detail:
- <a href="#field.detail">Field</a> |
- Constr |
- <a href="#method.detail">Method</a>
<a name="skip.navbar.bottom">
</a></body> </html>