TeslasuitDocumentation
APIs

Core API

The Core API provides the main functions, such as initialization, deinitialization, getting API version.

Functions#

ts_get_version#

TsVersion ts_get_version();

Returns the version of the loaded TESLASUIT SDK library as major, minor, and patch numbers.

Returns: TsVersion

TsVersion structure containing the major, minor, and patch version numbers of the loaded SDK.


ts_initialize#

TsStatusCode ts_initialize();

Initializes the TESLASUIT API, connecting to the running TESLASUIT services and opening a session.

Returns: TsStatusCode

TsStatusCode indicating whether the API was initialized successfully or, if not, what went wrong.


ts_initialize_with_path#

TsStatusCode ts_initialize_with_path(const char* data_directory);

Initializes the TESLASUIT API using a custom directory for the SDK's internal data.

Parameters

data_directory: const char*, in

Filesystem path to the directory the SDK should use for writing its internal data. The path must be writable by the running process.

Returns: TsStatusCode

TsStatusCode indicating whether the API was initialized successfully or, if not, what went wrong.


ts_uninitialize#

void ts_uninitialize();

Deinitializes the TESLASUIT API, stopping internal threads and destroying the session.

See also: ts_initialize


ts_get_status_code_message#

const char* ts_get_status_code_message(TsStatusCode status_code);

Converts a TsStatusCode value into a human readable text description.

Parameters

status_code: TsStatusCode

The status code returned by another API function, describing its outcome.

Returns: const char*

const char* Pointer to a null-terminated string describing the status code. The string is owned by the SDK and remains valid for the lifetime of the library.

See also: TsStatusCode