libneoradio2
libneoradio2.h
Go to the documentation of this file.
1 // @file
2 // !brief Main Header file for all library definitions
3 #ifndef __LIBNEORADIO2_H__
4 #define __LIBNEORADIO2_H__
5 
6 #if defined(_MSC_VER)
7  #ifdef LIBNEORADIO2_EXPORTS
8  #define LIBNEORADIO2_API __declspec(dllexport)
9  #else
10  //#define LIBNEORADIO2_API __declspec(dllimport)
11  #define LIBNEORADIO2_API
12  #endif
13 #elif defined(__GNUC__)
14  #ifdef LIBNEORADIO2_EXPORTS
15  #define LIBNEORADIO2_API __attribute__((visibility("default")))
16  #else
17  //#define LIBNEORADIO2_API __declspec(dllimport)
18  #define LIBNEORADIO2_API
19  #endif
20 #endif
21 
22 #include <stdint.h>
23 #include "radio2_frames.h"
24 
25 #include "libneoradio2common.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 
32 
37 LIBNEORADIO2_API void neoradio2_set_blocking(int blocking, long long ms_timeout);
43 LIBNEORADIO2_API int neoradio2_find(Neoradio2DeviceInfo* devices, unsigned int* device_count);
44 LIBNEORADIO2_API int neoradio2_is_blocking();
45 LIBNEORADIO2_API int neoradio2_open(neoradio2_handle* handle, Neoradio2DeviceInfo* device);
46 LIBNEORADIO2_API int neoradio2_is_opened(neoradio2_handle* handle, int* is_opened);
47 LIBNEORADIO2_API int neoradio2_close(neoradio2_handle* handle);
48 LIBNEORADIO2_API int neoradio2_is_closed(neoradio2_handle* handle, int* is_closed);
49 LIBNEORADIO2_API int neoradio2_chain_is_identified(neoradio2_handle* handle, int* is_identified);
50 LIBNEORADIO2_API int neoradio2_chain_identify(neoradio2_handle* handle);
51 LIBNEORADIO2_API int neoradio2_app_is_started(neoradio2_handle* handle, int device, int bank, int* is_started);
52 LIBNEORADIO2_API int neoradio2_app_start(neoradio2_handle* handle, int device, int bank);
53 LIBNEORADIO2_API int neoradio2_enter_bootloader(neoradio2_handle* handle, int device, int bank);
54 LIBNEORADIO2_API int neoradio2_get_serial_number(neoradio2_handle* handle, int device, int bank, unsigned int* serial_number);
55 LIBNEORADIO2_API int neoradio2_get_manufacturer_date(neoradio2_handle* handle, int device, int bank, int* year, int* month, int* day);
56 LIBNEORADIO2_API int neoradio2_get_firmware_version(neoradio2_handle* handle, int device, int bank, int* major, int* minor);
57 LIBNEORADIO2_API int neoradio2_get_hardware_revision(neoradio2_handle* handle, int device, int bank, int* major, int* minor);
58 LIBNEORADIO2_API int neoradio2_get_device_type(neoradio2_handle* handle, int device, int bank, unsigned int* device_type);
59 LIBNEORADIO2_API int neoradio2_request_pcbsn(neoradio2_handle* handle, int device, int bank);
60 LIBNEORADIO2_API int neoradio2_get_pcbsn(neoradio2_handle* handle, int device, int bank, char* pcb_sn);
61 LIBNEORADIO2_API int neoradio2_request_sensor_data(neoradio2_handle* handle, int device, int bank, int enable_cal);
62 LIBNEORADIO2_API int neoradio2_read_sensor_float(neoradio2_handle* handle, int device, int bank, float* value);
63 LIBNEORADIO2_API int neoradio2_read_sensor_array(neoradio2_handle* handle, int device, int bank, int* arr, int* arr_size);
64 LIBNEORADIO2_API int neoradio2_write_sensor(neoradio2_handle* handle, int device, int bank, int mask, int value);
65 LIBNEORADIO2_API int neoradio2_write_sensor_successful(neoradio2_handle* handle, int device, int bank);
66 LIBNEORADIO2_API int neoradio2_request_settings(neoradio2_handle* handle, int device, int bank);
67 LIBNEORADIO2_API int neoradio2_read_settings(neoradio2_handle* handle, int device, int bank, neoRADIO2_settings* settings);
68 LIBNEORADIO2_API int neoradio2_write_settings(neoradio2_handle* handle, int device, int bank, neoRADIO2_settings* settings);
69 LIBNEORADIO2_API int neoradio2_write_settings_successful(neoradio2_handle* handle, int device, int bank);
70 LIBNEORADIO2_API int neoradio2_get_chain_count(neoradio2_handle* handle, int* count, int identify);
71 LIBNEORADIO2_API int neoradio2_request_calibration(neoradio2_handle* handle, int device, int bank, neoRADIO2frame_calHeader* header);
72 LIBNEORADIO2_API int neoradio2_read_calibration_array(neoradio2_handle* handle, int device, int bank, neoRADIO2frame_calHeader* header, float* arr, int* arr_size);
73 LIBNEORADIO2_API int neoradio2_request_calibration_points(neoradio2_handle* handle, int device, int bank, neoRADIO2frame_calHeader* header);
74 LIBNEORADIO2_API int neoradio2_read_calibration_points_array(neoradio2_handle* handle, int device, int bank, neoRADIO2frame_calHeader* header, float* arr, int* arr_size);
75 LIBNEORADIO2_API int neoradio2_write_calibration(neoradio2_handle* handle, int device, int bank, neoRADIO2frame_calHeader* header, float* arr, int arr_size);
76 LIBNEORADIO2_API int neoradio2_write_calibration_successful(neoradio2_handle* handle, int device, int bank);
77 LIBNEORADIO2_API int neoradio2_write_calibration_points(neoradio2_handle* handle, int device, int bank, neoRADIO2frame_calHeader* header, float* arr, int arr_size);
78 LIBNEORADIO2_API int neoradio2_write_calibration_points_successful(neoradio2_handle* handle, int device, int bank);
79 LIBNEORADIO2_API int neoradio2_store_calibration(neoradio2_handle* handle, int device, int bank);
80 LIBNEORADIO2_API int neoradio2_is_calibration_stored(neoradio2_handle* handle, int device, int bank, int* stored);
81 LIBNEORADIO2_API int neoradio2_get_calibration_is_valid(neoradio2_handle* handle, int device, int bank, int* is_valid);
82 
83 LIBNEORADIO2_API int neoradio2_request_calibration_info(neoradio2_handle* handle, int device, int bank);
84 LIBNEORADIO2_API int neoradio2_read_calibration_info(neoradio2_handle* handle, int device, int bank, neoRADIO2frame_calHeader* header);
85 
86 
87 LIBNEORADIO2_API int neoradio2_toggle_led(neoradio2_handle* handle, int device, int bank, int ms);
88 LIBNEORADIO2_API int neoradio2_toggle_led_successful(neoradio2_handle* handle, int device, int bank);
89 
90 
91 LIBNEORADIO2_API int neoradio2_get_status(neoradio2_handle* handle, int device, int bank, int bitfield, StatusType type, CommandStatus* status);
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif // __LIBNEORADIO2_H__
LIBNEORADIO2_API int neoradio2_read_calibration_array(neoradio2_handle *handle, int device, int bank, neoRADIO2frame_calHeader *header, float *arr, int *arr_size)
Definition: libneoradio2.cpp:689
LIBNEORADIO2_API int neoradio2_read_sensor_float(neoradio2_handle *handle, int device, int bank, float *value)
Definition: libneoradio2.cpp:526
LIBNEORADIO2_API int neoradio2_is_closed(neoradio2_handle *handle, int *is_closed)
Definition: libneoradio2.cpp:240
LIBNEORADIO2_API int neoradio2_get_device_type(neoradio2_handle *handle, int device, int bank, unsigned int *device_type)
Definition: libneoradio2.cpp:460
LIBNEORADIO2_API int neoradio2_request_calibration_points(neoradio2_handle *handle, int device, int bank, neoRADIO2frame_calHeader *header)
Definition: libneoradio2.cpp:710
LIBNEORADIO2_API int neoradio2_write_calibration(neoradio2_handle *handle, int device, int bank, neoRADIO2frame_calHeader *header, float *arr, int arr_size)
Definition: libneoradio2.cpp:746
LIBNEORADIO2_API int neoradio2_read_settings(neoradio2_handle *handle, int device, int bank, neoRADIO2_settings *settings)
Definition: libneoradio2.cpp:607
Definition: radio2_frames.h:123
LIBNEORADIO2_API int neoradio2_write_settings_successful(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:642
LIBNEORADIO2_API int neoradio2_toggle_led_successful(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:900
LIBNEORADIO2_API int neoradio2_get_pcbsn(neoradio2_handle *handle, int device, int bank, char *pcb_sn)
Definition: libneoradio2.cpp:493
LIBNEORADIO2_API int neoradio2_get_status(neoradio2_handle *handle, int device, int bank, int bitfield, StatusType type, CommandStatus *status)
Definition: libneoradio2.cpp:912
LIBNEORADIO2_API void neoradio2_set_blocking(int blocking, long long ms_timeout)
Definition: libneoradio2.cpp:133
LIBNEORADIO2_API int neoradio2_store_calibration(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:811
Definition: radio2_frames.h:164
LIBNEORADIO2_API int neoradio2_write_calibration_successful(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:766
LIBNEORADIO2_API int neoradio2_app_is_started(neoradio2_handle *handle, int device, int bank, int *is_started)
Definition: libneoradio2.cpp:294
LIBNEORADIO2_API int neoradio2_request_calibration(neoradio2_handle *handle, int device, int bank, neoRADIO2frame_calHeader *header)
Definition: libneoradio2.cpp:674
LIBNEORADIO2_API int neoradio2_enter_bootloader(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:338
LIBNEORADIO2_API int neoradio2_is_blocking()
Definition: libneoradio2.cpp:147
LIBNEORADIO2_API int neoradio2_toggle_led(neoradio2_handle *handle, int device, int bank, int ms)
Definition: libneoradio2.cpp:886
LIBNEORADIO2_API int neoradio2_chain_identify(neoradio2_handle *handle)
Definition: libneoradio2.cpp:272
LIBNEORADIO2_API int neoradio2_write_settings(neoradio2_handle *handle, int device, int bank, neoRADIO2_settings *settings)
Definition: libneoradio2.cpp:624
LIBNEORADIO2_API int neoradio2_write_calibration_points(neoradio2_handle *handle, int device, int bank, neoRADIO2frame_calHeader *header, float *arr, int arr_size)
Definition: libneoradio2.cpp:779
LIBNEORADIO2_API int neoradio2_find(Neoradio2DeviceInfo *devices, unsigned int *device_count)
Definition: libneoradio2.cpp:116
LIBNEORADIO2_API int neoradio2_get_calibration_is_valid(neoradio2_handle *handle, int device, int bank, int *is_valid)
Definition: libneoradio2.cpp:842
LIBNEORADIO2_API int neoradio2_write_calibration_points_successful(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:799
LIBNEORADIO2_API int neoradio2_request_sensor_data(neoradio2_handle *handle, int device, int bank, int enable_cal)
Definition: libneoradio2.cpp:512
LIBNEORADIO2_API int neoradio2_write_sensor_successful(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:581
Definition: libneoradio2common.h:42
LIBNEORADIO2_API int neoradio2_is_opened(neoradio2_handle *handle, int *is_opened)
Definition: libneoradio2.cpp:196
LIBNEORADIO2_API int neoradio2_get_firmware_version(neoradio2_handle *handle, int device, int bank, int *major, int *minor)
Definition: libneoradio2.cpp:410
LIBNEORADIO2_API int neoradio2_read_calibration_points_array(neoradio2_handle *handle, int device, int bank, neoRADIO2frame_calHeader *header, float *arr, int *arr_size)
Definition: libneoradio2.cpp:725
LIBNEORADIO2_API int neoradio2_read_sensor_array(neoradio2_handle *handle, int device, int bank, int *arr, int *arr_size)
Definition: libneoradio2.cpp:545
LIBNEORADIO2_API int neoradio2_get_chain_count(neoradio2_handle *handle, int *count, int identify)
Definition: libneoradio2.cpp:654
LIBNEORADIO2_API int neoradio2_request_pcbsn(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:479
LIBNEORADIO2_API int neoradio2_get_serial_number(neoradio2_handle *handle, int device, int bank, unsigned int *serial_number)
Definition: libneoradio2.cpp:362
LIBNEORADIO2_API int neoradio2_write_sensor(neoradio2_handle *handle, int device, int bank, int mask, int value)
Definition: libneoradio2.cpp:566
LIBNEORADIO2_API int neoradio2_app_start(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:316
enum _CommandStatus CommandStatus
LIBNEORADIO2_API int neoradio2_get_hardware_revision(neoradio2_handle *handle, int device, int bank, int *major, int *minor)
Definition: libneoradio2.cpp:434
LIBNEORADIO2_API int neoradio2_get_manufacturer_date(neoradio2_handle *handle, int device, int bank, int *year, int *month, int *day)
Definition: libneoradio2.cpp:386
#define neoradio2_handle
Definition: libneoradio2common.h:40
LIBNEORADIO2_API int neoradio2_request_settings(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:593
LIBNEORADIO2_API int neoradio2_chain_is_identified(neoradio2_handle *handle, int *is_identified)
Definition: libneoradio2.cpp:254
enum _StatusType StatusType
LIBNEORADIO2_API int neoradio2_is_calibration_stored(neoradio2_handle *handle, int device, int bank, int *stored)
Definition: libneoradio2.cpp:826
LIBNEORADIO2_API int neoradio2_open(neoradio2_handle *handle, Neoradio2DeviceInfo *device)
Definition: libneoradio2.cpp:159
LIBNEORADIO2_API int neoradio2_read_calibration_info(neoradio2_handle *handle, int device, int bank, neoRADIO2frame_calHeader *header)
Definition: libneoradio2.cpp:872
LIBNEORADIO2_API int neoradio2_request_calibration_info(neoradio2_handle *handle, int device, int bank)
Definition: libneoradio2.cpp:858
LIBNEORADIO2_API int neoradio2_close(neoradio2_handle *handle)
Definition: libneoradio2.cpp:209