using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Windows.Forms;
namespace AGVSystem.Cls
{
public class AgvInfo
{
public Label agv_id = new Label();
///
/// 设备编号
///
public int Agv_ID
{
get { return Convert.ToInt16( agv_id.Text); }
set { agv_id.Text = value.ToString(); }
}
///
/// 设备序号
///
public int Internal_ID;
///
/// 设备联网状态
///
public bool bPlcLinked = false;
///
/// 设备IP
///
public string IP;
///
/// 联网端口
///
public int Port;
///
/// AGV类型
///
public int Type;
///
/// 设备上下线 true:上线,false:下线
///
public bool Enable;
///
/// 控制PLC型号
/// 1:smart200
/// 2:欧姆龙 hostlink
/// 3:欧姆龙 fins
/// 4:单片机
///
public int Control_PLC = 1;
///
/// 管控线体编号
///
public int AssemblyLine;
///
/// 设备所属线体名称
///
public string AssemblyName;
public Label location_display = new Label();
///
/// 设备位置显示标记
///
public int Location_Display
{
get {return Convert.ToInt16(location_display.Text); }
set {location_display.Text =value.ToString(); }
}
public int Rfid_Value = 0;
///
/// 设备路径显示标记
///
public int Path_Display = 0;
///
/// 设备放行点标记
///
public int Cross_Location_Go = 0;
///
/// agv放行信息
///
public string go_info = "";
///
/// 设备运动目标编号
///
public int Cross_Path_Id = 0;
///
/// 设备报警代码
///
public string Warn_ID = "0";
public Label warn_info = new Label();
///
/// 设备报警信息
///
public string Warn_info
{
get { return warn_info.Text; }
set { warn_info.Text = value; }
}
///
/// 设备报警等级
/// 1:正常
/// 2:报警
/// 3:故障
/// 4:掉网
///
public int Warn_Level = 0;
///
/// 设备位置显示地图编号
///
public int Area;
public Socket Soc;
///
/// Agv行驶里程
///
public double Mileage = 0;
///
/// 读取地标的时间点
///
public DateTime Read_dt;
///
/// AGV运动状态
/// 定义:1-运动、2-停止、0-未启动
///
public byte Run_Status;
///
/// 运动方向
/// 定义:1-前进/2-后退
///
public byte Run_Direction = 0;
///
/// 前进放行
/// 定义:1-直行/2-左转/3-右转
///
public byte Go_Direction = 1;
///
/// 设备运动速度
///
public byte Run_Speed = 0;
///
/// 设备电压
///
public float Voltage = 0;
///
/// 设备电量剩余百分比
///
public float Voltage_precent = 0;
///
/// 障碍物设置模式
///
public byte Bank_Model = 0;
///
/// 任务编号
///
public int Task_ID = 0;
public int Task_Temp = 0;
public Label task_descrption = new Label();
///
/// 任务描述
///
public String Task_Descrption
{
get {return task_descrption.Text; }
set
{
task_descrption.Text = value;
}
}
///
/// 作业线体编号
///
public int WorkType = 0;
public Label have_goods = new Label();
///
/// AGV 是否有货
///
public bool Have_Goods
{
get { return have_goods.Text=="有货"?true:false; }
set { have_goods.Text = value == false ? "" : "有货"; }
}
public Channel[] Up_Channel ;
public Channel[] Down_Channel ;
////设备绑定的物料ID
//public string Material_ID2 = "";
////上层2料道是否有料
//public byte Up_Loc2 = 0;//是否有料
//public int Task_Up_Loc2 = 0;//目标地址
//public int Machine_Up_ID2 = 0;//对应设备编号
//public byte Up_Loc2_Doing = 0;
////下层1料道是否有料
//public byte Down_Loc1 = 0;
//public int Task_Down_Loc1 = 0;
//public int Machine_Down_ID1 = 0;
//public byte Down_Loc1_Doing = 0;
}
public class Channel
{
//绑定的物料ID
public string Material_ID = "";
//料道是否有料
public byte Goods_Satus = 0;
//物料数量
public int Goods_Qty = 0;
//Channel上的BOX ID1
public int Box_ID1 = 0;
//Channel上的BOX ID2
public int Box_ID2 = 0;
//货物对应的工位ID
public int Channel_Task_ID = 0;
//货物对应的设备ID
public int Machine_ID = 0;
//动作执行状态 1:正在上/下料 0:非上/下料状态
public byte Do_Status = 0;
public byte Do_Up_Status = 0;
public byte Do_Down_Status = 0;
public byte Do_HgQty_Status = 0;//下滑竿标记
public byte Do_Bxg_Status = 0;//上保险杆标记
//mes指令ID
public Int64 Mes_Task_ID = 0;
}
}