179 lines
4.8 KiB
C#
179 lines
4.8 KiB
C#
|
|
using System;
|
|||
|
|
using System.Runtime.InteropServices;
|
|||
|
|
|
|||
|
|
namespace JoyD.Windows.CS.Toprie
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 共享数据结构定义类,用于在V8、A8SDK和DeviceManager之间共享
|
|||
|
|
/// </summary>
|
|||
|
|
public static class SharedStructures
|
|||
|
|
{
|
|||
|
|
// 位置相关结构体
|
|||
|
|
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;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|