Functions for handling arrays of pointers.
More...
Functions for handling arrays of pointers.
The function tiepie_hw_oscilloscope_get_data() uses a pointer to a buffer with pointers to buffers for the channel data. Not all programming/scripting languages can handle pointers to pointers properly. These functions can then be used to work around that issue.
- Example
- In pseudocode:
buffers = empty list/array
for i = 0 to channel_count - 1
buffers[ i ] = allocate buffer/array
end
end
TIEPIE_HW_API void tiepie_hw_pointerarray_set(tiepie_hw_pointerarray ptr, uint32_t index, void *value)
Set a pointer at a specified index in a specified pointer array.
TIEPIE_HW_API void tiepie_hw_pointerarray_delete(tiepie_hw_pointerarray ptr)
Delete an existing pointer array.
TIEPIE_HW_API tiepie_hw_pointerarray tiepie_hw_pointerarray_new(uint32_t length)
Create a new pointer array.
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_channel_get_enabled(tiepie_hw_handle handle, uint16_t ch)
Check whether a specified channel is currently enabled.
TIEPIE_HW_API uint64_t tiepie_hw_oscilloscope_get_data(tiepie_hw_handle handle, float **buffers, uint16_t channel_count, uint64_t start_index, uint64_t sample_count)
Get the measurement data for specified channels.
The data is now available in buffers
.
- See also
- tiepie_hw_oscilloscope_get_data
◆ tiepie_hw_pointerarray_new()
Create a new pointer array.
The pointer array is initialized with NULL
pointers.
- Parameters
-
- Returns
- A pointer to the pointer array.
- Status values
-
- Since
- 1.0
◆ tiepie_hw_pointerarray_set()
Set a pointer at a specified index in a specified pointer array.
- Parameters
-
[in] | ptr | A pointer identifying the pointer array. |
[in] | index | The requested array index. |
[in] | value | The pointer value to set. |
- Status values
-
- Since
- 1.0
◆ tiepie_hw_pointerarray_delete()
Delete an existing pointer array.
- Parameters
-
[in] | ptr | A pointer identifying the pointer array. |
- Status values
-
- Since
- 1.0