public class ScDllWrapper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ADV_SETTINGS_CHANGED
advanced settings are changed
|
static int |
APPL_FUNC_START
set rotation mode to "screen"
|
static int |
BAUD
setting parameter 'baud' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
BLINK_PERIOD
setting parameter 'blinkPeriod' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
BSC_SETTINGS_CHANGED
basic settings are changed
|
static int |
CAP_CHARACTERISTIC
setting parameter 'capCharacteristic' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
CFG_AUTO_CHANGE
setting parameter 'cfgAutoChange' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static java.lang.String |
CMD_ACCEPT_ALL_FTDIS
all FTDI devices shall be recognized (not only those with "SpaceController" in the USB description)
|
static java.lang.String |
CMD_BLINK_LEDS
blue LEDs shall flash
|
static java.lang.String |
CMD_INJECT_STRING
injects a string into the OS' keyboard buffer
|
static java.lang.String |
CMD_SET_FAKE_ZERO
shifts the device's zero position to get data for testing even in the real zero position
|
static java.lang.String |
CMD_UPDATE_FIRMWARE
initiates a firmware update
|
static java.lang.String |
CMD_UPDATE_FIRMWARE_GUI
initiates a firmware update, triggered by the GUI
|
static int |
DEV_BACK
"Back" command is to be executed
|
static int |
DEV_BOTTOM
"Bottom" command is to be executed
|
static int |
DEV_CTRL
"CTRL" command is to be executed (for triggering a function in WFL)
|
static int |
DEV_ERR_BUF_OVERFLOW
device firmware error: buffer overflow occured
|
static int |
DEV_ERR_INTERNAL_ERROR
device firmware error: unspecified internal error
|
static int |
DEV_ERR_INVALID_ID
device firmware error: invalid identifier detected
|
static int |
DEV_ERR_INVALID_VALUE
device firmware error: invalid value detected
|
static int |
DEV_ERR_PARSE_ERROR
device firmware error: error parsing the command string
|
static int |
DEV_ERR_UNKNOWN_COMMAND
device firmware error: unknown command detected
|
static int |
DEV_FIT
"Fit" command is to be executed
|
static int |
DEV_FRONT
"Front" command is to be executed
|
static int |
DEV_LEFT
"Left" command is to be executed
|
static int |
DEV_PARS_CHANGED
some other parameters are changed
|
static int |
DEV_RIGHT
"Right" command is to be executed
|
static int |
DEV_TOP
"Top" command is to be executed
|
static int |
DEV_WHEEL_LEFT
wheel moved to left
|
static int |
DEV_WHEEL_RIGHT
wheel moved to right
|
static int |
DEVICE_CHECKING_TIME
setting parameter 'deviceCheckingTime' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
DEVICE_TIMEOUT
setting parameter 'deviceTimeOut' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
DISABLE_CUBE_DEMO
setting parameter 'disableCubeDemo' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
ENABLE_LEGACY_COM1
setting parameter 'enableLegacyCom1' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
ENABLE_LEGACY_COM2
setting parameter 'enableLegacyCom2' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
EVT_APPL_IN_FRGRND
signals an application that it is in the foreground now
|
static int |
EVT_HNDL_KBD_DLG
the GUI's keyboard dialog should be shown
|
static int |
EVT_HNDL_LCD_DLG
the GUI's LCD brightness slider should be shown
|
static int |
EVT_HNDL_LEDS_DLG
the GUI's LED brightness slider should be shown
|
static int |
EVT_HNDL_SENS_DLG
the GUI's sensitivity slider should be shown
|
static int |
EVT_HNDL_THRESH_DLG
the GUI's threshold slider should be shown
|
static int |
EVT_HNDL_WFL_DLG
the GUI's WFL dialog should be shown
|
static int |
EXPLORER_DELAY
setting parameter 'explorerDelay' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
LED_NUM
Number of LEDs built into the device
|
static int |
MAX_BRIGHTNESS
Max.
|
static int |
MAX_BYTES_IN_RX_QUEUE
setting parameter 'maxBytesInRxQueue' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
NOTHING_CHANGED
nothing to signal
|
static int |
PORT
setting parameter 'port' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
REMEMBER_LAST_CONFIG
setting parameter 'rememberLastCfg' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
SEARCH_TOP_WINDOW
setting parameter 'searchTopWindow' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
SEND_DELAY
setting parameter 'sendDelay' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
SEND_MODE
setting parameter 'sendMode' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
SINGLE_COM_PER_APPL
setting parameter 'singleComPerAppl' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
SKIP_TIMEOUT
setting parameter 'skipTimeout' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
TIME_BEFORE_SLEEPING
setting parameter 'timeBeforeSleeping' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
static int |
WHEEL_ACCELERATOR
setting parameter 'wheelAccelerator' with methods scGetDaemonPar() and scSetDaemonPar() (see file daemon.ini)
|
Constructor and Description |
---|
ScDllWrapper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
eventToString(int event)
Converts an event type into a string.
|
static void |
main(java.lang.String[] args)
Nur zum Testen.
|
static void |
scConnect()
Deprecated.
|
static void |
scConnect2(boolean isAlwaysReceivingData,
java.lang.String applName)
Establishes the connection to the SpaceController daemon.
|
static void |
scDelCurrentUserRegValue(ScTwoStrings in)
Deletes a string value in the Windows registry under the base key
HKEY_CURRENT_USER.
|
static void |
scDisconnect()
Closes the connection to the SpaceController daemon.
|
static void |
scExecCmd(int devIdx,
java.lang.String in)
Executes a special command.
|
static void |
scFetchStdData(int devIdx,
ScStdData out)
Fetches the standard data set.
|
static void |
scGetAdvancedSettings(int devIdx,
ScAdvancedSettings out)
Retrieves the actual advanced settings parameters.
|
static void |
scGetAdvSens(int devIdx,
ScAdvSens out)
Retrieves the actual six sensitivity parameters of the advanced settings.
|
static void |
scGetBasicSettings(int devIdx,
ScBasicSettings out)
Retrieves the actual basic settings parameters.
|
static void |
scGetCfgFileName(int devIdx,
ScOneString out)
Retrieves the name and path of the device's actual configuration file.
|
static void |
scGetCmprMode(int devIdx,
ScOneByte out)
Deprecated.
|
static void |
scGetDaemonPar(int par,
ScOneInt out)
Retrieves one of the integer or boolean parameters available in the
Daemon's configuration file "daemon.ini".
|
static void |
scGetDefDevPars(int devIdx,
ScDevPars out)
Retrieves the default values of the device parameters.
|
static void |
scGetDevInfo(int devIdx,
ScDevInfo out)
Retrieves some information data about the device with the given index.
|
static void |
scGetDevNum(ScThreeInts out)
Retrieves the number devNum of SpaceController devices actually connected to
the computer and the maximal device index a device maxDevIdx may be
addressed with at the moment.
|
static void |
scGetDevPars(int devIdx,
ScDevPars out)
Retrieves the device's parameters as listed in the *.cfg files.
|
static void |
scGetDllLogPars(ScLogPars out)
Retrieves the logging parameters and filenames actually used by the internal
DLL functions.
|
static void |
scGetDmnVrsn(ScTwoStrings out)
Retrieves the SpaceController daemon's software version and the path to
its binary file.
|
static void |
scGetDom(int devIdx,
ScOneBoolean out)
Answers with true if the dominant mode is set.
|
static void |
scGetFgAppl(ScTwoStrings out)
Retrieves the name and potentially the state of the foreground application.
|
static void |
scGetFmwUpdtState(int devIdx,
ScTwoInts out)
Retrieves the state of a firmware update in progress.
The SpaceController contains three micro controllers (MCU): The main micro controller (#1). |
static void |
scGetLcd(int devIdx,
ScOneInt out)
Gets the LCD's brightness.
|
static void |
scGetLed(int devIdx,
int ledNo,
ScOneInt out)
Gets the brightness of a single LED.
|
static void |
scGetLedsEx(int devIdx,
byte[] buf)
Gets the brightnesses of all LEDs.
|
static void |
scGetNullRad(int devIdx,
ScOneInt out)
Retrieves the device's null radius (threshold).
|
static void |
scGetRawData(int devIdx,
byte[] buf)
The opto-electronical sensor integrated into the cap consists of six LEDs
illuminating six position sensitive devices (PSD) producing data between
0 and 1023.
|
static void |
scGetRot(int devIdx,
ScOneBoolean out)
Answers with true if the rotational mode is set.
|
static void |
scGetSendDelay(int devIdx,
ScTwoInts out)
Retrieves the device's data rate parameters.
|
static void |
scGetSens(int devIdx,
ScTwoInts out)
Retrieves the SC device's sensitivity.
|
static void |
scGetStdData(int devIdx,
ScStdData out)
Deprecated.
|
static void |
scGetStdMode(int devIdx,
ScOneByte out)
Retrieves the operating mode for standard data.
|
static void |
scGetTra(int devIdx,
ScOneBoolean out)
Answers with true if the translational mode is set.
|
static void |
scGetXRot(int devIdx,
ScOneBoolean out)
Answers with true if the x-axis' rotational data will be transmitted.
|
static void |
scGetXRotRev(int devIdx,
ScOneBoolean out)
Answers with true if the x-axis' rotational mode is set to reverse.
|
static void |
scGetXRotSens(int devIdx,
ScOneInt out)
Retrieves the device's sensitivity for the x-rotation.
|
static void |
scGetXTra(int devIdx,
ScOneBoolean out)
Answers with true if the x-axis' translational data will be transmitted.
|
static void |
scGetXTraRev(int devIdx,
ScOneBoolean out)
Answers with true if the x-axis' translational data is set to reverse.
|
static void |
scGetXTraSens(int devIdx,
ScOneInt out)
Retrieves the device's sensitivity for the x-translation.
|
static void |
scGetYRot(int devIdx,
ScOneBoolean out)
Answers with true if the y-axis' rotational data will be transmitted.
|
static void |
scGetYRotRev(int devIdx,
ScOneBoolean out)
Answers with true if the y-axis' rotational mode is set to reverse.
|
static void |
scGetYRotSens(int devIdx,
ScOneInt out)
Retrieves the device's sensitivity for the y-rotation.
|
static void |
scGetYTra(int devIdx,
ScOneBoolean out)
Answers with true if the y-axis' translational data will be transmitted.
|
static void |
scGetYTraRev(int devIdx,
ScOneBoolean out)
Answers with true if the y-axis' translational mode is set to reverse.
|
static void |
scGetYTraSens(int devIdx,
ScOneInt out)
Retrieves the device's sensitivity for the y-translation.
|
static void |
scGetZRot(int devIdx,
ScOneBoolean out)
Answers with true if the z-axis' rotational data will be transmitted.
|
static void |
scGetZRotRev(int devIdx,
ScOneBoolean out)
Answers with true if the z-axis' rotational mode is set to reverse.
|
static void |
scGetZRotSens(int devIdx,
ScOneInt out)
Retrieves the device's sensitivity for the z-rotation.
|
static void |
scGetZTra(int devIdx,
ScOneBoolean out)
Answers with true if the z-axis' translational data will be transmitted.
|
static void |
scGetZTraRev(int devIdx,
ScOneBoolean out)
Answers with true if the z-axis' translational mode is set to reverse.
|
static void |
scGetZTraSens(int devIdx,
ScOneInt out)
Retrieves the SC device's sensitivity for the z-translation.
|
static void |
scIsProcessRunning(ScOneString processName,
ScOneBoolean isRunning)
Checks if the process with the given name is running or not.\n
Example: |
static void |
scLoadDevPars(int devIdx,
ScOneString in,
ScDevPars out)
Deprecated.
|
static void |
scLoadDevPars(int devIdx,
java.lang.String in,
ScDevPars out)
Loads the parameters in the configuration file given in filePath into the
device with index devIdx.
|
static void |
scPressKey(int devIdx,
int key)
Triggers the same action as is done when a key of the device is pressed.
|
static void |
scQueryCurrentUserRegValue(ScTwoStrings in,
int len,
ScOneString out)
Queries a string value from the Windows registry under the base key
HKEY_CURRENT_USER.
|
static void |
scRelKey(int devIdx,
int key)
Triggers the same action as is done when a key of the device is released.
|
static void |
scSaveDevPars(int devIdx,
ScOneString in)
Deprecated.
|
static void |
scSaveDevPars(int devIdx,
java.lang.String in)
Saves the actual parameters of the device with index devIdx to the
configuration file given in filePath.
|
static void |
scSetAdvancedSettings(int devIdx,
ScAdvancedSettings inout)
Sets and retrieves the actual advanced settings parameters.
|
static void |
scSetAdvSens(int devIdx,
ScAdvSens inout)
Sets and retrieves the six actual sensitivity parameters of the advanced
settings.
|
static void |
scSetBasicSettings(int devIdx,
ScBasicSettings inout)
Sets and retrieves the actual basic settings parameters.
|
static void |
scSetCmprMode(int devIdx,
ScOneByte inout)
Deprecated.
|
static void |
scSetCurrentUserRegValue(ScThreeStrings in)
Sets a new string value into the Windows registry under the base key
HKEY_CURRENT_USER.
|
static void |
scSetDaemonPar(int par,
ScOneInt inout)
Sets one of the integer or boolean parameters available in the Daemon's
configuration file "daemon.ini".
|
static void |
scSetDevPars(int devIdx,
ScDevPars inout)
Sets and retrieves the actual device parameters listed in the device's
configuration file.
|
static void |
scSetDevParsToDefaults(int devIdx,
ScDevPars out)
Sets the actual device parameters to the defaults and retrieves the new
parameters.
|
static void |
scSetDllLogPars(ScLogPars in)
Sets the logging parameters actually used by the internal DLL functions.
The Daemon and the DLL are using the same routines and have the same initializing logging parameters at program start but are executing in there own address space and have there own copies of all variables. |
static void |
scSetDom(int devIdx,
ScOneBoolean inout)
Sets and retrieves the dominant mode.
|
static void |
scSetDsplString(int devIdx,
int row,
java.lang.String text,
ScOneInt out)
Sets a line of text into the display.
|
static void |
scSetLcd(int devIdx,
ScOneInt inout)
Sets and retrieves the LCD's brightness.
|
static void |
scSetLcdColor(int devIdx,
ScThreeInts inout)
Sets and retrieves the LCD's background color.
|
static void |
scSetLed(int devIdx,
int ledNo,
ScOneInt inout)
Sets and retrieves the brightness of a single LED.
|
static void |
scSetLeds(int devIdx,
ScThreeInts inout)
Sets and retrieves the brightness of the three types of LEDs built in into
the device.
|
static void |
scSetLedsEx(int devIdx,
byte[] buf)
Sets and retrieves the brightness of of all LEDs.
|
static void |
scSetMode(ScOneInt in)
This function is for internal use only - do not call it.
|
static void |
scSetNullRad(int devIdx,
ScOneInt inout)
Sets and retrieves the device's null radius (threshold).
|
static void |
scSetRot(int devIdx,
ScOneBoolean inout)
Sets and retrieves the rotational mode.
|
static void |
scSetSendDelay(int devIdx,
ScTwoInts inout)
Sets and retrieves the devices's data rate parameters.
|
static void |
scSetSens(int devIdx,
ScTwoInts inout)
Sets and retrieves the device's sensitivity.
|
static void |
scSetState(ScTwoStrings in)
Deprecated.
|
static void |
scSetState2(java.lang.String state)
Informs the daemon about the internal state (mode) of a supported
application.
|
static void |
scSetStdMode(int devIdx,
ScOneByte inout)
Sets and retrieves the operating mode for standard data.
|
static void |
scSetStdZero(int devIdx)
Sets the actual displacement of the cap as the standard 0 value.
|
static void |
scSetTra(int devIdx,
ScOneBoolean inout)
Sets and retrieves the translational mode.
|
static void |
scSetXRot(int devIdx,
ScOneBoolean inout)
Sets and retrieves the rotational mode for the x-axis.
|
static void |
scSetXRotRev(int devIdx,
ScOneBoolean inout)
Sets and retrieves the x-axis' reverse rotational mode.
|
static void |
scSetXRotSens(int devIdx,
ScOneInt inout)
Sets and retrieves the device's sensitivity for the x-axis' rotation.
|
static void |
scSetXTra(int devIdx,
ScOneBoolean inout)
Sets and retrieves the translational mode for the x-axis.
|
static void |
scSetXTraRev(int devIdx,
ScOneBoolean inout)
Sets and retrieves the x-axis' reverse translational mode.
|
static void |
scSetXTraSens(int devIdx,
ScOneInt inout)
Sets and retrieves the SC device's sensitivity for the x-axis'
translation.
|
static void |
scSetYRot(int devIdx,
ScOneBoolean inout)
Sets and retrieves the rotational mode for the y-axis.
|
static void |
scSetYRotRev(int devIdx,
ScOneBoolean inout)
Sets and retrieves the y-axis' reverse rotational mode.
|
static void |
scSetYRotSens(int devIdx,
ScOneInt inout)
Sets and retrieves the device's sensitivity for the y-axis' rotation.
|
static void |
scSetYTra(int devIdx,
ScOneBoolean inout)
Sets and retrieves the translational mode for the y-axis.
|
static void |
scSetYTraRev(int devIdx,
ScOneBoolean inout)
Sets and retrieves the y-axis' reverse translational mode.
|
static void |
scSetYTraSens(int devIdx,
ScOneInt inout)
Sets and retrieves the device's sensitivity for the y-axis' translation.
|
static void |
scSetZRot(int devIdx,
ScOneBoolean inout)
Sets and retrieves the rotational mode for the z-axis.
|
static void |
scSetZRotRev(int devIdx,
ScOneBoolean inout)
Sets and retrieves the z-axis' reverse rotational mode.
|
static void |
scSetZRotSens(int devIdx,
ScOneInt inout)
Sets and retrieves the device's sensitivity for the z-axis' rotation.
|
static void |
scSetZTra(int devIdx,
ScOneBoolean inout)
Sets and retrieves the translational mode for the z-axis.
|
static void |
scSetZTraRev(int devIdx,
ScOneBoolean inout)
Sets and retrieves the z-axis' reverse translational mode.
|
static void |
scSetZTraSens(int devIdx,
ScOneInt inout)
Sets and retrieves the device's sensitivity for the z-axis' translation.
|
static void |
scStop()
Sends the SpaceController Daemon a stop message, the process finishes itself
after sending an OK message.\n
Example: |
static void |
scTriggerFunction(int devIdx,
int funcIdx) |
public static final int LED_NUM
public static final int MAX_BRIGHTNESS
public static final int NOTHING_CHANGED
public static final int BSC_SETTINGS_CHANGED
public static final int ADV_SETTINGS_CHANGED
public static final int DEV_PARS_CHANGED
public static final int DEV_ERR_UNKNOWN_COMMAND
public static final int DEV_ERR_INVALID_VALUE
public static final int DEV_ERR_PARSE_ERROR
public static final int DEV_ERR_INTERNAL_ERROR
public static final int DEV_ERR_INVALID_ID
public static final int DEV_ERR_BUF_OVERFLOW
public static final int DEV_FRONT
public static final int DEV_RIGHT
public static final int DEV_TOP
public static final int DEV_FIT
public static final int DEV_WHEEL_LEFT
public static final int DEV_WHEEL_RIGHT
public static final int EVT_HNDL_SENS_DLG
public static final int EVT_HNDL_THRESH_DLG
public static final int EVT_HNDL_LCD_DLG
public static final int EVT_HNDL_LEDS_DLG
public static final int EVT_APPL_IN_FRGRND
public static final int EVT_HNDL_KBD_DLG
public static final int EVT_HNDL_WFL_DLG
public static final int DEV_BACK
public static final int DEV_LEFT
public static final int DEV_BOTTOM
public static final int DEV_CTRL
public static final int APPL_FUNC_START
public static final java.lang.String CMD_UPDATE_FIRMWARE
public static final java.lang.String CMD_UPDATE_FIRMWARE_GUI
public static final java.lang.String CMD_ACCEPT_ALL_FTDIS
public static final java.lang.String CMD_BLINK_LEDS
public static final java.lang.String CMD_INJECT_STRING
public static final java.lang.String CMD_SET_FAKE_ZERO
public static final int BAUD
public static final int MAX_BYTES_IN_RX_QUEUE
public static final int PORT
public static final int CFG_AUTO_CHANGE
public static final int REMEMBER_LAST_CONFIG
public static final int DISABLE_CUBE_DEMO
public static final int EXPLORER_DELAY
public static final int DEVICE_TIMEOUT
public static final int SEND_MODE
public static final int SEND_DELAY
public static final int CAP_CHARACTERISTIC
public static final int SINGLE_COM_PER_APPL
public static final int ENABLE_LEGACY_COM1
public static final int ENABLE_LEGACY_COM2
public static final int BLINK_PERIOD
public static final int SEARCH_TOP_WINDOW
public static final int SKIP_TIMEOUT
public static final int TIME_BEFORE_SLEEPING
public static final int WHEEL_ACCELERATOR
public static final int DEVICE_CHECKING_TIME
public static java.lang.String eventToString(int event)
event
- die Event-IDpublic static void scIsProcessRunning(ScOneString processName, ScOneBoolean isRunning)
ScOneString processName = new ScOneString("process.exe");
ScOneBoolean isRunning = new ScOneBoolean();
ScDllWrapper.scIsProcessRunning(processName, isRunning);
if (isRunning.mVal)
System.out.println("process is running");
else
System.out.println("process is not running");
processName
- mVal contains the process name to be checkedisRunning
- mVal contains true if the process is running else falsepublic static void scSetCurrentUserRegValue(ScThreeStrings in) throws ScEx
String key = "Software\\Microsoft\\Windows\\CurrentVersion\\Run";
String name = "sc_daemon.exe";
String value = "C:\\Program files\\SpaceController\\sc_daemon.exe";
ScThreeStrings ts = new ScThreeStrings(key, name, value);
try
{
ScDllWrapper.scSetCurrentUserRegValue(ts);
}
catch(ScEx ex)
{
System.out.println("scSetCurrentUserRegValue() failed.");
}
in
- in.mVal1 contains the path to the requested registry key (without
"HKEY_CURRENT_USER"),
in.mVal2 contains the name of the registry entry to be created or
modified,
in.mVal3 contains the value of the entry to be created or modifiedScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scQueryCurrentUserRegValue(ScTwoStrings in, int len, ScOneString out) throws ScEx
String key = "Software\\Microsoft\\Windows\\CurrentVersion\\Run";
String name = "sc_daemon.exe";
ScTwoStrings ts = new ScTwoStrings(key, name);
int len = 123; // size of the expected string value
ScOneString os = new ScOneString();
try
{
ScDllWrapper.scQueryCurrentUserRegValue(ts, len, os);
System.out.println("The value is '" + os.mVal + "'.");
}
catch(ScEx ex)
{
System.out.println("scQueryCurrentUserRegValue() failed.");
}
in
- in.mVal1 contains the path to the requested registry key (without
"HKEY_CURRENT_USER"),
in.mVal2 contains the name of the registry entry to be queriedlen
- the expected size of the return string (used in the native
C library only to allocate enough memory)out
- out.mVal contains the value of the entry to be queriedScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scDelCurrentUserRegValue(ScTwoStrings in) throws ScEx
String key = "Software\\Microsoft\\Windows\\CurrentVersion\\Run";
String name = "sc_daemon.exe";
ScTwoStrings ts = new ScTwoStrings(key, name);
try
{
ScDllWrapper.scDelCurrentUserRegValue(ts);
}
catch(ScEx ex)
{
System.out.println("scDelCurrentUserRegValue() failed.");
}
in
- in.mVal1 contains the path to the requested registry key (without
"HKEY_CURRENT_USER"),
in.mVal2 contains the name of the registry entry to be deletedScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scConnect2(boolean isAlwaysReceivingData, java.lang.String applName) throws ScEx
isAlwaysReceivingData
controls the driver's behaviour
concerning your application's foreground status. If set to true your
application will receive the standard data set even if it is not in the
foreground. If set to false your application will not receive these data
any longer as soon it is not the topmost application.
applName
is your application's name and is only important
if your application is a so called "supported application". [See chapter
3.4.2 of the user manual. You can change your application to a supported
one by adding an appropriate line into the file "daemon.ini". This file is
located in the folder "SpaceController" in the user's home directory. See
function scSetState2()
for further details.]
try
{
ScDllWrapper.scConnect2(true, null);
}
catch(ScEx ex)
{
System.out.println("scConnect2() failed.");
}
isAlwaysReceivingData
- if false the application will receive the
standard data set only if it is in the
foregroundapplName
- your application's name; only needed if your
application is a "supported application"; set
it to NULL otherwiseScEx
- throws one of the SpaceControl exceptions in case of an errorscSetState2(java.lang.String)
public static void scConnect() throws ScEx
try
{
ScDllWrapper.scConnect();
}
catch(ScEx ex)
{
System.out.println("scConnect() failed.");
}
ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scDisconnect() throws ScEx
try
{
ScDllWrapper.scDisconnect();
}
catch(ScEx ex)
{
System.out.println("scDisconnect() failed.");
}
ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scStop() throws ScEx
try
{
ScDllWrapper.scStop();
}
catch(ScEx ex)
{
System.out.println("scStop() failed.");
}
ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetDmnVrsn(ScTwoStrings out) throws ScEx
ScTwoStrings out = new ScTwoStrings();
try
{
ScDllWrapper.scGetDmnVrsn(out);
System.out.println("The daemon's version is: " + out.mVal1);
}
catch(ScEx ex)
{
System.out.println("scGetDmnVrsn() failed.");
}
out
- out.mVal1 contains the version string, out.mVal2 contains the
path and name of the daemon's binary fileScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetDevNum(ScThreeInts out) throws ScEx
ScThreeInts devNum = new ScThreeInts();
try
{
ScDllWrapper.scGetDevNum(devNum);
System.out.println("connected devices: " + devNum.mVal1);
System.out.println(" used devices: " + devNum.mVal2);
System.out.println("max. device index: " + devNum.mVal3);
}
catch(ScEx ex)
{
System.out.println("scGetDevNum() failed.");
}
out
- out.mVal1 contains the number of connected devices,
out.mVal2 contains the number of used devices,
out.mVal3 contains the maximal device indexScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetFgAppl(ScTwoStrings out) throws ScEx
ScTwoStrings fgAppl = new ScTwoStrings();
try
{
ScDllWrapper.scGetFgAppl(fgAppl);
System.out.println("The foreground application's name is: " + fgAppl.mVal1);
System.out.println("The foreground application's state is: " + fgAppl.mVal2);
}
catch(ScEx ex)
{
System.out.println("scGetFgAppl() failed.");
}
out
- out.mVal1 contains the application's name string,
out.mVal2 contains the application's state stringScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetDllLogPars(ScLogPars out)
ScLogPars logPars = new ScLogPars();
ScDllWrapper.scGetDllLogPars(logPars);
System.out.println("The logging parameters are:");
System.out.println(" logFile: " + logPars.mLogFile );
System.out.println("file logging: " + logPars.mIsLogToFile);
System.out.println("console logging: " + logPars.mIsLogToCnsl);
System.out.println("creation/destr.: " + logPars.mIsCrt );
System.out.println(" tracing: " + logPars.mIsTrc );
System.out.println(" device com.: " + logPars.mIsDcm );
System.out.println(" internal com.: " + logPars.mIsIcm );
System.out.println(" warnings: " + logPars.mIsWrn );
System.out.println(" debug messages: " + logPars.mIsDbg );
System.out.println(" temp. messages: " + logPars.mIsTmp );
out
- out.mIsLogToFile, out.mIsCrt etc. contain the logging parameterspublic static void scSetDllLogPars(ScLogPars in)
ScLogPars logPars = new ScLogPars();
// get the actual log parameters:
ScDllWrapper.scGetDllLogPars(logPars);
// change some values:
logPars.mLogFile = "/home/fs/my_log.txt";
logPars.mIsCrt = true;
logPars.mIsDbg = false;
logPars.mExclFileToLog = "";
ScDllWrapper.scSetDllLogPars(logPars);
in
- in.mIsLogToFile, in.mIsCrt etc. set the logging parameterspublic static void scSetState2(java.lang.String state) throws ScEx
ProEngineerWF4 = proe_wf4_plugin.exe xtopWF4 # commentAs you can see a line in this section consists of four parts:
String state = "Assembly";
try
{
ScDllWrapper.scSetState(state);
}
catch(ScEx ex)
{
System.out.println("scSetState() failed.");
}
state
- contains the state (mode) the supported application is inScEx
- throws one of the SpaceControl exceptions in case of an errorscConnect2(boolean, java.lang.String)
public static void scSetState(ScTwoStrings in) throws ScEx
ScTwoStrings state = new ScTwoStrings();
state.mVal1 = "ProEngineer"; // the application's name as known to the daemon
state.mVal2 = "Assembly"; // the mode the application is in
try
{
ScDllWrapper.scSetState(state);
}
catch(ScEx ex)
{
System.out.println("scSetState() failed.");
}
This function is also used to tell the daemon the name of the application
when the parameter "state" is set to "initializing". In this case the
parameter "name" is put into the list of communication partners, and the
daemon can identify this application.
If the daemon knows an application by name it will stop sending data
to it when it is not in the foreground any longer. An application not
known to the daemon will always receive data whether it is in the foreground
or not.
ScTwoStrings state = new ScTwoStrings();
state.mVal1 = "MyApplication";
state.mVal2 = "initializing";
try
{
ScDllWrapper.scState(state);
}
catch(ScEx ex)
{
System.out.println("scSetState() failed.");
}
into your code after your scConnect(), and the daemon knows to send
data to your application only when it is in the foreground.
state.mVal1 = "MyApplication;1234";
You have to retrieve your processe's id at runtime, of course. See the
function ManagementFactory.getRuntimeMXBean().getName().in
- in.mVal1 contains the name of the supported application
in.mVal2 contains the state (mode) the supported application is inScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetMode(ScOneInt in) throws ScEx
in
- in.mVal = 0: normal mode, in.mVal = 1: test modeScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetDaemonPar(int par, ScOneInt out) throws ScEx
ScOneInt val = new ScOneInt();
try
{
ScDllWrapper.scGetDaemonPar(ScDllWrapper.ENABLE_LEGACY_COM1, val);
System.out.println("enableLegacyCom1: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetDaemonPar() failed.");
}
par
- controls which parameter is requested and can be one of
BAUD,
MAX_BYTES_IN_RX_QUEUE,
PORT,
CFG_AUTO_CHANGE,
REMEMBER_LAST_CONFIG,
DISABLE_CUBE_DEMO,
EXPLORER_DELAY,
DEVICE_TIMEOUT,
SEND_MODE,
SEND_DELAY,
CAP_CHARACTERISTIC,
SINGLE_COM_PER_APPL,
ENABLE_LEGACY_COM1,
ENABLE_LEGACY_COM2,
BLINK_PERIOD,
SEARCH_TOP_WINDOW,
SKIP_TIMEOUT,
TIME_BEFORE_SLEEPING,
WHEEL_ACCELERATOR,
DEVICE_CHECKING_TIMEout
- out.mVal contains the daemon parameter's current valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetDaemonPar(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
public static void scSetDaemonPar(int par, ScOneInt inout) throws ScEx
ScOneInt val = new ScOneInt(1);
try
{
ScDllWrapper.scSetDaemonPar(ScDllWrapper.ENABLE_LEGACY_COM1, val);
System.out.println("enableLegacyCom1: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scSetDaemonPar() failed.");
}
par
- controls which parameter is to be set and can be one of
BAUD,
MAX_BYTES_IN_RX_QUEUE,
PORT,
CFG_AUTO_CHANGE,
REMEMBER_LAST_CONFIG,
DISABLE_CUBE_DEMO,
EXPLORER_DELAY,
DEVICE_TIMEOUT,
SEND_MODE,
SEND_DELAY,
CAP_CHARACTERISTIC,
SINGLE_COM_PER_APPL,
ENABLE_LEGACY_COM1,
ENABLE_LEGACY_COM2,
BLINK_PERIOD,
SEARCH_TOP_WINDOW,
SKIP_TIMEOUT,
TIME_BEFORE_SLEEPING,
WHEEL_ACCELERATOR,
DEVICE_CHECKING_TIMEinout
- inout.mVal contains the daemon parameter's value to be setScEx
- throws one of the SpaceControl exceptions in case of an errorscGetDaemonPar(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
public static void scGetDevInfo(int devIdx, ScDevInfo out) throws ScEx
int devIdx = 0;
ScDevInfo devInf = new ScDevInfo();
try
{
ScDllWrapper.scGetDevInfo(devIdx, devInf);
System.out.println(" index: " + devInf.mId);
System.out.println(" serial no.: " + devInf.mSerialNo);
System.out.println("description: " + devInf.mDescrptn);
}
catch(ScEx ex)
{
System.out.println("scGetDevInfo() failed.");
}
devIdx
- index of the device the infos are requestedout
- out.mSerialNo etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetDefDevPars(int devIdx, ScDevPars out) throws ScEx
int devIdx = 0;
ScDevPars devPars = new ScDevPars();
try
{
ScDllWrapper.scGetDefDevPars(devIdx, devPars);
System.out.println(" name: " + devPars.mName);
System.out.println("x-axis translation: " + devPars.mAs.mIsX);
System.out.println("z-axis rotation : " + devPars.mAs.mIsC);
System.out.println("etc.");
}
catch(ScEx ex)
{
System.out.println("scGetDevPars() failed.");
}
devIdx
- index of the device the infos are requestedout
- out.mIsX etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetDevPars(int devIdx, ScDevPars out) throws ScEx
int devIdx = 0;
ScDevPars devPars = new ScDevPars();
try
{
ScDllWrapper.scGetDevPars(devIdx, devPars);
System.out.println(" name: " + devPars.mName);
System.out.println("x-axis translation: " + devPars.mAs.mIsX);
System.out.println("z-axis rotation : " + devPars.mAs.mIsC);
System.out.println("etc.");
}
catch(ScEx ex)
{
System.out.println("scGetDevPars() failed.");
}
devIdx
- index of the device the infos are requestedout
- out.mIsX etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetDevPars(int devIdx, ScDevPars inout) throws ScEx
int devIdx = 0;
ScDevPars devPars = new ScDevPars();
devPars.mBs.mNullRadius = 10;
try
{
ScDllWrapper.scSetDevPars(devIdx, devPars);
System.out.println(" threshold: " + devPars.mBs.mNullRadius);
System.out.println("x-axis translation: " + devPars.mAs.mIsX);
System.out.println("z-axis rotation : " + devPars.mAs.mIsC);
System.out.println("etc.");
}
catch(ScEx ex)
{
System.out.println("scSetDevPars() failed.");
}
devIdx
- index of the device the infos are requestedinout
- inout.mIsX etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetDevParsToDefaults(int devIdx, ScDevPars out) throws ScEx
int devIdx = 0;
ScDevPars devPars = new ScDevPars();
try
{
ScDllWrapper.scSetDevParsToDefaults(devIdx, devPars);
System.out.println(" threshold: " + devPars.mBs.mNullRadius);
System.out.println("x-axis translation: " + devPars.mAs.mIsX);
System.out.println("z-axis rotation : " + devPars.mAs.mIsC);
System.out.println("etc.");
}
catch(ScEx ex)
{
System.out.println("scSetDevParsToDefaults() failed.");
}
devIdx
- index of the device the defaults are to be setout
- out.mIsX etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetBasicSettings(int devIdx, ScBasicSettings out) throws ScEx
int devIdx = 0;
ScBasicSettings bs = new ScBasicSettings();
try
{
ScDllWrapper.scGetBasicSettings(devIdx, bs);
System.out.println("threshold: " + bs.mNullRadius);
}
catch(ScEx ex)
{
System.out.println("scGetBasicSettings() failed.");
}
devIdx
- index of the device the infos are requestedout
- out.mNullRadius etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetBasicSettings(int devIdx, ScBasicSettings inout) throws ScEx
int devIdx = 0;
ScBasicSettings bs = new ScBasicSettings();
bs.mNullRadius = 10;
try
{
ScDllWrapper.scSetBasicSettings(devIdx, bs);
System.out.println("threshold: " + bs.mNullRadius);
}
catch(ScEx ex)
{
System.out.println("scSetBasicSettings() failed.");
}
devIdx
- index of the device the infos are requestedinout
- inout.mNullRadius etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetAdvancedSettings(int devIdx, ScAdvancedSettings out) throws ScEx
int devIdx = 0;
ScAdvancedSettings as = new ScAdvancedSettings();
try
{
ScDllWrapper.scGetAdvancedSettings(devIdx, as);
System.out.println("send delay: " + as.mSendDelay);
}
catch(ScEx ex)
{
System.out.println("scGetAdvancedSettings() failed.");
}
devIdx
- index of the device the infos are requestedout
- out.mSendDelay etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetAdvancedSettings(int devIdx, ScAdvancedSettings inout) throws ScEx
int devIdx = 0;
ScAdvancedSettings as = new ScAdvancedSettings();
as.mSendDelay = 10;
try
{
ScDllWrapper.scSetAdvancedSettings(devIdx, as);
System.out.println("send delay: " + as.mSendDelay);
}
catch(ScEx ex)
{
System.out.println("scSetAdvancedSettings() failed.");
}
devIdx
- index of the device the infos are requestedinout
- inout.mSendDelay etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetAdvSens(int devIdx, ScAdvSens out) throws ScEx
int devIdx = 0;
ScAdvSens as = new ScAdvSens();
try
{
ScDllWrapper.scGetAdvSens(devIdx, as);
System.out.println("x sensitivity: " + as.mXSens);
}
catch(ScEx ex)
{
System.out.println("scGetAdvSens() failed.");
}
devIdx
- index of the device the infos are requestedout
- out.mXSens etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetAdvSens(int devIdx, ScAdvSens inout) throws ScEx
int devIdx = 0;
ScAdvSens as = new ScAdvSens();
as.mXSens = 10;
try
{
ScDllWrapper.scSetAdvSens(devIdx, as);
System.out.println("x sensitivity: " + as.mXSens);
}
catch(ScEx ex)
{
System.out.println("scSetAdvSens() failed.");
}
devIdx
- index of the device the infos are requestedinout
- inout.mXSens etc. contains the infoScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetStdMode(int devIdx, ScOneByte out) throws ScEx
Bit no.: 87654321 out.mVal: 00000000 ^ if bit 1 is set rotational mode is active ^ if bit 2 is set translational mode is active ^ if bit 3 is set dominant mode is active
int devIdx = 0;
ScOneByte stdMode = new ScOneByte();
byte test = 4; // set test to 00000100
try
{
ScDllWrapper.scGetStdMode(devIdx, stdMode);
if ((stdMode.mVal & test) == 0)
System.out.println("dominant mode is not active");
else
System.out.println("dominant mode is active");
}
catch(ScEx ex)
{
System.out.println("scGetStdMode() failed.");
}
devIdx
- index of the device the infos are requestedout
- out.mVal contains the modeScEx
- throws one of the SpaceControl exceptions in case of an errorscSetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetStdMode(int devIdx, ScOneByte inout) throws ScEx
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
for details.
int devIdx = 0;
ScOneByte stdMode = new ScOneByte();
byte test = 2; // set test to 00000010
stdMode.mVal = 3; // 00000011 <=> trans. and rot. mode active
try
{
ScDllWrapper.scSetStdMode(devIdx, stdMode);
if ((stdMode.mVal & test) == 0)
System.out.println("translational mode is not active");
else
System.out.println("translational mode is active");
}
catch(ScEx ex)
{
System.out.println("scSetStdMode() failed.");
}
devIdx
- index of the device the data is to be setinout
- inout.mVal contains the modeScEx
- throws one of the SpaceControl exceptions in case of an errorscGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetCmprMode(int devIdx, ScOneByte out) throws ScEx
Bit no.: 87654321
out.mVal: 00000000
^ if bit 1 is set the spacemouse uses the Turbo Spacemouse protokol
^ bit 2 is unused
^ bit 3 is unused
^ bit 4 is unused
^ if bit 5 is set rotational mode is active
^ if bit 6 is set translational mode is active
^ if bit 7 is set dominant mode is active
^ bit 8 is unused
int devIdx = 0;
ScOneByte cmpMode = new ScOneByte();
byte test = 1; // set test to 00000001
try
{
ScDllWrapper.scGetCmprMode(devIdx, cmpMode);
if ((cmpMode.mVal & test) == 0)
System.out.println("compression mode is not active");
else
System.out.println("compression mode is active");
}
catch(ScEx ex)
{
System.out.println("scGetCmprMode() failed.");
}
devIdx
- index of the device the infos are requestedout
- out.mVal contains the modeScEx
- throws one of the SpaceControl exceptions in case of an errorscSetCmprMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetCmprMode(int devIdx, ScOneByte inout) throws ScEx
scGetCmprMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
for details.
int devIdx = 0;
ScOneByte cmpMode = new ScOneByte();
byte test = 1; // set test to 00000001
cmpMode.mVal = 3; // 00110001 <=> trans., rot. mode and compression active
try
{
ScDllWrapper.scSetCmprMode(devIdx, cmpMode);
if ((cmpMode.mVal & test) == 0)
System.out.println("compression mode is not active");
else
System.out.println("compression mode is active");
}
catch(ScEx ex)
{
System.out.println("scSetCmprMode() failed.");
}
devIdx
- index of the device the data is to be setinout
- inout.mVal contains the modeScEx
- throws one of the SpaceControl exceptions in case of an errorscGetCmprMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetSens(int devIdx, ScTwoInts out) throws ScEx
int devIdx = 0;
ScTwoInts sens = new ScTwoInts();
try
{
ScDllWrapper.scGetSens(devIdx, sens);
System.out.println("trans. sensitivity: " + sens.mVal1);
System.out.println(" rot. sensitivity: " + sens.mVal2);
}
catch(ScEx ex)
{
System.out.println("scGetSens() failed.");
}
devIdx
- index of the device the infos are requestedout
- out.mVal1 contains the translational sensitivity (0..15),
out.mVal2 contains the rotational sensititvity (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorscSetSens(int, de.spacecontrol.sc.dllwrapper.ScTwoInts)
public static void scSetSens(int devIdx, ScTwoInts inout) throws ScEx
scGetSens(int, de.spacecontrol.sc.dllwrapper.ScTwoInts)
for details.
int devIdx = 0;
ScTwoInts sens = new ScTwoInts();
sens.mVal1 = 5; // translational sensitivity
sens.mVal2 = 8; // this value does not matter, see comment above
try
{
ScDllWrapper.scSetSens(devIdx, sens);
System.out.println("trans. sensitivity: " + sens.mVal1);
System.out.println(" rot. sensitivity: " + sens.mVal2);
}
catch(ScEx ex)
{
System.out.println("scSetSens() failed.");
}
devIdx
- index of the device the data is to be setinout
- inout.mVal1 contains the translational sensitivity (0..15),
inout.mVal2 contains the rotational sensititvity (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorscGetSens(int, de.spacecontrol.sc.dllwrapper.ScTwoInts)
public static void scGetXTraSens(int devIdx, ScOneInt out) throws ScEx
int devIdx = 0;
ScOneInt val = new ScOneInt();
try
{
ScDllWrapper.scGetXTraSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetXTraSens() failed.");
}
devIdx
- index of the device the value is requestedout
- out.mVal contains the requested value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetXTraSens(int devIdx, ScOneInt inout) throws ScEx
scGetXTraSens(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
for details.
int devIdx = 0;
ScOneInt val = new ScOneInt();
val.mVal = 10;
try
{
ScDllWrapper.scSetXTraSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scSetXTraSens() failed.");
}
devIdx
- index of the device the value is to be set (0..15)inout
- inout.mVal contains the actual value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetYTraSens(int devIdx, ScOneInt out) throws ScEx
int devIdx = 0;
ScOneInt val = new ScOneInt();
try
{
ScDllWrapper.scGetYTraSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetYTraSens() failed.");
}
devIdx
- index of the device the value is requestedout
- out.mVal contains the requested value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetYTraSens(int devIdx, ScOneInt inout) throws ScEx
scGetYTraSens(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
for details.
int devIdx = 0;
ScOneInt val = new ScOneInt();
val.mVal = 10;
try
{
ScDllWrapper.scSetYTraSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scSetYTraSens() failed.");
}
devIdx
- index of the device the value is to be set (0..15)inout
- inout.mVal contains the actual value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetZTraSens(int devIdx, ScOneInt out) throws ScEx
int devIdx = 0;
ScOneInt val = new ScOneInt();
try
{
ScDllWrapper.scGetZTraSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetZTraSens() failed.");
}
devIdx
- index of the device the value is requestedout
- out.mVal contains the requested value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetZTraSens(int devIdx, ScOneInt inout) throws ScEx
scGetZTraSens(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
for details.
int devIdx = 0;
ScOneInt val = new ScOneInt();
val.mVal = 10;
try
{
ScDllWrapper.scSetZTraSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scSetZTraSens() failed.");
}
devIdx
- index of the device the value is to be set (0..15)inout
- inout.mVal contains the actual value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetXRotSens(int devIdx, ScOneInt out) throws ScEx
int devIdx = 0;
ScOneInt val = new ScOneInt();
try
{
ScDllWrapper.scGetXRotSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetXRotSens() failed.");
}
devIdx
- index of the device the value is requestedout
- out.mVal contains the requested value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetXRotSens(int devIdx, ScOneInt inout) throws ScEx
scGetXRotSens(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
for details.
int devIdx = 0;
ScOneInt val = new ScOneInt();
val.mVal = 10;
try
{
ScDllWrapper.scSetXRotSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scSetXRotSens() failed.");
}
devIdx
- index of the device the value is to be set (0..15)inout
- inout.mVal contains the actual value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetYRotSens(int devIdx, ScOneInt out) throws ScEx
int devIdx = 0;
ScOneInt val = new ScOneInt();
try
{
ScDllWrapper.scGetYRotSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetYRotSens() failed.");
}
devIdx
- index of the device the value is requestedout
- out.mVal contains the requested value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetYRotSens(int devIdx, ScOneInt inout) throws ScEx
scGetYRotSens(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
for details.
int devIdx = 0;
ScOneInt val = new ScOneInt();
val.mVal = 10;
try
{
ScDllWrapper.scSetYRotSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scSetYRotSens() failed.");
}
devIdx
- index of the device the value is to be set (0..15)inout
- inout.mVal contains the actual value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetZRotSens(int devIdx, ScOneInt out) throws ScEx
int devIdx = 0;
ScOneInt val = new ScOneInt();
try
{
ScDllWrapper.scGetZRotSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetZRotSens() failed.");
}
devIdx
- index of the device the value is requestedout
- out.mVal contains the requested value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetZRotSens(int devIdx, ScOneInt inout) throws ScEx
scGetZRotSens(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
for details.
int devIdx = 0;
ScOneInt val = new ScOneInt();
val.mVal = 10;
try
{
ScDllWrapper.scSetZRotSens(devIdx, val);
System.out.println("sensitivity: " + val.mVal);
}
catch(ScEx ex)
{
System.out.println("scSetZRotSens() failed.");
}
devIdx
- index of the device the value is to be set (0..15)inout
- inout.mVal contains the actual value (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetSendDelay(int devIdx, ScTwoInts out) throws ScEx
int devIdx = 0;
ScTwoInts rate = new ScTwoInts();
try
{
ScDllWrapper.scGetSendDelay(devIdx, rate);
System.out.println("max. period: " + rate.mVal1);
System.out.println("min. period: " + rate.mVal2);
}
catch(ScEx ex)
{
System.out.println("scGetSendDelay() failed.");
}
devIdx
- index of the device the infos are requestedout
- out.mVal1: SpaceMouse: after this time (20..500 ms) the
device sends new standard data automatically if
not all coordinates are 0.
SpaceController: The SpaceController will send
the next data packet after the delay (20..405 ms)
given here; values > 400 mean: send no data at
all anymore.
out.mVal2: SpaceMouse: soonest after this time (20..500 ms)
the spacemouse will send new standard data even
if requested sooner.
SpaceController: not used.ScEx
- throws one of the SpaceControl exceptions in case of an errorscSetSendDelay(int, de.spacecontrol.sc.dllwrapper.ScTwoInts)
public static void scSetSendDelay(int devIdx, ScTwoInts inout) throws ScEx
int devIdx = 0;
ScTwoInts rate = new ScTwoInts();
rate.mVal1 = 60; // max. period
rate.mVal2 = 80; // min. period
try
{
ScDllWrapper.scSetSendDelay(devIdx, rate);
System.out.println("max. period: " + rate.mVal1);
System.out.println("min. period: " + rate.mVal2);
}
catch(ScEx ex)
{
System.out.println("scSetSendDelay() failed.");
}
devIdx
- index of the device the data is to be setinout
- out.mVal1: SpaceMouse: after this time (20..500 ms) the
device sends new standard data automatically if
not all coordinates are 0.
SpaceController: The SpaceController will send
the next data packet after the delay (20..405 ms)
given here; values > 400 mean: send no data at
all anymore.
out.mVal2: SpaceMouse: soonest after this time (20..500 ms)
the spacemouse will send new standard data even
if requested sooner.
SpaceController: not used.ScEx
- throws one of the SpaceControl exceptions in case of an errorscGetSendDelay(int, de.spacecontrol.sc.dllwrapper.ScTwoInts)
public static void scGetNullRad(int devIdx, ScOneInt out) throws ScEx
int devIdx = 0;
ScOneInt nullRad = new ScOneInt();
try
{
ScDllWrapper.scGetNullRad(devIdx, nullRad);
System.out.println("null radius: " + nullRad.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetNullRad() failed.");
}
devIdx
- index of the device the null radius is requestedout
- out.mVal contains the null radius (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorscSetNullRad(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
public static void scSetNullRad(int devIdx, ScOneInt inout) throws ScEx
int devIdx = 0;
ScOneInt nullRad = new ScOneInt();
nullRad.mVal = 10;
try
{
ScDllWrapper.scSetNullRad(devIdx, nullRad);
System.out.println("null radius: " + nullRad.mVal);
}
catch(ScEx ex)
{
System.out.println("scSetNullRad() failed.");
}
devIdx
- index of the device the null radius is to be setinout
- inout.mVal contains the null radius (0..15)ScEx
- throws one of the SpaceControl exceptions in case of an errorscGetNullRad(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
public static void scSetStdZero(int devIdx) throws ScEx
int devIdx = 0;
try
{
ScDllWrapper.scSetStdZero(devIdx);
}
catch(ScEx ex)
{
System.out.println("scSetStdZero() failed.");
}
devIdx
- index of the device the standard zero is to be setScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetStdData(int devIdx, ScStdData out) throws ScEx
int devIdx = 0;
ScStdData data = new ScStdData();
try
{
ScDllWrapper.scGetStdData(devIdx, data);
System.out.println("x: " + data.mX + ", a: " + data.mA);
}
catch(ScEx ex)
{
System.out.println("scGetStdData() failed.");
}
devIdx
- index of the device the standard data is to be getout
- contains the standard data:
out.mX : x-translation
out.mY : y-translation
out.mZ : Z-translation
out.mA : rotation around the x-axis
out.mB : rotation around the y-axis
out.mC : rotation around the z-axis
out.mTraLmh: bitmask with the low-, mid- and high-flags of translation
out.mRotLmh: bitmask with the low-, mid- and high-flags of rotation
out.mEvent : an event no. (0..n) or -1
out.mTvSec : the time the message was generated by the driver:
seconds elapsed since jan 01 1970 UTC
out.mTvUsec: the time the message was generated by the driver:
additional microseconds since mTvSecScEx
- throws one of the SpaceControl exceptions in case of an errorscFetchStdData(int, de.spacecontrol.sc.dllwrapper.ScStdData)
,
scGetRawData(int, byte[])
public static void scFetchStdData(int devIdx, ScStdData out) throws ScEx
int devIdx = 0;
ScStdData data = new ScStdData();
try
{
ScDllWrapper.scFetchStdData(devIdx, data);
System.out.println("y: " + data.mY + ", b: " + data.mB);
}
catch(ScEx ex)
{
System.out.println("scFetchStdData() failed.");
}
devIdx
- index of the device the standard data is to be fetchedout
- contains the standard data: out.mX : x-translation out.mY : y-translation out.mZ : Z-translation out.mA : rotation around the x-axis out.mB : rotation around the y-axis out.mC : rotation around the z-axis out.mTraLmh: bitmask with the low-, mid- and high-flags of translation out.mRotLmh: bitmask with the low-, mid- and high-flags of rotation out.mEvent : an event no. (0..n) or -1 out.mTvSec : the time the message was generated by the driver: seconds elapsed since jan 01 1970 UTC out.mTvUsec: the time the message was generated by the driver: additional microseconds since mTvSec
ScEx
- throws one of the SpaceControl exceptions in case of an errorscGetStdData(int, de.spacecontrol.sc.dllwrapper.ScStdData)
,
scGetRawData(int, byte[])
public static void scGetRawData(int devIdx, byte[] buf) throws ScEx
int devIdx = 0;
byte[] buf = new byte[28];
try
{
ScDllWrapper.scGetRawData(devIdx, buf);
System.out.println("PSD1: " + (buf[0]*128+buf[1]));
}
catch(ScEx ex)
{
System.out.println("scGetRawData() failed.");
}
devIdx
- index of the device the raw data is to be getbuf
- byte array containing the dataScEx
- throws one of the SpaceControl exceptions in case of an errorscGetStdData(int, de.spacecontrol.sc.dllwrapper.ScStdData)
,
scFetchStdData(int, de.spacecontrol.sc.dllwrapper.ScStdData)
public static void scGetTra(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isTra = new ScOneBoolean();
try
{
ScDllWrapper.scGetTra(devIdx, isTra);
if (isTra.mVal)
System.out.println("translational mode is active");
else
System.out.println("translational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetTra() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetTra(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isTra = new ScOneBoolean();
isTra.mVal = false;
try
{
ScDllWrapper.scSetTra(devIdx, isTra);
if (isTra.mVal)
System.out.println("translational mode is active");
else
System.out.println("translational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetTra() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetXTra(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isTra = new ScOneBoolean();
try
{
ScDllWrapper.scGetXTra(devIdx, isTra);
if (isTra.mVal)
System.out.println("translational mode is active");
else
System.out.println("translational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetXTra() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetXTra(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isTra = new ScOneBoolean();
isTra.mVal = false;
try
{
ScDllWrapper.scSetXTra(devIdx, isTra);
if (isTra.mVal)
System.out.println("translational mode is active");
else
System.out.println("translational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetXTra() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetYTra(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isTra = new ScOneBoolean();
try
{
ScDllWrapper.scGetYTra(devIdx, isTra);
if (isTra.mVal)
System.out.println("translational mode is active");
else
System.out.println("translational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetYTra() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetYTra(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isTra = new ScOneBoolean();
isTra.mVal = false;
try
{
ScDllWrapper.scSetYTra(devIdx, isTra);
if (isTra.mVal)
System.out.println("translational mode is active");
else
System.out.println("translational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetYTra() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetZTra(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isTra = new ScOneBoolean();
try
{
ScDllWrapper.scGetZTra(devIdx, isTra);
if (isTra.mVal)
System.out.println("translational mode is active");
else
System.out.println("translational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetZTra() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetZTra(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isTra = new ScOneBoolean();
isTra.mVal = false;
try
{
ScDllWrapper.scSetZTra(devIdx, isTra);
if (isTra.mVal)
System.out.println("translational mode is active");
else
System.out.println("translational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetZTra() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetXTraRev(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
try
{
ScDllWrapper.scGetXTraRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetXTraRev() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetXTraRev(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
isRev.mVal = false;
try
{
ScDllWrapper.scSetXTraRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetXTraRev() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetYTraRev(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
try
{
ScDllWrapper.scGetYTraRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetYTraRev() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetYTraRev(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
isRev.mVal = false;
try
{
ScDllWrapper.scSetYTraRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetYTraRev() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetZTraRev(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
try
{
ScDllWrapper.scGetZTraRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetZTraRev() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetZTraRev(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
isRev.mVal = false;
try
{
ScDllWrapper.scSetZTraRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetZTraRev() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetRot(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isRot = new ScOneBoolean();
try
{
ScDllWrapper.scGetRot(devIdx, isRot);
if (isRot.mVal)
System.out.println("rotational mode is active");
else
System.out.println("rotational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetRot() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetRot(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetRot(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isRot = new ScOneBoolean();
isRot.mVal = false;
try
{
ScDllWrapper.scSetRot(devIdx, isRot);
if (isRot.mVal)
System.out.println("rotational mode is active");
else
System.out.println("rotational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetRot() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscGetRot(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetXRot(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isRot = new ScOneBoolean();
try
{
ScDllWrapper.scGetXRot(devIdx, isRot);
if (isRot.mVal)
System.out.println("rotational mode is active");
else
System.out.println("rotational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetXRot() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetXRot(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isRot = new ScOneBoolean();
isRot.mVal = false;
try
{
ScDllWrapper.scSetXRot(devIdx, isRot);
if (isRot.mVal)
System.out.println("rotational mode is active");
else
System.out.println("rotational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetXRot() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetYRot(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isRot = new ScOneBoolean();
try
{
ScDllWrapper.scGetYRot(devIdx, isRot);
if (isRot.mVal)
System.out.println("rotational mode is active");
else
System.out.println("rotational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetYRot() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetYRot(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isRot = new ScOneBoolean();
isRot.mVal = false;
try
{
ScDllWrapper.scSetYRot(devIdx, isRot);
if (isRot.mVal)
System.out.println("rotational mode is active");
else
System.out.println("rotational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetYRota() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetZRot(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isRot = new ScOneBoolean();
try
{
ScDllWrapper.scGetZRot(devIdx, isRot);
if (isRot.mVal)
System.out.println("rotational mode is active");
else
System.out.println("rotational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetZRot() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetZRot(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isRot = new ScOneBoolean();
isRot.mVal = false;
try
{
ScDllWrapper.scSetZRot(devIdx, isRot);
if (isRot.mVal)
System.out.println("rotational mode is active");
else
System.out.println("rotational mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetZRota() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetXRotRev(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
try
{
ScDllWrapper.scGetXRotRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetXRotRev() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetXRotRev(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
isRev.mVal = false;
try
{
ScDllWrapper.scSetXRotRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetXRotRev() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetYRotRev(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
try
{
ScDllWrapper.scGetYRotRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetYRotRev() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetYRotRev(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
isRev.mVal = false;
try
{
ScDllWrapper.scSetYRotRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetYRotRev() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetZRotRev(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
try
{
ScDllWrapper.scGetZRotRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetZRotRev() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetZRotRev(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isRev = new ScOneBoolean();
isRev.mVal = false;
try
{
ScDllWrapper.scSetZRotRev(devIdx, isRev);
if (isRev.mVal)
System.out.println("reverse mode is active");
else
System.out.println("reverse mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetZRotRev() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetDom(int devIdx, ScOneBoolean out) throws ScEx
int devIdx = 0;
ScOneBoolean isDom = new ScOneBoolean();
try
{
ScDllWrapper.scGetDom(devIdx, isDom);
if (isDom.mVal)
System.out.println("dominant mode is active");
else
System.out.println("dominant mode is not active");
}
catch(ScEx ex)
{
System.out.println("scGetDom() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetDom(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scSetDom(int devIdx, ScOneBoolean inout) throws ScEx
int devIdx = 0;
ScOneBoolean isDom = new ScOneBoolean();
isDom.mVal = false;
try
{
ScDllWrapper.scSetDom(devIdx, isDom);
if (isDom.mVal)
System.out.println("dominant mode is active");
else
System.out.println("dominant mode is not active");
}
catch(ScEx ex)
{
System.out.println("scSetDom() failed.");
}
devIdx
- index of the device the value is to be setinout
- out.mVal contains the boolean valueScEx
- throws one of the SpaceControl exceptions in case of an errorscSetTra(int, de.spacecontrol.sc.dllwrapper.ScOneBoolean)
,
scGetStdMode(int, de.spacecontrol.sc.dllwrapper.ScOneByte)
public static void scGetCfgFileName(int devIdx, ScOneString out) throws ScEx
int devIdx = 0;
ScOneString filename = new ScOneString();
try
{
ScDllWrapper.scGetCfgFileName(devIdx, filename);
System.out.println("filename = " + filename.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetCfgFileName() failed.");
}
devIdx
- the index of the deviceout
- file name, e.g. /home/fs/spacecontroller/[serialNo]/last.cfgScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSaveDevPars(int devIdx, ScOneString in) throws ScEx
int devIdx = 0;
ScOneString filename = new ScOneString();
filename.mVal = "myConfigFile.cfg";
try
{
ScDllWrapper.scSaveDevPars(devIdx, filename);
}
catch(ScEx ex)
{
System.out.println("scSaveDevPars() failed.");
}
devIdx
- the index of the devicein
- file name, e.g. /home/fs/spacecontroller/[serialNo]/last.cfgScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSaveDevPars(int devIdx, java.lang.String in) throws ScEx
int devIdx = 0;
String filename = "myConfigFile.cfg";
try
{
ScDllWrapper.scSaveDevPars(devIdx, filename);
}
catch(ScEx ex)
{
System.out.println("scSaveDevPars() failed.");
}
devIdx
- the index of the devicein
- file name, e.g. /home/fs/spacecontroller/[serialNo]/last.cfgScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scLoadDevPars(int devIdx, ScOneString in, ScDevPars out) throws ScEx
int devIdx = 0;
ScOneString filename = new ScOneString();
ScDevPars devpars = new ScDevPars();
filename.mVal = "myConfigFile.cfg";
try
{
ScDllWrapper.scLoadDevPars(devIdx, filename, devpars);
}
catch(ScEx ex)
{
System.out.println("scLoadDevPars() failed.");
}
devIdx
- the index of the devicein
- file name, e.g. /home/fs/my.cfgout
- parameters just loadedScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scLoadDevPars(int devIdx, java.lang.String in, ScDevPars out) throws ScEx
int devIdx = 0;
String filename = "myConfigFile.cfg";
ScDevPars devpars = new ScDevPars();
try
{
ScDllWrapper.scLoadDevPars(devIdx, filename, devpars);
}
catch(ScEx ex)
{
System.out.println("scLoadDevPars() failed.");
}
devIdx
- the index of the devicein
- file name, e.g. /home/fs/my.cfgout
- parameters just loadedScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scPressKey(int devIdx, int key) throws ScEx
int devIdx = 0;
int key = 5;
try
{
ScDllWrapper.scPressKey(devIdx, key);
}
catch(ScEx ex)
{
System.out.println("scPressKey() failed.");
}
devIdx
- index of the device the key seems to be pressedkey
- the key's index (0..16)ScEx
- throws one of the SpaceControl exceptions in case of an errorscRelKey(int, int)
public static void scRelKey(int devIdx, int key) throws ScEx
int devIdx = 0;
int key = 5;
try
{
ScDllWrapper.scRelKey(devIdx, key);
}
catch(ScEx ex)
{
System.out.println("scRelKey() failed.");
}
devIdx
- index of the device the key seems to be releasedkey
- the key's index (0..16)ScEx
- throws one of the SpaceControl exceptions in case of an errorscRelKey(int, int)
public static void scTriggerFunction(int devIdx, int funcIdx) throws ScEx
ScEx
public static void scSetLeds(int devIdx, ScThreeInts inout) throws ScEx
int devIdx = 0;
ScThreeInts brightnesses = new ScThreeInts();
brightnesses.mVal1 = 15; // all red LEDs to maximum
brightnesses.mVal2 = 5; // all green LEDs to 5
brightnesses.mVal3 = 0; // switch all blue LEDs off
try
{
ScDllWrapper.scSetLeds(devIdx, brightnesses);
System.out.println("red LEDs brightness: " + brightnesses.mVal1);
System.out.println("green LEDs brightness: " + brightnesses.mVal2);
System.out.println("blue LEDs brightness: " + brightnesses.mVal3);
}
catch(ScEx ex)
{
System.out.println("scSetLeds() failed.");
}
devIdx
- index of the device the value is to be setinout
- inout.mVal1 contains the red, inout.mVal2 the
green and inout.mVal3 the blue LED's brightnessScEx
- throws one of the SpaceControl exceptions in case of an errorscSetLed(int, int, de.spacecontrol.sc.dllwrapper.ScOneInt)
public static void scGetLed(int devIdx, int ledNo, ScOneInt out) throws ScEx
int devIdx = 0;
int ledNo = 5;
ScOneInt brightness = new ScOneInt();
try
{
ScDllWrapper.scGetLed(devIdx, ledNo, brightness);
System.out.println("brightness of LED no. 5: " + brightness.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetLed() failed.");
}
devIdx
- index of the device the info is requestedledNo
- index of the requested LED (0..32)out
- out.mVal contains the LED's brightnessScEx
- throws one of the SpaceControl exceptions in case of an errorscSetLed(int, int, de.spacecontrol.sc.dllwrapper.ScOneInt)
public static void scSetLed(int devIdx, int ledNo, ScOneInt inout) throws ScEx
int devIdx = 0;
int ledNo = 5;
ScOneInt brightness = new ScOneInt();
brightness.mVal = 10;
try
{
ScDllWrapper.scSetLed(devIdx, ledNo, brightness);
System.out.println("brightness of LED no. 5: " + brightness.mVal);
}
catch(ScEx ex)
{
System.out.println("scSetLed() failed.");
}
devIdx
- index of the device the value is to be setledNo
- the LED the brightness is to be set (0..32)inout
- inout.mVal contains the LED's brightnessScEx
- throws one of the SpaceControl exceptions in case of an errorscGetLed(int, int, de.spacecontrol.sc.dllwrapper.ScOneInt)
,
scSetLeds(int, de.spacecontrol.sc.dllwrapper.ScThreeInts)
public static void scGetLedsEx(int devIdx, byte[] buf) throws ScEx
int devIdx = 0;
byte[] buf = new byte[33];
try
{
ScDllWrapper.scGetLedsEx(devIdx, buf);
System.out.println("brightness of LED with index 5: " + buf[5]);
}
catch(ScEx ex)
{
System.out.println("scGetLedsEx() failed.");
}
devIdx
- index of the device the LED data is to be getbuf
- byte array containing the dataScEx
- throws one of the SpaceControl exceptions in case of an errorscSetLedsEx(int, byte[])
,
scGetLed(int, int, de.spacecontrol.sc.dllwrapper.ScOneInt)
public static void scSetLedsEx(int devIdx, byte[] buf) throws ScEx
int devIdx = 0;
byte[] buf = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1, 2, 3 };
try
{
ScDllWrapper.scSetLedsEx(devIdx, buf);
System.out.println("brightness of LED with index 5: " + buf[5]);
}
catch(ScEx ex)
{
System.out.println("scSetLedsEx() failed.");
}
devIdx
- index of the device the LED data is to be setbuf
- byte array containing the dataScEx
- throws one of the SpaceControl exceptions in case of an errorscGetLedsEx(int, byte[])
,
scSetLeds(int, de.spacecontrol.sc.dllwrapper.ScThreeInts)
,
scSetLed(int, int, de.spacecontrol.sc.dllwrapper.ScOneInt)
public static void scGetLcd(int devIdx, ScOneInt out) throws ScEx
int devIdx = 0;
ScOneInt brightness = new ScOneInt();
try
{
ScDllWrapper.scGetLcd(devIdx, brightness);
System.out.println("LCD's brightness: " + brightness.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetLcd() failed.");
}
devIdx
- index of the device the info is requestedout
- out.mVal contains the LCD's brightnessScEx
- throws one of the SpaceControl exceptions in case of an errorscSetLcd(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
public static void scSetLcd(int devIdx, ScOneInt inout) throws ScEx
int devIdx = 0;
ScOneInt brightness = new ScOneInt();
brightness.mVal = 10;
try
{
ScDllWrapper.scSetLcd(devIdx, brightness);
System.out.println("LCD's brightness: " + brightness.mVal);
}
catch(ScEx ex)
{
System.out.println("scGetLcd() failed.");
}
devIdx
- index of the device the value is to be setinout
- inout.mVal contains the LCD's brightnessScEx
- throws one of the SpaceControl exceptions in case of an errorscGetLcd(int, de.spacecontrol.sc.dllwrapper.ScOneInt)
public static void scSetLcdColor(int devIdx, ScThreeInts inout) throws ScEx
int devIdx = 0;
ScThreeInts inout = new ScThreeInts(255, 100, 100); // this RGB gives a light red alltogether
ScStatus status = scSetLcdColor(devIdx, inout);
if (status == SC_OK)
printf("green: %d\n", inout.mVal2);
else
printf("error\n");
devIdx
- the index of the device to be requestedinout
- inout.mVal1: red part of the color (0..255),
inout.mVal2: green part of the color (0..255)
inout.mVal3: blue part of the color (0..255)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scSetDsplString(int devIdx, int row, java.lang.String text, ScOneInt out) throws ScEx
int devIdx = 0;
int row = 2;
String text = "new display line";
ScOneInt out = new ScOneInt();
try
{
ScDllWrapper.scSetDsplString(devIdx, row, text, out);
System.out.println("number of characters set: " + out.mVal);
}
catch(ScEx ex)
{
System.out.println("scSetDsplString() failed.");
}
devIdx
- index of the device the value is to be setrow
- line the text is to be put into (0..6)text
- the text to be set (up to 40 characters)out
- out.mVal contains the number of characters set into the displayScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scGetFmwUpdtState(int devIdx, ScTwoInts out) throws ScEx
int devIdx = 0;
ScTwoInts state = new ScTwoInts();
try
{
ScDllWrapper.scGetFmwUpdtState(devIdx, rate);
System.out.println("Micro controller: " + state.mVal1);
System.out.println(" progress/%: " + state.mVal2);
}
catch(ScEx ex)
{
System.out.println("scGetFmwUpdtState() failed.");
}
devIdx
- the index of the device to be requestedout
- out.mVal1 contains the ID of the micro controller just
updating
( 0: no update in progress,
1: mainboard microcontroller is updating,
2: display microcontroller is updating,
4: sensor microcontroller is updating,
-1: error while updating mainboard MCU,
-2: error while updating display MCU,
-4: error while updating sensor MCU),
out.mVal2 cointains the update sequence's progress of one
of the three micro controllers in percent (0..100)ScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void scExecCmd(int devIdx, java.lang.String in) throws ScEx
int devIdx = 0;
String cmd = "30500";
try
{
ScDllWrapper.scExecCmd(devIdx, cmd);
}
catch(ScEx ex)
{
System.out.println("scExecCmd() failed.");
}
devIdx
- the index of the device (if needed, -1 in other cases)in
- command to be executedScEx
- throws one of the SpaceControl exceptions in case of an errorpublic static void main(java.lang.String[] args)
args
- command line arguments