diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-04-04 00:50:05 -0600 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-04-04 00:50:05 -0600 |
commit | 8992810b626e58e1dd1ed61b3b41f20db60dddf4 (patch) | |
tree | 9de1d96f7c9b6224eae606fcebdcdaef4dba2c5f /include/libsurvive | |
parent | be7593dc945ed4025f81c6876760807310a67319 (diff) | |
download | libsurvive-8992810b626e58e1dd1ed61b3b41f20db60dddf4.tar.gz libsurvive-8992810b626e58e1dd1ed61b3b41f20db60dddf4.tar.bz2 |
Added basic documentation
Diffstat (limited to 'include/libsurvive')
-rw-r--r-- | include/libsurvive/survive_api.h | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/include/libsurvive/survive_api.h b/include/libsurvive/survive_api.h index aacd47a..52eca8d 100644 --- a/include/libsurvive/survive_api.h +++ b/include/libsurvive/survive_api.h @@ -8,22 +8,54 @@ extern "C" { struct SurviveAsyncContext; typedef struct SurviveAsyncContext SurviveAsyncContext; + /*** + * Initialize a new instance of an async context -- mirrors survive_init + * @return Pointer to the async context + */ SURVIVE_EXPORT SurviveAsyncContext *survive_async_init(int argc, char *const *argv); + + /** + * Close all devices and free all memory associated with the given context + */ SURVIVE_EXPORT void survive_async_close(SurviveAsyncContext* actx); + /** + * Start the background thread which processes images. + */ SURVIVE_EXPORT void survive_async_start_thread(SurviveAsyncContext* actx); - SURVIVE_EXPORT int survive_async_stop_thread(SurviveAsyncContext* actx); - SURVIVE_EXPORT bool survive_async_is_running(SurviveAsyncContext* actx); + + /** + * @return true iff the background thread is still running + */ + SURVIVE_EXPORT bool survive_async_is_running(SurviveAsyncContext *actx); struct SurviveAsyncObject; typedef struct SurviveAsyncObject SurviveAsyncObject; + /** + * Get the first known object. Note that the first n objects are the lighthouses; for however many you are + * configured for. + */ SURVIVE_EXPORT const SurviveAsyncObject* survive_async_get_first_tracked(SurviveAsyncContext* actx); + /** + * Get the next known object from a current one. + */ SURVIVE_EXPORT const SurviveAsyncObject* survive_async_get_next_tracked(SurviveAsyncContext* actx, const SurviveAsyncObject* curr); - SURVIVE_EXPORT const SurviveAsyncObject* survive_async_get_next_updated(SurviveAsyncContext* actx); + /** + * Gets the next object which has been updated since we last looked at it with this function + */ + SURVIVE_EXPORT const SurviveAsyncObject *survive_async_get_next_updated(SurviveAsyncContext *actx); + + /** + * Gets the pose of a given object + */ SURVIVE_EXPORT survive_timecode survive_async_object_get_latest_pose(const SurviveAsyncObject *sao, - SurvivePose *OUTPUT); + SurvivePose *pose); + + /** + * Gets the null terminated name of the object. + */ SURVIVE_EXPORT const char *survive_async_object_name(const SurviveAsyncObject *sao); #ifdef __cplusplus |