|
Sci-SDK Library
SDK for Sci-Compiler projects
|
#include "scisdk_defines.h"Go to the source code of this file.
Macros | |
| #define | SCISDK_DLL_API extern "C" |
Functions | |
| SCISDK_DLL_API void * | SCISDK_InitLib () |
| Initialize the SciSDK handles accolating the resources. This function must be called before any other function. | |
| SCISDK_DLL_API int | SCISDK_FreeLib (void *handle) |
| Release the SciSDK handles and free the resources. | |
| 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 Sci-Compiler json file and build the tree of memory mapped resources defined in the JSON file. The function create a node for each resource and add it to the tree. A top node, with name specified in Name field, for the device is also created and added to the tree. All the nodes found in the json are added as children of the top node. | |
| 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 library disconnect function and will release the resources allocated by the library for the device. | |
| SCISDK_DLL_API int | SCISDK_SetParameterString (char *Path, char *value, void *handle) |
| Set the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function accept a string as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct SetParamter function must be call in agreement with the external library required value type. | |
| SCISDK_DLL_API int | SCISDK_SetParameterInteger (char *Path, int value, void *handle) |
| Set the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function accept a integer as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct SetParamter function must be call in agreement with the external library required value type. | |
| SCISDK_DLL_API int | SCISDK_SetParameterUInteger (char *Path, uint32_t value, void *handle) |
| Set the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function accept a integer as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct SetParamter function must be call in agreement with the external library required value type. | |
| SCISDK_DLL_API int | SCISDK_SetParameterDouble (char *Path, double value, void *handle) |
| Set the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function accept a double as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct SetParamter function must be call in agreement with the external library required value type. | |
| SCISDK_DLL_API int | SCISDK_GetParameterString (char *Path, char **value, void *handle) |
| Get the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function return a string as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct GetParamter function must be call in agreement with the external library required value type. | |
| SCISDK_DLL_API int | SCISDK_GetParameterInteger (char *Path, int *value, void *handle) |
| Get the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function return a integer as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct GetParamter function must be call in agreement with the external library required value type. | |
| SCISDK_DLL_API int | SCISDK_GetParameterUInteger (char *Path, uint32_t *value, void *handle) |
| Get the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function return a integer as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct GetParamter function must be call in agreement with the external library required value type. | |
| SCISDK_DLL_API int | SCISDK_GetParameterDouble (char *Path, double *value, void *handle) |
| Get the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function return a double as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct GetParamter function must be call in agreement with the external library required value type. | |
| SCISDK_DLL_API int | SCISDK_DecodeData (char *Path, void *buffer_in, void *buffer_out, void *handle) |
| 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 (oscilloscope, spectrum, list) or of the board specific dpp endpoint. The buffer is allocated in function of the actual configuration of MMC/board endpoint. For example, if a 1024 point oscilloscope is configured the buffer will be allocated to store 1024 points (1 analog point + 4 digital point per sample). If the device driver to the MMC/board endpoint support both RAW and DECODED data, it is possible to specify the type of data to allocate the buffer for. | |
| 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 (list) or of the board specific scope endpoint. The MMC operating in list mode does not have a maximum number of points to store, indeed an additional parameter (size) is required to allocated a buffer to store the data. The user will than use this buffer as temporany buffer for the readout and will store received data in a processing buffer or a file. | |
| SCISDK_DLL_API int | SCISDK_SetRegister (char *Path, uint32_t value, void *handle) |
| Set the value of a register in the Sci-Compiler generated firmware. This function works only on Simple Register, not on Register File and Multichannel Register. The last two types of register are supported as Memory Mapped Component and they are set/get with Set/GetParameter. | |
| SCISDK_DLL_API int | SCISDK_GetRegister (char *Path, uint32_t *value, void *handle) |
| Get the value of a register in the Sci-Compiler generated firmware. This function works only on Simple Register, not on Register File and Multichannel Register. The last two types of register are supported as Memory Mapped Component and they are set/get with Set/GetParameter. | |
| 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 int | SCISDK_ReadData (char *Path, void *buffer, void *handle) |
| Read data from the board for the specific Memory Mapped Componet (oscilloscope, spectrum, list) or of the board specific endpoint (scope, dpp). The function behavour depends on the configuration of the device driver of the Memory Mapped Component or board endpoint: | |
| 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_ReadStatus (char *Path, void *buffer, void *handle) |
| Query the board for the specific Memory Mapped Componet (oscilloscope, spectrum, list) status using the MMC device driver The status is a structure, different for each MMC device driver, that contains the actual status of the MMC, (ie: running, stopped, run time, progress, number of samples in the spectrum, etc..) | |
| 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_ExecuteCommand (char *Path, char *value, void *handle) |
| Execute a command for the specific Memory Mapped Component device driver/endpoint. Typically the device drivers of the MMC do not directly support access to the hardware when a single Set/Get Paramter is called but wait for a configuration command to be executed. Refere to the specific Device Driver documentation for the list of supported commands and their usage. | |
| 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_GetAllParameters (char *Path, char **ret, void *handle) |
| Return all configuration parameters for the specified node MMC/endpoint. | |
| SCISDK_DLL_API int | SCISDK_GetParameterDescription (char *Path, char **ret, void *handle) |
| Return the description for a specific parameter. | |
| 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 an empty string. | |
| 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_GetParameterMaximumValue (char *Path, double *ret, void *handle) |
| If the parameter is numeric, return the maximum acceptable value. | |
| 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_GetCommandList (char *Path, char **ret, bool return_json, void *handle) |
| Return the commands a component answers to. | |
| SCISDK_DLL_API int | SCISDK_GetCommandsProperties (char *Path, char **ret, void *handle) |
| Return a json with all the information about the commands of a component. | |
| SCISDK_DLL_API int | SCISDK_GetComponentCatalog (char *Type, char **ret, void *handle) |
| Return the parameters and commands of every component type, with no board attached. | |
| SCISDK_DLL_API int | SCISDK_GetBoardApiList (char *name, char **ret, bool return_json, void *handle) |
| Return the board API parameters of an attached device. | |
| SCISDK_DLL_API int | SCISDK_GetBoardApiCatalog (char *Device, char **ret, void *handle) |
Return the board API a given Device string provides, with no board attached. | |
| SCISDK_DLL_API int | SCISDK_free_string (char *_str) |
| Free a SciSDK allocated string. | |
| 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_GetLibraryVersion (char **ret, void *handle) |
| Return a string with the current version of SciSDK library. | |
| SCISDK_DLL_API int | SCISDK_GetSupportedBoardList (char **ret, void *handle) |
| Return the list of board models supported by this version of SciSDK. | |
| SCISDK_DLL_API int | SCISDK_ReadRegisterRaw (char *name, uint32_t address, uint32_t *value, void *handle) |
| Return the full machine readable description of every supported board. | |
| SCISDK_DLL_API int | SCISDK_WriteRegisterRaw (char *name, uint32_t address, uint32_t value, void *handle) |
| Write one register of a connected board by bus address. | |
| SCISDK_DLL_API int | SCISDK_GetSupportedComponentList (char **ret, bool return_json, void *handle) |
| Get the list of MMC component types this build of SciSDK can drive. | |
| SCISDK_DLL_API int | SCISDK_ValidateRegisterFile (char *JSONFwFilePath, char **ret, void *handle) |
| Check a RegisterFile JSON without connecting to any hardware. | |
| SCISDK_DLL_API int | SCISDK_GetSupportedBoardsInfo (char **ret, void *handle) |
| SCISDK_DLL_API int | SCISDK_Enumerate (char *board_models, char **ret, void *handle) |
| Discover the boards currently connected to the machine. | |
| SCISDK_DLL_API int | SCISDK_GetFirmwareJSON (char *name, char **ret, void *handle) |
| Return the full firmware JSON configuration for the specified device. | |
| SCISDK_DLL_API int | SCISDK_GetFirmwareName (char *name, char **ret, void *handle) |
| Return the firmware project name from the JSON configuration. | |
| SCISDK_DLL_API int | SCISDK_GetFirmwareVersion (char *name, char **ret, void *handle) |
| Return the firmware version from the JSON configuration Note: Version can be null in the JSON, in which case an empty string is returned. | |
| SCISDK_DLL_API int | SCISDK_GetFirmwareBuildDate (char *name, char **ret, void *handle) |
| Return the firmware build date from the JSON configuration. | |
| SCISDK_DLL_API int | SCISDK_GetFirmwareMagic (char *name, char **ret, void *handle) |
| Return the firmware magic number from the JSON configuration. | |
| #define SCISDK_DLL_API extern "C" |
| 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 Sci-Compiler json file and build the tree of memory mapped resources defined in the JSON file. The function create a node for each resource and add it to the tree. A top node, with name specified in Name field, for the device is also created and added to the tree. All the nodes found in the json are added as children of the top node.
The connection method is specified in the Device path field. To connect to a device connected to the USB port, the Device path field must be set to "usb:<pid>" where <pid> is the PID of the device. Please pay attention to the fact that some devices emulate ethernet on usb bus, so the connection must be done using the ethernet protocol.
To connect to a device connected to the ethernet port, the Device path field must be set to "<ip>:<port>" where the <ip> is the IP address of the device and <port> is the port number of the server listening on the device. If port is not specified, the default port for the specific device is used.
This function will load the dinamic library specified for the specific hardware device default path. If the library is found in the execution path of the user software, the library will be loaded Otherwise the library will be loaded searching into the system path. Please pay attention to the fact that the libraries must be compiled with the same architecture used by the user software.
| DevicePath | Device path to connect to. Must be in the format "usb:<pid>" or "<ip>:<port>" |
| DeviceModel | String containing the device model. Must be one of the supported devices. The supported devices are: DT1260, R5560, R5560SE, DT5560, DT5550, DT5550W-CITIROC, DT5550W-PETIROC, V2740, V2745, DT2740, DT2745 |
| JSONFwFilePath | Path to the JSON file containing the firmware description. |
| Name | Name of the board. This name will be used to identify the device. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| 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 (oscilloscope, spectrum, list) or of the board specific dpp endpoint. The buffer is allocated in function of the actual configuration of MMC/board endpoint. For example, if a 1024 point oscilloscope is configured the buffer will be allocated to store 1024 points (1 analog point + 4 digital point per sample). If the device driver to the MMC/board endpoint support both RAW and DECODED data, it is possible to specify the type of data to allocate the buffer for.
The buffer parameter is a pointer to a data structure pointer. The function will allocate the structure in the buffer and all array inside the structure.
To release the memory allocated by this function the user must call SCISDK_FreeBuffer(). Do not use free to release the memory allocated by this function.
| Path | The path to the parameter to get. The path must be in the format <device name>:.../<resource name> for example: /board0/MMCComponents/Oscilloscope_0 |
| buffer_type | T_BUFFER_TYPE_RAW or T_BUFFER_TYPE_DECODED |
| buffer | Pointer to a non allocated struct (ie: SCISDK_OSCILLOSCOPE_DECODED_BUFFER) to be allocated |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| 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 (list) or of the board specific scope endpoint. The MMC operating in list mode does not have a maximum number of points to store, indeed an additional parameter (size) is required to allocated a buffer to store the data. The user will than use this buffer as temporany buffer for the readout and will store received data in a processing buffer or a file.
The buffer parameter is a pointer to a data structure pointer. The function will allocate the structure in the buffer and all array inside the structure.
To release the memory allocated by this function the user must call SCISDK_FreeBuffer(). Do not use free to release the memory allocated by this function.
| Path | The path to the parameter to get. The path must be in the format <device name>:.../<resource name> for example: /board0/MMCComponents/List_0 |
| buffer_type | T_BUFFER_TYPE_RAW or T_BUFFER_TYPE_DECODED |
| buffer | Pointer to a non allocated struct (ie: SCISDK_LIST_RAW_BUFFER) to be allocated |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| size | Size of the buffer to allocate. The size is specified in elements (ie: 1024 for a 1024 list word, where the list word can be 32/64/128.. bits wide, depending on the MMC configuration specified in Sci-Compiler when the list has been created) |
| SCISDK_DLL_API int SCISDK_DecodeData | ( | char * | Path, |
| void * | buffer_in, | ||
| void * | buffer_out, | ||
| void * | handle | ||
| ) |
| 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 library disconnect function and will release the resources allocated by the library for the device.
| name | Name of the board to remove. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_Enumerate | ( | char * | board_models, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Discover the boards currently connected to the machine.
| board_models | ';'-separated list of the board models to look for (e.g. "DT1260;V2495"). Models that are unknown or that do not support discovery are silently ignored (no error). Discovery is currently implemented for DT1260/SCIDK (USB) and V2495/DT2495 (USB) only. |
| ret | Pointer to the buffer to be filled with a single ';'-separated list of the boards that were found. Each entry has the form "<model>:<connection path>" (e.g. "DT1260:usb:10500"), i.e. exactly the two strings to hand over to SCISDK_AddNewDevice(). The string is empty when nothing is found. It's allocated by the SCISDK_Enumerate function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_ExecuteCommand | ( | char * | Path, |
| char * | value, | ||
| void * | handle | ||
| ) |
Execute a command for the specific Memory Mapped Component device driver/endpoint. Typically the device drivers of the MMC do not directly support access to the hardware when a single Set/Get Paramter is called but wait for a configuration command to be executed. Refere to the specific Device Driver documentation for the list of supported commands and their usage.
| Path | The path to the Memory Mapped component or board endpoint command <device name>:.../<resource name>.<command name> for example: /board0/MMCComponents/TOF_0.start |
| value | An optional argument for the command. It's type depends on the command |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_free_string | ( | char * | _str | ) |
Free a SciSDK allocated string.
| _str | Pointer to the string to be freed |
| 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()
| Path | The path to the Memory Mapped component or board endpoint The path must be in the format <device name>:.../<resource name> for example: /board0/MMCComponents/List_0 |
| buffer_type | T_BUFFER_TYPE_RAW or T_BUFFER_TYPE_DECODED |
| buffer | Pointer to the buffer to be released |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_FreeLib | ( | void * | handle | ) |
Release the SciSDK handles and free the resources.
| handle | handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetAllParameters | ( | char * | Path, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return all configuration parameters for the specified node MMC/endpoint.
| Path | The path to the node MMC/endpoint <device name>:.../<resource name> for example: /board0/MMCComponents/Oscilloscope_0 |
| ret | Pointer to the buffer to be filled with the tree. It's allocated by the SCISDK_GetParameterListOfValues function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetAttachedDevicesList | ( | char ** | ret, |
| void * | handle | ||
| ) |
Return a csv string with the list of attached devices.
| ret | Pointer to the buffer to be filled with the csv string. It's allocated by the SCISDK_GetAttachedDevicesList function and must be freed by the caller using the SCISDK_free_string() function |
| handle |
| SCISDK_DLL_API int SCISDK_GetBoardApiCatalog | ( | char * | Device, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return the board API a given Device string provides, with no board attached.
The counterpart of SCISDK_GetComponentCatalog() for board drivers: it answers from the Device value of a RegisterFile alone, so a tool can show the board API of a firmware it has only read from disk.
The answer is a JSON array, one object per board driver: device (the Device string), driver, description, and parameters in the same shape as SCISDK_GetParametersProperties() plus, on each, path — the full path to use, /boardapi/..., since the device name is the caller's — and wildcard, true for an entry like /boardapi/felib/\*\* which is a router for a whole namespace rather than a single parameter.
Asking for every driver reports one entry per driver, not per Device string: the eight spellings that select the FELib driver would otherwise be eight identical lists.
| Device | A Device string, or NULL/"" for every board driver |
| ret | Pointer to the buffer to be filled. It's allocated by this function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
Device | SCISDK_DLL_API int SCISDK_GetBoardApiList | ( | char * | name, |
| char ** | ret, | ||
| bool | return_json, | ||
| void * | handle | ||
| ) |
Return the board API parameters of an attached device.
The board API is the set of knobs that belong to the board rather than to the firmware — the analog front end, the LEMO impedances, a pulse generator — reached as <device>:/boardapi/.... Which ones exist depends on the Device value of the RegisterFile, so it cannot be known without asking.
A board with no board API answers with an empty list and NI_OK, not an error: most firmwares have none, and that has to be distinguishable from a failure.
| name | The device name given to SCISDK_AddNewDevice() |
| ret | Pointer to the buffer to be filled. It's allocated by this function and must be freed by the caller using the SCISDK_free_string() function |
| return_json | true: the same JSON as SCISDK_GetParametersProperties(), one object per parameter. false: a ';' separated list of the full paths, device name included, ready to be passed back to Set/GetParameter |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetCommandList | ( | char * | Path, |
| char ** | ret, | ||
| bool | return_json, | ||
| void * | handle | ||
| ) |
Return the commands a component answers to.
The commands are the ones SCISDK_ExecuteCommand() will run: they are registered by the driver together with their description, so this list cannot fall behind what the component actually accepts.
| Path | The path to the component <device name>:.../<resource name> for example: board0:/MMCComponents/Oscilloscope_0 |
| ret | Pointer to the buffer to be filled. It's allocated by this function and must be freed by the caller using the SCISDK_free_string() function |
| return_json | false: a comma separated list of command names. true: the same JSON as SCISDK_GetCommandsProperties() |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetCommandsProperties | ( | char * | Path, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return a json with all the information about the commands of a component.
One object per command: name, description, and parameter with used, description and list_of_values — what to pass as the value argument of SCISDK_ExecuteCommand(), empty for the commands that take nothing.
| Path | The path to the component <device name>:.../<resource name> |
| ret | Pointer to the buffer to be filled. It's allocated by this function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetComponentCatalog | ( | char * | Type, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return the parameters and commands of every component type, with no board attached.
Unlike SCISDK_GetParametersProperties() this needs neither a device nor a RegisterFile: it describes what this build of the library can drive. It is what an editor, a code generator or a documentation build should read, so that the names, types, accepted values and ranges they offer come from the drivers rather than from a list maintained by hand.
The answer is a JSON array, one object per component type: type (the "Type" string a RegisterFile may use), driver, description, from_firmware (true when the parameter set itself is the RegisterFile's – a RegisterFile's register names, or one parameter per channel – so parameters cannot be the definitive list), parameters in the same shape as SCISDK_GetParametersProperties() plus a depends_on_firmware flag, and commands in the same shape as SCISDK_GetCommandsProperties().
depends_on_firmware on a parameter means its range or accepted values are computed from the RegisterFile (the digitizer's acq_len maximum is nsamples * nchannels, its enabledch values are the channel masks that fit). For those, limits is reported empty rather than filled with numbers that describe no real board; ask SCISDK_GetParametersProperties() once a device is attached to get the real ones.
| Type | A single "Type" string, or NULL/"" for every type |
| ret | Pointer to the buffer to be filled. It's allocated by this function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetComponentList | ( | char * | name, |
| char * | Type, | ||
| char ** | ret, | ||
| bool | return_json, | ||
| void * | handle | ||
| ) |
Return the tree of:
Please note that is not possible to get CaenFELib internal configuration parameters using this function. (will appera just /felib/** indicating that this routing point will pass the rest of the path to CaenFELib)
| name | The name of the board |
| Type | The type of resource to be returned. It can be:
|
Left empty ("") – or "ALL" – to get all resources
| ret | Pointer to the buffer to be filled with the tree. It's allocated by the SCISDK_GetParameterListOfValues function and must be freed by the caller using the SCISDK_free_string() function |
| return_json | If true the tree is returned in JSON format, otherwise in CSV format. Prefer the JSON form in code: it carries the path of every entry, and not all of them live under /MMCComponents/ – the plain registers of the RegisterFile are /Registers/<name> and the board API is /boardapi. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetFirmwareBuildDate | ( | char * | name, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return the firmware build date from the JSON configuration.
| name | Name of the device |
| ret | Pointer to the buffer to be filled with the build date string. It's allocated by the SCISDK_GetFirmwareBuildDate function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetFirmwareJSON | ( | char * | name, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return the full firmware JSON configuration for the specified device.
| name | Name of the device |
| ret | Pointer to the buffer to be filled with the JSON string. It's allocated by the SCISDK_GetFirmwareJSON function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetFirmwareMagic | ( | char * | name, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return the firmware magic number from the JSON configuration.
| name | Name of the device |
| ret | Pointer to the buffer to be filled with the magic string. It's allocated by the SCISDK_GetFirmwareMagic function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetFirmwareName | ( | char * | name, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return the firmware project name from the JSON configuration.
| name | Name of the device |
| ret | Pointer to the buffer to be filled with the project name string. It's allocated by the SCISDK_GetFirmwareName function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetFirmwareVersion | ( | char * | name, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return the firmware version from the JSON configuration Note: Version can be null in the JSON, in which case an empty string is returned.
| name | Name of the device |
| ret | Pointer to the buffer to be filled with the version string. It's allocated by the SCISDK_GetFirmwareVersion function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetLibraryVersion | ( | char ** | ret, |
| void * | handle | ||
| ) |
Return a string with the current version of SciSDK library.
| ret | Pointer to the buffer to be filled with the version number string. It's allocated by the SCISDK_GetLibraryVersion function and must be freed by the caller using the SCISDK_free_string() function |
| handle |
| SCISDK_DLL_API int SCISDK_GetParameterDescription | ( | char * | Path, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return the description for a specific parameter.
| Path | The path to the paramter <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_mode |
| ret | Pointer to the buffer to be filled with the description. It's allocated by the SCISDK_GetParameterListOfValues function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetParameterDouble | ( | char * | Path, |
| double * | value, | ||
| void * | handle | ||
| ) |
Get the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function return a double as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct GetParamter function must be call in agreement with the external library required value type.
| Path | The path to the parameter to get. The path must be in the format <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_mode |
| Value | Pointer to the allocated buffer to receive the value. The value will be a double. The buffer must be large enough to contain the value. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetParameterInteger | ( | char * | Path, |
| int * | value, | ||
| void * | handle | ||
| ) |
Get the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function return a integer as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct GetParamter function must be call in agreement with the external library required value type.
| Path | The path to the parameter to get. The path must be in the format <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_value |
| Value | Pointer to the allocated buffer to receive the value. The value will be a integer. The buffer must be large enough to contain the value. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| 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 an empty string.
| Path | The path to the paramter <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_mode |
| ret | Pointer to the buffer to be filled with the list of possible values. It's allocated by the SCISDK_GetParameterListOfValues function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetParameterMaximumValue | ( | char * | Path, |
| double * | ret, | ||
| void * | handle | ||
| ) |
If the parameter is numeric, return the maximum acceptable value.
| Path | The path to the paramter <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_level |
| re | Pointer to the double-type variable to be filled with the maximum value. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetParameterMinimumValue | ( | char * | Path, |
| double * | re, | ||
| void * | handle | ||
| ) |
If the parameter is numeric, return the minimum acceptable value.
| Path | The path to the paramter <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_level |
| re | Pointer to the double-type variable to be filled with the minimum value. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetParametersProperties | ( | char * | Path, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Return a json with all the information about the parameter.
| Path | The path to the paramter <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_level |
| ret | Pointer to the buffer to be filled with the json. It's allocated by the SCISDK_GetParametersProperties function and must be freed by the caller using the SCISDK_free_string() function |
| handle |
| SCISDK_DLL_API int SCISDK_GetParameterString | ( | char * | Path, |
| char ** | value, | ||
| void * | handle | ||
| ) |
Get the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function return a string as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct GetParamter function must be call in agreement with the external library required value type.
| Path | The path to the parameter to get. The path must be in the format <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_mode |
| Value | Pointer to the allocated buffer to receive the value. The value will be a string. The buffer must be large enough to contain the value. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetParameterUInteger | ( | char * | Path, |
| uint32_t * | value, | ||
| void * | handle | ||
| ) |
Get the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function return a integer as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct GetParamter function must be call in agreement with the external library required value type.
| Path | The path to the parameter to get. The path must be in the format <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_value |
| Value | Pointer to the allocated buffer to receive the value. The value will be a uint32. The buffer must be large enough to contain the value. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetRegister | ( | char * | Path, |
| uint32_t * | value, | ||
| void * | handle | ||
| ) |
Get the value of a register in the Sci-Compiler generated firmware. This function works only on Simple Register, not on Register File and Multichannel Register. The last two types of register are supported as Memory Mapped Component and they are set/get with Set/GetParameter.
| Path | The path to the register <device name>:.../Registers/<register name> for example: board0:/Registers/DELAY |
| value | Poiter to the variable to receive the value of the register |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetSupportedBoardList | ( | char ** | ret, |
| void * | handle | ||
| ) |
Return the list of board models supported by this version of SciSDK.
The returned string is a single ';'-separated list of the model names accepted by SCISDK_AddNewDevice(), for example: "DT1260;SCIDK;V2495;DT2495;DT5771;...;BoardEmulator;FakeBoard". Model names are case-insensitive when passed back to SCISDK_AddNewDevice().
| ret | Pointer to the buffer to be filled with the ';'-separated list. It's allocated by the SCISDK_GetSupportedBoardList function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_GetSupportedBoardsInfo | ( | char ** | ret, |
| void * | handle | ||
| ) |
| SCISDK_DLL_API int SCISDK_GetSupportedComponentList | ( | char ** | ret, |
| bool | return_json, | ||
| void * | handle | ||
| ) |
Get the list of MMC component types this build of SciSDK can drive.
These are the "Type" strings a RegisterFile may use for an entry of "MMCComponents". The list is the same table the library instantiates components from, so it cannot drift from what is actually supported.
| ret | Pointer to a char* that receives the list. With return_json false it is ';' separated ("Oscilloscope;OscilloscopeDual;WaveDump;..."); with return_json true it is a JSON array of objects with "type" (the RegisterFile spelling), "driver" (the driver that implements it) and "description". Allocated by this function, free it with free(). |
| return_json | true for the JSON form, false for the ';' separated one. |
| handle | SciSDK library handle |
| SCISDK_DLL_API void * SCISDK_InitLib | ( | ) |
Initialize the SciSDK handles accolating the resources. This function must be called before any other function.
| 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, list) or of the board specific endpoint (scope, dpp). The function behavour depends on the configuration of the device driver of the Memory Mapped Component or board endpoint:
| Path | The path to the Memory Mapped component or board endpoint The path must be in the format <device name>:.../<resource name> for example: /board0/MMCComponents/List_0 |
| buffer | Pointer to the buffer to be filled with the data read from the board allocated with SCISDK_AllocateBuffer() |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_ReadRegisterRaw | ( | char * | name, |
| uint32_t | address, | ||
| uint32_t * | value, | ||
| void * | handle | ||
| ) |
Return the full machine readable description of every supported board.
The returned string is a JSON array; every element describes one board family:
"registerfile_json" is "from_device" when the board can serve its own RegisterFile JSON, so that SCISDK_AddNewDevice() can be called with an empty JSONFwFilePath. "notes" may also appear at the board level.
| ret | Pointer to the buffer to be filled with the JSON string. It's allocated by the SCISDK_GetSupportedBoardsInfo function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
Read one register of a connected board by bus address.
Bypasses the RegisterFile: the address goes straight to the board bus. This is the diagnostic path, for when the register map is unknown, is suspected wrong, or is precisely what is being investigated. Prefer SCISDK_GetRegister() with a named register in normal code.
| name | Device name given to SCISDK_AddNewDevice() |
| address | Bus address of the register |
| value | Receives the value read |
| handle | SciSDK library handle |
| 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 the MMC device driver The status is a structure, different for each MMC device driver, that contains the actual status of the MMC, (ie: running, stopped, run time, progress, number of samples in the spectrum, etc..)
| Path | The path to the Memory Mapped component or board endpoint |
| buffer | Pointer to the buffer to be filled with the status. The buffer must be allocated and must be in the correct format for the specific MMC device driver. For example the status buffer for the Spectrum device driver must be instantiated as SCISDK_SPECTRUM_STATUS_BUFFER |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| 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.
| err_no | The error code returned by the SciSDK functions |
| value | Pointer to the buffer to be filled with the error string. It's allocated by the SCISDK_s_error function and must be freed by the caller using the SCISDK_free_string() function |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_SetParameterDouble | ( | char * | Path, |
| double | value, | ||
| void * | handle | ||
| ) |
Set the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function accept a double as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct SetParamter function must be call in agreement with the external library required value type.
The SciSDK check that the value is in the correct range for the specific parameter. If the value is not in the correct range the function will return an error and the value will not be set.
| Path | The path to the parameter to set. The path must be in the format <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_level |
| Value | The value to set. The value must be a double. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_SetParameterInteger | ( | char * | Path, |
| int | value, | ||
| void * | handle | ||
| ) |
Set the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function accept a integer as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct SetParamter function must be call in agreement with the external library required value type.
The SciSDK check that the value is in the correct range for the specific parameter. If the value is not in the correct range the function will return an error and the value will not be set.
| Path | The path to the parameter to set. The path must be in the format <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_level |
| Value | The value to set. The value must be a integer. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_SetParameterString | ( | char * | Path, |
| char * | value, | ||
| void * | handle | ||
| ) |
Set the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function accept a string as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct SetParamter function must be call in agreement with the external library required value type.
The SciSDK check that the value is in the correct range or in the acceptance list for the specific parameter. If the value is not in the correct range or in the acceptance list, the function will return an error and the value will not be set.
| Path | The path to the parameter to set. The path must be in the format <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_mode |
| Value | The value to set. The value must be a string. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_SetParameterUInteger | ( | char * | Path, |
| uint32_t | value, | ||
| void * | handle | ||
| ) |
Set the value of a parameter for the specific Sci-Compiler Memory Mapped Component or route the value to external board library to set board specific parameters. This function accept a integer as value. Please note that the behaviour of this function is different if the path is a SciSDK managed node or a device specific node managed by the external library. The SciSDK managed nodes perform a conversion of the string to the correct type and then set the value automatically. If the operation is routed to the external library (ie: ../felib/..) SciSDK has not the information reguarding the data type required by the external library indeed the che correct SetParamter function must be call in agreement with the external library required value type.
The SciSDK check that the value is in the correct range for the specific parameter. If the value is not in the correct range the function will return an error and the value will not be set.
| Path | The path to the parameter to set. The path must be in the format <device name>:.../<resource name>.<parameter name> for example: /board0/MMCComponents/Oscilloscope_0.trigger_level |
| Value | The value to set. The value must be a uint32_t. |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_SetRegister | ( | char * | Path, |
| uint32_t | value, | ||
| void * | handle | ||
| ) |
Set the value of a register in the Sci-Compiler generated firmware. This function works only on Simple Register, not on Register File and Multichannel Register. The last two types of register are supported as Memory Mapped Component and they are set/get with Set/GetParameter.
| Path | The path to the register <device name>:.../Registers/<register name> for example: board0:/Registers/DELAY |
| value | The value to set in the register |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_ValidateRegisterFile | ( | char * | JSONFwFilePath, |
| char ** | ret, | ||
| void * | handle | ||
| ) |
Check a RegisterFile JSON without connecting to any hardware.
Parses the file and reports what SciSDK would make of it: the board model and firmware name it declares, how many plain registers it has, and every component with the driver that would be built for it. A component whose type this build does not know is a warning, not an error: the library skips what it cannot drive and the rest of the file still works.
| JSONFwFilePath | Path of the RegisterFile to check. |
| ret | Pointer to a char* that receives a JSON report: {file, device, project, registers, components[], errors[], warnings[], valid}. Allocated by this function, free it with free(). It is filled even when the file is invalid, so the caller can show why. |
| handle | SciSDK library handle |
| 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.
| Path | The path to the Memory Mapped component or board endpoint The path must be in the format <device name>:.../<resource name> for example: /board0/boardapi/spectrum |
| buffer | Pointer to the buffer to be filled with the data read from the board allocated with SCISDK_AllocateBuffer() |
| handle | Handle to the SciSDK allocated by SCISDK_InitLib() |
| SCISDK_DLL_API int SCISDK_WriteRegisterRaw | ( | char * | name, |
| uint32_t | address, | ||
| uint32_t | value, | ||
| void * | handle | ||
| ) |
Write one register of a connected board by bus address.
The write counterpart of SCISDK_ReadRegisterRaw(); the same warning applies, and rather more so: nothing checks that the address means what you think it means.
| name | Device name given to SCISDK_AddNewDevice() |
| address | Bus address of the register |
| value | Value to write |
| handle | SciSDK library handle |