SciSDK Library
SDK for SciCompiler projects
SciSDK_DLL.h
Go to the documentation of this file.
1 // The following ifdef block is the standard way of creating macros which make exporting
2 // from a DLL simpler. All files within this DLL are compiled with the SCISDK_DLL_EXPORTS
3 // symbol defined on the command line. This symbol should not be defined on any project
4 // that uses this DLL. This way any other project whose source files include this file see
5 // SCISDK_DLL_API functions as being imported from a DLL, whereas this DLL sees symbols
6 // defined with this macro as being exported.
7 
8 
9 #ifdef _MSC_VER
10  #ifdef SCISDK_DLL_EXPORTS
11  #define SCISDK_DLL_API extern "C" __declspec(dllexport)// __declspec(dllexport)
12  #else
13  #define SCISDK_DLL_API extern "C" __declspec(dllimport)
14  #endif
15 #else
16  #ifdef SCISDK_DLL_EXPORTS
17  #define SCISDK_DLL_API extern "C" __attribute__((visibility("default")))
18  #else
19  #define SCISDK_DLL_API extern "C"
20  #endif
21 #endif
22 
23 #include "scisdk_defines.h"
24 
32 
39 SCISDK_DLL_API int SCISDK_FreeLib(void *handle);
40 
73 SCISDK_DLL_API int SCISDK_AddNewDevice(char *DevicePath, char *DeviceModel, char *JSONFwFilePath, char *Name, void *handle);
74 
84 SCISDK_DLL_API int SCISDK_DetachDevice(char* name, void*handle);
85 
111 SCISDK_DLL_API int SCISDK_SetParameterString(char* Path, char* value, void* handle);
112 
113 
138 SCISDK_DLL_API int SCISDK_SetParameterInteger(char* Path, int value, void*handle);
139 
164 SCISDK_DLL_API int SCISDK_SetParameterUInteger(char* Path, uint32_t value, void* handle);
165 
190 SCISDK_DLL_API int SCISDK_SetParameterDouble(char* Path, double value, void*handle);
191 
192 
216 SCISDK_DLL_API int SCISDK_GetParameterString(char* Path, char** value, void* handle);
217 
218 
242 SCISDK_DLL_API int SCISDK_GetParameterInteger(char* Path, int *value, void*handle);
243 
244 
268 SCISDK_DLL_API int SCISDK_GetParameterUInteger(char* Path, uint32_t* value, void* handle);
292 SCISDK_DLL_API int SCISDK_GetParameterDouble(char* Path, double*value, void*handle);
293 
294 SCISDK_DLL_API int SCISDK_DecodeData(char* Path, void*buffer_in, void*buffer_out, void*handle);
295 
321 SCISDK_DLL_API int SCISDK_AllocateBuffer(char* Path, T_BUFFER_TYPE buffer_type, void **buffer, void *handle);
322 
323 
351 SCISDK_DLL_API int SCISDK_AllocateBufferSize(char* Path, T_BUFFER_TYPE buffer_type, void **buffer, void *handle, int size);
352 
366 SCISDK_DLL_API int SCISDK_SetRegister(char* Path, uint32_t value, void* handle);
367 
381 SCISDK_DLL_API int SCISDK_GetRegister(char* Path, uint32_t*value, void*handle);
382 
397 SCISDK_DLL_API int SCISDK_FreeBuffer(char* Path, int buffer_type, void **buffer, void*handle);
398 
427 SCISDK_DLL_API int SCISDK_ReadData(char *Path, void *buffer, void*handle);
428 
429 
430 
446 SCISDK_DLL_API int SCISDK_WriteData(char* Path, void* buffer, void* handle);
447 
462 SCISDK_DLL_API int SCISDK_ReadStatus(char *Path, void *buffer, void*handle);
463 
474 SCISDK_DLL_API int SCISDK_s_error(int err_no, char** value, void* handle);
475 
491 SCISDK_DLL_API int SCISDK_ExecuteCommand(char* Path, char* value, void* handle);
492 
532 SCISDK_DLL_API int SCISDK_GetComponentList(char* name, char* Type, char** ret, bool return_json, void* handle);
533 
547 SCISDK_DLL_API int SCISDK_GetAllParameters(char* Path, char **ret, void*handle);
548 
562 SCISDK_DLL_API int SCISDK_GetParameterDescription(char* Path, char** ret, void* handle);
563 
578 SCISDK_DLL_API int SCISDK_GetParameterListOfValues(char* Path, char** ret, void* handle);
579 
591 SCISDK_DLL_API int SCISDK_GetParameterMinimumValue(char* Path, double* re, void* handle);
592 
604 SCISDK_DLL_API int SCISDK_GetParameterMaximumValue(char* Path, double* ret, void* handle);
605 
619 SCISDK_DLL_API int SCISDK_GetParametersProperties(char *Path, char **ret, void *handle);
620 
628 
638 SCISDK_DLL_API int SCISDK_GetAttachedDevicesList(char** ret, void* handle);
639 
650 SCISDK_DLL_API int SCISDK_GetLibraryVersion(char** ret, void* handle);
SCISDK_DLL_API int SCISDK_SetParameterString(char *Path, char *value, void *handle)
Set the value of a parameter for the specific SciCompiler Memory Mapped Component or route the value ...
SCISDK_DLL_API int SCISDK_SetParameterInteger(char *Path, int value, void *handle)
Set the value of a parameter for the specific SciCompiler Memory Mapped Component or route the value ...
SCISDK_DLL_API int SCISDK_GetLibraryVersion(char **ret, void *handle)
Return a string with the current version of SciSDK library.
SCISDK_DLL_API int SCISDK_DetachDevice(char *name, void *handle)
Remove a device from the tree of memory mapped resources. The function will call the device specific ...
SCISDK_DLL_API int SCISDK_FreeLib(void *handle)
Release the SciSDK handles and free the resources.
SCISDK_DLL_API int SCISDK_ExecuteCommand(char *Path, char *value, void *handle)
Execute a command for the specific Memory Mapped Component device driver/endpoint....
SCISDK_DLL_API int SCISDK_AddNewDevice(char *DevicePath, char *DeviceModel, char *JSONFwFilePath, char *Name, void *handle)
Connect to and hardware device. The function tries to connect to the device, decode the SciCompiler j...
SCISDK_DLL_API int SCISDK_GetAttachedDevicesList(char **ret, void *handle)
Return a csv string with the list of attached devices.
SCISDK_DLL_API int SCISDK_GetParameterListOfValues(char *Path, char **ret, void *handle)
If the parameter has a list of possible values, return the list of possible values otherwise return a...
SCISDK_DLL_API int SCISDK_GetParameterMaximumValue(char *Path, double *ret, void *handle)
If the parameter is numeric, return the maximum acceptable value.
SCISDK_DLL_API int SCISDK_GetParameterString(char *Path, char **value, void *handle)
Get the value of a parameter for the specific SciCompiler Memory Mapped Component or route the value ...
SCISDK_DLL_API int SCISDK_AllocateBufferSize(char *Path, T_BUFFER_TYPE buffer_type, void **buffer, void *handle, int size)
Allocate a buffer to be used to store data from the board for the specific Memory Mapped Componet (li...
SCISDK_DLL_API int SCISDK_GetComponentList(char *name, char *Type, char **ret, bool return_json, void *handle)
Return the tree of:
SCISDK_DLL_API int SCISDK_GetParameterMinimumValue(char *Path, double *re, void *handle)
If the parameter is numeric, return the minimum acceptable value.
SCISDK_DLL_API int SCISDK_SetParameterUInteger(char *Path, uint32_t value, void *handle)
Set the value of a parameter for the specific SciCompiler Memory Mapped Component or route the value ...
SCISDK_DLL_API int SCISDK_DecodeData(char *Path, void *buffer_in, void *buffer_out, void *handle)
SCISDK_DLL_API int SCISDK_free_string(char *_str)
Free a SciSDK allocated string.
SCISDK_DLL_API int SCISDK_GetParameterDouble(char *Path, double *value, void *handle)
Get the value of a parameter for the specific SciCompiler Memory Mapped Component or route the value ...
SCISDK_DLL_API int SCISDK_GetParameterDescription(char *Path, char **ret, void *handle)
Return the description for a specific parameter.
SCISDK_DLL_API int SCISDK_SetRegister(char *Path, uint32_t value, void *handle)
Set the value of a register in the SciCompiler generated firmware. This function works only on Simple...
SCISDK_DLL_API int SCISDK_GetParameterUInteger(char *Path, uint32_t *value, void *handle)
Get the value of a parameter for the specific SciCompiler Memory Mapped Component or route the value ...
SCISDK_DLL_API int SCISDK_WriteData(char *Path, void *buffer, void *handle)
Write data tothe board for the specific Memory Mapped Componet or of the board specific endpoint.
SCISDK_DLL_API int SCISDK_GetParametersProperties(char *Path, char **ret, void *handle)
Return a json with all the information about the parameter.
SCISDK_DLL_API int SCISDK_AllocateBuffer(char *Path, T_BUFFER_TYPE buffer_type, void **buffer, void *handle)
Allocate a buffer to be used to store data from the board for the specific Memory Mapped Componet (os...
SCISDK_DLL_API int SCISDK_s_error(int err_no, char **value, void *handle)
Convert the returned error code in a human readable string explaining the error.
SCISDK_DLL_API int SCISDK_FreeBuffer(char *Path, int buffer_type, void **buffer, void *handle)
Release the memory allocated by SCISDK_AllocateBuffer() or SCISDK_AllocateBufferSize()
SCISDK_DLL_API void * SCISDK_InitLib()
Initialize the SciSDK handles accolating the resources. This function must be called before any other...
#define SCISDK_DLL_API
Definition: SciSDK_DLL.h:19
SCISDK_DLL_API int SCISDK_GetAllParameters(char *Path, char **ret, void *handle)
Return all configuration parameters for the specified node MMC/endpoint.
SCISDK_DLL_API int SCISDK_ReadData(char *Path, void *buffer, void *handle)
Read data from the board for the specific Memory Mapped Componet (oscilloscope, spectrum,...
SCISDK_DLL_API int SCISDK_GetRegister(char *Path, uint32_t *value, void *handle)
Get the value of a register in the SciCompiler generated firmware. This function works only on Simple...
SCISDK_DLL_API int SCISDK_GetParameterInteger(char *Path, int *value, void *handle)
Get the value of a parameter for the specific SciCompiler Memory Mapped Component or route the value ...
SCISDK_DLL_API int SCISDK_ReadStatus(char *Path, void *buffer, void *handle)
Query the board for the specific Memory Mapped Componet (oscilloscope, spectrum, list) status using t...
SCISDK_DLL_API int SCISDK_SetParameterDouble(char *Path, double value, void *handle)
Set the value of a parameter for the specific SciCompiler Memory Mapped Component or route the value ...
T_BUFFER_TYPE
Definition: scisdk_defines.h:228