|
|
|
|
|
/***************************************************************************************************
|
|
|
|
|
|
*
|
|
|
|
|
|
* <EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> (c) 2018<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD>
|
|
|
|
|
|
*
|
|
|
|
|
|
* <EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>MvInterfaceBoxDefine.h
|
|
|
|
|
|
* ժ Ҫ<EFBFBD><EFBFBD><EFBFBD>Ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>ļ<EFBFBD>
|
|
|
|
|
|
*
|
|
|
|
|
|
* <EFBFBD><EFBFBD> ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
*
|
|
|
|
|
|
***************************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/***************************************************************************************************
|
|
|
|
|
|
*
|
|
|
|
|
|
* Copyright: Copyright: Copyright (c) 2018 all rights reserved
|
|
|
|
|
|
*
|
|
|
|
|
|
* File name: MvInterfaceBoxDefine.h
|
|
|
|
|
|
* Abstract: Common definition header file of Visual controller
|
|
|
|
|
|
*
|
|
|
|
|
|
* Remarks: None
|
|
|
|
|
|
*
|
|
|
|
|
|
***************************************************************************************************/
|
|
|
|
|
|
#ifndef MV_IO_INTERFACE_BOX_DEFINE_H__
|
|
|
|
|
|
#define MV_IO_INTERFACE_BOX_DEFINE_H__
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef IN
|
|
|
|
|
|
#define IN
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef OUT
|
|
|
|
|
|
#define OUT
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#define MV_SERIAL_BUF_LEN 1024 //ch:<3A><><EFBFBD><EFBFBD>buffer<65><72><EFBFBD><EFBFBD> | en : Serial buffer length
|
|
|
|
|
|
|
|
|
|
|
|
#define MV_SERIAL_RECVBUF_MAXLEN (1024*1024) //ch:һ<><D2BB><EFBFBD>Խ<EFBFBD><D4BD>մ<EFBFBD><D5B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5><EFBFBD><EFBFBD><EFBFBD>ֵ | en:Max value of received data at one time
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
typedef enum MVCL_CTRL_TYPE__
|
|
|
|
|
|
{
|
|
|
|
|
|
CTRL_INPUT_LEVEL = 0x00, // ch:<3A><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>ڸߵ͵<DFB5>ƽ<EFBFBD><C6BD>Ϣ |en: Get high and low level information of input port
|
|
|
|
|
|
CTRL_RESET_PARAM = 0x01, // ch:<3A>ָ<EFBFBD>Ĭ<EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD>ֵ |en: Restore default parameter values
|
|
|
|
|
|
CTRL_VERSION_INFO = 0x02, // ch:<3A><>ȡ<EFBFBD>汾<EFBFBD><E6B1BE>Ϣ |en: Get vision information
|
|
|
|
|
|
CTRL_PATTERN_SET_INFO = 0x03, // ch:<3A><>ȡģʽ<C4A3><CABD>Ϣ |en: Get mode information
|
|
|
|
|
|
CTRL_INPUT_SET_INFO = 0x04, // ch:<3A><>ȡIO<49><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ |en: Get IO input port setting information
|
|
|
|
|
|
CTRL_OUTPUT_SET_INFO = 0x05, // ch:<3A><>ȡIO<49><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ |en: Get IO output port setting information
|
|
|
|
|
|
CTRL_LIGHT_SET_INFO = 0x06, // ch:<3A><>ȡ<EFBFBD><C8A1>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ |en: Get lighting settings information
|
|
|
|
|
|
CTRL_FILTER_SET_INFO = 0x07, // ch:<3A><>ȡ<EFBFBD>˲<EFBFBD><CBB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ |en: Get filter setting information
|
|
|
|
|
|
}MVCL_CTRL_TYPE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
|
*ch:<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>궨<EFBFBD><EFBFBD> en| Common macro definitions
|
|
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
const static unsigned int MV_IO_MAX_COM_NAME_LENGTH = 64; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><C6B3><EFBFBD> | en:Max serial port name length
|
|
|
|
|
|
const static unsigned int MV_IO_MAX_PROC_STATE_LEN = 64; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD> | en:Max upgrade state length
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
|
* ö<EFBFBD>ٶ<EFBFBD><EFBFBD><EFBFBD> | en: Enumeration definition
|
|
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
// ch:<3A>رմ<D8B1><D5B4><EFBFBD>Ĭ<EFBFBD>ϳ<EFBFBD>ʱʱ<CAB1><CAB1> en: Default timeout for closing serial port
|
|
|
|
|
|
#define CLOSE_SERIAL_DEFAULT_TIMEOUT 3000
|
|
|
|
|
|
|
|
|
|
|
|
/** @enum MV_IO_PATTERN_OUT
|
|
|
|
|
|
* @brief ch:<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽѡ<EFBFBD><EFBFBD> | en: Output mode selection
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef enum MV_IO_PATTERN_OUT__
|
|
|
|
|
|
{
|
|
|
|
|
|
MV_IO_PATTERN_PWM = 0x05, // PWM
|
|
|
|
|
|
MV_IO_PATTERN_SINGLE = 0x06, // SINGLE
|
|
|
|
|
|
} MV_IO_PATTERN_OUT;
|
|
|
|
|
|
|
|
|
|
|
|
/** @enum MV_IO_PORT_NUMBER
|
|
|
|
|
|
* @brief ch:Port<EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD> | en: port definition
|
|
|
|
|
|
* ch:<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>7<EFBFBD><EFBFBD>Port<EFBFBD>ھ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>7<EFBFBD><EFBFBD><EFBFBD>궨<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ | en:The eight port ports of input and output are represented by these seven macro definitions
|
|
|
|
|
|
* ch:<EFBFBD><EFBFBD>Ҫͬʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Port<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㣨<EFBFBD><EFBFBD><EFBFBD><EFBFBD>: MV_IO_PORT_1 | MV_IO_PORT_2<EFBFBD><EFBFBD>
|
|
|
|
|
|
* en: To enable the output of two port ports at the same time, the or operation can be performed(ex: MV_IO_PORT_1 | MV_IO_PORT_2)
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef enum MV_IO_PORT_NUMBER__
|
|
|
|
|
|
{
|
|
|
|
|
|
MV_IO_PORT_1 = 0x1, // ch:<3A>˿<EFBFBD>1 | en: port1
|
|
|
|
|
|
MV_IO_PORT_2 = 0x2, // ch:<3A>˿<EFBFBD>2 | en: port2
|
|
|
|
|
|
MV_IO_PORT_3 = 0x4, // ch:<3A>˿<EFBFBD>3 | en: port3
|
|
|
|
|
|
MV_IO_PORT_4 = 0x8, // ch:<3A>˿<EFBFBD>4 | en: port4
|
|
|
|
|
|
MV_IO_PORT_5 = 0x10, // ch:<3A>˿<EFBFBD>5 | en: port5
|
|
|
|
|
|
MV_IO_PORT_6 = 0x20, // ch:<3A>˿<EFBFBD>6 | en: port6
|
|
|
|
|
|
MV_IO_PORT_7 = 0x40, // ch:<3A>˿<EFBFBD>7 | en: port7
|
|
|
|
|
|
MV_IO_PORT_8 = 0x80, // ch:<3A>˿<EFBFBD>8 | en: port8
|
|
|
|
|
|
} MV_IO_PORT_NUMBER;
|
|
|
|
|
|
|
|
|
|
|
|
/** @enum MV_IO_EDGE_TYPE
|
|
|
|
|
|
* @brief ch:<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD>,<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>źŵĴ<EFBFBD><EFBFBD><EFBFBD> | en:Edge definition
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef enum MV_IO_EDGE_TYPE__
|
|
|
|
|
|
{
|
|
|
|
|
|
MV_IO_EDGE_UNKNOW = 0x00, // ch:δ֪ | en: Unknow
|
|
|
|
|
|
MV_IO_EDGE_RISING = 0x01, // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en: Rising edge
|
|
|
|
|
|
MV_IO_EDGE_FALLING = 0x02, // ch:<3A>½<EFBFBD><C2BD><EFBFBD> | en: Falling edge
|
|
|
|
|
|
} MV_IO_EDGE_TYPE;
|
|
|
|
|
|
|
|
|
|
|
|
/** @enum MV_IO_ENABLE_TYPE
|
|
|
|
|
|
* @brief ch:ʹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͷ<EFBFBD><EFBFBD>壬<EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><EFBFBD>ƴ<EFBFBD><EFBFBD><EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µĴ<EFBFBD><EFBFBD><EFBFBD> | en: Enable type definition, used to control the trigger in serial mode
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef enum MV_IO_ENABLE_TYPE__
|
|
|
|
|
|
{
|
|
|
|
|
|
MV_IO_ENABLE_START = 0x00, // ch:ʹ<>ܿ<EFBFBD>ʼ | en: Enable
|
|
|
|
|
|
MV_IO_ENABLE_END = 0x01, // ch:ʹ<>ܽ<EFBFBD><DCBD><EFBFBD> | en: Disable
|
|
|
|
|
|
} MV_IO_ENABLE_TYPE;
|
|
|
|
|
|
|
|
|
|
|
|
/** @enum MV_IO_LIGHTSTATE
|
|
|
|
|
|
* @brief ch:<EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en: Light states
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef enum MV_IO_LIGHTSTATE__
|
|
|
|
|
|
{
|
|
|
|
|
|
MV_IO_LIGHTSTATE_ON = 0x0001, // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Light on after triggering
|
|
|
|
|
|
MV_IO_LIGHTSTATE_OFF = 0x0002, // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Light off after triggering
|
|
|
|
|
|
} MV_IO_LIGHTSTATE;
|
|
|
|
|
|
|
|
|
|
|
|
// <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
|
|
|
typedef enum MVCL_MSG_TYPE__
|
|
|
|
|
|
{
|
|
|
|
|
|
MSG_TYPE_UNKNOW = 0x00, // ch:δ֪ | en:Unknow
|
|
|
|
|
|
MSG_TYPE_NORMAL = 0x02, // ch:<3A><>ʶ<EFBFBD><CAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD> | en:Normal
|
|
|
|
|
|
}MVCL_MSG_TYPE;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
|
* ch:<EFBFBD>ṹ<EFBFBD>嶨<EFBFBD><EFBFBD> | en:Struct definition
|
|
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_IO_SERIAL
|
|
|
|
|
|
* @brief ch:<EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD> | en:Serial param
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_IO_SERIAL__
|
|
|
|
|
|
{
|
|
|
|
|
|
char strComName[MV_IO_MAX_COM_NAME_LENGTH]; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Serial port name
|
|
|
|
|
|
unsigned int nReserved[8]; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD> | en:Reserve
|
|
|
|
|
|
} MV_IO_SERIAL;
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_IO_LIGHT_PARAM
|
|
|
|
|
|
* @brief ch:<EFBFBD><EFBFBD><EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Parameter setting of light source module
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_IO_LIGHT_PARAM__
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned char nPortNumber; // ch:<3A><><EFBFBD>ȶ˿<C8B6> | en:Light port
|
|
|
|
|
|
unsigned short nLightValue; // ch:<3A><>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD>ֵ(0-100֮<30><D6AE>) | en:Light value(0-100)
|
|
|
|
|
|
unsigned short nLightState; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dz<EFBFBD><C7B3><EFBFBD> | en:Light on or off after triggering
|
|
|
|
|
|
unsigned short nLightEdge; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><C2BD>ش<EFBFBD><D8B4><EFBFBD> | en:Rising or falling edge trigger
|
|
|
|
|
|
unsigned int nDurationTime; // ch:<3A><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> | en:Duration Time
|
|
|
|
|
|
unsigned int nReserved[3]; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD> | en:Reserved
|
|
|
|
|
|
} MV_IO_LIGHT_PARAM;
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_IO_ASSOCIATE_PARAM
|
|
|
|
|
|
* @brief ch:<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Input associated output port parameter setting
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_IO_ASSOCIATEPORT_PARAM__
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned short nInPortNum; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD> | en:Associated input port
|
|
|
|
|
|
unsigned short nOutPortNum; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿ڣ<CBBF>(PORT_1)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD>ſڣ<C5BF>(PORT_1 | PORT_2)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD>ź<EFBFBD>2<EFBFBD>ſڣ<C5BF>(<28>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
|
// en:Associated output port, (Port_ 1)For the associated port 1, (Port_ 1 | PORT_ 2) Represents the connection between port 1 and port 2, and so on
|
|
|
|
|
|
unsigned int nReserved[4]; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD> | en:Reserved
|
|
|
|
|
|
} MV_IO_ASSOCIATEPORT_PARAM;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_IO_OUTPUT_ENABLE
|
|
|
|
|
|
* @brief ch:<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD> | en:Set output enable
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_IO_OUTPUT_ENABLE__
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned char nPortNumber; // ʹ<>ܶ˿<DCB6>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD>ͬʱʹ<CAB1>ܿ<EFBFBD><DCBF><EFBFBD>ִ<EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD> | en:Enable port, if more than one port is enabled at the same time, it can perform or operation
|
|
|
|
|
|
unsigned char nType; // MV_IO_ENABLE_START <20><>ʾʹ<CABE>ܿ<EFBFBD>ʼ<EFBFBD><CABC>MV_IO_ENABLE_END<4E><44>ʾʹ<CABE>ܽ<EFBFBD><DCBD><EFBFBD> | en:en:MV_IO_ENABLE_START:start of enabling,MV_IO_ENABLE_END:end of enabling
|
|
|
|
|
|
unsigned int nReserved[4]; // <20><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD> | en:Reserved
|
|
|
|
|
|
} MV_IO_OUTPUT_ENABLE;
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_IO_INPUT_LEVEL
|
|
|
|
|
|
* @brief ch:<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ en: Input level
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_IO_INPUT_LEVEL__
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned char nPortNumber; // ch:<3A>˿ں<CBBF>,<2C>ο<EFBFBD>MV_IO_PORT_NUMBER | en: Port number.reference MV_IO_PORT_NUMBER
|
|
|
|
|
|
unsigned char nLevel0; // ch:1<>ſڵ<C5BF>ƽ<EFBFBD><C6BD>Ϣ |en:Level information of port1
|
|
|
|
|
|
unsigned char nLevel1; // ch:2<>ſڵ<C5BF>ƽ<EFBFBD><C6BD>Ϣ |en:Level information of port2
|
|
|
|
|
|
unsigned char nLevel2; // ch:3<>ſڵ<C5BF>ƽ<EFBFBD><C6BD>Ϣ |en:Level information of port3
|
|
|
|
|
|
unsigned char nLevel3; // ch:4<>ſڵ<C5BF>ƽ<EFBFBD><C6BD>Ϣ |en:Level information of port4
|
|
|
|
|
|
unsigned char nLevel4; // ch:5<>ſڵ<C5BF>ƽ<EFBFBD><C6BD>Ϣ |en:Level information of port5
|
|
|
|
|
|
unsigned char nLevel5; // ch:6<>ſڵ<C5BF>ƽ<EFBFBD><C6BD>Ϣ |en:Level information of port6
|
|
|
|
|
|
unsigned char nLevel6; // ch:7<>ſڵ<C5BF>ƽ<EFBFBD><C6BD>Ϣ |en:Level information of port7
|
|
|
|
|
|
unsigned char nLevel7; // ch:8<>ſڵ<C5BF>ƽ<EFBFBD><C6BD>Ϣ |en:Level information of port8
|
|
|
|
|
|
unsigned int nReserved[8]; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD> | en:Reserved
|
|
|
|
|
|
}MV_IO_INPUT_LEVEL;
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_IO_INPUT_EDGE
|
|
|
|
|
|
* @brief ch:<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD>͵Ľṹ<EFBFBD><EFBFBD> | en:Detects the structure of the input along the information type
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_IO_INPUT_EDGE_TYPE__
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned char nPortNumber; // ch:<3A>˿ں<CBBF> | en:Port number
|
|
|
|
|
|
unsigned short nTriggerTimes; // ch:<3A><>Ӧ<EFBFBD>˿ڴ<CBBF><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Trigger times of corresponding port
|
|
|
|
|
|
enum MV_IO_EDGE_TYPE enEdgeType; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Trigger edge type
|
|
|
|
|
|
unsigned int nReserved[8]; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD> | en:Reserved
|
|
|
|
|
|
}MV_IO_INPUT_EDGE_TYPE;
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_IO_VERSION
|
|
|
|
|
|
* @brief ch:SDK<EFBFBD>汾<EFBFBD><EFBFBD> | en:SDK vision
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_IO_VERSION__
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned int nMainVersion; // ch:<3A><><EFBFBD>汾<EFBFBD><E6B1BE> | en:Major version
|
|
|
|
|
|
unsigned int nSubVersion; // ch:<3A>ΰ汾<CEB0><E6B1BE> | en:Minor version
|
|
|
|
|
|
unsigned int nModifyVersion; // ch:<3A><EFBFBD><DEB6>汾<EFBFBD><E6B1BE> | en:Revision
|
|
|
|
|
|
unsigned int nYear; // ch:<3A><> | en:Year
|
|
|
|
|
|
unsigned int nMonth; // ch:<3A><> | en:month
|
|
|
|
|
|
unsigned int nDay; // ch:<3A><> | en:date
|
|
|
|
|
|
unsigned int nReserved[8]; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD> | en:Reserved
|
|
|
|
|
|
}MV_IO_VERSION;
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_IO_SET_INPUT
|
|
|
|
|
|
* @brief ch:<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Input port setting
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_IO_SET_INPUT__
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned int nPort; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD> | Input port
|
|
|
|
|
|
unsigned int nEnable; // ch:ʹ<><CAB9>״̬<D7B4><CCAC>1<EFBFBD><31>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30>ʾ<EFBFBD>ر<EFBFBD> | en:Enable state, 1 is on, 0 is off
|
|
|
|
|
|
unsigned int nEdge; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Trigger edge
|
|
|
|
|
|
unsigned int nDelayTime; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD> | en:Trigger delay
|
|
|
|
|
|
unsigned int nGlitch; // ch:ȥ<><C8A5>ʱ<EFBFBD><CAB1> | en:Debounce time
|
|
|
|
|
|
unsigned int nReserved[8]; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD> | en:Reserved
|
|
|
|
|
|
}MV_IO_SET_INPUT;
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_IO_SET_OUTPUT
|
|
|
|
|
|
* @brief ch:<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Output port setting
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_IO_SET_OUTPUT__
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned int nPort; // <20><><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD> | en:Output port
|
|
|
|
|
|
unsigned int nType; // <20><><EFBFBD><EFBFBD>ģʽ(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ<C4A3><CABD>PWMģʽ) | en:Output mode(Single pulse and PWM mode )
|
|
|
|
|
|
unsigned int nPulseWidth; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Pulse width
|
|
|
|
|
|
unsigned int nPulsePeriod; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Pulse period
|
|
|
|
|
|
unsigned int nDurationTime; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> | en:Pulse duration
|
|
|
|
|
|
unsigned int nValidLevel; // <20><>Ч<EFBFBD><D0A7>ƽ<EFBFBD><C6BD>1<EFBFBD><31>ʾ<EFBFBD>ߵ<EFBFBD>ƽ<EFBFBD><C6BD>0<EFBFBD><30>ʾ<EFBFBD>͵<EFBFBD>ƽ | en:Effective level, 1 is high level, 0 is low level
|
|
|
|
|
|
unsigned int nReserved[8]; // <20><><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD> | en:Reserved
|
|
|
|
|
|
}MV_IO_SET_OUTPUT;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_IO_LOCAL_UPGRADE
|
|
|
|
|
|
* @brief ch:<EFBFBD>̼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬ | en:Firmware upgrade status
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_IO_LOCAL_UPGRADE__
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned int nProcPercent; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en:Upgrade progress
|
|
|
|
|
|
char chProcState[MV_IO_MAX_PROC_STATE_LEN]; // ch:<3A><><EFBFBD><EFBFBD>״̬ | en:Upgrade status
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int nReserved[8]; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD> | en:Reserved
|
|
|
|
|
|
}MV_IO_LOCAL_UPGRADE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD> | en:Detection level callback function
|
|
|
|
|
|
typedef void (__stdcall* DetectFunType)(void *, MV_IO_INPUT_EDGE_TYPE*, void*);
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_SERIAL_DEVICE
|
|
|
|
|
|
* @brief ch: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸 en: serial device
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_SERIAL_DEVICE_
|
|
|
|
|
|
{
|
|
|
|
|
|
void* pMvSerial; // <20><><EFBFBD>ھ<EFBFBD><DABE><EFBFBD>
|
|
|
|
|
|
DetectFunType pCallbackFun; // <20>ؼ<EFBFBD><D8BC>⺯<EFBFBD><E2BAAF>
|
|
|
|
|
|
void* hCallBackThreadHandle; // <20>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
unsigned int bCallbackRunning; // <20>жϻص<CFBB><D8B5>߳<EFBFBD><DFB3>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>
|
|
|
|
|
|
void* hSerialRecvThreadHandle; // <20><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳̾<DFB3><CCBE><EFBFBD>
|
|
|
|
|
|
unsigned int bSerialRecvRunning; // <20>жϴ<D0B6><CFB4><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
char nReserved[32]; // <20><><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD>
|
|
|
|
|
|
}MV_SERIAL_DEVICE;
|
|
|
|
|
|
|
|
|
|
|
|
/** @struct MV_SERIAL_DATA
|
|
|
|
|
|
* @brief ch: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en: serial Data
|
|
|
|
|
|
*/
|
|
|
|
|
|
typedef struct MV_SERIAL_DATA_
|
|
|
|
|
|
{
|
|
|
|
|
|
unsigned int bUsed; // ch:<3A><>־λ<D6BE><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9> | en:Flag bit, whether the data is used or not
|
|
|
|
|
|
MVCL_MSG_TYPE nType; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | en: Data type
|
|
|
|
|
|
unsigned int nRecvLen; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD> | en:Received data length
|
|
|
|
|
|
double fRecvTime; // ch:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> | en:Received data time
|
|
|
|
|
|
char* pSerialRecvBuf; // ch:<3A><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD> | en:Data received
|
|
|
|
|
|
char* pInitRecvBuf; // ch:<3A><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD> | en:Initial data
|
|
|
|
|
|
}MV_SERIAL_DATA;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|