📄 lv2000.h
字号:
#ifndef LV2000_H
#define LV2000_H
// The following set of constants can be used in LvSendCmd(), LvSendCmdEx() functions
// The 4. byte is camera ID - by default it is 0;
// use the bitwise OR operator or PLUS operator to add camera ID
// Note that for commands, which require additional values to be send,
// the LvSendByteCmdEx() function is more suitable instead of LvSendCmdEx()
// The constants for this function are listed in section below.
// Adjust Exposure Mode command
#define LV_SET_EXPOMODE_AUTO 0xAA600000 // Set exposure mode to AUTO
#define LV_SET_EXPOMODE_SHUTTER 0xAA600100 // Set exposure mode to SHUTTER ADJ (Iris, AGC remains AUTO)
#define LV_SET_EXPOMODE_IRIS 0xAA600200 // Set exposure mode to IRIS ADJ (Shutter, AGC remains AUTO)
#define LV_SET_EXPOMODE_AGC 0xAA600300 // Set exposure mode to AGC ADJ (Shutter, Iris remains AUTO)
#define LV_SET_EXPOMODE_MANUAL 0xAA600400 // Set exposure mode to MANUAL
// Backlight
#define LV_GET_BACKLIGHT 0xAA610000 // Get Backlight level
// White Balance
#define LV_SET_WB_AUTO 0xAA650000 // Set White Balance mode to AUTO
#define LV_SET_WB_SPECIAL 0xAA650100 // Set White Balance mode to SPECIAL
#define LV_SET_WB_INDOOR 0xAA650200 // Set White Balance mode to INDOOR
#define LV_SET_WB_OUTDOOR 0xAA650300 // Set White Balance mode to OUTDOOR
#define LV_SET_WB_MANUAL 0xAA650400 // Set White Balance mode to MANUAL
#define LV_SET_WB_PUSHAUTO 0xAA650500 // Set White Balance mode to PUSH AUTO
// Display Camera ID ON/OFF
#define LV_TOGGLE_DISPLAY_ID 0xAA6A0000 // Toggle the Camera ID Display ON/OFF
// Iris Area Weighting Value
#define LV_GET_IRIS_WEIGHT 0xAA6B0000 // Get Iris Area Weighting value
//#define LV_SET_IRIS_WEIGHT 0xAA6C0000 // Set Iris Area Weighting value in 3rd byte
// Zoom Lens Position
#define LV_GET_ZOOM_POS 0x36000000 // Get Zoom Lens Position
// Focus Lens Position
#define LV_GET_FOCUS_POS 0x37000000 // Get Focus Lens Position
#define LV_FOCUS_AUTO 0xAA580000 // Set Auto Focus (undocumented by the manufacturer)
#define LV_FOCUS_MANUAL 0xAA590000 // Set Manual Focus (undocumented by the manufacturer)
// Camera Power ON/OFF
#define LV_SET_POWER_ON 0x3A000000 // Camera Power ON
#define LV_SET_POWER_OFF 0x3E000000 // Camera Power OFF
// Preset: Memorize Zoom, Focus, Digital zoom
#define LV_SET_PRESET_0 0x4D000000
#define LV_SET_PRESET_1 0x4D010000
#define LV_SET_PRESET_2 0x4D020000
#define LV_SET_PRESET_3 0x4D030000
#define LV_SET_PRESET_4 0x4D040000
#define LV_SET_PRESET_5 0x4D050000
#define LV_SET_PRESET_6 0x4D060000
#define LV_SET_PRESET_7 0x4D070000
// Reset of microcontroller of the camera
#define LV_RESTART 0x4F000000 // Reset the camera's microcontroller
// Digital Zoom Power from 2x to 8x
#define LV_SET_DIGIZOOM_POWER_2 0x52000000 // Set Digital Zoom max. power to 2x (total 32x)
#define LV_SET_DIGIZOOM_POWER_3 0x52010000 // Set Digital Zoom max. power to 3x (total 48x)
#define LV_SET_DIGIZOOM_POWER_4 0x52020000 // Set Digital Zoom max. power to 4x (total 64x)
#define LV_SET_DIGIZOOM_POWER_5 0x52030000 // Set Digital Zoom max. power to 5x (total 80x)
#define LV_SET_DIGIZOOM_POWER_6 0x52040000 // Set Digital Zoom max. power to 6x (total 96x)
#define LV_SET_DIGIZOOM_POWER_7 0x52050000 // Set Digital Zoom max. power to 7x (total 112x)
#define LV_SET_DIGIZOOM_POWER_8 0x52060000 // Set Digital Zoom max. power to 8x (total 128x)
// Set camera ID
#define LV_GET_CAMERA_ID 0xCC000000
// Constants than can be used in LvSendByteCmd(), LvSendByteCmdEx() functions
#define LV_SET_BACKLIGHT_B1 0xAA
#define LV_SET_BACKLIGHT_B2 0x62
#define LV_SET_IRIS_WEIGHT_B1 0xAA
#define LV_SET_IRIS_WEIGHT_B2 0x6C
#define LV_MEMORIZE_ZOOM_B1 0x49
#define LV_MEMORIZE_FOCUS_B1 0x4A
#define LV_MEMORIZE_DIGIZOOM_B1 0x4B
#define LV_SET_PRESET_B1 0x4D
#define LV_SET_CAMERA_ID_B1 0x78
// Key Actions
// Each Key command must be stopped by the LV_KEY_STOP command
// Stop, reset
#define LV_KEY_NOT 0x5F000000 // Do not do anything
#define LV_KEY_STOP 0x5F0C0000 // Stop all key actions being performed
#define LV_KEY_RESET_SETTINGS 0x5F520000 // Reset the camera mode to default
// Zoom
#define LV_KEY_ZOOM_TELE 0x5F010000 // Zoom to Tele
#define LV_KEY_ZOOM_TELE_QUICK 0x5F020000 // Zoom to Tele quickly
#define LV_KEY_ZOOM_WIDE 0x5F030000 // Zoom to Wide
#define LV_KEY_ZOOM_WIDE_QUICK 0x5F040000 // Zoom to Wide quickly
#define LV_KEY_TOGGLE_DIGIZOOM 0x5F220000 // Toggle Digital Zoom mode ON/OFF
// Focus
#define LV_KEY_FOCUS_FAR_QUICK 0x5F080000 // Move focus to far quickly
#define LV_KEY_FOCUS_NEAR_QUICK 0x5F090000 // Move focus to near quickly
#define LV_KEY_FOCUS_FAR 0x5F380000 // Move focus to far slowly
#define LV_KEY_FOCUS_NEAR 0x5F390000 // Move focus to near slowly
#define LV_KEY_FOCUS_FAR_STEP 0x5F0A0000 // Move focus to far by one step
#define LV_KEY_FOCUS_NEAR_STEP 0x5F0B0000 // Move focus to near by one step
#define LV_KEY_TOGGLE_FOCUS_MODE 0x5F510000 // Toggle between "Manual/Auto" and "Push Auto" modes
#define LV_KEY_FOCUS_PUSH_AUTO 0x5F3F0000 // In Push Auto mode, push the focus
// In Manual/Auto, toggle between Manual/Auto
// Shutter, Iris, AGC
#define LV_KEY_SHUTTER_UP 0x5F400000 // Increase shutter speed
#define LV_KEY_SHUTTER_DN 0x5F410000 // Decrease shutter speed
#define LV_KEY_IRIS_UP 0x5F420000 // Increase iris
#define LV_KEY_IRIS_DN 0x5F430000 // Decrease iris
#define LV_KEY_AGC_UP 0x5F440000 // Increase AGC level
#define LV_KEY_AGC_DN 0x5F450000 // Decrease AGC level
// Brightness, Hue
#define LV_KEY_BRIGHTNESS_UP 0x5F460000 // Increase brightness
#define LV_KEY_BRIGHTNESS_DN 0x5F470000 // Decrease brightness
#define LV_KEY_HUE_UP 0x5F4C0000 // Increase hue
#define LV_KEY_HUE_DN 0x5F4D0000 // Decrease hue
// Sharpness
#define LV_KEY_SHARPNESS_UP 0x5F530000 // Increase sharpness level
#define LV_KEY_SHARPNESS_DN 0x5F540000 // Decrease sharpness level
// White balance
#define LV_KEY_WB_RED_UP 0x5F480000 // Increase red level in special WB mode
#define LV_KEY_WB_RED_DN 0x5F490000 // Decrease red level in special WB mode
#define LV_KEY_WB_BLUE_UP 0x5F4A0000 // Increase blue level in special WB mode
#define LV_KEY_WB_BLUE_DN 0x5F4B0000 // Decrease blue level in special WB mode
#define LV_KEY_TOGGLE_PUSH_WB 0x5F4E0000 // Toggle Push White Balance mode ON/OFF
// Menu
#define LV_KEY_MENU_SEL_UP 0x5F4F0000 // Scroll the menu selection up
#define LV_KEY_MENU_SEL_DN 0x5F500000 // Scroll the menu selection down
#define LV_KEY_MENU_DATA_UP 0x5F270000 // Increase the data of the selected menu item
#define LV_KEY_MENU_DATA_DN 0x5F280000 // Decrease the data of the selected menu item
#define LV_KEY_TOGGLE_MENU 0x5F250000 // Toggle Menu ON/OFF
// Other
#define LV_KEY_TOGGLE_BACKLIGHT 0x5F1A0000 // Toggle Backlight mode ON/OFF
#define LV_KEY_TOGGLE_FLICKERLESS 0x5F1B0000 // Toggle Flickerless mode ON/OFF
#define LV_KEY_TOGGLE_NEGATIVE 0x5F1E0000 // Toggle Negative mode ON/OFF
#define LV_KEY_TOGGLE_MONO 0x5F210000 // Toggle Monochrome mode ON/OFF
#define LV_KEY_TOGGLE_DISPLAY 0x5F240000 // Toggle On Screen Display (OSD) Key function ON/OFF
#define LV_KEY_TOGGLE_POWER 0x5F320000 // Toggle camera power ON/OFF
#ifdef __cplusplus
extern "C" {
#endif
DWORD WINAPI LvCloseComm ();
DWORD WINAPI LvOpenComm (BYTE ucCommPort);
DWORD WINAPI LvSendByteCmd (BYTE ucSend1, BYTE ucSend2,
BYTE ucSend3, BYTE ucCameraID);
DWORD WINAPI LvSendByteCmdEx (BYTE ucSend1, BYTE ucSend2,
BYTE ucSend3, BYTE ucCameraID,
BYTE* pucReturn1, BYTE* pucReturn2,
BYTE* pucReturn3, BYTE* pucReturn4);
DWORD WINAPI LvSendCmd (DWORD dwCmd);
DWORD WINAPI LvSendCmdEx (DWORD dwCmd,
BYTE* pucReturn1, BYTE* pucReturn2,
BYTE* pucReturn3, BYTE* pucReturn4);
DWORD WINAPI LvSendCmdWithStop (DWORD dwCmd);
DWORD WINAPI LvGetFocusLensPos (WORD* pwFocus, BYTE ucCameraID);
DWORD WINAPI LvGetZoomLensPos (WORD * pwZoom, BYTE* pucDigiZoom,
BYTE ucCameraID);
DWORD WINAPI LvMemorizeZoom (BYTE ucIndex, WORD wZoom,
BYTE ucCameraID);
DWORD WINAPI LvMemorizeFocus (BYTE ucIndex, WORD wFocus,
BYTE ucCameraID);
DWORD WINAPI LvGetIrisWeight (BYTE* pucIrisWeight1,
BYTE* pucIrisWeight2,
BYTE ucCameraID);
DWORD WINAPI LvSetIrisWeight (BYTE ucIrisWeight1,
BYTE ucIrisWeight2,
BYTE CameraID);
void WINAPI LvControlDlg (int iComPort, int iCameraId);
void WINAPI LvControlDlgEx (int iComPort, int iCameraId,
int iLeft, int iTop);
#ifdef __cplusplus
}
#endif
#endif // _LV2000_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -