Functions for general purpose and supporting your app. More...
Functions | |
VL_SDK_API char *VL_CALLINGCONVENTION | vlSDKUtil_get (const char *uri, unsigned long *size, const char *options=0) |
Retrieves a file and its data from a given URI. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlSDKUtil_set (const char *uri, const void *data, unsigned long size, const char *options=0) |
Posts or writes data to given URI. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlSDKUtil_getTempFilename (const char *prefName, char *newName, unsigned int maxSize) |
Generate a temporary file URI. More... | |
VL_SDK_API char *VL_CALLINGCONVENTION | vlSDKUtil_getCameraPositionsFromGeometry (const char *geometryJson, unsigned long *size) |
Transforms a workspace geometry into a list of points. More... | |
VL_SDK_API char *VL_CALLINGCONVENTION | vlSDKUtil_getCameraTransformsFromWorkspaceDefinition (const char *workspaceJson, unsigned long *size) |
Transforms a workspace definition into a list of poses. More... | |
Functions for general purpose and supporting your app.
Functions allowing to support your implementation with the visionlibSDK.
VL_SDK_API char* VL_CALLINGCONVENTION vlSDKUtil_get | ( | const char * | uri, |
unsigned long * | size, | ||
const char * | options = 0 |
||
) |
Retrieves a file and its data from a given URI.
This function tries to retrieve a file synchronously from a given source URI. An AbstractApplication instance has to be created before calling this function. The URI can point to a file on disk (file:///path) or even to a file on a web server (http://192.0.0.1/file). VisionLib schemes (e.g. project_dir:filename) and custom schemes are also supported.
uri | A zero terminated string containing the URI. |
size | A pointer to an unsigned long integer, which will be used to store the size of the retrieved file. |
options | An optional pointer (can be NULL), which describes some options for download (not used yet). |
NULL
if an error occurred. VL_SDK_API char* VL_CALLINGCONVENTION vlSDKUtil_getCameraPositionsFromGeometry | ( | const char * | geometryJson, |
unsigned long * | size | ||
) |
Transforms a workspace geometry into a list of points.
This function parses a workspace defined in json and transforms it into an array of positions (3 float values).
geometryJson | A zero terminated string containing the geometry definition as json. |
size | A pointer to an unsigned long integer, which will be used to store the size of the retrieved file. |
NULL
if an error occurred. VL_SDK_API char* VL_CALLINGCONVENTION vlSDKUtil_getCameraTransformsFromWorkspaceDefinition | ( | const char * | workspaceJson, |
unsigned long * | size | ||
) |
Transforms a workspace definition into a list of poses.
This function parses a workspace defined in json and transforms it into an array of camera transformations (7 float values tx, ty, tz, rx, ry, rz, rw).
geometryJson | A zero terminated string containing the geometry definition as json. |
size | A pointer to an unsigned long integer, which will be used to store the size of the retrieved file. |
NULL
if an error occurred. VL_SDK_API bool VL_CALLINGCONVENTION vlSDKUtil_getTempFilename | ( | const char * | prefName, |
char * | newName, | ||
unsigned int | maxSize | ||
) |
Generate a temporary file URI.
This function creates a filename that can be written to on the local file system of the device. An AbstractApplication instance has to be created before calling this function. A hint can be given, which will get incorporated into the filename.
prefName | A zero terminated string containing the preferred name, which can also be NULL. |
newName | Buffer for storing the filename as zero terminated string. |
maxSize | Size of the buffer. |
true
, on success; false
, otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlSDKUtil_set | ( | const char * | uri, |
const void * | data, | ||
unsigned long | size, | ||
const char * | options = 0 |
||
) |
Posts or writes data to given URI.
This function tries to write a file synchronously to a given URI. An AbstractApplication instance has to be created before calling this function. The URI can point to a file on disk (file:///path) or even to a file on a web server (http://192.0.0.1/file). VisionLib schemes (e.g. data_dir:filename) and custom schemes are also supported.
uri | A zero terminated string containing the URI. |
data | A pointer to the data to be written. |
size | Number of bytes to be written. |
options | An optional pointer (can be NULL), which describes some options for download (not used yet) |
true
, on success; false
, otherwise.