123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- #ifndef RAMZED_SDK_H
- #define RAMZED_SDK_H
- enum {
- PROBE_NULL = -1,
- PROBE_LINEAR = 0, //L40
- PROBE_CONVEX, //R60
- // PROBE_MINI_LINEAR,
- // PROBE_MINI_CONVEX,
- PROBE_MAX,
- };
- enum {
- MODE_NULL = 0,
- MODE_B = 1,
- MODE_C,
- MODE_D,
- // MODE_M,
- MAX_MODE_NUM
- };
- #define FORMAT_QT_RGB888 0
- #define FORMAT_QT_ARGB8888 1
- #define FORMAT_PNG 10
- #define FORMAT_JPG 11
- typedef struct _image_msg_t{
- //1. header
- unsigned short version;
- unsigned short frame_type;
- unsigned int frame_id;
- unsigned int width;
- unsigned int height;
- unsigned int length;
- unsigned int image_format;
- char probe_type;
- unsigned char res[3];
- //2. payload
- unsigned char payload[0];
- }image_header_msg_t, image_msg_t;
- typedef void (*image_done_callback_t)(unsigned char *frame_msg);
- typedef void (*image_done_callback2_t)(unsigned char *frame_msg_header, unsigned char *payload);
- typedef int (*check_callback2_t)();
- typedef void (*probe_connected_callback_t)(unsigned char probe_type);
- //just ch32 or new ch24
- typedef void (*probe_disconnected_callback_t)(unsigned char probe_type);
- #define PRESET_SMALLPART 1
- #define PRESET_LIVERPART 2
- class __declspec(dllimport) ramzed_sdk
- {
- public:
- ramzed_sdk();
- static ramzed_sdk* instance();
- int init();
- void reg_image_done_cb(image_done_callback_t cb);
- void reg_image_done_cb2(check_callback2_t check_cb, image_done_callback2_t cb);
- void reg_probe_connected_cb(probe_connected_callback_t cb);
- void reg_probe_disconnected_cb(probe_disconnected_callback_t cb);
- // void cfg_usb_probe_type(int probe_type);
- // void usb_shutting_down(unsigned char down);
- // int switch_probe_type(int probe_type);
- int set_preset(int preset);
- int set_mode(unsigned char mode);
- int set_B_gain(unsigned char gain);
- int set_B_depth(unsigned char factor);
- int set_B_frequency(float frq);
- int set_B_focus(unsigned char focus);
- int set_B_harmonic(unsigned char harmonic);
- int set_B_power(unsigned char power);
- int set_B_dynamic_range(unsigned char range);
- int get_B_gain(unsigned char *gain);
- int get_B_depth(unsigned char *gears, float *depth_cm);
- int get_B_frequency(float *frq);
- int get_B_focus(unsigned char *gears, float *focus_cm);
- //int get_B_power(unsigned char *power);
- int get_B_dynamic_range(unsigned char *range);
- int set_tgc1(unsigned char tgc);
- int set_tgc2(unsigned char tgc);
- int set_tgc3(unsigned char tgc);
- int set_tgc4(unsigned char tgc);
- int set_tgc5(unsigned char tgc);
- int set_tgc6(unsigned char tgc);
- int set_tgc7(unsigned char tgc);
- int set_tgc8(unsigned char tgc);
- int get_tgc1(float *tgc);
- int get_tgc2(float *tgc);
- int get_tgc3(float *tgc);
- int get_tgc4(float *tgc);
- int get_tgc5(float *tgc);
- int get_tgc6(float *tgc);
- int get_tgc7(float *tgc);
- int get_tgc8(float *tgc);
- int set_C_ROI(int x1, int x2, int y1, int y2);
- //int set_C_ROI2(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
- int set_C_gain(unsigned char gain);
- int set_C_frequency(float frq);
- // int set_C_speed_wall_filter(unsigned char speed);
- //int set_C_range_wall_filter(unsigned char range);
- // int set_C_persistence(unsigned char perc);
- //int set_C_linear_angle(int angle);
- int set_C_prf(unsigned char prf);
- int set_C_angle(unsigned char prf);
- int get_C_angle(unsigned char *prf);
- int get_C_prf(unsigned char *prf);
- int get_C_gain(unsigned char *gain);
- int get_C_frequency(float *frq);
- // int set_D_submode(unsigned char bc_mode);
- // int set_D_sampling(int x, int y);
- // int set_D_angle(int angle);
- // int set_D_baseline(int baseline);
- // int set_D_gain(unsigned char gain);
- // int set_D_prf(unsigned char prf);
- // int set_D_sampling_gate(unsigned char gate);
- // int cfg_D_image_width_height(int width, int height);
- // int get_D_prf(float *prf);
- // int get_D_sampling_gate(float *mm);
- // int get_D_speed_range(float *start, float *end);
- int set_freeze(unsigned char enable);
- int set_ctrl_table(unsigned char *table);
- int get_ctrl_table(unsigned char *table);
- //int set_post_level(unsigned char level);
- // int set_mirror(unsigned char mirror);
- // int set_debug_info(int enable);
- };
- #endif // RAMZED_SDK_H
|