#include "KSJApiUserZone.h"数据结构 | |
| struct | _tagUSBCmd |
宏定义 | |
| #define | KSJ_API __declspec(dllimport) |
类型定义 | |
| typedef struct _tagUSBCmd | USBCMD |
| typedef struct _tagUSBCmd * | PUSBCMD |
函数 | |
| KSJ_API int __stdcall | KSJ_VendorCmd (int nIndex, PUSBCMD pUsbCmd, unsigned char *pBuf) |
| KSJ_API int __stdcall | KSJ_WrSensorReg (int nIndex, unsigned char btRegAddress, unsigned short wValue) |
| KSJ_API int __stdcall | KSJ_RdSensorReg (int nIndex, unsigned char btRegAddress, unsigned short *pwValue) |
| KSJ_API int __stdcall | KSJ_WrSensorRegX (int nIndex, unsigned short wRegAdress, unsigned short wValue) |
| KSJ_API int __stdcall | KSJ_RdSensorRegX (int nIndex, unsigned short wRegAdress, unsigned short *pwValue) |
| KSJ_API int __stdcall | KSJ_FrameRestart (int nIndex) |
| KSJ_API int __stdcall | KSJ_WrFpgaReg (int nIndex, unsigned char btRegAddress, unsigned short wValue) |
| 当曝光改变后无法立刻生效时,需调用此函数。 | |
| KSJ_API int __stdcall | KSJ_RdFpgaReg (int nIndex, unsigned char btRegAddress, unsigned short *pwValue) |
| KSJ_API int __stdcall | KSJ_ResetFpga (int nIndex, bool bReset) |
| KSJ_API int __stdcall | KSJ_WrFx2Sfr (int nIndex, unsigned short uRegAdress, unsigned char btValue) |
| KSJ_API int __stdcall | KSJ_RdFx2Sfr (int nIndex, unsigned short uRegAdress, unsigned char *pbtValue) |
| KSJ_API int __stdcall | KSJ_WrFx2Reg (int nIndex, unsigned short uRegAdress, unsigned char btValue) |
| KSJ_API int __stdcall | KSJ_RdFx2Reg (int nIndex, unsigned short uRegAdress, unsigned char *pbtValue) |
| KSJ_API int __stdcall | KSJ_ResetFx2 (int nIndex, bool bReset) |
| KSJ_API int __stdcall | KSJ_WrAD9923A (int nIndex, unsigned short wRegAddress, unsigned long dwValue) |
| KSJ_API int __stdcall | KSJ_WrTMP101 (int nIndex, unsigned char btRegAddress, unsigned short wValue) |
| KSJ_API int __stdcall | KSJ_RdTMP101 (int nIndex, unsigned char btRegAddress, unsigned short *pwValue) |
| KSJ_API int __stdcall | KSJ_ResetDevice (int nIndex) |
| KSJ_API int __stdcall | KSJ_ReconnectDevice (int nIndex) |
| KSJ_API int __stdcall | KSJ_ResetHost (int nIndex) |
| KSJ_API int __stdcall | KSJ_CancelIo (int nIndex) |
| KSJ_API int __stdcall | KSJ_RebootDevice (int nIndex) |
| KSJ_RebootDevice. | |
| KSJ_API int __stdcall | KSJ_RecoverDevice (int nIndex) |
| KSJ_API int __stdcall | KSJ_Open (int nIndex) |
| 只是简单的打开相机,此相机必须已经创建。 | |
| KSJ_API int __stdcall | KSJ_Close (int nIndex) |
| 只是简单的关闭相机,不会销毁已经创建的相机对象。 | |
| KSJ_API int __stdcall | KSJ_ClearFeature (int nIndex) |
| KSJ_API int __stdcall | KSJ_ResetPipe (int nIndex) |
| KSJ_API int __stdcall | KSJ_UsbHostResetDevice (int nIndex) |
| KSJ_API int __stdcall | KSJ_WorkingModeProgram (int nIndex, unsigned short wValue) |
| KSJ_API int __stdcall | KSJ_WorkingModeReadout (int nIndex, unsigned short *pValue) |
| KSJ_API int __stdcall | KSJ_WorkingModeExProgram (int nIndex, unsigned short wValue) |
| KSJ_API int __stdcall | KSJ_WorkingModeExReadout (int nIndex, unsigned short *pValue) |
| KSJ_API int __stdcall | KSJ_ColorModeProgram (int nIndex, unsigned short wValue) |
| KSJ_API int __stdcall | KSJ_ColorModeReadout (int nIndex, unsigned short *pValue) |
| KSJ_API int __stdcall | KSJ_SerialsDescProgram (int nIndex, unsigned char btDesc[16]) |
| KSJ_API int __stdcall | KSJ_HardwareVersionProgram (int nIndex, unsigned char btVersion[64]) |
| #define KSJ_API __declspec(dllimport) |
| typedef struct _tagUSBCmd USBCMD |
该头文件内的接口函数为凯视佳内部相机调试接口,不能提供给客户使用 如果不正确使用这些接口,可能会造成相机采图出现问题,甚至造成相机损坏 发送控制命令,各字节符合USB协议 MSB( IoBlockEx.uOffset ) = SETUPDAT[3], LSB( IoBlockEx.uOffset ) = SETUPDAT[2] MSB( IoBlockEx.uIndex ) = SETUPDAT[5], LSB( IoBlockEx.uIndex ) = SETUPDAT[4] MSB( IoBlockEx.uLength ) = SETUPDAT[7], LSB( IoBlockEx.uLength ) = SETUPDAT[6] wValue = uOffset wIndex = uIndex wLength = uLength
| typedef struct _tagUSBCmd * PUSBCMD |
| KSJ_API int __stdcall KSJ_VendorCmd | ( | int | nIndex, | |
| PUSBCMD | pUsbCmd, | |||
| unsigned char * | pBuf | |||
| ) |
| KSJ_API int __stdcall KSJ_WrSensorReg | ( | int | nIndex, | |
| unsigned char | btRegAddress, | |||
| unsigned short | wValue | |||
| ) |
参考“凯视佳工业相机内部API函数说明书” 单次读写字节数必须不大于64字节
| KSJ_API int __stdcall KSJ_RdSensorReg | ( | int | nIndex, | |
| unsigned char | btRegAddress, | |||
| unsigned short * | pwValue | |||
| ) |
| KSJ_API int __stdcall KSJ_WrSensorRegX | ( | int | nIndex, | |
| unsigned short | wRegAdress, | |||
| unsigned short | wValue | |||
| ) |
| KSJ_API int __stdcall KSJ_RdSensorRegX | ( | int | nIndex, | |
| unsigned short | wRegAdress, | |||
| unsigned short * | pwValue | |||
| ) |
| KSJ_API int __stdcall KSJ_FrameRestart | ( | int | nIndex | ) |
| KSJ_API int __stdcall KSJ_WrFpgaReg | ( | int | nIndex, | |
| unsigned char | btRegAddress, | |||
| unsigned short | wValue | |||
| ) |
当曝光改变后无法立刻生效时,需调用此函数。
| KSJ_API int __stdcall KSJ_RdFpgaReg | ( | int | nIndex, | |
| unsigned char | btRegAddress, | |||
| unsigned short * | pwValue | |||
| ) |
| KSJ_API int __stdcall KSJ_ResetFpga | ( | int | nIndex, | |
| bool | bReset | |||
| ) |
| KSJ_API int __stdcall KSJ_WrFx2Sfr | ( | int | nIndex, | |
| unsigned short | uRegAdress, | |||
| unsigned char | btValue | |||
| ) |
| KSJ_API int __stdcall KSJ_RdFx2Sfr | ( | int | nIndex, | |
| unsigned short | uRegAdress, | |||
| unsigned char * | pbtValue | |||
| ) |
| KSJ_API int __stdcall KSJ_WrFx2Reg | ( | int | nIndex, | |
| unsigned short | uRegAdress, | |||
| unsigned char | btValue | |||
| ) |
| KSJ_API int __stdcall KSJ_RdFx2Reg | ( | int | nIndex, | |
| unsigned short | uRegAdress, | |||
| unsigned char * | pbtValue | |||
| ) |
| KSJ_API int __stdcall KSJ_ResetFx2 | ( | int | nIndex, | |
| bool | bReset | |||
| ) |
| KSJ_API int __stdcall KSJ_WrAD9923A | ( | int | nIndex, | |
| unsigned short | wRegAddress, | |||
| unsigned long | dwValue | |||
| ) |
| KSJ_API int __stdcall KSJ_WrTMP101 | ( | int | nIndex, | |
| unsigned char | btRegAddress, | |||
| unsigned short | wValue | |||
| ) |
| KSJ_API int __stdcall KSJ_RdTMP101 | ( | int | nIndex, | |
| unsigned char | btRegAddress, | |||
| unsigned short * | pwValue | |||
| ) |
| KSJ_API int __stdcall KSJ_ResetDevice | ( | int | nIndex | ) |
| KSJ_API int __stdcall KSJ_ReconnectDevice | ( | int | nIndex | ) |
| KSJ_API int __stdcall KSJ_ResetHost | ( | int | nIndex | ) |
| KSJ_API int __stdcall KSJ_CancelIo | ( | int | nIndex | ) |
| KSJ_API int __stdcall KSJ_RebootDevice | ( | int | nIndex | ) |
KSJ_RebootDevice.
-----------------------------------------------------------------------------
重启相机,相机将会重新启动,重新和主机建立USB连接
| nIndex | [in] 相机索引(从0开始,最大索引数为:连接到主机的相机数目减一) |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJ_RecoverDevice | ( | int | nIndex | ) |
| KSJ_API int __stdcall KSJ_Open | ( | int | nIndex | ) |
只是简单的打开相机,此相机必须已经创建。
| KSJ_API int __stdcall KSJ_Close | ( | int | nIndex | ) |
只是简单的关闭相机,不会销毁已经创建的相机对象。
| KSJ_API int __stdcall KSJ_ClearFeature | ( | int | nIndex | ) |
| KSJ_API int __stdcall KSJ_ResetPipe | ( | int | nIndex | ) |
| KSJ_API int __stdcall KSJ_UsbHostResetDevice | ( | int | nIndex | ) |
| KSJ_API int __stdcall KSJ_WorkingModeProgram | ( | int | nIndex, | |
| unsigned short | wValue | |||
| ) |
| KSJ_API int __stdcall KSJ_WorkingModeReadout | ( | int | nIndex, | |
| unsigned short * | pValue | |||
| ) |
| KSJ_API int __stdcall KSJ_WorkingModeExProgram | ( | int | nIndex, | |
| unsigned short | wValue | |||
| ) |
| KSJ_API int __stdcall KSJ_WorkingModeExReadout | ( | int | nIndex, | |
| unsigned short * | pValue | |||
| ) |
| KSJ_API int __stdcall KSJ_ColorModeProgram | ( | int | nIndex, | |
| unsigned short | wValue | |||
| ) |
| KSJ_API int __stdcall KSJ_ColorModeReadout | ( | int | nIndex, | |
| unsigned short * | pValue | |||
| ) |
| KSJ_API int __stdcall KSJ_SerialsDescProgram | ( | int | nIndex, | |
| unsigned char | btDesc[16] | |||
| ) |
| KSJ_API int __stdcall KSJ_HardwareVersionProgram | ( | int | nIndex, | |
| unsigned char | btVersion[64] | |||
| ) |