| | |
| | | |
| | | #include "capabilities/capa.h" |
| | | |
| | | #define USERNAME "On_admin" |
| | | #define PASSWORD "a12345678" |
| | | |
| | | #define HK_IDS_2DE 1 |
| | | |
| | | #if defined(HK_IDS_2DE) |
| | |
| | | #define MIN_TOUR_TIME 15 |
| | | #define MIN_TOUR_POS 2 |
| | | |
| | | #define WT_TIME 5 |
| | | #define STOP_WT_TIME 3 |
| | | |
| | | #define MAX_IMG_SCALE 0.5 |
| | | |
| | | #define PI 3.14159 |
| | |
| | | #define COEF_FV_A 0.953 |
| | | #define COEF_FV_B 0.598 |
| | | #define COEF_FV_C 0.166 |
| | | |
| | | #define ENABLE 0 |
| | | #define DISABLE 1 |
| | | |
| | | /*PTZ working stat*/ |
| | | enum PTZStat { |
| | |
| | | PTZ_CMD_RIGHTDOWN, |
| | | PTZ_CMD_ZOOM_IN, |
| | | PTZ_CMD_ZOOM_OUT, |
| | | PTZ_CMD_FOCUS_IN, |
| | | PTZ_CMD_FOCUS_OUT, |
| | | PTZ_CMD_FOCUS_STOP, |
| | | }; |
| | | |
| | | /*the tradditional preset control command*/ |
| | |
| | | |
| | | struct tagCapabilities capa; |
| | | |
| | | struct tagProfile *profilesToken; |
| | | struct tagProfile *profiles; |
| | | |
| | | PresetToure_node *posNode; |
| | | int posNode_count; |
| | |
| | | |
| | | /*the touring process work stat*/ |
| | | char proc_stat; |
| | | |
| | | char ip[PROTO_ADDRESS_SIZE]; |
| | | |
| | | enum tourType tour_type; |
| | | |
| | |
| | | |
| | | int proto_PTZPreset(PtzDevs *DevData, const char *posName, enum PreSetCMD cmd, \ |
| | | int *posToken, const char *username, const char *passwd); |
| | | int proto_PTZ_ImagingSet(PtzDevs *DevData, float speed, const char *username, const char *passwd); |
| | | int proto_PTZ_ImagingSet(PtzDevs *DevData, enum PTZCMD cmd, float speed, const char *username, const char *passwd); |
| | | |
| | | static void *task_preset_touring(void *arg); |
| | | float proto_PTZZoom_get(PtzDevs *DevData, int x0, int y0, int x1, int y1); |
| | |
| | | void proto_PTZWaitStopped(PtzDevs *DevData, const char *username, const char *passwd); |
| | | void proto_PTZPreset_tour_stop(PtzDevs *DevData); |
| | | |
| | | static void timer_handler(union sigval para); |
| | | static int timer_init(timer_t *timer_index); |
| | | static int timer_start(timer_t timer_index, int sec); |
| | | static int timer_stop(timer_t timer_index); |
| | | static int timer_destroy(timer_t timer_index); |
| | | static void ptz_timer_handler(union sigval para); |
| | | |
| | | #ifdef __cplusplus |
| | | } |