622 lines
14 KiB
C#
622 lines
14 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace a8sdk
|
|
{
|
|
public class A8SDK
|
|
{
|
|
// 结构体定义
|
|
public struct AreaPos
|
|
{
|
|
public int enable;
|
|
public int x;
|
|
public int y;
|
|
public int width;
|
|
public int height;
|
|
}
|
|
|
|
public struct SpotPos
|
|
{
|
|
public int enable;
|
|
public int x;
|
|
public int y;
|
|
}
|
|
|
|
public struct LinePos
|
|
{
|
|
public int enable;
|
|
public int sta_x;
|
|
public int sta_y;
|
|
public int end_x;
|
|
public int end_y;
|
|
}
|
|
|
|
public struct ImagePos
|
|
{
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
|
public AreaPos[] area;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
|
public SpotPos[] spot;
|
|
public LinePos line;
|
|
}
|
|
|
|
public struct AreaTemp
|
|
{
|
|
public int enable;
|
|
public int max_temp;
|
|
public int max_temp_x;
|
|
public int max_temp_y;
|
|
public int min_temp;
|
|
public int min_temp_x;
|
|
public int min_temp_y;
|
|
public int ave_temp;
|
|
}
|
|
|
|
public struct SpotTemp
|
|
{
|
|
public int enable;
|
|
public int temp;
|
|
}
|
|
|
|
public struct LineTemp
|
|
{
|
|
public int enable;
|
|
public int max_temp;
|
|
public int max_temp_x;
|
|
public int max_temp_y;
|
|
public int min_temp;
|
|
public int min_temp_x;
|
|
public int min_temp_y;
|
|
public int ave_temp;
|
|
}
|
|
|
|
public struct GlobaTemp
|
|
{
|
|
public int max_temp;
|
|
public int max_temp_x;
|
|
public int max_temp_y;
|
|
public int min_temp;
|
|
public int min_temp_x;
|
|
public int min_temp_y;
|
|
}
|
|
|
|
public struct ImageTemp
|
|
{
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
|
public AreaTemp[] area;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
|
public SpotTemp[] spot;
|
|
public LineTemp line;
|
|
public GlobaTemp globa;
|
|
}
|
|
|
|
public struct EmailServer
|
|
{
|
|
public int enable;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
|
public char[] recv_addr;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
|
public char[] send_addr;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
|
public char[] send_pwd;
|
|
}
|
|
|
|
public struct TftpServer
|
|
{
|
|
public int enable;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
|
public char[] tftp_addr;
|
|
}
|
|
|
|
public struct NetworkEth
|
|
{
|
|
public int enable;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
|
public char[] static_ip;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
|
public char[] netmask;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
|
public char[] gateway;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
|
public char[] dns1;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
|
public char[] dns2;
|
|
}
|
|
|
|
public struct EnvirParam
|
|
{
|
|
public int method;
|
|
public int num;
|
|
public float emissivity;
|
|
public float airTemp;
|
|
public float targetTemp;
|
|
public float atmosTrans;
|
|
public float distance;
|
|
public float infraredTemp;
|
|
public float infraredRadia;
|
|
}
|
|
|
|
public struct AlarmParam
|
|
{
|
|
public int method;
|
|
public int num;
|
|
public int active;
|
|
public int condition;
|
|
public int captrue;
|
|
public int disableCalib;
|
|
public int email;
|
|
public int digital;
|
|
public int ftp;
|
|
public float threshold;
|
|
public float hysteresis;
|
|
public int thresholeTime;
|
|
}
|
|
|
|
public struct FocusParam
|
|
{
|
|
public int method;
|
|
public int x;
|
|
public int y;
|
|
public int width;
|
|
public int height;
|
|
}
|
|
|
|
public struct TimeParam
|
|
{
|
|
public int year;
|
|
public char month;
|
|
public char day;
|
|
public char hour;
|
|
public char minute;
|
|
public char second;
|
|
}
|
|
|
|
// 私有字段
|
|
private readonly IntPtr ipx;
|
|
|
|
// 构造函数和析构函数
|
|
public A8SDK(string ip)
|
|
{
|
|
// TODO: 实现IP指针转换
|
|
ipx = IntPtr.Zero;
|
|
}
|
|
|
|
~A8SDK()
|
|
{
|
|
// TODO: 实现资源释放
|
|
}
|
|
|
|
// 静态方法
|
|
public static int SDK_initialize()
|
|
{
|
|
// TODO: 实现SDK初始化
|
|
return 0;
|
|
}
|
|
|
|
public static int SDK_destroy()
|
|
{
|
|
// TODO: 实现SDK清理
|
|
return 0;
|
|
}
|
|
|
|
public static String SDK_serch_device(int list_len)
|
|
{
|
|
// TODO: 实现设备搜索
|
|
return string.Empty;
|
|
}
|
|
|
|
// 方法实现
|
|
public void Shutter_correction()
|
|
{
|
|
// TODO: 实现快门校正
|
|
}
|
|
|
|
public int Shutter_times
|
|
{
|
|
get
|
|
{
|
|
// TODO: 实现获取快门时间
|
|
return 0;
|
|
}
|
|
set
|
|
{
|
|
// TODO: 实现设置快门时间
|
|
}
|
|
}
|
|
|
|
public int Color_plate
|
|
{
|
|
get
|
|
{
|
|
// TODO: 实现获取色板
|
|
return 0;
|
|
}
|
|
set
|
|
{
|
|
// TODO: 实现设置色板
|
|
}
|
|
}
|
|
|
|
public int Mirror_mode
|
|
{
|
|
get
|
|
{
|
|
// TODO: 实现获取镜像模式
|
|
return 0;
|
|
}
|
|
set
|
|
{
|
|
// TODO: 实现设置镜像模式
|
|
}
|
|
}
|
|
|
|
public int Video_mode
|
|
{
|
|
get
|
|
{
|
|
// TODO: 实现获取视频模式
|
|
return 0;
|
|
}
|
|
set
|
|
{
|
|
// TODO: 实现设置视频模式
|
|
}
|
|
}
|
|
|
|
public void Set_area_pos(int index, AreaPos area_data)
|
|
{
|
|
// TODO: 实现设置区域位置
|
|
}
|
|
|
|
public AreaPos Get_area_pos(int index)
|
|
{
|
|
// TODO: 实现获取区域位置
|
|
return new AreaPos();
|
|
}
|
|
|
|
public void Set_spot_pos(int index, SpotPos spot_data)
|
|
{
|
|
// TODO: 实现设置点位置
|
|
}
|
|
|
|
public SpotPos Get_spot_pos(int index)
|
|
{
|
|
// TODO: 实现获取点位置
|
|
return new SpotPos();
|
|
}
|
|
|
|
public LinePos Line_pos
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置线位置
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取线位置
|
|
return new LinePos();
|
|
}
|
|
}
|
|
|
|
public ImagePos All_pos
|
|
{
|
|
get
|
|
{
|
|
// TODO: 实现获取所有位置
|
|
return new ImagePos();
|
|
}
|
|
}
|
|
|
|
public int Temp_range
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置温度范围
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取温度范围
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public int Video_isp_x_offset
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置X偏移
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取X偏移
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public int Video_isp_y_offset
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置Y偏移
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取Y偏移
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public int Video_isp_x_scale
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置X缩放
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取X缩放
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public int Video_isp_y_scale
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置Y缩放
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取Y缩放
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public int Set_led
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置LED
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取LED状态
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public EmailServer Email_server
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置邮件服务器
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取邮件服务器
|
|
return new EmailServer();
|
|
}
|
|
}
|
|
|
|
public TftpServer Tftp_server
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置TFTP服务器
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取TFTP服务器
|
|
return new TftpServer();
|
|
}
|
|
}
|
|
|
|
public NetworkEth Network_eth
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置网络参数
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取网络参数
|
|
return new NetworkEth();
|
|
}
|
|
}
|
|
|
|
public int Fusion_distance
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置融合距离
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取融合距离
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public void Set_envir_param(EnvirParam data)
|
|
{
|
|
// TODO: 实现设置环境参数
|
|
}
|
|
|
|
public EnvirParam Get_area_envir_param(int index)
|
|
{
|
|
// TODO: 实现获取区域环境参数
|
|
return new EnvirParam();
|
|
}
|
|
|
|
public EnvirParam Get_spot_envir_param(int index)
|
|
{
|
|
// TODO: 实现获取点环境参数
|
|
return new EnvirParam();
|
|
}
|
|
|
|
public EnvirParam Get_line_envir_param()
|
|
{
|
|
// TODO: 实现获取线环境参数
|
|
return new EnvirParam();
|
|
}
|
|
|
|
public EnvirParam Get_globa_envir_param()
|
|
{
|
|
// TODO: 实现获取全局环境参数
|
|
return new EnvirParam();
|
|
}
|
|
|
|
public void Set_alarm_param(AlarmParam data)
|
|
{
|
|
// TODO: 实现设置报警参数
|
|
}
|
|
|
|
public AlarmParam Get_area_alarm_param(int index)
|
|
{
|
|
// TODO: 实现获取区域报警参数
|
|
return new AlarmParam();
|
|
}
|
|
|
|
public AlarmParam Get_spot_alarm_param(int index)
|
|
{
|
|
// TODO: 实现获取点报警参数
|
|
return new AlarmParam();
|
|
}
|
|
|
|
public AlarmParam Get_globa_alarm_param()
|
|
{
|
|
// TODO: 实现获取全局报警参数
|
|
return new AlarmParam();
|
|
}
|
|
|
|
public AlarmParam Get_line_alarm_param()
|
|
{
|
|
// TODO: 实现获取线报警参数
|
|
return new AlarmParam();
|
|
}
|
|
|
|
public AreaTemp Get_area_temp(int index)
|
|
{
|
|
// TODO: 实现获取区域温度
|
|
return new AreaTemp();
|
|
}
|
|
|
|
public SpotTemp Get_spot_temp(int index)
|
|
{
|
|
// TODO: 实现获取点温度
|
|
return new SpotTemp();
|
|
}
|
|
|
|
public LineTemp Get_line_temp()
|
|
{
|
|
// TODO: 实现获取线温度
|
|
return new LineTemp();
|
|
}
|
|
|
|
public GlobaTemp Get_globa_temp()
|
|
{
|
|
// TODO: 实现获取全局温度
|
|
return new GlobaTemp();
|
|
}
|
|
|
|
public ImageTemp Get_all_temp()
|
|
{
|
|
// TODO: 实现获取所有温度数据
|
|
return new ImageTemp();
|
|
}
|
|
|
|
public void Power_reboot()
|
|
{
|
|
// TODO: 实现设备重启
|
|
}
|
|
|
|
public void Param_recover()
|
|
{
|
|
// TODO: 实现参数恢复
|
|
}
|
|
|
|
public void Update()
|
|
{
|
|
// TODO: 实现设备更新
|
|
}
|
|
|
|
public int Heartbeat()
|
|
{
|
|
// TODO: 实现心跳检测
|
|
return 0;
|
|
}
|
|
|
|
public void Set_uart(int nSpeed, int nBits, char nEvent, int nStop)
|
|
{
|
|
// TODO: 实现设置串口
|
|
}
|
|
|
|
public void Send_uart_command(byte[] cmd)
|
|
{
|
|
// TODO: 实现发送串口命令
|
|
}
|
|
|
|
public void Autofocus(FocusParam data)
|
|
{
|
|
// TODO: 实现自动对焦
|
|
}
|
|
|
|
public void Set_device_name(string data)
|
|
{
|
|
// TODO: 实现设置设备名称
|
|
}
|
|
|
|
public string Get_device_name()
|
|
{
|
|
// TODO: 实现获取设备名称
|
|
return string.Empty;
|
|
}
|
|
|
|
public byte[] Get_detect_number()
|
|
{
|
|
// TODO: 实现获取检测编号
|
|
return new byte[0];
|
|
}
|
|
|
|
public char Temp_frame
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置温度帧
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取温度帧
|
|
return (char)0;
|
|
}
|
|
}
|
|
|
|
public char Alarm
|
|
{
|
|
set
|
|
{
|
|
// TODO: 实现设置报警输出
|
|
}
|
|
get
|
|
{
|
|
// TODO: 实现获取报警输入
|
|
return (char)0;
|
|
}
|
|
}
|
|
|
|
public int Comp_temp
|
|
{
|
|
get
|
|
{
|
|
// TODO: 实现获取补偿温度
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public void Set_time(TimeParam data)
|
|
{
|
|
// TODO: 实现设置系统时间
|
|
}
|
|
}
|
|
} |