SpaceControl DLL  Version 2.8.3
API documentation for the SpaceControl 3D input devices
spc_ctrlr.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // SpaceController-DLL - Copyright (c) Spacecontrol GmbH, D-82229 Seefeld
3 //------------------------------------------------------------------------------
4 //
8 //
9 // Erzeugt am 17. April 2007, 10:07
10 //
11 // Datum Autor Aenderung (neue Eintraege oben)
12 // -------- ------ -------------------------------------------------------------
13 // 17.04.07 fse erzeugt
14 //------------------------------------------------------------------------------
15 
16 #ifndef _spc_ctrlr_H
17 #define _spc_ctrlr_H
18 
19 //------------------------------------------------------------------------------
20 
21 #ifndef __cplusplus
22 #error spc_ctrlr.h is only for C++!
23 #endif
24 
25 #ifdef _WIN32
26  // SI_EXPORTING ist definiert, wenn wir die SiApp-DLL bauen, dann werden die
27  // Funktionen aus sc_dll.cc statisch gelinkt, SC_API wird als leer definiert.
28  // SC_EXPORTING ist definiert, wenn wir die SC-DLL bauen, dann werden die
29  // Funktionen aus sc_dll.cc exportiert und koennen dynamisch gelinkt werden,
30  // SC_API wird als __declspec(dllexport) definiert.
31  // Wenn weder SI_EXPORTING noch SC_EXPORTING definiert sind, kann spc_ctrlr.h
32  // von Applikationen inkludiert werden, die die SC-DLL dynamisch linken
33  // wollen, SC_API wird als __declspec(dllimport) definiert.
34  #ifdef SI_EXPORTING
35  #define SC_API
36  #else
37  #ifdef SC_EXPORTING
38  #define SC_API __declspec(dllexport)
39  #else
40  #define SC_API __declspec(dllimport)
41  #endif
42  #endif
43  #include <winsock2.h> // ersetzt wg. Compiler-Warnung ...
44 // #include <windows.h> // ... "#warning Please include winsock2.h before windows.h"
45 #else
46  #define SC_API
47  #ifdef __linux__
48  #include <X11/Xlib.h>
49  #endif
50 #endif
51 
52 #include <string>
53 #include <vector>
54 #include "scDevPars.h"
55 
56 class Message;
57 
58 using namespace std;
59 
60 //------------------------------------------------------------------------------
61 
62 #define MIN_STD_MODE 0
63 #define MAX_STD_MODE 7
64 #define MIN_CMPR_MODE 0
65 #define MAX_CMPR_MODE 119
66 #define MIN_PERIOD 0
67 #define MAX_PERIOD 405
68 #define MIN_SENS 0
69 #define MAX_SENS 15
70 #define MIN_NULL_RAD 0
71 #define MAX_NULL_RAD 15
72 #define MIN_BRIGHTNESS 0
73 #define MAX_BRIGHTNESS 15
74 #define MIN_COLOR_VAL 0
75 #define MAX_COLOR_VAL 255
76 #define MAX_AVE_NUM 15
77 #define NO_BRGHT_CHANGE MAX_BRIGHTNESS+1
78 #define FORCE_SET_BRIGHTNESS 20
79 #define MIN_LMH_BND 0
80 #define MAX_LMH_BND 5000
81 #define RAW_DATA_LEN 28
82 #define MAX_FRM_REC_DATA_LEN 83
83 #define RAM_PAGE_PART_LEN 69
84 #define LED_NUM 33
85 #define MAX_DEV_NUM 16
86 #define MIN_KEY_IDX 0
87 #define MAX_KEY_IDX 16
88 #define MAX_STR_LEN 32
89 #define MAX_DSPL_STR_LEN 40
90 #define MIN_DSPL_ROW 0
91 #define MAX_DSPL_ROW 6
92 #define FLAG_OFFSET 100
93 #define MOTION_EVT "MotionEvent"
94 #define BUT_PRESS_EVT "ButtonPressEvent"
95 #define BUT_REL_EVT "ButtonReleaseEvent"
96 #define CMD_EVT "CommandEvent"
97 #define TASK_BAR_EVT "TaskBarEvent"
98 #define UNNAMED_TRNS "unnamedTrncvr"
99 #define DEV_DCN_EVT "DeviceDisconnectEvent"
100 #define SB_MOTION_EVT "SpaceballMotionEventType"
101 #define SB_BUT_PRESS_EVT "SpaceballButtonPressEventType"
102 #define SB_BUT_REL_EVT "SpaceballButtonReleaseEventType"
103 #define SB_CMD_EVT "SpaceballPassThruCommandEventType"
104 #define SW_CMD_EVT "SpaceWarePassThruCommandEventType"
105 
106 //------------------------------------------------------------------------------
107 
109 // fse, 08.08.07
110 
112 {
113  MotionEvent = 24869,
114  ButtonPressEvent,
115  ButtonReleaseEvent,
116  CommandEvent,
117  TaskBarEvent
118 };
119 
121 // fse, 08.08.07
122 
124 {
125  MagellanNoCommand, // <- needed only for the Linux version
126  MagellanStop, // <- needed only for the Linux version by fse
127  MagellanSetWindowCommand = 27695,
128  MagellanApplicationSensitivity,
129  MagellanRingBell,
130  MagellanApplicationStarts,
131  MagellanModeChange,
132  MagellanNullRadiusChange,
133  MagellanControlPanel,
134  MagellanInternSendCommand,
135  MagellanSetActiveLed,
136  StopDriver,
137  OpenControlPanel,
138  ShowVersionInfo
139 };
140 
142 // fse, 20.02.08
143 
144 enum ScKey
145 {
146  SC_KEY_1 = 0,
147  SC_KEY_2,
148  SC_KEY_3,
149  SC_KEY_4,
150  SC_KEY_5,
151  SC_KEY_6,
152  SC_KEY_CTRL,
153  SC_KEY_ALT,
154  SC_KEY_SHIFT,
155  SC_KEY_ESC,
156  SC_KEY_FRONT,
157  SC_KEY_RIGHT,
158  SC_KEY_TOP,
159  SC_KEY_FIT,
160  SC_KEY_2D3D,
161  SC_KEY_PANEL,
162  SC_KEY_MENU,
163  SC_KEY_1_B,
164  SC_KEY_2_B,
165  SC_KEY_3_B,
166  SC_KEY_4_B,
167  SC_KEY_5_B,
168  SC_KEY_6_B,
169  SC_KEY_CTRL_B,
170  SC_KEY_ALT_B,
171  SC_KEY_SHIFT_B,
172  SC_KEY_ESC_B,
173  SC_KEY_FRONT_B,
174  SC_KEY_RIGHT_B,
175  SC_KEY_TOP_B,
176  SC_KEY_FIT_B,
177  SC_KEY_2D3D_B,
178  SC_KEY_PANEL_B,
179  SC_KEY_MENU_B,
180  SC_KEY_END
181 };
182 
183 
185 // ACHTUNG: Im Falle einer Aenderung muessen die gleichnamigen final ints in
186 // ScDllWrapper.java angepasst werden!
187 // fse, 24.06.13
188 
190 {
191  BAUD,
192  MAX_BYTES_IN_RX_QUEUE,
193  PORT,
194  EXPLORER_DELAY,
195  DEVICE_TIMEOUT,
196  SEND_MODE,
197  SEND_DELAY,
198  CAP_CHARACTERISTIC,
199  BLINK_PERIOD,
200  IS_CFG_AUTO_CHANGE,
201  IS_LAST_CFG_TO_REM,
202  IS_SINGLE_COM_PER_APP,
203  IS_LEGACY_COM_1,
204  IS_LEGACY_COM_2,
205  PROGRAM_PARS_END
206 };
207 
209 // fse, 11.02.09
210 
212 {
213  SC_DMN_NRM, // normaler Modus
214  SC_DMN_TST_SPC, // Testmodus fuer SpaceController
215  SC_DMN_TST_GEN, // Testmodus fuer GEN
216  SC_DMN_END
217 };
218 
219 //------------------------------------------------------------------------------
220 
224 // fse, 08.08.07
225 
226 struct ScCom
227 {
228  #ifdef _WIN32
229  DWORD mMotionEvt;
230  DWORD mButPressEvt;
231  DWORD mButRelEvt;
232  DWORD mCmdEvt;
233  DWORD mTaskBarEvt;
234  #endif
235  #ifdef __linux__
236  Atom mMotionEvt;
237  Atom mButPressEvt;
238  Atom mButRelEvt;
239  Atom mCmdEvt;
240  Atom mDevDcnEvt;
241  Atom mSbMotionEvt;
242  Atom mSbButPressEvt;
243  Atom mSbButRelEvt;
244  Atom mSbCmdEvt;
245  Atom mSwCmdEvt;
246  #endif
247  #ifdef __APPLE__
248  // Old Spacemouse interface not available.
249  #endif
250 };
251 
252 //------------------------------------------------------------------------------
253 
254 #define MAX_SERIALNO_LEN 16
255 #define MAX_DESCRPTN_LEN 64
256 
257 // DLL problem:
263 // Unfortunately it is not possible to retrieve strings out of a DLL if the
264 // string memory is not allocated before by the application using the DLL.
265 // Strings as structure members can not be retrieved even if the memory is
266 // allocated before. (This destroys the advantage of strings over character
267 // arrays.)
268 // Therefore character arrays are used in all the following structs.
269 // This would be not necessary under Linux using shared objects.
270 // ACHTUNG: AENDERUNGEN AUCH IN ScDevInfo.java EINPFLEGEN!
271 // fse, 09.05.07
272 
273 struct ScDevInfo
274 {
275  int mId;
276  char mSerialNo[MAX_SERIALNO_LEN];
277  char mDescrptn[MAX_DESCRPTN_LEN];
278  void setId (int in ) { mId = in; }
279  void setSerialNo(char* inP) { strncpy(mSerialNo, inP, MAX_SERIALNO_LEN); mSerialNo[MAX_SERIALNO_LEN-1] = 0; }
280  void setDescrptn(char* inP) { strncpy(mDescrptn, inP, MAX_DESCRPTN_LEN); mDescrptn[MAX_DESCRPTN_LEN-1] = 0; }
281 };
282 
283 //------------------------------------------------------------------------------
284 
285 #define MAX_VERSION_LEN 16
286 #define MAX_FILENAME_LEN 256
287 
288 // fse, 31.05.07
291 
292 struct ScVersion
293 {
294  char mVrsn[MAX_VERSION_LEN];
295  char mPath[MAX_FILENAME_LEN];
296  void setVrsn(char* inP) { strncpy(mVrsn, inP, MAX_VERSION_LEN ); mVrsn[MAX_VERSION_LEN-1 ] = 0; }
297  void setPath(char* inP) { strncpy(mPath, inP, MAX_FILENAME_LEN); mPath[MAX_FILENAME_LEN-1] = 0; }
298 };
299 
300 //------------------------------------------------------------------------------
301 
302 #define MAX_APPL_NAME_LEN 32
303 #define MAX_APPL_STATE_LEN 16
304 
305 // fse, 16.04.08
311 
312 struct ScFgAppl
313 {
314  char mName [MAX_APPL_NAME_LEN ];
315  char mState[MAX_APPL_STATE_LEN];
316  void setName (char* inP) { strncpy(mName , inP, MAX_APPL_NAME_LEN ); mName [MAX_APPL_NAME_LEN -1] = 0; }
317  void setState(char* inP) { strncpy(mState, inP, MAX_APPL_STATE_LEN); mState[MAX_APPL_STATE_LEN-1] = 0; }
318 };
319 
320 //------------------------------------------------------------------------------
321 
325 // fse, 14.09.07
326 
328 {
329  char mFilename[MAX_FILENAME_LEN];
330  void setFilename(char* inP) { strncpy(mFilename, inP, MAX_FILENAME_LEN); mFilename[MAX_FILENAME_LEN-1] = 0; }
331 };
332 
333 //------------------------------------------------------------------------------
334 
336 // ACHTUNG: Pro Element eine Ausnahmeklasse in ScDllWrapper definieren!
337 // ACHTUNG: Eine Kopie dieser Enumeration liegt auf Java-Seite in der Datei
338 // ScStatus.java. Aenderungen auch dort einpflegen!
339 // ACHTUNG: Auch ScDllWrapper.intToStatus(int rc) in ScDllWrapper.java
340 // anpassen!
341 // fse, 03.09.12: SC_EXEC_ERROR ergaenzt.
342 // fse, 11.07.14: SC_THREAD_ERROR ergaenzt.
343 // fse, 08.07.15: SC_WRONG_USER ergaenzt.
344 
346 {
347  SC_OK ,
360 };
361 
362 
363 //------------------------------------------------------------------------------
364 
367 
368 typedef int (*stdDataCallbackP)(short x, short y, short z, short a, short b, short c, int traLmh, int rotLmh, int event, long tvSec, long tvUsec);
369 
370 //------------------------------------------------------------------------------
371 
372 #ifdef __cplusplus
373 extern "C"
374 {
375 #endif
376 
377 SC_API char* scStatusToStr(ScStatus ks);
378 SC_API ScStatus scIsProcessRunning(char* processName, bool* isRunningP);
379 SC_API ScStatus scSetCurrentUserRegValue (char* keyP, char* nameP, char* valueP);
380 SC_API ScStatus scQueryCurrentUserRegValue(char* keyP, char* nameP, int len, char* valueP);
381 SC_API ScStatus scDelCurrentUserRegValue (char* keyP, char* nameP);
382 
383 SC_API ScStatus scConnect2(bool isAlwaysReceivingData, char* applName);
387 SC_API ScStatus scGetDmnVrsn(char* versionP, char* pathP);
388 SC_API ScStatus scGetDevNum (int* devNumP, int* usedDevNumP, int* maxDevIdxP);
389 SC_API ScStatus scGetFgAppl (char* fgApplP, char* fgApplStateP);
390 SC_API ScStatus scGetDllLogPars(char logFile[gMaxFileNameLen], int* maxSizeP, bool* isLogToFileP, bool* isLogToCnslP, bool* isWrnP, bool* isCrtP, bool* isTrcP, bool* isDcmP, bool* isIcmP, bool* isInfP, bool* isDbgP, bool* isTmpP, char exclFileToLog[gMaxFileNameLen]);
391 SC_API ScStatus scSetDllLogPars(char logFile[gMaxFileNameLen], int maxSize , bool isLogToFile , bool isLogToCnsl , bool isWrn , bool isCrt , bool isTrc , bool isDcm , bool isIcm , bool isInf , bool isDbg , bool isTmp , char exclFileToLog[gMaxFileNameLen]);
392 SC_API ScStatus scSetState2(char* state);
393 SC_API ScStatus scSetState(char* str1, char* str2);
395 
396 SC_API ScStatus scGetDaemonPar(int par, int* valP);
397 SC_API ScStatus scSetDaemonPar(int par, int* valP);
398 
399 SC_API ScStatus scGetDevInfo (int devIdx, ScDevInfo* diP);
400 
401 SC_API ScStatus scGetDefDevPars (int devIdx, ScDevPars* dpP);
402 SC_API ScStatus scGetDevPars (int devIdx, ScDevPars* dpP);
403 SC_API ScStatus scSetDevPars (int devIdx, ScDevPars* dpP);
404 SC_API ScStatus scSetDevParsToDefaults(int devIdx, ScDevPars* dpP);
405 
406 SC_API ScStatus scGetBasicSettings(int devIdx, ScBasicSettings* bsP);
407 SC_API ScStatus scSetBasicSettings(int devIdx, ScBasicSettings* bsP);
408 
409 SC_API ScStatus scGetAdvancedSettings(int devIdx, ScAdvancedSettings* asP);
410 SC_API ScStatus scSetAdvancedSettings(int devIdx, ScAdvancedSettings* bsP);
411 
412 SC_API ScStatus scGetAdvSens (int devIdx, ScAdvSens* dpP);
413 SC_API ScStatus scSetAdvSens (int devIdx, ScAdvSens* dpP);
414 
415 SC_API ScStatus scGetStdMode (int devIdx, unsigned char* bitmaskP);
416 SC_API ScStatus scSetStdMode (int devIdx, unsigned char* bitmaskP);
417 
418 SC_API ScStatus scGetCmprMode (int devIdx, unsigned char* bitmaskP);
419 SC_API ScStatus scSetCmprMode (int devIdx, unsigned char* bitmaskP);
420 
421 SC_API ScStatus scGetSens (int devIdx, int* transSensP, int* rotSensP);
422 SC_API ScStatus scSetSens (int devIdx, int* transSensP, int* rotSensP);
423 
424 SC_API ScStatus scGetXTraSens (int devIdx, int* sensP);
425 SC_API ScStatus scSetXTraSens (int devIdx, int* sensP);
426 
427 SC_API ScStatus scGetYTraSens (int devIdx, int* sensP);
428 SC_API ScStatus scSetYTraSens (int devIdx, int* sensP);
429 
430 SC_API ScStatus scGetZTraSens (int devIdx, int* sensP);
431 SC_API ScStatus scSetZTraSens (int devIdx, int* sensP);
432 
433 SC_API ScStatus scGetXRotSens (int devIdx, int* sensP);
434 SC_API ScStatus scSetXRotSens (int devIdx, int* sensP);
435 
436 SC_API ScStatus scGetYRotSens (int devIdx, int* sensP);
437 SC_API ScStatus scSetYRotSens (int devIdx, int* sensP);
438 
439 SC_API ScStatus scGetZRotSens (int devIdx, int* sensP);
440 SC_API ScStatus scSetZRotSens (int devIdx, int* sensP);
441 
442 SC_API ScStatus scGetSendDelay(int devIdx, int* maxPeriodP, int* minPeriodP);
443 SC_API ScStatus scSetSendDelay(int devIdx, int* maxPeriodP, int* minPeriodP);
444 
445 SC_API ScStatus scGetNullRad (int devIdx, int* nullRadP);
446 SC_API ScStatus scSetNullRad (int devIdx, int* nullRadP);
447 
448 SC_API ScStatus scSetStdZero (int devIdx);
449 
450 //SC_API ScStatus scGetStdData (int devIdx, short* xP, short* yP, short* zP, short* aP, short* bP, short* cP, int* traLmhP, int* rotLmhP, int* eventP, long* tvSecP, long* tvUsecP);
451 SC_API ScStatus scFetchStdData(int devIdx, short* xP, short* yP, short* zP, short* aP, short* bP, short* cP, int* traLmhP, int* rotLmhP, int* eventP, long* tvSecP, long* tvUsecP);
452 SC_API ScStatus scGetRawData (int devIdx, unsigned char buf[RAW_DATA_LEN]);
453 
454 SC_API ScStatus scGetTra (int devIdx, bool* isTraP);
455 SC_API ScStatus scSetTra (int devIdx, bool* isTraP);
456 
457 SC_API ScStatus scGetXTra (int devIdx, bool* isTraP);
458 SC_API ScStatus scSetXTra (int devIdx, bool* isTraP);
459 
460 SC_API ScStatus scGetYTra (int devIdx, bool* isTraP);
461 SC_API ScStatus scSetYTra (int devIdx, bool* isTraP);
462 
463 SC_API ScStatus scGetZTra (int devIdx, bool* isTraP);
464 SC_API ScStatus scSetZTra (int devIdx, bool* isTraP);
465 
466 SC_API ScStatus scGetXTraRev(int devIdx, bool* isRevP);
467 SC_API ScStatus scSetXTraRev(int devIdx, bool* isRevP);
468 
469 SC_API ScStatus scGetYTraRev(int devIdx, bool* isRevP);
470 SC_API ScStatus scSetYTraRev(int devIdx, bool* isRevP);
471 
472 SC_API ScStatus scGetZTraRev(int devIdx, bool* isRevP);
473 SC_API ScStatus scSetZTraRev(int devIdx, bool* isRevP);
474 
475 SC_API ScStatus scGetRot (int devIdx, bool* isRotP);
476 SC_API ScStatus scSetRot (int devIdx, bool* isRotP);
477 
478 SC_API ScStatus scGetXRot (int devIdx, bool* isRotP);
479 SC_API ScStatus scSetXRot (int devIdx, bool* isRotP);
480 
481 SC_API ScStatus scGetYRot (int devIdx, bool* isRotP);
482 SC_API ScStatus scSetYRot (int devIdx, bool* isRotP);
483 
484 SC_API ScStatus scGetZRot (int devIdx, bool* isRotP);
485 SC_API ScStatus scSetZRot (int devIdx, bool* isRotP);
486 
487 SC_API ScStatus scGetXRotRev(int devIdx, bool* isRevP);
488 SC_API ScStatus scSetXRotRev(int devIdx, bool* isRevP);
489 
490 SC_API ScStatus scGetYRotRev(int devIdx, bool* isRevP);
491 SC_API ScStatus scSetYRotRev(int devIdx, bool* isRevP);
492 
493 SC_API ScStatus scGetZRotRev(int devIdx, bool* isRevP);
494 SC_API ScStatus scSetZRotRev(int devIdx, bool* isRevP);
495 
496 SC_API ScStatus scGetDom (int devIdx, bool* isDomP);
497 SC_API ScStatus scSetDom (int devIdx, bool* isDomP);
498 
499 SC_API ScStatus scReadMsg (int devIdx, char* msgP);
500 
501 SC_API ScStatus scGetCfgFilename(int devIdx, char* filenameP);
502 SC_API ScStatus scSaveDevPars (int devIdx, char* filenameP);
503 SC_API ScStatus scLoadDevPars (int devIdx, char* filenameP, ScDevPars* dpP);
504 
505 SC_API ScStatus scPressKey (int devIdx, int key);
506 SC_API ScStatus scRelKey (int devIdx, int key);
507 
508 SC_API ScStatus scSetLed (int devIdx, int ledNo, int* brightnessP);
509 SC_API ScStatus scGetLed (int devIdx, int ledNo, int* brightnessP);
510 
511 SC_API ScStatus scSetLeds (int devIdx, int* redP, int* greenP, int* blueP);
512 //SC_API ScStatus ScGetLeds (int devIdx, int* redP, int* greenP, int* blueP);
513 
514 SC_API ScStatus scSetLedsEx (int devIdx, char brightness[LED_NUM]);
515 SC_API ScStatus scGetLedsEx (int devIdx, char brightness[LED_NUM]);
516 
517 SC_API ScStatus scSetLcd (int devIdx, int* brightnessP);
518 SC_API ScStatus scGetLcd (int devIdx, int* brightnessP);
519 SC_API ScStatus scSetLcdColor(int devIdx, int* redP, int* greenP, int* blueP);
520 
521 SC_API ScStatus scSetDsplString(int devIdx, int row, char text[MAX_DSPL_STR_LEN], int* charNumP);
522 
523 SC_API ScStatus scGetFmwUpdtState(int devIdx, int* mcuIdP, int* progressP);
524 
525 SC_API ScStatus scExecCmd(int devIdx, char* cmdP);
526 
527 SC_API ScStatus scTriggerFunction(int devIdx, int funcIdx);
529 
530 //SC_API ScStatus scGetSettings();
531 //SC_API ScStatus scGetLogPars();
532 //SC_API void scPrintVersion();
533 
534 //SC_API ScStatus scGetDevices(ScDevInfoList** dilPP);
535 
536 #ifdef __cplusplus
537 }
538 #endif
539 
540 //------------------------------------------------------------------------------
541 
542 #endif /* _spc_ctrlr_H */
543 
544 //------------------------------------------------------------------------------
545 //-------------------------------------- ---------------------------------------
546 //------------------------- ------------------------- --------------------------
547 //------------------ ------------------- ------------------- -------------------
548 //-------------- --------------- --------------- --------------- ---------------
549 //------------ ------------ ------------ ------------ ------------ -------------
SC_API ScStatus scSetZRot(int devIdx, bool *isRotP)
Sets and retrieves the rotational mode for the z-axis.
Definition: sc_dll.cc:4784
SC_API ScStatus scSetDevPars(int devIdx, ScDevPars *dpP)
Sets and retrieves the actual device parameters as listed in the device's configuration file...
Definition: sc_dll.cc:1951
SC_API ScStatus scGetZTraRev(int devIdx, bool *isRevP)
Answers with true if the z-axis' translational mode is set to reverse.
Definition: sc_dll.cc:4414
the expected application was not found
Definition: spc_ctrlr.h:353
SC_API ScStatus scGetSens(int devIdx, int *transSensP, int *rotSensP)
Retrieves the device's sensitivity.
Definition: sc_dll.cc:2552
SC_API ScStatus scSetDevParsToDefaults(int devIdx, ScDevPars *dpP)
Sets the actual device parameters to the defaults and retrieves the new parameters.
Definition: sc_dll.cc:1997
SC_API ScStatus scSetLed(int devIdx, int ledNo, int *brightnessP)
Sets and retrieves the brightness of a single LED.
Definition: sc_dll.cc:5539
SC_API ScStatus scSetZTraSens(int devIdx, int *sensP)
Sets and retrieves the device's sensitivity for the z-axis' translation.
Definition: sc_dll.cc:2848
SC_API ScStatus scSetZTra(int devIdx, bool *isTraP)
Sets and retrieves the translational mode for the z-axis.
Definition: sc_dll.cc:4208
SC_API ScStatus scGetAdvSens(int devIdx, ScAdvSens *dpP)
Retrieves the actual six sensitivity parameters of the advanced settings.
Definition: sc_dll.cc:2225
SC_API ScStatus scGetYTraSens(int devIdx, int *sensP)
Retrieves the device's sensitivity for the y-translation.
Definition: sc_dll.cc:2729
SC_API ScStatus scSetMode(ScDaemonMode mode)
This function is for internal use only - do not call it.
Definition: sc_dll.cc:1627
SC_API ScStatus scGetRawData(int devIdx, unsigned char buf[RAW_DATA_LEN])
The opto-electronical sensor integrated into the cap consists of six LEDs illuminating six position s...
Definition: sc_dll.cc:3875
SC_API ScStatus scTriggerFunction(int devIdx, int funcIdx)
Triggers the function with index funcIdx.
Definition: sc_dll.cc:5395
SC_API ScStatus scGetLcd(int devIdx, int *brightnessP)
Retrieves the LCD's brightness.
Definition: sc_dll.cc:5662
Structure needed for communication via the MS Windows messaging system or the X-Server messaging syst...
Definition: spc_ctrlr.h:226
Structure holding the Daemon software's version no.
Definition: spc_ctrlr.h:292
SC_API ScStatus scGetDefDevPars(int devIdx, ScDevPars *dpP)
Retrieves the default values of the device parameters.
Definition: sc_dll.cc:1773
SC_API ScStatus scSetXRot(int devIdx, bool *isRotP)
Sets and retrieves the rotational mode for the x-axis.
Definition: sc_dll.cc:4620
SC_API ScStatus scGetZTra(int devIdx, bool *isTraP)
Answers with true if the z-axis' translational data will be transmitted.
Definition: sc_dll.cc:4168
SC_API ScStatus scGetLed(int devIdx, int ledNo, int *brightnessP)
Gets the brightness of a single LED.
Definition: sc_dll.cc:5497
SC_API ScStatus scGetStdMode(int devIdx, unsigned char *bitmaskP)
Definition: sc_dll.cc:2342
SC_API ScStatus scGetLedsEx(int devIdx, char brightness[LED_NUM])
Gets the brightnesses of all LEDs.
Definition: sc_dll.cc:5579
thread for reading data from devices could not be started
Definition: spc_ctrlr.h:357
communication error occurred
Definition: spc_ctrlr.h:348
SC_API ScStatus scSetDaemonPar(int par, int *valP)
Sets one of the parameters available in the Daemon's configuration file "daemon.ini".
Definition: sc_dll.cc:1700
the DLL's user is not the same as the daemon's user
Definition: spc_ctrlr.h:358
void setVrsn(char *inP)
sets the member mVrsn
Definition: spc_ctrlr.h:296
SC_API ScStatus scSetYRotSens(int devIdx, int *sensP)
Sets and retrieves the SpaceControl device's sensitivity for the y-axis' rotation.
Definition: sc_dll.cc:3010
SC_API ScStatus scTransferCallbackFunction(int devIdx, stdDataCallbackP cbP)
This function hands over a callback function pointer to the API.
Definition: sc_dll.cc:3802
SC_API ScStatus scDisconnect()
Closes the connection to the SpaceControl daemon.
Definition: sc_dll.cc:1064
STL namespace.
Structure holding a foreground application's name and state.
Definition: spc_ctrlr.h:312
SC_API ScStatus scSetTra(int devIdx, bool *isTraP)
Sets and retrieves the translational mode.
Definition: sc_dll.cc:3961
SC_API ScStatus scGetCfgFilename(int devIdx, char *filenameP)
Retrieves the name and path of the device's actual configuration file.
Definition: sc_dll.cc:5184
SC_API ScStatus scSetAdvSens(int devIdx, ScAdvSens *dpP)
Sets and retrieves the six actual sensitivity parameters of the advanced settings.
Definition: sc_dll.cc:2274
ScDaemonMode
This enumeration is reserved for internal use.
Definition: spc_ctrlr.h:211
SC_API ScStatus scGetZRotSens(int devIdx, int *sensP)
Retrieves the device's sensitivity for the z-rotation.
Definition: sc_dll.cc:3053
file could not be written or read
Definition: spc_ctrlr.h:351
SC_API ScStatus scGetYTra(int devIdx, bool *isTraP)
Answers with true if the y-axis' translational data will be transmitted.
Definition: sc_dll.cc:4085
SC_API ScStatus scFetchStdData(int devIdx, short *xP, short *yP, short *zP, short *aP, short *bP, short *cP, int *traLmhP, int *rotLmhP, int *eventP, long *tvSecP, long *tvUsecP)
Fetches the standard data set.
Definition: sc_dll.cc:3562
SC_API ScStatus scSetAdvancedSettings(int devIdx, ScAdvancedSettings *bsP)
Sets and retrieves the actual advanced settings parameters.
Definition: sc_dll.cc:2181
SC_API ScStatus scSaveDevPars(int devIdx, char *filenameP)
Saves the actual parameters of the device with index devIdx to the configuration file given in filePa...
Definition: sc_dll.cc:5222
SC_API ScStatus scGetDllLogPars(char logFile[gMaxFileNameLen], int *maxSizeP, bool *isLogToFileP, bool *isLogToCnslP, bool *isWrnP, bool *isCrtP, bool *isTrcP, bool *isDcmP, bool *isIcmP, bool *isInfP, bool *isDbgP, bool *isTmpP, char exclFileToLog[gMaxFileNameLen])
Retrieves the logging parameters and filenames actually used by the internal DLL functions.
Definition: sc_dll.cc:1330
#define RAW_DATA_LEN
length of the raw data buffer
Definition: spc_ctrlr.h:81
SC_API ScStatus scSetZRotSens(int devIdx, int *sensP)
Sets and retrieves the device's sensitivity for the z-axis' rotation.
Definition: sc_dll.cc:3091
SC_API ScStatus scSetXRotRev(int devIdx, bool *isRevP)
Sets and retrieves the x-axis' reverse rotational mode.
Definition: sc_dll.cc:4866
SC_API ScStatus scGetRot(int devIdx, bool *isRotP)
Answers with true if the rotational mode is set.
Definition: sc_dll.cc:4497
one or more parameters are out of range
Definition: spc_ctrlr.h:350
SC_API ScStatus scGetNullRad(int devIdx, int *nullRadP)
Retrieves the device's null radius (threshold).
Definition: sc_dll.cc:3244
SC_API ScStatus scDelCurrentUserRegValue(char *keyP, char *nameP)
Deletes a string value in the Windows registry under the base key HKEY_CURRENT_USER.
Definition: sc_dll.cc:819
SC_API ScStatus scGetYRotSens(int devIdx, int *sensP)
Retrieves the SC device's sensitivity for the y-rotation.
Definition: sc_dll.cc:2972
SC_API ScStatus scGetDaemonPar(int par, int *valP)
Retrieves one of the parameters available in the Daemon's configuration file "daemon.ini".
Definition: sc_dll.cc:1663
SC_API ScStatus scGetAdvancedSettings(int devIdx, ScAdvancedSettings *asP)
Retrieves the actual advanced settings parameters.
Definition: sc_dll.cc:2133
not used
Definition: spc_ctrlr.h:359
SC_API char * scStatusToStr(ScStatus ks)
Returns a DLL function's status code as a string.
Definition: sc_dll.cc:684
#define MAX_APPL_NAME_LEN
maximal length of an application name
Definition: spc_ctrlr.h:302
SC_API ScStatus scSetXTraSens(int devIdx, int *sensP)
Sets and retrieves the device's sensitivity for the x-axis' translation.
Definition: sc_dll.cc:2686
void setPath(char *inP)
sets the member mPath
Definition: spc_ctrlr.h:297
SC_API ScStatus scRelKey(int devIdx, int key)
Triggers the same action as is done when a key of the device is released.
Definition: sc_dll.cc:5345
SC_API ScStatus scGetFmwUpdtState(int devIdx, int *mcuIdP, int *progressP)
Retrieves the state of a firmware update in progress.
Definition: sc_dll.cc:5866
SC_API ScStatus scSetBasicSettings(int devIdx, ScBasicSettings *bsP)
Sets and retrieves the actual basic settings parameters.
Definition: sc_dll.cc:2089
void setDescrptn(char *inP)
sets the member mDescrptn
Definition: spc_ctrlr.h:280
void setFilename(char *inP)
sets the member mFilename
Definition: spc_ctrlr.h:330
SC_API ScStatus scSetYTraRev(int devIdx, bool *isRevP)
Sets and retrieves the y-axis' reverse translational mode.
Definition: sc_dll.cc:4372
void setSerialNo(char *inP)
sets the member mSerialNo
Definition: spc_ctrlr.h:279
#define MAX_DSPL_STR_LEN
max. length of a string in the LCD
Definition: spc_ctrlr.h:89
SC_API ScStatus scGetDevPars(int devIdx, ScDevPars *dpP)
Retrieves the actual device parameters as listed in the *.cfg files.
Definition: sc_dll.cc:1816
SC_API ScStatus scSetZTraRev(int devIdx, bool *isRevP)
Sets and retrieves the z-axis' reverse translational mode.
Definition: sc_dll.cc:4454
SC_API ScStatus scSetLcdColor(int devIdx, int *redP, int *greenP, int *blueP)
Sets and retrieves the LCD's background color.
Definition: sc_dll.cc:5752
SC_API ScStatus scSetCurrentUserRegValue(char *keyP, char *nameP, char *valueP)
Sets a new string value into the Windows registry under the base key HKEY_CURRENT_USER.
Definition: sc_dll.cc:746
SC_API ScStatus scSetNullRad(int devIdx, int *nullRadP)
Sets and retrieves the device's null radius (threshold).
Definition: sc_dll.cc:3285
SC_API ScStatus scSetXTraRev(int devIdx, bool *isRevP)
Sets and retrieves the x-axis' reverse translational mode.
Definition: sc_dll.cc:4290
void setState(char *inP)
sets the member mState
Definition: spc_ctrlr.h:317
#define MAX_DESCRPTN_LEN
description's max. length
Definition: spc_ctrlr.h:255
SC_API ScStatus scConnect2(bool isAlwaysReceivingData, char *applName)
Establishes the connection to the SpaceControl daemon.
Definition: sc_dll.cc:876
error while accessing the Windows registry
Definition: spc_ctrlr.h:354
SC_API ScStatus scGetFgAppl(char *fgApplP, char *fgApplStateP)
Retrieves the name and potentially the state of the foreground application.
Definition: sc_dll.cc:1257
SC_API ScStatus scSetStdZero(int devIdx)
Sets the actual displacement of the cap as the standard 0 value.
Definition: sc_dll.cc:3326
SC_API ScStatus scQueryCurrentUserRegValue(char *keyP, char *nameP, int len, char *valueP)
Queries a string value from the Windows registry under the base key HKEY_CURRENT_USER.
Definition: sc_dll.cc:784
SC_API ScStatus scSetXRotSens(int devIdx, int *sensP)
Sets and retrieves the device's sensitivity for the x-axis' rotation.
Definition: sc_dll.cc:2929
SC_API ScStatus scSetDllLogPars(char logFile[gMaxFileNameLen], int maxSize, bool isLogToFile, bool isLogToCnsl, bool isWrn, bool isCrt, bool isTrc, bool isDcm, bool isIcm, bool isInf, bool isDbg, bool isTmp, char exclFileToLog[gMaxFileNameLen])
Sets the logging parameters actually used by the internal DLL functions.
Definition: sc_dll.cc:1427
Structure holding the path and filename of a configuration file to write to harddisk or read from it...
Definition: spc_ctrlr.h:327
SC_API ScStatus scSetXTra(int devIdx, bool *isTraP)
Sets and retrieves the translational mode for the x-axis.
Definition: sc_dll.cc:4043
#define MAX_VERSION_LEN
version number's max. length
Definition: spc_ctrlr.h:285
SC_API ScStatus scSetLedsEx(int devIdx, char brightness[LED_NUM])
Sets and retrieves the brightness of all LEDs.
Definition: sc_dll.cc:5620
SC_API ScStatus scGetZRotRev(int devIdx, bool *isRevP)
Answers with true if the z-axis' rotational mode is set to reverse.
Definition: sc_dll.cc:4990
#define SC_API
macro is needed for defining DLL ex- and import
Definition: spc_ctrlr.h:46
function successfully executed
Definition: spc_ctrlr.h:347
SC_API ScStatus scGetXTraRev(int devIdx, bool *isRevP)
Answers with true if the x-axis' translational mode is set to reverse.
Definition: sc_dll.cc:4250
SC_API ScStatus scGetDom(int devIdx, bool *isDomP)
Answers with true if the dominant mode is set.
Definition: sc_dll.cc:5073
SC_API ScStatus scGetXTra(int devIdx, bool *isTraP)
Answers with true if the x-axis' translational data will be transmitted.
Definition: sc_dll.cc:4003
SC_API ScStatus scGetZTraSens(int devIdx, int *sensP)
Retrieves the device's sensitivity for the z-translation.
Definition: sc_dll.cc:2810
void setId(int in)
sets the member mId
Definition: spc_ctrlr.h:278
SC_API ScStatus scPressKey(int devIdx, int key)
Triggers the same action as is done when a key of the device is pressed, i.
Definition: sc_dll.cc:5304
SC_API ScStatus scGetYTraRev(int devIdx, bool *isRevP)
Answers with true if the y-axis' translational mode is set to reverse.
Definition: sc_dll.cc:4332
command is not supported by this device type
Definition: spc_ctrlr.h:355
SC_API ScStatus scGetDevInfo(int devIdx, ScDevInfo *diP)
Retrieves some information data about the device with the given index.
Definition: sc_dll.cc:1732
SC_API ScStatus scGetSendDelay(int devIdx, int *maxPeriodP, int *minPeriodP)
Retrieves the devic's data rate parameters.
Definition: sc_dll.cc:3145
SC_API ScStatus scSetYRot(int devIdx, bool *isRotP)
Sets and retrieves the rotational mode for the y-axis.
Definition: sc_dll.cc:4702
SC_API ScStatus scSetDom(int devIdx, bool *isDomP)
Sets and retrieves the dominant mode.
Definition: sc_dll.cc:5114
sending of keystrokes failed
Definition: spc_ctrlr.h:352
SC_API ScStatus scGetTra(int devIdx, bool *isTraP)
Answers with true if the translational mode is set.
Definition: sc_dll.cc:3920
SC_API ScStatus scSetState2(char *state)
Informs the daemon about the internal state (mode) of a supported application.
Definition: sc_dll.cc:1520
SC_API ScStatus scGetXRot(int devIdx, bool *isRotP)
Answers with true if the x-axis' rotational data will be transmitted.
Definition: sc_dll.cc:4580
SC_API ScStatus scGetDmnVrsn(char *versionP, char *pathP)
Retrieves the SpaceControl daemon's software version and its binary name and path.
Definition: sc_dll.cc:1128
#define MAX_SERIALNO_LEN
serial number's max. length
Definition: spc_ctrlr.h:254
int(* stdDataCallbackP)(short x, short y, short z, short a, short b, short c, int traLmh, int rotLmh, int event, long tvSec, long tvUsec)
Callback function's signature when using scRegisterCallbackFunction() to get data packets from a devi...
Definition: spc_ctrlr.h:368
SC_API ScStatus scSetLcd(int devIdx, int *brightnessP)
Sets and retrieves the LCD's brightness Example:
Definition: sc_dll.cc:5699
SC_API ScStatus scSetZRotRev(int devIdx, bool *isRevP)
Sets and retrieves the z-axis' reverse rotational mode.
Definition: sc_dll.cc:5030
command could not be executed
Definition: spc_ctrlr.h:356
SC_API ScStatus scGetYRotRev(int devIdx, bool *isRevP)
Answers with true if the y-axis' rotational mode is set to reverse.
Definition: sc_dll.cc:4908
SC_API ScStatus scLoadDevPars(int devIdx, char *filenameP, ScDevPars *dpP)
Loads the parameters in the configuration file given in filePath into the device with index devIdx...
Definition: sc_dll.cc:5258
DaemonPar
Enumeration to name the parameters in the daemon.ini's [PROGRAM] section.
Definition: spc_ctrlr.h:189
SC_API ScStatus scSetState(char *str1, char *str2)
Definition: sc_dll.cc:1595
SC_API ScStatus scSetSens(int devIdx, int *transSensP, int *rotSensP)
Sets and retrieves the device's sensitivity.
Definition: sc_dll.cc:2602
SC_API ScStatus scSetDsplString(int devIdx, int row, char text[MAX_DSPL_STR_LEN], int *charNumP)
Sets a line of text into the display.
Definition: sc_dll.cc:5803
SC_API ScStatus scGetBasicSettings(int devIdx, ScBasicSettings *bsP)
Retrieves the actual basic settings parameters.
Definition: sc_dll.cc:2041
SC_API ScStatus scSetYTraSens(int devIdx, int *sensP)
Sets and retrieves the device's sensitivity for the y-axis' translation.
Definition: sc_dll.cc:2767
SC_API ScStatus scConnect()
Definition: sc_dll.cc:930
SC_API ScStatus scGetXRotRev(int devIdx, bool *isRevP)
Answers with true if the x-axis' rotational mode is set to reverse.
Definition: sc_dll.cc:4826
SC_API ScStatus scSetYTra(int devIdx, bool *isTraP)
Sets and retrieves the translational mode for the y-axis.
Definition: sc_dll.cc:4125
SC_API ScStatus scStop()
Sends the SpaceControl Daemon a stop message, the process finishes itself after sending an OK message...
Definition: sc_dll.cc:1095
SC_API ScStatus scSetYRotRev(int devIdx, bool *isRevP)
Sets and retrieves the y-axis' reverse rotational mode.
Definition: sc_dll.cc:4948
SC_API ScStatus scGetXRotSens(int devIdx, int *sensP)
Retrieves the device's sensitivity for the x-rotation.
Definition: sc_dll.cc:2891
SC_API ScStatus scGetYRot(int devIdx, bool *isRotP)
Answers with true if the y-axis' rotational data will be transmitted.
Definition: sc_dll.cc:4662
void setName(char *inP)
sets the member mName
Definition: spc_ctrlr.h:316
SC_API ScStatus scGetDevNum(int *devNumP, int *usedDevNumP, int *maxDevIdxP)
Retrieves the number devNum of SpaceControl devices actually connected to the computer, the number usedDevNum of SpaceControl devices actually used by the driver and the maximal device index maxDevIdx a device may be addressed with at the moment.
Definition: sc_dll.cc:1191
WinEvents
Enumeration for the various Windows-Events for Windows message handling.
Definition: spc_ctrlr.h:111
#define MAX_FILENAME_LEN
max. length of path and filename for configuration files (and logging files)
Definition: spc_ctrlr.h:286
SC_API ScStatus scGetZRot(int devIdx, bool *isRotP)
Answers with true if the z-axis' rotational data will be transmitted.
Definition: sc_dll.cc:4744
SC_API ScStatus scSetSendDelay(int devIdx, int *maxPeriodP, int *minPeriodP)
Sets and retrieves the devices's data rate parameters.
Definition: sc_dll.cc:3199
SC_API ScStatus scExecCmd(int devIdx, char *cmdP)
Executes a special command.
Definition: sc_dll.cc:5924
#define MAX_APPL_STATE_LEN
maximal length of an application's state
Definition: spc_ctrlr.h:303
int mId
identifier for the SpaceController device
Definition: spc_ctrlr.h:275
SC_API ScStatus scGetXTraSens(int devIdx, int *sensP)
Retrieves the device's sensitivity for the x-translation.
Definition: sc_dll.cc:2648
SC_API ScStatus scSetRot(int devIdx, bool *isRotP)
Sets and retrieves the rotational mode.
Definition: sc_dll.cc:4538
ScStatus
These status values are returned by the DLL functions.
Definition: spc_ctrlr.h:345
Information structure concerning a SpaceController device.
Definition: spc_ctrlr.h:273
SC_API ScStatus scIsProcessRunning(char *processName, bool *isRunningP)
Checks if the process with the given name is running or not.
Definition: sc_dll.cc:717
a wrong device index was given
Definition: spc_ctrlr.h:349
SC_API ScStatus scSetStdMode(int devIdx, unsigned char *bitmaskP)
Definition: sc_dll.cc:2389
SC_API ScStatus scSetLeds(int devIdx, int *redP, int *greenP, int *blueP)
Sets and retrieves the brightness of the device's blue LEDs.
Definition: sc_dll.cc:5451
ScKey
Enumeration to name the device's keys.
Definition: spc_ctrlr.h:144
WinCommands
In case of a command event these commands are possible.
Definition: spc_ctrlr.h:123
#define LED_NUM
Anzahl der LEDs.
Definition: spc_ctrlr.h:84
SC DLL

SpaceControl Copyright (c) SpaceControl GmbH, Am Technologiepark 10, D-82229 Seefeld
Generated by Doxygen