SpaceControl DLL  Version 2.8.9
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, // 5
152  SC_KEY_CTRL,
153  SC_KEY_ALT,
154  SC_KEY_SHIFT,
155  SC_KEY_ESC,
156  SC_KEY_FRONT, // 10
157  SC_KEY_RIGHT,
158  SC_KEY_TOP,
159  SC_KEY_FIT,
160  SC_KEY_2D3D,
161  SC_KEY_PANEL, // 15
162  SC_KEY_MENU,
163  SC_KEY_1_B,
164  SC_KEY_2_B,
165  SC_KEY_3_B,
166  SC_KEY_4_B, // 20
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, // 25
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, // 30
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 // REMOTE_SOFTWARE,
194 // IPV4_ADDR,
195  PORT,
196  CFG_AUTO_CHANGE,
197  REMEMBER_LAST_CONFIG,
198 // EXCLUSIVE_APPL,
199  DISABLE_CUBE_DEMO,
200  EXPLORER_DELAY,
201  DEVICE_TIMEOUT,
202  SEND_MODE,
203  SEND_DELAY,
204  CAP_CHARACTERISTIC,
205  SINGLE_COM_PER_APPL,
206  ENABLE_LEGACY_COM1,
207  ENABLE_LEGACY_COM2,
208 // EXCLUSIVE_DEVICE,
209  BLINK_PERIOD,
210  SEARCH_TOP_WINDOW,
211  SKIP_TIMEOUT,
212  TIME_BEFORE_SLEEPING,
213  WHEEL_ACCELERATOR,
214  DEVICE_CHECKING_TIME,
215  PROGRAM_PARS_END
216 };
217 
219 // fse, 11.02.09
220 
222 {
223  SC_DMN_NRM, // normaler Modus
224  SC_DMN_TST_SPC, // Testmodus fuer SpaceController
225  SC_DMN_TST_GEN, // Testmodus fuer GEN
226  SC_DMN_END
227 };
228 
229 //------------------------------------------------------------------------------
230 
234 // fse, 08.08.07
235 
236 struct ScCom
237 {
238  #ifdef _WIN32
239  DWORD mMotionEvt;
240  DWORD mButPressEvt;
241  DWORD mButRelEvt;
242  DWORD mCmdEvt;
243  DWORD mTaskBarEvt;
244  #endif
245  #ifdef __linux__
246  Atom mMotionEvt;
247  Atom mButPressEvt;
248  Atom mButRelEvt;
249  Atom mCmdEvt;
250  Atom mDevDcnEvt;
251  Atom mSbMotionEvt;
252  Atom mSbButPressEvt;
253  Atom mSbButRelEvt;
254  Atom mSbCmdEvt;
255  Atom mSwCmdEvt;
256  #endif
257  #ifdef __APPLE__
258  // Old Spacemouse interface not available.
259  #endif
260 };
261 
262 //------------------------------------------------------------------------------
263 
264 #define MAX_SERIALNO_LEN 16
265 #define MAX_DESCRPTN_LEN 64
266 
267 // DLL problem:
273 // Unfortunately it is not possible to retrieve strings out of a DLL if the
274 // string memory is not allocated before by the application using the DLL.
275 // Strings as structure members can not be retrieved even if the memory is
276 // allocated before. (This destroys the advantage of strings over character
277 // arrays.)
278 // Therefore character arrays are used in all the following structs.
279 // This would be not necessary under Linux using shared objects.
280 // ACHTUNG: AENDERUNGEN AUCH IN ScDevInfo.java und spacecontrol_src.py
281 // EINPFLEGEN!
282 // fse, 09.05.07
283 
284 struct ScDevInfo
285 {
286  int mId;
287  char mSerialNo[MAX_SERIALNO_LEN];
288  char mDescrptn[MAX_DESCRPTN_LEN];
289  void setId (int in ) { mId = in; }
290  void setSerialNo(char* inP) { strncpy(mSerialNo, inP, MAX_SERIALNO_LEN); mSerialNo[MAX_SERIALNO_LEN-1] = 0; }
291  void setDescrptn(char* inP) { strncpy(mDescrptn, inP, MAX_DESCRPTN_LEN); mDescrptn[MAX_DESCRPTN_LEN-1] = 0; }
292 };
293 
294 //------------------------------------------------------------------------------
295 
296 #define MAX_VERSION_LEN 16
297 #define MAX_FILENAME_LEN 256
298 
299 // fse, 31.05.07
302 
303 struct ScVersion
304 {
305  char mVrsn[MAX_VERSION_LEN];
306  char mPath[MAX_FILENAME_LEN];
307  void setVrsn(char* inP) { strncpy(mVrsn, inP, MAX_VERSION_LEN ); mVrsn[MAX_VERSION_LEN-1 ] = 0; }
308  void setPath(char* inP) { strncpy(mPath, inP, MAX_FILENAME_LEN); mPath[MAX_FILENAME_LEN-1] = 0; }
309 };
310 
311 //------------------------------------------------------------------------------
312 
313 #define MAX_APPL_NAME_LEN 32
314 #define MAX_APPL_STATE_LEN 32
315 // fse, 28.02.17: MAX_APPL_STATE_LEN von 16 auf 32 verdoppelt, weil Blender u.a.
316 // den Status "Default-nonnormal" zurueckgibt => 2 Bytes zu lang fuer 16 Bytes.
317 
323 // fse, 16.04.08
324 
325 struct ScFgAppl
326 {
327  char mName [MAX_APPL_NAME_LEN ];
328  char mState[MAX_APPL_STATE_LEN];
329  void setName (char* inP) { strncpy(mName , inP, MAX_APPL_NAME_LEN ); mName [MAX_APPL_NAME_LEN -1] = 0; }
330  void setState(char* inP) { strncpy(mState, inP, MAX_APPL_STATE_LEN); mState[MAX_APPL_STATE_LEN-1] = 0; }
331 };
332 
333 //------------------------------------------------------------------------------
334 
338 // fse, 14.09.07
339 
341 {
342  char mFilename[MAX_FILENAME_LEN];
343  void setFilename(char* inP) { strncpy(mFilename, inP, MAX_FILENAME_LEN); mFilename[MAX_FILENAME_LEN-1] = 0; }
344 };
345 
346 //------------------------------------------------------------------------------
347 
349 // ACHTUNG: Pro Element eine Ausnahmeklasse in ScDllWrapper definieren!
350 // ACHTUNG: Eine Kopie dieser Enumeration liegt auf Java-Seite in der Datei
351 // ScStatus.java. Aenderungen auch dort einpflegen!
352 // ACHTUNG: Auch ScDllWrapper.intToStatus(int rc) in ScDllWrapper.java
353 // anpassen!
354 // fse, 03.09.12: SC_EXEC_ERROR ergaenzt.
355 // fse, 11.07.14: SC_THREAD_ERROR ergaenzt.
356 // fse, 08.07.15: SC_WRONG_USER ergaenzt.
357 
359 {
360  SC_OK ,
373 };
374 
375 
376 //------------------------------------------------------------------------------
377 
380 
381 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);
382 
383 //------------------------------------------------------------------------------
384 
385 #ifdef __cplusplus
386 extern "C"
387 {
388 #endif
389 
390 SC_API char* scStatusToStr(ScStatus ks);
391 SC_API ScStatus scIsProcessRunning(char* processName, bool* isRunningP);
392 SC_API ScStatus scSetCurrentUserRegValue (char* keyP, char* nameP, char* valueP);
393 SC_API ScStatus scQueryCurrentUserRegValue(char* keyP, char* nameP, int len, char* valueP);
394 SC_API ScStatus scDelCurrentUserRegValue (char* keyP, char* nameP);
395 
396 SC_API ScStatus scConnect2(bool isAlwaysReceivingData, char* applName);
400 SC_API ScStatus scGetDmnVrsn(char* versionP, char* pathP);
401 SC_API ScStatus scGetDevNum (int* devNumP, int* usedDevNumP, int* maxDevIdxP);
402 SC_API ScStatus scGetFgAppl (char* fgApplP, char* fgApplStateP);
403 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]);
404 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]);
405 SC_API ScStatus scSetState2(char* state);
406 SC_API ScStatus scSetState(char* str1, char* str2);
408 
409 SC_API ScStatus scGetDaemonPar(int par, int* valP);
410 SC_API ScStatus scSetDaemonPar(int par, int* valP);
411 
412 SC_API ScStatus scGetDevInfo (int devIdx, ScDevInfo* diP);
413 
414 SC_API ScStatus scGetDefDevPars (int devIdx, ScDevPars* dpP);
415 SC_API ScStatus scGetDevPars (int devIdx, ScDevPars* dpP);
416 SC_API ScStatus scSetDevPars (int devIdx, ScDevPars* dpP);
417 SC_API ScStatus scSetDevParsToDefaults(int devIdx, ScDevPars* dpP);
418 
419 SC_API ScStatus scGetBasicSettings(int devIdx, ScBasicSettings* bsP);
420 SC_API ScStatus scSetBasicSettings(int devIdx, ScBasicSettings* bsP);
421 
422 SC_API ScStatus scGetAdvancedSettings(int devIdx, ScAdvancedSettings* asP);
423 SC_API ScStatus scSetAdvancedSettings(int devIdx, ScAdvancedSettings* bsP);
424 
425 SC_API ScStatus scGetAdvSens (int devIdx, ScAdvSens* dpP);
426 SC_API ScStatus scSetAdvSens (int devIdx, ScAdvSens* dpP);
427 
428 SC_API ScStatus scGetStdMode (int devIdx, unsigned char* bitmaskP);
429 SC_API ScStatus scSetStdMode (int devIdx, unsigned char* bitmaskP);
430 
431 SC_API ScStatus scGetCmprMode (int devIdx, unsigned char* bitmaskP);
432 SC_API ScStatus scSetCmprMode (int devIdx, unsigned char* bitmaskP);
433 
434 SC_API ScStatus scGetSens (int devIdx, int* transSensP, int* rotSensP);
435 SC_API ScStatus scSetSens (int devIdx, int* transSensP, int* rotSensP);
436 
437 SC_API ScStatus scGetXTraSens (int devIdx, int* sensP);
438 SC_API ScStatus scSetXTraSens (int devIdx, int* sensP);
439 
440 SC_API ScStatus scGetYTraSens (int devIdx, int* sensP);
441 SC_API ScStatus scSetYTraSens (int devIdx, int* sensP);
442 
443 SC_API ScStatus scGetZTraSens (int devIdx, int* sensP);
444 SC_API ScStatus scSetZTraSens (int devIdx, int* sensP);
445 
446 SC_API ScStatus scGetXRotSens (int devIdx, int* sensP);
447 SC_API ScStatus scSetXRotSens (int devIdx, int* sensP);
448 
449 SC_API ScStatus scGetYRotSens (int devIdx, int* sensP);
450 SC_API ScStatus scSetYRotSens (int devIdx, int* sensP);
451 
452 SC_API ScStatus scGetZRotSens (int devIdx, int* sensP);
453 SC_API ScStatus scSetZRotSens (int devIdx, int* sensP);
454 
455 SC_API ScStatus scGetSendDelay(int devIdx, int* maxPeriodP, int* minPeriodP);
456 SC_API ScStatus scSetSendDelay(int devIdx, int* maxPeriodP, int* minPeriodP);
457 
458 SC_API ScStatus scGetNullRad (int devIdx, int* nullRadP);
459 SC_API ScStatus scSetNullRad (int devIdx, int* nullRadP);
460 
461 SC_API ScStatus scSetStdZero (int devIdx);
462 
463 //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);
464 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);
465 SC_API ScStatus scGetRawData (int devIdx, unsigned char buf[RAW_DATA_LEN]);
466 
467 SC_API ScStatus scGetTra (int devIdx, bool* isTraP);
468 SC_API ScStatus scSetTra (int devIdx, bool* isTraP);
469 
470 SC_API ScStatus scGetXTra (int devIdx, bool* isTraP);
471 SC_API ScStatus scSetXTra (int devIdx, bool* isTraP);
472 
473 SC_API ScStatus scGetYTra (int devIdx, bool* isTraP);
474 SC_API ScStatus scSetYTra (int devIdx, bool* isTraP);
475 
476 SC_API ScStatus scGetZTra (int devIdx, bool* isTraP);
477 SC_API ScStatus scSetZTra (int devIdx, bool* isTraP);
478 
479 SC_API ScStatus scGetXTraRev(int devIdx, bool* isRevP);
480 SC_API ScStatus scSetXTraRev(int devIdx, bool* isRevP);
481 
482 SC_API ScStatus scGetYTraRev(int devIdx, bool* isRevP);
483 SC_API ScStatus scSetYTraRev(int devIdx, bool* isRevP);
484 
485 SC_API ScStatus scGetZTraRev(int devIdx, bool* isRevP);
486 SC_API ScStatus scSetZTraRev(int devIdx, bool* isRevP);
487 
488 SC_API ScStatus scGetRot (int devIdx, bool* isRotP);
489 SC_API ScStatus scSetRot (int devIdx, bool* isRotP);
490 
491 SC_API ScStatus scGetXRot (int devIdx, bool* isRotP);
492 SC_API ScStatus scSetXRot (int devIdx, bool* isRotP);
493 
494 SC_API ScStatus scGetYRot (int devIdx, bool* isRotP);
495 SC_API ScStatus scSetYRot (int devIdx, bool* isRotP);
496 
497 SC_API ScStatus scGetZRot (int devIdx, bool* isRotP);
498 SC_API ScStatus scSetZRot (int devIdx, bool* isRotP);
499 
500 SC_API ScStatus scGetXRotRev(int devIdx, bool* isRevP);
501 SC_API ScStatus scSetXRotRev(int devIdx, bool* isRevP);
502 
503 SC_API ScStatus scGetYRotRev(int devIdx, bool* isRevP);
504 SC_API ScStatus scSetYRotRev(int devIdx, bool* isRevP);
505 
506 SC_API ScStatus scGetZRotRev(int devIdx, bool* isRevP);
507 SC_API ScStatus scSetZRotRev(int devIdx, bool* isRevP);
508 
509 SC_API ScStatus scGetDom (int devIdx, bool* isDomP);
510 SC_API ScStatus scSetDom (int devIdx, bool* isDomP);
511 
512 SC_API ScStatus scReadMsg (int devIdx, char* msgP);
513 
514 SC_API ScStatus scGetCfgFilename(int devIdx, char* filenameP);
515 SC_API ScStatus scSaveDevPars (int devIdx, char* filenameP);
516 SC_API ScStatus scLoadDevPars (int devIdx, char* filenameP, ScDevPars* dpP);
517 
518 SC_API ScStatus scPressKey (int devIdx, int key);
519 SC_API ScStatus scRelKey (int devIdx, int key);
520 
521 SC_API ScStatus scSetLed (int devIdx, int ledNo, int* brightnessP);
522 SC_API ScStatus scGetLed (int devIdx, int ledNo, int* brightnessP);
523 
524 SC_API ScStatus scSetLeds (int devIdx, int* redP, int* greenP, int* blueP);
525 //SC_API ScStatus ScGetLeds (int devIdx, int* redP, int* greenP, int* blueP);
526 
527 SC_API ScStatus scSetLedsEx (int devIdx, char brightness[LED_NUM]);
528 SC_API ScStatus scGetLedsEx (int devIdx, char brightness[LED_NUM]);
529 
530 SC_API ScStatus scSetLcd (int devIdx, int* brightnessP);
531 SC_API ScStatus scGetLcd (int devIdx, int* brightnessP);
532 SC_API ScStatus scSetLcdColor(int devIdx, int* redP, int* greenP, int* blueP);
533 
534 SC_API ScStatus scSetDsplString(int devIdx, int row, char text[MAX_DSPL_STR_LEN], int* charNumP);
535 
536 SC_API ScStatus scGetFmwUpdtState(int devIdx, int* mcuIdP, int* progressP);
537 
538 SC_API ScStatus scExecCmd(int devIdx, char* cmdP);
539 
540 SC_API ScStatus scTriggerFunction(int devIdx, int funcIdx);
542 
543 //SC_API ScStatus scGetSettings();
544 //SC_API ScStatus scGetLogPars();
545 //SC_API void scPrintVersion();
546 
547 //SC_API ScStatus scGetDevices(ScDevInfoList** dilPP);
548 
549 #ifdef __cplusplus
550 }
551 #endif
552 
553 //------------------------------------------------------------------------------
554 
555 #endif /* _spc_ctrlr_H */
556 
557 //------------------------------------------------------------------------------
558 //-------------------------------------- ---------------------------------------
559 //------------------------- ------------------------- --------------------------
560 //------------------ ------------------- ------------------- -------------------
561 //-------------- --------------- --------------- --------------- ---------------
562 //------------ ------------ ------------ ------------ ------------ -------------
SC_API ScStatus scSetZRot(int devIdx, bool *isRotP)
Sets and retrieves the rotational mode for the z-axis.
Definition: sc_dll.cc:5015
SC_API ScStatus scSetDevPars(int devIdx, ScDevPars *dpP)
Sets and retrieves the actual device parameters as listed in the device&#39;s configuration file...
Definition: sc_dll.cc:2057
SC_API ScStatus scGetZTraRev(int devIdx, bool *isRevP)
Answers with true if the z-axis&#39; translational mode is set to reverse.
Definition: sc_dll.cc:4645
the expected application was not found
Definition: spc_ctrlr.h:366
SC_API ScStatus scGetSens(int devIdx, int *transSensP, int *rotSensP)
Retrieves the device&#39;s sensitivity.
Definition: sc_dll.cc:2658
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:2103
SC_API ScStatus scSetLed(int devIdx, int ledNo, int *brightnessP)
Sets and retrieves the brightness of a single LED.
Definition: sc_dll.cc:5770
SC_API ScStatus scSetZTraSens(int devIdx, int *sensP)
Sets and retrieves the device&#39;s sensitivity for the z-axis&#39; translation.
Definition: sc_dll.cc:2954
SC_API ScStatus scSetZTra(int devIdx, bool *isTraP)
Sets and retrieves the translational mode for the z-axis.
Definition: sc_dll.cc:4439
SC_API ScStatus scGetAdvSens(int devIdx, ScAdvSens *dpP)
Retrieves the actual six sensitivity parameters of the advanced settings.
Definition: sc_dll.cc:2331
SC_API ScStatus scGetYTraSens(int devIdx, int *sensP)
Retrieves the device&#39;s sensitivity for the y-translation.
Definition: sc_dll.cc:2835
SC_API ScStatus scSetMode(ScDaemonMode mode)
This function is for internal use only - do not call it.
Definition: sc_dll.cc:1731
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:4106
SC_API ScStatus scTriggerFunction(int devIdx, int funcIdx)
Triggers the function with index funcIdx.
Definition: sc_dll.cc:5626
SC_API ScStatus scGetLcd(int devIdx, int *brightnessP)
Retrieves the LCD&#39;s brightness.
Definition: sc_dll.cc:5893
Structure needed for communication via the MS Windows messaging system or the X-Server messaging syst...
Definition: spc_ctrlr.h:236
Structure holding the Daemon software&#39;s version no.
Definition: spc_ctrlr.h:303
SC_API ScStatus scGetDefDevPars(int devIdx, ScDevPars *dpP)
Retrieves the default values of the device parameters.
Definition: sc_dll.cc:1879
SC_API ScStatus scSetXRot(int devIdx, bool *isRotP)
Sets and retrieves the rotational mode for the x-axis.
Definition: sc_dll.cc:4851
SC_API ScStatus scGetZTra(int devIdx, bool *isTraP)
Answers with true if the z-axis&#39; translational data will be transmitted.
Definition: sc_dll.cc:4399
SC_API ScStatus scGetLed(int devIdx, int ledNo, int *brightnessP)
Gets the brightness of a single LED.
Definition: sc_dll.cc:5728
SC_API ScStatus scGetStdMode(int devIdx, unsigned char *bitmaskP)
Definition: sc_dll.cc:2448
SC_API ScStatus scGetLedsEx(int devIdx, char brightness[LED_NUM])
Gets the brightnesses of all LEDs.
Definition: sc_dll.cc:5810
thread for reading data from devices could not be started
Definition: spc_ctrlr.h:370
communication error occurred
Definition: spc_ctrlr.h:361
SC_API ScStatus scSetDaemonPar(int par, int *valP)
Sets one of the integer or boolean parameters available in the Daemon&#39;s configuration file "daemon...
Definition: sc_dll.cc:1806
the DLL&#39;s user is not the same as the daemon&#39;s user
Definition: spc_ctrlr.h:371
void setVrsn(char *inP)
sets the member mVrsn
Definition: spc_ctrlr.h:307
SC_API ScStatus scSetYRotSens(int devIdx, int *sensP)
Sets and retrieves the SpaceControl device&#39;s sensitivity for the y-axis&#39; rotation.
Definition: sc_dll.cc:3116
SC_API ScStatus scTransferCallbackFunction(int devIdx, stdDataCallbackP cbP)
This function hands over a callback function pointer to the API.
Definition: sc_dll.cc:4026
SC_API ScStatus scDisconnect()
Closes the connection to the SpaceControl daemon.
Definition: sc_dll.cc:1156
STL namespace.
Structure holding a foreground application&#39;s name and state.
Definition: spc_ctrlr.h:325
SC_API ScStatus scSetTra(int devIdx, bool *isTraP)
Sets and retrieves the translational mode.
Definition: sc_dll.cc:4192
SC_API ScStatus scGetCfgFilename(int devIdx, char *filenameP)
Retrieves the name and path of the device&#39;s actual configuration file.
Definition: sc_dll.cc:5415
SC_API ScStatus scSetAdvSens(int devIdx, ScAdvSens *dpP)
Sets and retrieves the six actual sensitivity parameters of the advanced settings.
Definition: sc_dll.cc:2380
ScDaemonMode
This enumeration is reserved for internal use.
Definition: spc_ctrlr.h:221
SC_API ScStatus scGetZRotSens(int devIdx, int *sensP)
Retrieves the device&#39;s sensitivity for the z-rotation.
Definition: sc_dll.cc:3159
file could not be written or read
Definition: spc_ctrlr.h:364
SC_API ScStatus scGetYTra(int devIdx, bool *isTraP)
Answers with true if the y-axis&#39; translational data will be transmitted.
Definition: sc_dll.cc:4316
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:3711
SC_API ScStatus scSetAdvancedSettings(int devIdx, ScAdvancedSettings *bsP)
Sets and retrieves the actual advanced settings parameters.
Definition: sc_dll.cc:2287
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:5453
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:1429
#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&#39;s sensitivity for the z-axis&#39; rotation.
Definition: sc_dll.cc:3197
SC_API ScStatus scSetXRotRev(int devIdx, bool *isRevP)
Sets and retrieves the x-axis&#39; reverse rotational mode.
Definition: sc_dll.cc:5097
SC_API ScStatus scGetRot(int devIdx, bool *isRotP)
Answers with true if the rotational mode is set.
Definition: sc_dll.cc:4728
one or more parameters are out of range
Definition: spc_ctrlr.h:363
SC_API ScStatus scGetNullRad(int devIdx, int *nullRadP)
Retrieves the device&#39;s null radius (threshold).
Definition: sc_dll.cc:3350
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:888
SC_API ScStatus scGetYRotSens(int devIdx, int *sensP)
Retrieves the SC device&#39;s sensitivity for the y-rotation.
Definition: sc_dll.cc:3078
SC_API ScStatus scGetDaemonPar(int par, int *valP)
Retrieves one of the integer or boolean parameters available in the Daemon&#39;s configuration file "daem...
Definition: sc_dll.cc:1768
SC_API ScStatus scGetAdvancedSettings(int devIdx, ScAdvancedSettings *asP)
Retrieves the actual advanced settings parameters.
Definition: sc_dll.cc:2239
not used
Definition: spc_ctrlr.h:372
SC_API char * scStatusToStr(ScStatus ks)
Returns a DLL function&#39;s status code as a string.
Definition: sc_dll.cc:753
#define MAX_APPL_NAME_LEN
maximal length of an application name
Definition: spc_ctrlr.h:313
SC_API ScStatus scSetXTraSens(int devIdx, int *sensP)
Sets and retrieves the device&#39;s sensitivity for the x-axis&#39; translation.
Definition: sc_dll.cc:2792
void setPath(char *inP)
sets the member mPath
Definition: spc_ctrlr.h:308
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:5576
SC_API ScStatus scGetFmwUpdtState(int devIdx, int *mcuIdP, int *progressP)
Retrieves the state of a firmware update in progress.
Definition: sc_dll.cc:6097
SC_API ScStatus scSetBasicSettings(int devIdx, ScBasicSettings *bsP)
Sets and retrieves the actual basic settings parameters.
Definition: sc_dll.cc:2195
void setDescrptn(char *inP)
sets the member mDescrptn
Definition: spc_ctrlr.h:291
void setFilename(char *inP)
sets the member mFilename
Definition: spc_ctrlr.h:343
SC_API ScStatus scSetYTraRev(int devIdx, bool *isRevP)
Sets and retrieves the y-axis&#39; reverse translational mode.
Definition: sc_dll.cc:4603
void setSerialNo(char *inP)
sets the member mSerialNo
Definition: spc_ctrlr.h:290
#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:1922
SC_API ScStatus scSetZTraRev(int devIdx, bool *isRevP)
Sets and retrieves the z-axis&#39; reverse translational mode.
Definition: sc_dll.cc:4685
SC_API ScStatus scSetLcdColor(int devIdx, int *redP, int *greenP, int *blueP)
Sets and retrieves the LCD&#39;s background color.
Definition: sc_dll.cc:5983
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:815
SC_API ScStatus scSetNullRad(int devIdx, int *nullRadP)
Sets and retrieves the device&#39;s null radius (threshold).
Definition: sc_dll.cc:3391
SC_API ScStatus scSetXTraRev(int devIdx, bool *isRevP)
Sets and retrieves the x-axis&#39; reverse translational mode.
Definition: sc_dll.cc:4521
void setState(char *inP)
sets the member mState
Definition: spc_ctrlr.h:330
#define MAX_DESCRPTN_LEN
description&#39;s max. length
Definition: spc_ctrlr.h:265
SC_API ScStatus scConnect2(bool isAlwaysReceivingData, char *applName)
Establishes the connection to the SpaceControl daemon.
Definition: sc_dll.cc:945
error while accessing the Windows registry
Definition: spc_ctrlr.h:367
SC_API ScStatus scGetFgAppl(char *fgApplP, char *fgApplStateP)
Retrieves the name and potentially the state of the foreground application.
Definition: sc_dll.cc:1356
SC_API ScStatus scSetStdZero(int devIdx)
Sets the actual displacement of the cap as the standard 0 value.
Definition: sc_dll.cc:3432
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:853
SC_API ScStatus scSetXRotSens(int devIdx, int *sensP)
Sets and retrieves the device&#39;s sensitivity for the x-axis&#39; rotation.
Definition: sc_dll.cc:3035
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:1526
Structure holding the path and filename of a configuration file to write to harddisk or read from it...
Definition: spc_ctrlr.h:340
SC_API ScStatus scSetXTra(int devIdx, bool *isTraP)
Sets and retrieves the translational mode for the x-axis.
Definition: sc_dll.cc:4274
#define MAX_VERSION_LEN
version number&#39;s max. length
Definition: spc_ctrlr.h:296
SC_API ScStatus scSetLedsEx(int devIdx, char brightness[LED_NUM])
Sets and retrieves the brightness of all LEDs.
Definition: sc_dll.cc:5851
SC_API ScStatus scGetZRotRev(int devIdx, bool *isRevP)
Answers with true if the z-axis&#39; rotational mode is set to reverse.
Definition: sc_dll.cc:5221
#define SC_API
macro is needed for defining DLL ex- and import
Definition: spc_ctrlr.h:46
function successfully executed
Definition: spc_ctrlr.h:360
SC_API ScStatus scGetXTraRev(int devIdx, bool *isRevP)
Answers with true if the x-axis&#39; translational mode is set to reverse.
Definition: sc_dll.cc:4481
SC_API ScStatus scGetDom(int devIdx, bool *isDomP)
Answers with true if the dominant mode is set.
Definition: sc_dll.cc:5304
SC_API ScStatus scGetXTra(int devIdx, bool *isTraP)
Answers with true if the x-axis&#39; translational data will be transmitted.
Definition: sc_dll.cc:4234
SC_API ScStatus scGetZTraSens(int devIdx, int *sensP)
Retrieves the device&#39;s sensitivity for the z-translation.
Definition: sc_dll.cc:2916
void setId(int in)
sets the member mId
Definition: spc_ctrlr.h:289
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:5535
SC_API ScStatus scGetYTraRev(int devIdx, bool *isRevP)
Answers with true if the y-axis&#39; translational mode is set to reverse.
Definition: sc_dll.cc:4563
command is not supported by this device type
Definition: spc_ctrlr.h:368
SC_API ScStatus scGetDevInfo(int devIdx, ScDevInfo *diP)
Retrieves some information data about the device with the given index.
Definition: sc_dll.cc:1838
SC_API ScStatus scGetSendDelay(int devIdx, int *maxPeriodP, int *minPeriodP)
Retrieves the devic&#39;s data rate parameters.
Definition: sc_dll.cc:3251
SC_API ScStatus scSetYRot(int devIdx, bool *isRotP)
Sets and retrieves the rotational mode for the y-axis.
Definition: sc_dll.cc:4933
SC_API ScStatus scSetDom(int devIdx, bool *isDomP)
Sets and retrieves the dominant mode.
Definition: sc_dll.cc:5345
sending of keystrokes failed
Definition: spc_ctrlr.h:365
SC_API ScStatus scGetTra(int devIdx, bool *isTraP)
Answers with true if the translational mode is set.
Definition: sc_dll.cc:4151
SC_API ScStatus scSetState2(char *state)
Informs the daemon about the internal state (mode) of a supported application.
Definition: sc_dll.cc:1619
SC_API ScStatus scGetXRot(int devIdx, bool *isRotP)
Answers with true if the x-axis&#39; rotational data will be transmitted.
Definition: sc_dll.cc:4811
SC_API ScStatus scGetDmnVrsn(char *versionP, char *pathP)
Retrieves the SpaceControl daemon&#39;s software version and its binary name and path.
Definition: sc_dll.cc:1224
#define MAX_SERIALNO_LEN
serial number&#39;s max. length
Definition: spc_ctrlr.h:264
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&#39;s signature when using scRegisterCallbackFunction() to get data packets from a devi...
Definition: spc_ctrlr.h:381
SC_API ScStatus scSetLcd(int devIdx, int *brightnessP)
Sets and retrieves the LCD&#39;s brightness Example:
Definition: sc_dll.cc:5930
SC_API ScStatus scSetZRotRev(int devIdx, bool *isRevP)
Sets and retrieves the z-axis&#39; reverse rotational mode.
Definition: sc_dll.cc:5261
command could not be executed
Definition: spc_ctrlr.h:369
SC_API ScStatus scGetYRotRev(int devIdx, bool *isRevP)
Answers with true if the y-axis&#39; rotational mode is set to reverse.
Definition: sc_dll.cc:5139
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:5489
DaemonPar
Enumeration to name the parameters in the daemon.ini&#39;s [PROGRAM] section.
Definition: spc_ctrlr.h:189
SC_API ScStatus scSetState(char *str1, char *str2)
Definition: sc_dll.cc:1694
SC_API ScStatus scSetSens(int devIdx, int *transSensP, int *rotSensP)
Sets and retrieves the device&#39;s sensitivity.
Definition: sc_dll.cc:2708
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:6034
SC_API ScStatus scGetBasicSettings(int devIdx, ScBasicSettings *bsP)
Retrieves the actual basic settings parameters.
Definition: sc_dll.cc:2147
SC_API ScStatus scSetYTraSens(int devIdx, int *sensP)
Sets and retrieves the device&#39;s sensitivity for the y-axis&#39; translation.
Definition: sc_dll.cc:2873
SC_API ScStatus scConnect()
Definition: sc_dll.cc:1000
SC_API ScStatus scGetXRotRev(int devIdx, bool *isRevP)
Answers with true if the x-axis&#39; rotational mode is set to reverse.
Definition: sc_dll.cc:5057
SC_API ScStatus scSetYTra(int devIdx, bool *isTraP)
Sets and retrieves the translational mode for the y-axis.
Definition: sc_dll.cc:4356
SC_API ScStatus scStop()
Sends the SpaceControl Daemon a stop message, the process finishes itself after sending an OK message...
Definition: sc_dll.cc:1191
SC_API ScStatus scSetYRotRev(int devIdx, bool *isRevP)
Sets and retrieves the y-axis&#39; reverse rotational mode.
Definition: sc_dll.cc:5179
SC_API ScStatus scGetXRotSens(int devIdx, int *sensP)
Retrieves the device&#39;s sensitivity for the x-rotation.
Definition: sc_dll.cc:2997
SC_API ScStatus scGetYRot(int devIdx, bool *isRotP)
Answers with true if the y-axis&#39; rotational data will be transmitted.
Definition: sc_dll.cc:4893
void setName(char *inP)
sets the member mName
Definition: spc_ctrlr.h:329
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:1290
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:297
SC_API ScStatus scGetZRot(int devIdx, bool *isRotP)
Answers with true if the z-axis&#39; rotational data will be transmitted.
Definition: sc_dll.cc:4975
SC_API ScStatus scSetSendDelay(int devIdx, int *maxPeriodP, int *minPeriodP)
Sets and retrieves the devices&#39;s data rate parameters.
Definition: sc_dll.cc:3305
SC_API ScStatus scExecCmd(int devIdx, char *cmdP)
Executes a special command.
Definition: sc_dll.cc:6155
#define MAX_APPL_STATE_LEN
maximal length of an application&#39;s state
Definition: spc_ctrlr.h:314
int mId
identifier for the SpaceController device
Definition: spc_ctrlr.h:286
SC_API ScStatus scGetXTraSens(int devIdx, int *sensP)
Retrieves the device&#39;s sensitivity for the x-translation.
Definition: sc_dll.cc:2754
SC_API ScStatus scSetRot(int devIdx, bool *isRotP)
Sets and retrieves the rotational mode.
Definition: sc_dll.cc:4769
ScStatus
These status values are returned by the DLL functions.
Definition: spc_ctrlr.h:358
Information structure concerning a SpaceController device.
Definition: spc_ctrlr.h:284
SC_API ScStatus scIsProcessRunning(char *processName, bool *isRunningP)
Checks if the process with the given name is running or not.
Definition: sc_dll.cc:786
a wrong device index was given
Definition: spc_ctrlr.h:362
SC_API ScStatus scSetStdMode(int devIdx, unsigned char *bitmaskP)
Definition: sc_dll.cc:2495
SC_API ScStatus scSetLeds(int devIdx, int *redP, int *greenP, int *blueP)
Sets and retrieves the brightness of the device&#39;s blue LEDs.
Definition: sc_dll.cc:5682
ScKey
Enumeration to name the device&#39;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 & Co. KG, Am Technologiepark 10, D-82229 Seefeld
Generated by Doxygen