SRWorks C++ High Level API¶
This page will introduce the SRWorks C++ high level API that caontrol the SRWorksRuntime. You can use these APIs to initial/start/release modules.
SRWorks API¶
-
int
ViveSR::SRWork
::
Initial
(int ModuleType, void *config)¶ Turn on the specific SRWorks engine.
- Return
one of ViveSR::Error
- Parameters
[in] ModuleType
: What kind of engine should be turn on[in] config
:
-
int
ViveSR::SRWork
::
InitialWOStart
(int ModuleType, void *config)¶ Initial the specific SRWorks engine without start.
- Return
one of ViveSR::Error
- Parameters
[in] ModuleType
: What kind of engine should be turn on[in] config
:
-
int
ViveSR::SRWork
::
StartModule
(int ModuleType)¶ Start the specific SRWorks engine.
- Return
one of ViveSR::Error
- Parameters
[in] ModuleType
: What kind of engine should be turn on
-
int
ViveSR::SRWork
::
Release
(int ModuleType)¶ Turn off and release the specific SRWorks engine.
- Return
one of ViveSR::Error
- Parameters
[in] ModuleType
: What kind of engine should be turn off
-
int
ViveSR::SRWork
::
GetStatus
(int ModuleType, ModuleStatus *status)¶ Get the status of the specific SRWorks engine.
- Return
one of ViveSR::Error
- Parameters
[in] ModuleType
: What kind of engine is interested in[out] status
: The status of the specific engine
-
int
ViveSR::SRWork
::
SR_WORK_GetVersion
(char *&version)¶ Get the SRruntime version.
- Return
one of ViveSR::Error
- Parameters
[out] version
: Represented by four integer
-
int
ViveSR::SRWork
::
LinkModule
(int module_type_in, int module_type_out)¶ Link two modules.
- Return
one of ViveSR::Error
- Parameters
[in] module_type_in
: The first module.[in] module_type_out
: The second module.
-
int
ViveSR::SRWork
::
UnlinkModule
(int module_type_in, int module_type_out)¶ Unlink two modules.
- Return
one of ViveSR::Error
- Parameters
[in] module_type_in
: The first module.[in] module_type_out
: The second module.
-
int
ViveSR::SRWork
::
StopViveSR
()¶ Stop ViveSR all modules.
- Return
one of ViveSR::Error