Release v1.1.1.1: Anti-Theft buttons update, BMS history chg_wait column, and wait for charging status display

This commit is contained in:
2026-09-22 15:17:18 +09:00
parent df038ae86b
commit 3ac6d6065d
26 changed files with 1570 additions and 2643 deletions

View File

@@ -1,4 +1,4 @@
namespace LFP_Manager.Controls namespace LFP_Manager.Controls
{ {
partial class ucCalibration partial class ucCalibration
{ {
@@ -29,10 +29,19 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.gbAntiTheft = new DevExpress.XtraEditors.GroupControl();
this.layoutControl4 = new DevExpress.XtraLayout.LayoutControl();
this.TeSensitive = new DevExpress.XtraEditors.TextEdit(); this.TeSensitive = new DevExpress.XtraEditors.TextEdit();
this.BtnAntiTheftEnable = new DevExpress.XtraEditors.SimpleButton(); this.TeAntiTheftGyroCurr = new DevExpress.XtraEditors.TextEdit();
this.BtnClearAntiTheftProtect = new DevExpress.XtraEditors.SimpleButton(); this.BtnClearAlarm = new DevExpress.XtraEditors.SimpleButton();
this.BtnAntiTheftDisable = new DevExpress.XtraEditors.SimpleButton(); this.layoutControlItemClearAlarm = new DevExpress.XtraLayout.LayoutControlItem();
this.BtnClearActivation = new DevExpress.XtraEditors.SimpleButton();
this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem();
this.simpleLabelItemAntiTheftStatus = new DevExpress.XtraLayout.SimpleLabelItem();
this.emptySpaceItem6 = new DevExpress.XtraLayout.EmptySpaceItem();
this.layoutControlItemClearActivation = new DevExpress.XtraLayout.LayoutControlItem();
this.gbBmsDateTime = new DevExpress.XtraEditors.GroupControl(); this.gbBmsDateTime = new DevExpress.XtraEditors.GroupControl();
this.layoutControl3 = new DevExpress.XtraLayout.LayoutControl(); this.layoutControl3 = new DevExpress.XtraLayout.LayoutControl();
this.BtnGetCurrTime = new DevExpress.XtraEditors.SimpleButton(); this.BtnGetCurrTime = new DevExpress.XtraEditors.SimpleButton();
@@ -79,22 +88,27 @@
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
this.simpleLabelItem2 = new DevExpress.XtraLayout.SimpleLabelItem(); this.simpleLabelItem2 = new DevExpress.XtraLayout.SimpleLabelItem();
this.TeAntiTheftGyroCurr = new DevExpress.XtraEditors.TextEdit();
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
this.emptySpaceItem5 = new DevExpress.XtraLayout.EmptySpaceItem(); this.emptySpaceItem5 = new DevExpress.XtraLayout.EmptySpaceItem();
this.layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutControlItemAntiTheftGroup = new DevExpress.XtraLayout.LayoutControlItem();
this.emptySpaceItem6 = new DevExpress.XtraLayout.EmptySpaceItem();
this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem21 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem20 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout(); this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gbAntiTheft)).BeginInit();
this.gbAntiTheft.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControl4)).BeginInit();
this.layoutControl4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.TeSensitive.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.TeSensitive.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.TeAntiTheftGyroCurr.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItemAntiTheftStatus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemClearAlarm)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemClearActivation)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gbBmsDateTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gbBmsDateTime)).BeginInit();
this.gbBmsDateTime.SuspendLayout(); this.gbBmsDateTime.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).BeginInit();
@@ -143,31 +157,20 @@
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.TeAntiTheftGyroCurr.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAntiTheftGroup)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem20)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// layoutControl1 // layoutControl1
// //
this.layoutControl1.Controls.Add(this.TeSensitive); this.layoutControl1.Controls.Add(this.gbAntiTheft);
this.layoutControl1.Controls.Add(this.BtnAntiTheftEnable);
this.layoutControl1.Controls.Add(this.BtnClearAntiTheftProtect);
this.layoutControl1.Controls.Add(this.BtnAntiTheftDisable);
this.layoutControl1.Controls.Add(this.gbBmsDateTime); this.layoutControl1.Controls.Add(this.gbBmsDateTime);
this.layoutControl1.Controls.Add(this.gbChaModeControl); this.layoutControl1.Controls.Add(this.gbChaModeControl);
this.layoutControl1.Controls.Add(this.gbCapacityControl); this.layoutControl1.Controls.Add(this.gbCapacityControl);
this.layoutControl1.Controls.Add(this.TeAntiTheftGyroCurr);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(0, 0); this.layoutControl1.Location = new System.Drawing.Point(0, 0);
this.layoutControl1.Name = "layoutControl1"; this.layoutControl1.Name = "layoutControl1";
@@ -177,47 +180,170 @@
this.layoutControl1.TabIndex = 0; this.layoutControl1.TabIndex = 0;
this.layoutControl1.Text = "layoutControl1"; this.layoutControl1.Text = "layoutControl1";
// //
// gbAntiTheft
//
this.gbAntiTheft.Controls.Add(this.layoutControl4);
this.gbAntiTheft.Location = new System.Drawing.Point(2, 212);
this.gbAntiTheft.Name = "gbAntiTheft";
this.gbAntiTheft.Size = new System.Drawing.Size(282, 192);
this.gbAntiTheft.TabIndex = 13;
this.gbAntiTheft.Text = "Anti-Theft";
//
// layoutControl4
//
this.layoutControl4.Controls.Add(this.BtnClearAlarm);
this.layoutControl4.Controls.Add(this.BtnClearActivation);
this.layoutControl4.Controls.Add(this.TeSensitive);
this.layoutControl4.Controls.Add(this.TeAntiTheftGyroCurr);
this.layoutControl4.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl4.Location = new System.Drawing.Point(2, 23);
this.layoutControl4.Name = "layoutControl4";
this.layoutControl4.Root = this.layoutControlGroup4;
this.layoutControl4.Size = new System.Drawing.Size(278, 167);
this.layoutControl4.TabIndex = 0;
this.layoutControl4.Text = "layoutControl4";
//
// TeSensitive // TeSensitive
// //
this.TeSensitive.Location = new System.Drawing.Point(86, 265); this.TeSensitive.Location = new System.Drawing.Point(88, 3);
this.TeSensitive.Name = "TeSensitive"; this.TeSensitive.Name = "TeSensitive";
this.TeSensitive.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F); this.TeSensitive.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
this.TeSensitive.Properties.Appearance.Options.UseFont = true; this.TeSensitive.Properties.Appearance.Options.UseFont = true;
this.TeSensitive.Properties.Appearance.Options.UseTextOptions = true; this.TeSensitive.Properties.Appearance.Options.UseTextOptions = true;
this.TeSensitive.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; this.TeSensitive.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
this.TeSensitive.Properties.ReadOnly = true; this.TeSensitive.Properties.ReadOnly = true;
this.TeSensitive.Size = new System.Drawing.Size(194, 24); this.TeSensitive.Size = new System.Drawing.Size(187, 24);
this.TeSensitive.TabIndex = 18; this.TeSensitive.StyleController = this.layoutControl4;
this.TeSensitive.TabIndex = 4;
// //
// BtnAntiTheftEnable // TeAntiTheftGyroCurr
// //
this.BtnAntiTheftEnable.Location = new System.Drawing.Point(109, 365); this.TeAntiTheftGyroCurr.Location = new System.Drawing.Point(88, 31);
this.BtnAntiTheftEnable.Name = "BtnAntiTheftEnable"; this.TeAntiTheftGyroCurr.Name = "TeAntiTheftGyroCurr";
this.BtnAntiTheftEnable.Size = new System.Drawing.Size(85, 35); this.TeAntiTheftGyroCurr.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
this.BtnAntiTheftEnable.StyleController = this.layoutControl1; this.TeAntiTheftGyroCurr.Properties.Appearance.Options.UseFont = true;
this.BtnAntiTheftEnable.TabIndex = 17; this.TeAntiTheftGyroCurr.Properties.Appearance.Options.UseTextOptions = true;
this.BtnAntiTheftEnable.Text = "Enable"; this.TeAntiTheftGyroCurr.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
this.BtnAntiTheftEnable.Click += new System.EventHandler(this.BtnAntiTheftEnable_Click); this.TeAntiTheftGyroCurr.Properties.ReadOnly = true;
this.TeAntiTheftGyroCurr.Size = new System.Drawing.Size(187, 24);
this.TeAntiTheftGyroCurr.StyleController = this.layoutControl4;
this.TeAntiTheftGyroCurr.TabIndex = 5;
// //
// BtnClearAntiTheftProtect // BtnClearAlarm
// //
this.BtnClearAntiTheftProtect.Location = new System.Drawing.Point(6, 365); this.BtnClearAlarm.Location = new System.Drawing.Point(3, 127);
this.BtnClearAntiTheftProtect.Name = "BtnClearAntiTheftProtect"; this.BtnClearAlarm.Name = "BtnClearAlarm";
this.BtnClearAntiTheftProtect.Size = new System.Drawing.Size(99, 35); this.BtnClearAlarm.Size = new System.Drawing.Size(133, 37);
this.BtnClearAntiTheftProtect.StyleController = this.layoutControl1; this.BtnClearAlarm.StyleController = this.layoutControl4;
this.BtnClearAntiTheftProtect.TabIndex = 16; this.BtnClearAlarm.TabIndex = 6;
this.BtnClearAntiTheftProtect.Text = "Clear Protect"; this.BtnClearAlarm.Text = "Clear Alarm";
this.BtnClearAntiTheftProtect.Click += new System.EventHandler(this.BtnClearAntiTheftProtect_Click); this.BtnClearAlarm.Click += new System.EventHandler(this.BtnClearAlarm_Click);
// //
// BtnAntiTheftDisable // BtnClearActivation
// //
this.BtnAntiTheftDisable.Location = new System.Drawing.Point(198, 365); this.BtnClearActivation.Location = new System.Drawing.Point(140, 127);
this.BtnAntiTheftDisable.Name = "BtnAntiTheftDisable"; this.BtnClearActivation.Name = "BtnClearActivation";
this.BtnAntiTheftDisable.Size = new System.Drawing.Size(82, 35); this.BtnClearActivation.Size = new System.Drawing.Size(135, 37);
this.BtnAntiTheftDisable.StyleController = this.layoutControl1; this.BtnClearActivation.StyleController = this.layoutControl4;
this.BtnAntiTheftDisable.TabIndex = 15; this.BtnClearActivation.TabIndex = 7;
this.BtnAntiTheftDisable.Text = "Disable"; this.BtnClearActivation.Text = "Clear Activation";
this.BtnAntiTheftDisable.Click += new System.EventHandler(this.BtnAntiTheftDisable_Click); this.BtnClearActivation.Click += new System.EventHandler(this.BtnClearActivation_Click);
//
// layoutControlGroup4
//
this.layoutControlGroup4.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.layoutControlGroup4.GroupBordersVisible = false;
this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem16,
this.layoutControlItem17,
this.simpleLabelItemAntiTheftStatus,
this.emptySpaceItem6,
this.layoutControlItemClearAlarm,
this.layoutControlItemClearActivation});
this.layoutControlGroup4.Name = "layoutControlGroup4";
this.layoutControlGroup4.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
this.layoutControlGroup4.Size = new System.Drawing.Size(278, 167);
this.layoutControlGroup4.TextVisible = false;
//
// layoutControlItem16
//
this.layoutControlItem16.AppearanceItemCaption.Options.UseTextOptions = true;
this.layoutControlItem16.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.layoutControlItem16.Control = this.TeSensitive;
this.layoutControlItem16.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem16.MinSize = new System.Drawing.Size(115, 28);
this.layoutControlItem16.Name = "layoutControlItem16";
this.layoutControlItem16.Size = new System.Drawing.Size(276, 28);
this.layoutControlItem16.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem16.Text = " Sensitive";
this.layoutControlItem16.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.layoutControlItem16.TextSize = new System.Drawing.Size(80, 20);
this.layoutControlItem16.TextToControlDistance = 5;
//
// layoutControlItem17
//
this.layoutControlItem17.AppearanceItemCaption.Options.UseTextOptions = true;
this.layoutControlItem17.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.layoutControlItem17.Control = this.TeAntiTheftGyroCurr;
this.layoutControlItem17.Location = new System.Drawing.Point(0, 28);
this.layoutControlItem17.MinSize = new System.Drawing.Size(115, 28);
this.layoutControlItem17.Name = "layoutControlItem17";
this.layoutControlItem17.Size = new System.Drawing.Size(276, 28);
this.layoutControlItem17.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem17.Text = " Status";
this.layoutControlItem17.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.layoutControlItem17.TextSize = new System.Drawing.Size(80, 20);
this.layoutControlItem17.TextToControlDistance = 5;
//
// simpleLabelItemAntiTheftStatus
//
this.simpleLabelItemAntiTheftStatus.AllowHotTrack = false;
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.ForeColor = System.Drawing.Color.Blue;
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.Options.UseFont = true;
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.Options.UseForeColor = true;
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.Options.UseTextOptions = true;
this.simpleLabelItemAntiTheftStatus.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
this.simpleLabelItemAntiTheftStatus.Location = new System.Drawing.Point(0, 56);
this.simpleLabelItemAntiTheftStatus.MinSize = new System.Drawing.Size(274, 22);
this.simpleLabelItemAntiTheftStatus.Name = "simpleLabelItemAntiTheftStatus";
this.simpleLabelItemAntiTheftStatus.Size = new System.Drawing.Size(276, 22);
this.simpleLabelItemAntiTheftStatus.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.simpleLabelItemAntiTheftStatus.Text = " Waiting for charging activation";
this.simpleLabelItemAntiTheftStatus.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.simpleLabelItemAntiTheftStatus.TextSize = new System.Drawing.Size(270, 18);
//
// emptySpaceItem6
//
this.emptySpaceItem6.AllowHotTrack = false;
this.emptySpaceItem6.Location = new System.Drawing.Point(0, 78);
this.emptySpaceItem6.MinSize = new System.Drawing.Size(104, 24);
this.emptySpaceItem6.Name = "emptySpaceItem6";
this.emptySpaceItem6.Size = new System.Drawing.Size(276, 46);
this.emptySpaceItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.emptySpaceItem6.TextSize = new System.Drawing.Size(0, 0);
//
// layoutControlItemClearAlarm
//
this.layoutControlItemClearAlarm.Control = this.BtnClearAlarm;
this.layoutControlItemClearAlarm.Location = new System.Drawing.Point(0, 124);
this.layoutControlItemClearAlarm.MinSize = new System.Drawing.Size(80, 35);
this.layoutControlItemClearAlarm.Name = "layoutControlItemClearAlarm";
this.layoutControlItemClearAlarm.Size = new System.Drawing.Size(137, 41);
this.layoutControlItemClearAlarm.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItemClearAlarm.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItemClearAlarm.TextVisible = false;
//
// layoutControlItemClearActivation
//
this.layoutControlItemClearActivation.Control = this.BtnClearActivation;
this.layoutControlItemClearActivation.Location = new System.Drawing.Point(137, 124);
this.layoutControlItemClearActivation.MinSize = new System.Drawing.Size(80, 35);
this.layoutControlItemClearActivation.Name = "layoutControlItemClearActivation";
this.layoutControlItemClearActivation.Size = new System.Drawing.Size(139, 41);
this.layoutControlItemClearActivation.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItemClearActivation.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItemClearActivation.TextVisible = false;
// //
// gbBmsDateTime // gbBmsDateTime
// //
@@ -770,19 +896,6 @@
this.simpleLabelItem2.Text = " %"; this.simpleLabelItem2.Text = " %";
this.simpleLabelItem2.TextSize = new System.Drawing.Size(19, 14); this.simpleLabelItem2.TextSize = new System.Drawing.Size(19, 14);
// //
// TeAntiTheftGyroCurr
//
this.TeAntiTheftGyroCurr.Location = new System.Drawing.Point(86, 237);
this.TeAntiTheftGyroCurr.Name = "TeAntiTheftGyroCurr";
this.TeAntiTheftGyroCurr.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
this.TeAntiTheftGyroCurr.Properties.Appearance.Options.UseFont = true;
this.TeAntiTheftGyroCurr.Properties.Appearance.Options.UseTextOptions = true;
this.TeAntiTheftGyroCurr.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
this.TeAntiTheftGyroCurr.Properties.ReadOnly = true;
this.TeAntiTheftGyroCurr.Size = new System.Drawing.Size(194, 24);
this.TeAntiTheftGyroCurr.StyleController = this.layoutControl1;
this.TeAntiTheftGyroCurr.TabIndex = 13;
//
// layoutControlGroup1 // layoutControlGroup1
// //
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1"; this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
@@ -793,7 +906,7 @@
this.layoutControlItem4, this.layoutControlItem4,
this.layoutControlItem8, this.layoutControlItem8,
this.emptySpaceItem5, this.emptySpaceItem5,
this.layoutControlGroup3}); this.layoutControlItemAntiTheftGroup});
this.layoutControlGroup1.Name = "Root"; this.layoutControlGroup1.Name = "Root";
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
this.layoutControlGroup1.Size = new System.Drawing.Size(838, 406); this.layoutControlGroup1.Size = new System.Drawing.Size(838, 406);
@@ -841,90 +954,17 @@
this.emptySpaceItem5.Size = new System.Drawing.Size(552, 196); this.emptySpaceItem5.Size = new System.Drawing.Size(552, 196);
this.emptySpaceItem5.TextSize = new System.Drawing.Size(0, 0); this.emptySpaceItem5.TextSize = new System.Drawing.Size(0, 0);
// //
// layoutControlGroup3 // layoutControlItemAntiTheftGroup
// //
this.layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { this.layoutControlItemAntiTheftGroup.Control = this.gbAntiTheft;
this.emptySpaceItem6, this.layoutControlItemAntiTheftGroup.Location = new System.Drawing.Point(0, 210);
this.layoutControlItem17, this.layoutControlItemAntiTheftGroup.MaxSize = new System.Drawing.Size(286, 196);
this.layoutControlItem21, this.layoutControlItemAntiTheftGroup.MinSize = new System.Drawing.Size(286, 196);
this.layoutControlItem20, this.layoutControlItemAntiTheftGroup.Name = "layoutControlItemAntiTheftGroup";
this.layoutControlItem15, this.layoutControlItemAntiTheftGroup.Size = new System.Drawing.Size(286, 196);
this.layoutControlItem16}); this.layoutControlItemAntiTheftGroup.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlGroup3.Location = new System.Drawing.Point(0, 210); this.layoutControlItemAntiTheftGroup.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlGroup3.Name = "layoutControlGroup3"; this.layoutControlItemAntiTheftGroup.TextVisible = false;
this.layoutControlGroup3.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
this.layoutControlGroup3.Size = new System.Drawing.Size(286, 196);
this.layoutControlGroup3.Text = "Anti-Theft";
//
// emptySpaceItem6
//
this.emptySpaceItem6.AllowHotTrack = false;
this.emptySpaceItem6.Location = new System.Drawing.Point(0, 56);
this.emptySpaceItem6.Name = "emptySpaceItem6";
this.emptySpaceItem6.Size = new System.Drawing.Size(278, 72);
this.emptySpaceItem6.TextSize = new System.Drawing.Size(0, 0);
//
// layoutControlItem17
//
this.layoutControlItem17.Control = this.TeAntiTheftGyroCurr;
this.layoutControlItem17.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
this.layoutControlItem17.CustomizationFormText = " Gyro-Scope Curr";
this.layoutControlItem17.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem17.MaxSize = new System.Drawing.Size(0, 28);
this.layoutControlItem17.MinSize = new System.Drawing.Size(134, 28);
this.layoutControlItem17.Name = "layoutControlItem17";
this.layoutControlItem17.Size = new System.Drawing.Size(278, 28);
this.layoutControlItem17.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem17.Text = " Gyro Scope";
this.layoutControlItem17.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.layoutControlItem17.TextSize = new System.Drawing.Size(75, 20);
this.layoutControlItem17.TextToControlDistance = 5;
//
// layoutControlItem21
//
this.layoutControlItem21.Control = this.BtnAntiTheftDisable;
this.layoutControlItem21.Location = new System.Drawing.Point(192, 128);
this.layoutControlItem21.MinSize = new System.Drawing.Size(30, 26);
this.layoutControlItem21.Name = "layoutControlItem21";
this.layoutControlItem21.Size = new System.Drawing.Size(86, 39);
this.layoutControlItem21.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem21.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem21.TextVisible = false;
//
// layoutControlItem20
//
this.layoutControlItem20.Control = this.BtnClearAntiTheftProtect;
this.layoutControlItem20.Location = new System.Drawing.Point(0, 128);
this.layoutControlItem20.MinSize = new System.Drawing.Size(30, 26);
this.layoutControlItem20.Name = "layoutControlItem20";
this.layoutControlItem20.Size = new System.Drawing.Size(103, 39);
this.layoutControlItem20.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem20.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem20.TextVisible = false;
//
// layoutControlItem15
//
this.layoutControlItem15.Control = this.BtnAntiTheftEnable;
this.layoutControlItem15.Location = new System.Drawing.Point(103, 128);
this.layoutControlItem15.MinSize = new System.Drawing.Size(30, 26);
this.layoutControlItem15.Name = "layoutControlItem15";
this.layoutControlItem15.Size = new System.Drawing.Size(89, 39);
this.layoutControlItem15.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem15.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem15.TextVisible = false;
//
// layoutControlItem16
//
this.layoutControlItem16.Control = this.TeSensitive;
this.layoutControlItem16.Location = new System.Drawing.Point(0, 28);
this.layoutControlItem16.MinSize = new System.Drawing.Size(178, 28);
this.layoutControlItem16.Name = "layoutControlItem16";
this.layoutControlItem16.Size = new System.Drawing.Size(278, 28);
this.layoutControlItem16.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem16.Text = " Sensitive";
this.layoutControlItem16.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.layoutControlItem16.TextSize = new System.Drawing.Size(75, 14);
this.layoutControlItem16.TextToControlDistance = 5;
// //
// ucCalibration // ucCalibration
// //
@@ -935,7 +975,19 @@
this.Size = new System.Drawing.Size(838, 406); this.Size = new System.Drawing.Size(838, 406);
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false); this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gbAntiTheft)).EndInit();
this.gbAntiTheft.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControl4)).EndInit();
this.layoutControl4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.TeSensitive.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.TeSensitive.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.TeAntiTheftGyroCurr.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItemAntiTheftStatus)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemClearAlarm)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemClearActivation)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gbBmsDateTime)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gbBmsDateTime)).EndInit();
this.gbBmsDateTime.ResumeLayout(false); this.gbBmsDateTime.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).EndInit();
@@ -984,19 +1036,12 @@
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.TeAntiTheftGyroCurr.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAntiTheftGroup)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem20)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@@ -1055,17 +1100,20 @@
private DevExpress.XtraEditors.TextEdit TeChgModeValueNew; private DevExpress.XtraEditors.TextEdit TeChgModeValueNew;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem5; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem5;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; private DevExpress.XtraEditors.GroupControl gbAntiTheft;
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem6; private DevExpress.XtraLayout.LayoutControlItem layoutControlItemAntiTheftGroup;
private DevExpress.XtraEditors.TextEdit TeAntiTheftGyroCurr; private DevExpress.XtraLayout.LayoutControl layoutControl4;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4;
private DevExpress.XtraEditors.SimpleButton BtnAntiTheftDisable;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem21;
private DevExpress.XtraEditors.SimpleButton BtnClearAntiTheftProtect;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem20;
private DevExpress.XtraEditors.SimpleButton BtnAntiTheftEnable;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15;
private DevExpress.XtraEditors.TextEdit TeSensitive; private DevExpress.XtraEditors.TextEdit TeSensitive;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16;
private DevExpress.XtraEditors.TextEdit TeAntiTheftGyroCurr;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17;
private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItemAntiTheftStatus;
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem6;
private DevExpress.XtraEditors.SimpleButton BtnClearAlarm;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItemClearAlarm;
private DevExpress.XtraEditors.SimpleButton BtnClearActivation;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItemClearActivation;
} }
} }

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
@@ -133,15 +133,17 @@ namespace LFP_Manager.Controls
TeCurrDateTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", SystemData.BmsDateTime); TeCurrDateTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", SystemData.BmsDateTime);
// Anti-Theft Data Display // Anti-Theft Data Display
TeSensitive.Text = string.Format("{0}", SystemData.CalibriationData.AntiTheft.GyroScope);
TeAntiTheftGyroCurr.Text = string.Format("{0}", SystemData.CalibriationData.AntiTheft.Status);
if (SystemData.CalibriationData.AntiTheft.GyroScope == 0) if (SystemData.CalibriationData.AntiTheft.GyroScope == 0)
{ {
TeAntiTheftGyroCurr.Text = "DISABLE"; simpleLabelItemAntiTheftStatus.Text = "DISABLE";
} }
else else
{ {
TeAntiTheftGyroCurr.Text = "ENABLE"; simpleLabelItemAntiTheftStatus.Text = csConstData.SystemInfo.GetAntiTheftStatusString(SystemData.CalibriationData.AntiTheft.Status);
} }
TeSensitive.Text = string.Format("{0}", SystemData.CalibriationData.AntiTheft.GyroScope);
if (dFlag == 0) if (dFlag == 0)
{ {
@@ -218,9 +220,9 @@ namespace LFP_Manager.Controls
{ {
TeNewDateTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now); TeNewDateTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now);
} }
private void BtnClearAntiTheftProtect_Click(object sender, EventArgs e) private void BtnClearAlarm_Click(object sender, EventArgs e)
{ {
// Anti Theft Data Clear // Anti Theft Clear Alarm (Send 1 to 0x0089)
PasswordResult = 0; PasswordResult = 0;
foreach (Form frm in Application.OpenForms) foreach (Form frm in Application.OpenForms)
@@ -239,7 +241,34 @@ namespace LFP_Manager.Controls
if (PasswordResult == 1) if (PasswordResult == 1)
{ {
wCalib = rCalib.DeepCopy(); wCalib = rCalib.DeepCopy();
wCalib.AntiTheft.GyroScope = Config.GyroSensitive; wCalib.AntiTheft.GyroScope = 1;
OnCommnadEvent(19, CALC_INDEX, 1, ref rParam, ref wCalib);
}
}
private void BtnClearActivation_Click(object sender, EventArgs e)
{
// Anti Theft Clear Activation (Set Sensitive to 0)
PasswordResult = 0;
foreach (Form frm in Application.OpenForms)
{
if (frm.Name == "FmxPassword")
{
frm.Activate();
return;
}
}
FmxPassword PasswordForm = new FmxPassword(Config, 0);
PasswordForm.OnResult += PassWordResultProc;
PasswordForm.ShowDialog();
if (PasswordResult == 1)
{
wCalib = rCalib.DeepCopy();
wCalib.AntiTheft.GyroScope = 0;
OnCommnadEvent(19, CALC_INDEX, 1, ref rParam, ref wCalib); OnCommnadEvent(19, CALC_INDEX, 1, ref rParam, ref wCalib);
} }
@@ -249,62 +278,6 @@ namespace LFP_Manager.Controls
{ {
PasswordResult = result; PasswordResult = result;
} }
private void BtnAntiTheftEnable_Click(object sender, EventArgs e)
{
// Anti Theft Data Get
PasswordResult = 0;
foreach (Form frm in Application.OpenForms)
{
if (frm.Name == "FmxPassword")
{
frm.Activate();
return;
}
}
FmxPassword PasswordForm = new FmxPassword(Config, 1);
PasswordForm.OnResult += PassWordResultProc;
PasswordForm.ShowDialog();
if (PasswordResult == 1)
{
wCalib = rCalib.DeepCopy();
wCalib.AntiTheft.GyroScope = Config.GyroSensitive;
OnCommnadEvent(18, CALC_INDEX, 1, ref rParam, ref wCalib);
}
}
private void BtnAntiTheftDisable_Click(object sender, EventArgs e)
{
// Anti Theft Data Get
PasswordResult = 0;
foreach (Form frm in Application.OpenForms)
{
if (frm.Name == "FmxPassword")
{
frm.Activate();
return;
}
}
FmxPassword PasswordForm = new FmxPassword(Config, 2);
PasswordForm.OnResult += PassWordResultProc;
PasswordForm.ShowDialog();
if (PasswordResult == 1)
{
wCalib = rCalib.DeepCopy();
wCalib.AntiTheft.GyroScope = 0;
OnCommnadEvent(18, CALC_INDEX, 1, ref rParam, ref wCalib);
}
}
#endregion #endregion
#region COMPONENT EVENT #region COMPONENT EVENT

View File

@@ -1,4 +1,4 @@
namespace LFP_Manager.Controls namespace LFP_Manager.Controls
{ {
partial class ucEventLog partial class ucEventLog
{ {
@@ -32,6 +32,7 @@
this.gcLogging = new DevExpress.XtraEditors.GroupControl(); this.gcLogging = new DevExpress.XtraEditors.GroupControl();
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl(); this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
this.cbPacketLog = new DevExpress.XtraEditors.CheckEdit(); this.cbPacketLog = new DevExpress.XtraEditors.CheckEdit();
this.btnAnalyzer = new DevExpress.XtraEditors.SimpleButton();
this.btnLogClear = new DevExpress.XtraEditors.SimpleButton(); this.btnLogClear = new DevExpress.XtraEditors.SimpleButton();
this.tabDataLog = new DevExpress.XtraTab.XtraTabControl(); this.tabDataLog = new DevExpress.XtraTab.XtraTabControl();
this.tpDataLog = new DevExpress.XtraTab.XtraTabPage(); this.tpDataLog = new DevExpress.XtraTab.XtraTabPage();
@@ -39,8 +40,9 @@
this.meDataLog = new DevExpress.XtraEditors.MemoEdit(); this.meDataLog = new DevExpress.XtraEditors.MemoEdit();
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
this.lcCheckEdit = new DevExpress.XtraLayout.LayoutControlItem(); this.lcCheckEdit = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItemAnalyzer = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
@@ -58,8 +60,9 @@
((System.ComponentModel.ISupportInitialize)(this.meDataLog.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.meDataLog.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.lcCheckEdit)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lcCheckEdit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAnalyzer)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
@@ -90,6 +93,7 @@
// //
this.layoutControl2.AllowCustomization = false; this.layoutControl2.AllowCustomization = false;
this.layoutControl2.Controls.Add(this.cbPacketLog); this.layoutControl2.Controls.Add(this.cbPacketLog);
this.layoutControl2.Controls.Add(this.btnAnalyzer);
this.layoutControl2.Controls.Add(this.btnLogClear); this.layoutControl2.Controls.Add(this.btnLogClear);
this.layoutControl2.Controls.Add(this.tabDataLog); this.layoutControl2.Controls.Add(this.tabDataLog);
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill; this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -110,11 +114,21 @@
this.cbPacketLog.StyleController = this.layoutControl2; this.cbPacketLog.StyleController = this.layoutControl2;
this.cbPacketLog.TabIndex = 6; this.cbPacketLog.TabIndex = 6;
// //
// btnAnalyzer
//
this.btnAnalyzer.Location = new System.Drawing.Point(702, 28);
this.btnAnalyzer.Name = "btnAnalyzer";
this.btnAnalyzer.Size = new System.Drawing.Size(83, 50);
this.btnAnalyzer.StyleController = this.layoutControl2;
this.btnAnalyzer.TabIndex = 7;
this.btnAnalyzer.Text = "Analyzer";
this.btnAnalyzer.Click += new System.EventHandler(this.btnAnalyzer_Click);
//
// btnLogClear // btnLogClear
// //
this.btnLogClear.Location = new System.Drawing.Point(702, 28); this.btnLogClear.Location = new System.Drawing.Point(702, 82);
this.btnLogClear.Name = "btnLogClear"; this.btnLogClear.Name = "btnLogClear";
this.btnLogClear.Size = new System.Drawing.Size(83, 110); this.btnLogClear.Size = new System.Drawing.Size(83, 56);
this.btnLogClear.StyleController = this.layoutControl2; this.btnLogClear.StyleController = this.layoutControl2;
this.btnLogClear.TabIndex = 5; this.btnLogClear.TabIndex = 5;
this.btnLogClear.Text = "Clear"; this.btnLogClear.Text = "Clear";
@@ -162,8 +176,9 @@
this.layoutControlGroup2.GroupBordersVisible = false; this.layoutControlGroup2.GroupBordersVisible = false;
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem6, this.layoutControlItem6,
this.layoutControlItem14, this.lcCheckEdit,
this.lcCheckEdit}); this.layoutControlItemAnalyzer,
this.layoutControlItem14});
this.layoutControlGroup2.Name = "layoutControlGroup2"; this.layoutControlGroup2.Name = "layoutControlGroup2";
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2); this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
this.layoutControlGroup2.Size = new System.Drawing.Size(789, 142); this.layoutControlGroup2.Size = new System.Drawing.Size(789, 142);
@@ -181,18 +196,6 @@
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem6.TextVisible = false; this.layoutControlItem6.TextVisible = false;
// //
// layoutControlItem14
//
this.layoutControlItem14.Control = this.btnLogClear;
this.layoutControlItem14.CustomizationFormText = "layoutControlItem14";
this.layoutControlItem14.Location = new System.Drawing.Point(698, 24);
this.layoutControlItem14.MinSize = new System.Drawing.Size(60, 26);
this.layoutControlItem14.Name = "layoutControlItem14";
this.layoutControlItem14.Size = new System.Drawing.Size(87, 114);
this.layoutControlItem14.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem14.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem14.TextVisible = false;
//
// lcCheckEdit // lcCheckEdit
// //
this.lcCheckEdit.Control = this.cbPacketLog; this.lcCheckEdit.Control = this.cbPacketLog;
@@ -205,6 +208,30 @@
this.lcCheckEdit.TextSize = new System.Drawing.Size(0, 0); this.lcCheckEdit.TextSize = new System.Drawing.Size(0, 0);
this.lcCheckEdit.TextVisible = false; this.lcCheckEdit.TextVisible = false;
// //
// layoutControlItemAnalyzer
//
this.layoutControlItemAnalyzer.Control = this.btnAnalyzer;
this.layoutControlItemAnalyzer.CustomizationFormText = "layoutControlItemAnalyzer";
this.layoutControlItemAnalyzer.Location = new System.Drawing.Point(698, 24);
this.layoutControlItemAnalyzer.MinSize = new System.Drawing.Size(60, 26);
this.layoutControlItemAnalyzer.Name = "layoutControlItemAnalyzer";
this.layoutControlItemAnalyzer.Size = new System.Drawing.Size(87, 54);
this.layoutControlItemAnalyzer.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItemAnalyzer.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItemAnalyzer.TextVisible = false;
//
// layoutControlItem14
//
this.layoutControlItem14.Control = this.btnLogClear;
this.layoutControlItem14.CustomizationFormText = "layoutControlItem14";
this.layoutControlItem14.Location = new System.Drawing.Point(698, 78);
this.layoutControlItem14.MinSize = new System.Drawing.Size(60, 26);
this.layoutControlItem14.Name = "layoutControlItem14";
this.layoutControlItem14.Size = new System.Drawing.Size(87, 60);
this.layoutControlItem14.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem14.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem14.TextVisible = false;
//
// layoutControlGroup1 // layoutControlGroup1
// //
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1"; this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
@@ -249,8 +276,9 @@
((System.ComponentModel.ISupportInitialize)(this.meDataLog.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.meDataLog.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.lcCheckEdit)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lcCheckEdit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAnalyzer)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
@@ -263,6 +291,7 @@
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
private DevExpress.XtraEditors.GroupControl gcLogging; private DevExpress.XtraEditors.GroupControl gcLogging;
private DevExpress.XtraLayout.LayoutControl layoutControl2; private DevExpress.XtraLayout.LayoutControl layoutControl2;
private DevExpress.XtraEditors.SimpleButton btnAnalyzer;
private DevExpress.XtraEditors.SimpleButton btnLogClear; private DevExpress.XtraEditors.SimpleButton btnLogClear;
private DevExpress.XtraTab.XtraTabControl tabDataLog; private DevExpress.XtraTab.XtraTabControl tabDataLog;
private DevExpress.XtraTab.XtraTabPage tpDataLog; private DevExpress.XtraTab.XtraTabPage tpDataLog;
@@ -270,6 +299,7 @@
private DevExpress.XtraEditors.MemoEdit meDataLog; private DevExpress.XtraEditors.MemoEdit meDataLog;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItemAnalyzer;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
private DevExpress.XtraEditors.CheckEdit cbPacketLog; private DevExpress.XtraEditors.CheckEdit cbPacketLog;

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
@@ -23,6 +23,8 @@ namespace LFP_Manager.Controls
#region PUBLIC UPDATE #region PUBLIC UPDATE
public event EventHandler OnPacketAnalyzerClick = null;
public void EventUpdate(string aEvent) public void EventUpdate(string aEvent)
{ {
if (this.InvokeRequired) if (this.InvokeRequired)
@@ -44,6 +46,11 @@ namespace LFP_Manager.Controls
#region ENVENT #region ENVENT
private void btnAnalyzer_Click(object sender, EventArgs e)
{
OnPacketAnalyzerClick?.Invoke(this, EventArgs.Empty);
}
private void btnLogClear_Click(object sender, EventArgs e) private void btnLogClear_Click(object sender, EventArgs e)
{ {
meDataLog.Text = ""; meDataLog.Text = "";

View File

@@ -466,7 +466,8 @@ namespace LFP_Manager.Controls
private string GetOpStatusDisplayText(short val) private string GetOpStatusDisplayText(short val)
{ {
switch ((ushort)val) ushort uval = (ushort)(val & 0x7FFF);
switch (uval)
{ {
case 0x0000: return "STANDBY (0x0000)"; case 0x0000: return "STANDBY (0x0000)";
case 0x0001: return "CHARGING (0x0001)"; case 0x0001: return "CHARGING (0x0001)";
@@ -475,12 +476,7 @@ namespace LFP_Manager.Controls
case 0x0004: return "TRIP (0x0004)"; case 0x0004: return "TRIP (0x0004)";
case 0x0008: return "CHG-LIMIT (0x0008)"; case 0x0008: return "CHG-LIMIT (0x0008)";
case 0x0032: return "POWER-ON (0x0032)"; case 0x0032: return "POWER-ON (0x0032)";
case 0x8000: return "STANDBY-HEAT (0x8000)"; default: return string.Format("UNKNOWN (0x{0:X4})", uval);
case 0x8001: return "CHARGING-HEAT (0x8001)";
case 0x8002: return "DISCHARGING-HEAT (0x8002)";
case 0x8004: return "TRIP-HEAT (0x8004)";
case 0x8008: return "CHG-LIMIT-HEAT (0x8008)";
default: return string.Format("UNKNOWN (0x{0:X4})", (ushort)val);
} }
} }

View File

@@ -689,7 +689,7 @@ namespace LFP_Manager.Controls
{ {
if (SystemData.ShelfCommFail == false) if (SystemData.ShelfCommFail == false)
{ {
switch ((int)SystemData.StatusData.status) switch ((int)SystemData.StatusData.status & 0x7FFF)
{ {
case 0x0000: // Stand by case 0x0000: // Stand by
lbStatus.Text = "STANDBY"; lbStatus.Text = "STANDBY";
@@ -719,28 +719,8 @@ namespace LFP_Manager.Controls
lbStatus.Text = "CHG-LIMIT"; lbStatus.Text = "CHG-LIMIT";
lbStatus.ForeColor = System.Drawing.Color.Blue; lbStatus.ForeColor = System.Drawing.Color.Blue;
break; break;
case 0x8000: // Stand by - Heat
lbStatus.Text = "STANDBY-HEAT";
lbStatus.ForeColor = System.Drawing.Color.Blue;
break;
case 0x8001: // Charging
lbStatus.Text = "CHARGING-HEAT";
lbStatus.ForeColor = System.Drawing.Color.Blue;
break;
case 0x8002: // Discharging
lbStatus.Text = "DISCHARGING-HEAT";
lbStatus.ForeColor = System.Drawing.Color.Magenta;
break;
case 0x8004: // TRIP
lbStatus.Text = "TRIP-HEAT";
lbStatus.ForeColor = System.Drawing.Color.Red;
break;
case 0x8008: // Chg-Lmt
lbStatus.Text = "CHG-LIMIT-HEAT";
lbStatus.ForeColor = System.Drawing.Color.Blue;
break;
default: default:
lbStatus.Text = string.Format("UNKNOWN(0x{0:X4})", (ushort)SystemData.StatusData.status); lbStatus.Text = string.Format("UNKNOWN(0x{0:X4})", (ushort)(SystemData.StatusData.status & 0x7FFF));
lbStatus.ForeColor = System.Drawing.Color.Black; lbStatus.ForeColor = System.Drawing.Color.Black;
break; break;
} }
@@ -842,7 +822,8 @@ namespace LFP_Manager.Controls
private void DisplayAlarm() private void DisplayAlarm()
{ {
gbAlarm.Text = string.Format("Alarm && Fault ( ERROR: 0x{0:X4} )", (ushort)SystemData.StatusData.errorCode); string chgWaitStr = (((ushort)SystemData.StatusData.status & 0x8000) == 0) ? " - Wait for Charging" : "";
gbAlarm.Text = string.Format("Alarm && Fault ( ERROR: 0x{0:X4} ){1}", (ushort)SystemData.StatusData.errorCode, chgWaitStr);
bool[] aFault = csUtils.Int16ToBitArray(SystemData.StatusData.protection); bool[] aFault = csUtils.Int16ToBitArray(SystemData.StatusData.protection);
bool[] aWarining = csUtils.Int16ToBitArray(SystemData.StatusData.warning); bool[] aWarining = csUtils.Int16ToBitArray(SystemData.StatusData.warning);

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@@ -29,6 +29,21 @@ namespace LFP_Manager.DataStructure
"Unknown7", // 7 "Unknown7", // 7
"PRE-CHG + LMT", // 8 "PRE-CHG + LMT", // 8
}; };
public static readonly string[] ANTI_THEFT_STATUS =
{
"Waiting for charging activation", // 0
"Activated", // 1
};
public static string GetAntiTheftStatusString(int status)
{
if (status >= 0 && status < ANTI_THEFT_STATUS.Length)
{
return ANTI_THEFT_STATUS[status];
}
return string.Format("Unknown ({0})", status);
}
} }
public class CommType public class CommType

View File

@@ -551,11 +551,13 @@ namespace LFP_Manager.DataStructure
{ {
public int Comm; public int Comm;
public int GyroScope; public int GyroScope;
public int Status;
public TAntiTheft() public TAntiTheft()
{ {
Comm = 0; Comm = 0;
GyroScope = 0; GyroScope = 0;
Status = 0;
} }
public TAntiTheft DeepCopy() public TAntiTheft DeepCopy()
{ {
@@ -563,6 +565,7 @@ namespace LFP_Manager.DataStructure
{ {
Comm = Comm, Comm = Comm,
GyroScope = GyroScope, GyroScope = GyroScope,
Status = Status,
}; };
return newCopy; return newCopy;
} }
@@ -688,6 +691,41 @@ namespace LFP_Manager.DataStructure
} }
} }
public enum UartTxType
{
Polling, // 주기적 상태 조회
WriteParam, // 파라미터 쓰기 (Holding Register)
WriteReg, // 레지스터 쓰기
WriteCoil, // 코일 쓰기
ReadReg, // 레지스터 읽기
FwUpdate, // 펌웨어 업데이트
Raw // 기타 원시 패킷
}
public class TUartTxItem
{
public UartTxType TxType { get; set; } = UartTxType.Raw;
public int SystemId { get; set; } = 0;
public ushort RegAddr { get; set; } = 0;
public ushort RegLen { get; set; } = 0;
public byte[] Data { get; set; } = null;
public bool ExpectReply { get; set; } = true;
public int TimeoutMs { get; set; } = 500;
public TUartTxItem() { }
public TUartTxItem(UartTxType type, int sysId, ushort regAddr, ushort regLen, byte[] data, bool expectReply = true, int timeoutMs = 500)
{
TxType = type;
SystemId = sysId;
RegAddr = regAddr;
RegLen = regLen;
Data = data;
ExpectReply = expectReply;
TimeoutMs = timeoutMs;
}
}
public class TUartTxBuff public class TUartTxBuff
{ {
public int InPos; public int InPos;
@@ -731,3 +769,4 @@ namespace LFP_Manager.DataStructure
} }
} }

View File

@@ -55,15 +55,15 @@
this.layoutControl1.Name = "layoutControl1"; this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1265, 291, 250, 350); this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1265, 291, 250, 350);
this.layoutControl1.Root = this.layoutControlGroup1; this.layoutControl1.Root = this.layoutControlGroup1;
this.layoutControl1.Size = new System.Drawing.Size(814, 444); this.layoutControl1.Size = new System.Drawing.Size(814, 457);
this.layoutControl1.TabIndex = 0; this.layoutControl1.TabIndex = 0;
this.layoutControl1.Text = "layoutControl1"; this.layoutControl1.Text = "layoutControl1";
// //
// btnClose // btnClose
// //
this.btnClose.Location = new System.Drawing.Point(714, 403); this.btnClose.Location = new System.Drawing.Point(714, 415);
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(96, 37); this.btnClose.Size = new System.Drawing.Size(96, 38);
this.btnClose.StyleController = this.layoutControl1; this.btnClose.StyleController = this.layoutControl1;
this.btnClose.TabIndex = 5; this.btnClose.TabIndex = 5;
this.btnClose.Text = "Close"; this.btnClose.Text = "Close";
@@ -80,17 +80,17 @@
this.emptySpaceItem1}); this.emptySpaceItem1});
this.layoutControlGroup1.Name = "Root"; this.layoutControlGroup1.Name = "Root";
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2); this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
this.layoutControlGroup1.Size = new System.Drawing.Size(814, 444); this.layoutControlGroup1.Size = new System.Drawing.Size(814, 457);
this.layoutControlGroup1.TextVisible = false; this.layoutControlGroup1.TextVisible = false;
// //
// layoutControlItem2 // layoutControlItem2
// //
this.layoutControlItem2.Control = this.btnClose; this.layoutControlItem2.Control = this.btnClose;
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2"; this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
this.layoutControlItem2.Location = new System.Drawing.Point(710, 399); this.layoutControlItem2.Location = new System.Drawing.Point(710, 411);
this.layoutControlItem2.MinSize = new System.Drawing.Size(93, 26); this.layoutControlItem2.MinSize = new System.Drawing.Size(93, 26);
this.layoutControlItem2.Name = "layoutControlItem2"; this.layoutControlItem2.Name = "layoutControlItem2";
this.layoutControlItem2.Size = new System.Drawing.Size(100, 41); this.layoutControlItem2.Size = new System.Drawing.Size(100, 42);
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem2.TextVisible = false; this.layoutControlItem2.TextVisible = false;
@@ -99,9 +99,9 @@
// //
this.emptySpaceItem1.AllowHotTrack = false; this.emptySpaceItem1.AllowHotTrack = false;
this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1"; this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1";
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 399); this.emptySpaceItem1.Location = new System.Drawing.Point(0, 411);
this.emptySpaceItem1.Name = "emptySpaceItem1"; this.emptySpaceItem1.Name = "emptySpaceItem1";
this.emptySpaceItem1.Size = new System.Drawing.Size(710, 41); this.emptySpaceItem1.Size = new System.Drawing.Size(710, 42);
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
// //
// tmrDisplay // tmrDisplay
@@ -113,7 +113,7 @@
// //
this.ucCalibrationConfig.Location = new System.Drawing.Point(4, 4); this.ucCalibrationConfig.Location = new System.Drawing.Point(4, 4);
this.ucCalibrationConfig.Name = "ucCalibrationConfig"; this.ucCalibrationConfig.Name = "ucCalibrationConfig";
this.ucCalibrationConfig.Size = new System.Drawing.Size(806, 395); this.ucCalibrationConfig.Size = new System.Drawing.Size(806, 407);
this.ucCalibrationConfig.TabIndex = 4; this.ucCalibrationConfig.TabIndex = 4;
// //
// layoutControlItem1 // layoutControlItem1
@@ -123,7 +123,7 @@
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem1.MinSize = new System.Drawing.Size(104, 24); this.layoutControlItem1.MinSize = new System.Drawing.Size(104, 24);
this.layoutControlItem1.Name = "layoutControlItem1"; this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.Size = new System.Drawing.Size(810, 399); this.layoutControlItem1.Size = new System.Drawing.Size(810, 411);
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem1.TextVisible = false; this.layoutControlItem1.TextVisible = false;
@@ -132,7 +132,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(814, 444); this.ClientSize = new System.Drawing.Size(814, 457);
this.Controls.Add(this.layoutControl1); this.Controls.Add(this.layoutControl1);
this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("fmxCalibration.IconOptions.Icon"))); this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("fmxCalibration.IconOptions.Icon")));
this.Name = "fmxCalibration"; this.Name = "fmxCalibration";

View File

@@ -1,4 +1,4 @@
namespace LFP_Manager.Forms namespace LFP_Manager.Forms
{ {
partial class fmxHistory partial class fmxHistory
{ {
@@ -44,6 +44,7 @@
this.gvBmsHistory = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gvBmsHistory = new DevExpress.XtraGrid.Views.Grid.GridView();
this.gcHistDateTime = new DevExpress.XtraGrid.Columns.GridColumn(); this.gcHistDateTime = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcStatus = new DevExpress.XtraGrid.Columns.GridColumn(); this.gcStatus = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcChgWait = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcWarning = new DevExpress.XtraGrid.Columns.GridColumn(); this.gcWarning = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcProtect = new DevExpress.XtraGrid.Columns.GridColumn(); this.gcProtect = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcError = new DevExpress.XtraGrid.Columns.GridColumn(); this.gcError = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -239,6 +240,7 @@
this.gcNo, this.gcNo,
this.gcHistDateTime, this.gcHistDateTime,
this.gcStatus, this.gcStatus,
this.gcChgWait,
this.gcWarning, this.gcWarning,
this.gcProtect, this.gcProtect,
this.gcError, this.gcError,
@@ -298,6 +300,18 @@
this.gcStatus.Visible = true; this.gcStatus.Visible = true;
this.gcStatus.VisibleIndex = 2; this.gcStatus.VisibleIndex = 2;
// //
// gcChgWait
//
this.gcChgWait.AppearanceCell.Options.UseTextOptions = true;
this.gcChgWait.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.gcChgWait.AppearanceHeader.Options.UseTextOptions = true;
this.gcChgWait.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.gcChgWait.Caption = "Chg Wait Status";
this.gcChgWait.FieldName = "chg_wait";
this.gcChgWait.Name = "gcChgWait";
this.gcChgWait.Visible = true;
this.gcChgWait.VisibleIndex = 3;
//
// gcWarning // gcWarning
// //
this.gcWarning.AppearanceCell.Options.UseTextOptions = true; this.gcWarning.AppearanceCell.Options.UseTextOptions = true;
@@ -308,7 +322,7 @@
this.gcWarning.FieldName = "warning"; this.gcWarning.FieldName = "warning";
this.gcWarning.Name = "gcWarning"; this.gcWarning.Name = "gcWarning";
this.gcWarning.Visible = true; this.gcWarning.Visible = true;
this.gcWarning.VisibleIndex = 3; this.gcWarning.VisibleIndex = 4;
// //
// gcProtect // gcProtect
// //
@@ -320,7 +334,7 @@
this.gcProtect.FieldName = "protect"; this.gcProtect.FieldName = "protect";
this.gcProtect.Name = "gcProtect"; this.gcProtect.Name = "gcProtect";
this.gcProtect.Visible = true; this.gcProtect.Visible = true;
this.gcProtect.VisibleIndex = 4; this.gcProtect.VisibleIndex = 5;
// //
// gcError // gcError
// //
@@ -332,7 +346,7 @@
this.gcError.FieldName = "error"; this.gcError.FieldName = "error";
this.gcError.Name = "gcError"; this.gcError.Name = "gcError";
this.gcError.Visible = true; this.gcError.Visible = true;
this.gcError.VisibleIndex = 5; this.gcError.VisibleIndex = 6;
// //
// gcVoltage // gcVoltage
// //
@@ -346,7 +360,7 @@
this.gcVoltage.FieldName = "voltage"; this.gcVoltage.FieldName = "voltage";
this.gcVoltage.Name = "gcVoltage"; this.gcVoltage.Name = "gcVoltage";
this.gcVoltage.Visible = true; this.gcVoltage.Visible = true;
this.gcVoltage.VisibleIndex = 6; this.gcVoltage.VisibleIndex = 7;
// //
// gcCurrent // gcCurrent
// //
@@ -360,7 +374,7 @@
this.gcCurrent.FieldName = "current"; this.gcCurrent.FieldName = "current";
this.gcCurrent.Name = "gcCurrent"; this.gcCurrent.Name = "gcCurrent";
this.gcCurrent.Visible = true; this.gcCurrent.Visible = true;
this.gcCurrent.VisibleIndex = 7; this.gcCurrent.VisibleIndex = 8;
// //
// gcSOC // gcSOC
// //
@@ -373,7 +387,7 @@
this.gcSOC.FieldName = "SOC"; this.gcSOC.FieldName = "SOC";
this.gcSOC.Name = "gcSOC"; this.gcSOC.Name = "gcSOC";
this.gcSOC.Visible = true; this.gcSOC.Visible = true;
this.gcSOC.VisibleIndex = 8; this.gcSOC.VisibleIndex = 9;
// //
// gcSOH // gcSOH
// //
@@ -386,7 +400,7 @@
this.gcSOH.FieldName = "SOH"; this.gcSOH.FieldName = "SOH";
this.gcSOH.Name = "gcSOH"; this.gcSOH.Name = "gcSOH";
this.gcSOH.Visible = true; this.gcSOH.Visible = true;
this.gcSOH.VisibleIndex = 9; this.gcSOH.VisibleIndex = 10;
// //
// gcTemp1 // gcTemp1
// //
@@ -898,6 +912,7 @@
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4;
private DevExpress.XtraGrid.Columns.GridColumn gcHistDateTime; private DevExpress.XtraGrid.Columns.GridColumn gcHistDateTime;
private DevExpress.XtraGrid.Columns.GridColumn gcStatus; private DevExpress.XtraGrid.Columns.GridColumn gcStatus;
private DevExpress.XtraGrid.Columns.GridColumn gcChgWait;
private DevExpress.XtraGrid.Columns.GridColumn gcWarning; private DevExpress.XtraGrid.Columns.GridColumn gcWarning;
private DevExpress.XtraGrid.Columns.GridColumn gcProtect; private DevExpress.XtraGrid.Columns.GridColumn gcProtect;
private DevExpress.XtraGrid.Columns.GridColumn gcError; private DevExpress.XtraGrid.Columns.GridColumn gcError;

View File

@@ -103,6 +103,7 @@ namespace LFP_Manager.Forms
hDT.Columns.Add("no", typeof(int)); hDT.Columns.Add("no", typeof(int));
hDT.Columns.Add("datetime", typeof(string)); hDT.Columns.Add("datetime", typeof(string));
hDT.Columns.Add("status", typeof(int)); hDT.Columns.Add("status", typeof(int));
hDT.Columns.Add("chg_wait", typeof(int));
hDT.Columns.Add("warning", typeof(short)); hDT.Columns.Add("warning", typeof(short));
hDT.Columns.Add("protect", typeof(short)); hDT.Columns.Add("protect", typeof(short));
hDT.Columns.Add("error", typeof(short)); hDT.Columns.Add("error", typeof(short));
@@ -116,7 +117,7 @@ namespace LFP_Manager.Forms
{ {
hDT.Columns.Add(string.Format("temp_{0:00}", i + 1), typeof(float)); hDT.Columns.Add(string.Format("temp_{0:00}", i + 1), typeof(float));
} }
for (int i = 0; i < 16; i++) for (int i = 0; i < csConstData.SystemInfo.MAX_MODULE_CELL_SIZE; i++)
{ {
hDT.Columns.Add(string.Format("cell_v_{0:00}", i + 1), typeof(float)); hDT.Columns.Add(string.Format("cell_v_{0:00}", i + 1), typeof(float));
} }
@@ -146,8 +147,8 @@ namespace LFP_Manager.Forms
{ {
if (bms_history_req == false || data == null) return; if (bms_history_req == false || data == null) return;
// BMS History response packet: Addr(1) + Func(1) + ByteCount(1 = 58) + Data(58) + CRC(2) = 63 bytes // BMS History response packet: Addr(1) + Func(1) + ByteCount(1 = 56) + Data(56) + CRC(2) = 61 bytes
if (data.Length >= 63 && data[1] == 0x03 && data[2] == 58) if (data.Length >= 61 && data[1] == 0x03 && data[2] == 56)
{ {
try try
{ {
@@ -184,7 +185,9 @@ namespace LFP_Manager.Forms
hRow["datetime"] = stDateTime; hRow["datetime"] = stDateTime;
pos = 2; pos = 2;
hRow["status"] = shorts[pos++]; short rawStatus = shorts[pos++];
hRow["status"] = (int)(rawStatus & 0x7FFF);
hRow["chg_wait"] = ((rawStatus & 0x8000) != 0) ? 1 : 0;
hRow["warning"] = shorts[pos++]; hRow["warning"] = shorts[pos++];
hRow["protect"] = shorts[pos++]; hRow["protect"] = shorts[pos++];
hRow["error"] = shorts[pos++]; hRow["error"] = shorts[pos++];
@@ -192,14 +195,14 @@ namespace LFP_Manager.Forms
hRow["current"] = string.Format("{0:0.00}", Convert.ToDouble(shorts[pos++]) / 100); hRow["current"] = string.Format("{0:0.00}", Convert.ToDouble(shorts[pos++]) / 100);
hRow["SOC"] = string.Format("{0:0.0}", Convert.ToDouble(shorts[pos++]) / 1); hRow["SOC"] = string.Format("{0:0.0}", Convert.ToDouble(shorts[pos++]) / 1);
// Temperature // Temperature (3 registers = 6 temps)
for (int i = 0; i < 3; i++) for (int i = 0; i < 3; i++)
{ {
hRow[string.Format("temp_{0:00}", (i * 2) + 1)] = Convert.ToDouble((byte)(shorts[pos] >> 8)); hRow[string.Format("temp_{0:00}", (i * 2) + 1)] = Convert.ToDouble((byte)(shorts[pos] >> 8));
hRow[string.Format("temp_{0:00}", (i * 2) + 2)] = Convert.ToDouble((byte)(shorts[pos++] >> 0)); hRow[string.Format("temp_{0:00}", (i * 2) + 2)] = Convert.ToDouble((byte)(shorts[pos++] >> 0));
} }
// Cell Voltage // Cell Voltage (15 cells)
for (int i = 0; i < 16; i++) for (int i = 0; i < csConstData.SystemInfo.MAX_MODULE_CELL_SIZE; i++)
{ {
hRow[string.Format("cell_v_{0:00}", i + 1)] = Convert.ToDouble(shorts[pos++]) / 1000; hRow[string.Format("cell_v_{0:00}", i + 1)] = Convert.ToDouble(shorts[pos++]) / 1000;
} }
@@ -278,14 +281,14 @@ namespace LFP_Manager.Forms
sdata[2] = (byte)(addr >> 8); // Address H sdata[2] = (byte)(addr >> 8); // Address H
sdata[3] = (byte)(addr >> 0); // Address L sdata[3] = (byte)(addr >> 0); // Address L
sdata[4] = 0x00; // Number of Register H sdata[4] = 0x00; // Number of Register H
sdata[5] = 0x1D; // Number of Register L sdata[5] = 0x1C; // Number of Register L (28 registers = 56 bytes)
crc = csSerialCommFunction.GetCRC(sdata, 6); crc = csSerialCommFunction.GetCRC(sdata, 6);
sdata[6] = crc[1]; // CRCH sdata[6] = crc[1]; // CRCH
sdata[7] = crc[0]; // CRCL sdata[7] = crc[0]; // CRCL
OnSendUartData?.Invoke(addr, sdata, false); OnSendUartData?.Invoke(addr, sdata, true);
} }
private void gvBmsHistory_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) private void gvBmsHistory_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
@@ -294,7 +297,7 @@ namespace LFP_Manager.Forms
if (e.Column.FieldName == "status") if (e.Column.FieldName == "status")
{ {
int status = Convert.ToInt32(e.Value); int status = Convert.ToInt32(e.Value) & 0x7FFF;
switch ((ushort)status) switch ((ushort)status)
{ {
case 0x0000: e.DisplayText = "STANDBY (0x0000)"; break; case 0x0000: e.DisplayText = "STANDBY (0x0000)"; break;
@@ -304,11 +307,6 @@ namespace LFP_Manager.Forms
case 0x0004: e.DisplayText = "TRIP (0x0004)"; break; case 0x0004: e.DisplayText = "TRIP (0x0004)"; break;
case 0x0008: e.DisplayText = "CHG-LIMIT (0x0008)"; break; case 0x0008: e.DisplayText = "CHG-LIMIT (0x0008)"; break;
case 0x0032: e.DisplayText = "POWER-ON (0x0032)"; break; case 0x0032: e.DisplayText = "POWER-ON (0x0032)"; break;
case 0x8000: e.DisplayText = "STANDBY-HEAT (0x8000)"; break;
case 0x8001: e.DisplayText = "CHARGING-HEAT (0x8001)"; break;
case 0x8002: e.DisplayText = "DISCHARGING-HEAT (0x8002)"; break;
case 0x8004: e.DisplayText = "TRIP-HEAT (0x8004)"; break;
case 0x8008: e.DisplayText = "CHG-LIMIT-HEAT (0x8008)"; break;
default: e.DisplayText = string.Format("UNKNOWN (0x{0:X4})", status); break; default: e.DisplayText = string.Format("UNKNOWN (0x{0:X4})", status); break;
} }
} }

View File

@@ -58,6 +58,8 @@ namespace LFP_Manager.Forms
this.historyViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.historyViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.updateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.updateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.firmwareUpdateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.firmwareUpdateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.packetAnalyzerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.changePasswordToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.changePasswordToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
@@ -311,6 +313,7 @@ namespace LFP_Manager.Forms
this.fileToolStripMenuItem, this.fileToolStripMenuItem,
this.historyToolStripMenuItem, this.historyToolStripMenuItem,
this.updateToolStripMenuItem, this.updateToolStripMenuItem,
this.toolsToolStripMenuItem,
this.settingsToolStripMenuItem}); this.settingsToolStripMenuItem});
this.mnMain.Location = new System.Drawing.Point(0, 0); this.mnMain.Location = new System.Drawing.Point(0, 0);
this.mnMain.Name = "mnMain"; this.mnMain.Name = "mnMain";
@@ -363,6 +366,21 @@ namespace LFP_Manager.Forms
this.firmwareUpdateToolStripMenuItem.Text = "Firmware Update"; this.firmwareUpdateToolStripMenuItem.Text = "Firmware Update";
this.firmwareUpdateToolStripMenuItem.Click += new System.EventHandler(this.firmwareUpdateToolStripMenuItem_Click); this.firmwareUpdateToolStripMenuItem.Click += new System.EventHandler(this.firmwareUpdateToolStripMenuItem_Click);
// //
// toolsToolStripMenuItem
//
this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.packetAnalyzerToolStripMenuItem});
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(46, 20);
this.toolsToolStripMenuItem.Text = "Tools";
//
// packetAnalyzerToolStripMenuItem
//
this.packetAnalyzerToolStripMenuItem.Name = "packetAnalyzerToolStripMenuItem";
this.packetAnalyzerToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.packetAnalyzerToolStripMenuItem.Text = "Packet Analyzer";
this.packetAnalyzerToolStripMenuItem.Click += new System.EventHandler(this.packetAnalyzerToolStripMenuItem_Click);
//
// settingsToolStripMenuItem // settingsToolStripMenuItem
// //
this.settingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.settingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -374,7 +392,7 @@ namespace LFP_Manager.Forms
// changePasswordToolStripMenuItem // changePasswordToolStripMenuItem
// //
this.changePasswordToolStripMenuItem.Name = "changePasswordToolStripMenuItem"; this.changePasswordToolStripMenuItem.Name = "changePasswordToolStripMenuItem";
this.changePasswordToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.changePasswordToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
this.changePasswordToolStripMenuItem.Text = "Change Password"; this.changePasswordToolStripMenuItem.Text = "Change Password";
this.changePasswordToolStripMenuItem.Click += new System.EventHandler(this.changePasswordToolStripMenuItem_Click); this.changePasswordToolStripMenuItem.Click += new System.EventHandler(this.changePasswordToolStripMenuItem_Click);
// //
@@ -386,6 +404,7 @@ namespace LFP_Manager.Forms
this.Controls.Add(this.layoutControl1); this.Controls.Add(this.layoutControl1);
this.Controls.Add(this.mnMain); this.Controls.Add(this.mnMain);
this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("fmxMain.IconOptions.Icon"))); this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("fmxMain.IconOptions.Icon")));
this.MainMenuStrip = this.mnMain;
this.Name = "fmxMain"; this.Name = "fmxMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "LFP SYSTEM"; this.Text = "LFP SYSTEM";
@@ -443,6 +462,8 @@ namespace LFP_Manager.Forms
private System.Windows.Forms.ToolStripMenuItem historyViewToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem historyViewToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem updateToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem updateToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem firmwareUpdateToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem firmwareUpdateToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem packetAnalyzerToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem changePasswordToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem changePasswordToolStripMenuItem;
} }

View File

@@ -26,6 +26,7 @@ namespace LFP_Manager.Forms
private fmxModuleDetail ModuleDetailForm = null; private fmxModuleDetail ModuleDetailForm = null;
private fmxFwUpdate FwUpdateForm = null; private fmxFwUpdate FwUpdateForm = null;
private fmxHistory HistoryForm = null; private fmxHistory HistoryForm = null;
private fmxPacketLog PacketLogForm = null;
// Static Variables // Static Variables
CommConfig Config = new CommConfig(); CommConfig Config = new CommConfig();
@@ -64,6 +65,7 @@ namespace LFP_Manager.Forms
uTarget.OnStart += StartButtonClick; uTarget.OnStart += StartButtonClick;
uDataLog.OnUpdate += LogStatusUpdate; uDataLog.OnUpdate += LogStatusUpdate;
uEventLog.OnPacketAnalyzerClick += packetAnalyzerToolStripMenuItem_Click;
this.Text = String.Format("LFP SYSTEM [{0}] -- TW (for DBG)", Application.ProductVersion); this.Text = String.Format("LFP SYSTEM [{0}] -- TW (for DBG)", Application.ProductVersion);
} }
@@ -210,6 +212,7 @@ namespace LFP_Manager.Forms
uartThread.OnUpdate += UpdateData; uartThread.OnUpdate += UpdateData;
uartThread.OnDataRecv += UartRecvData; uartThread.OnDataRecv += UartRecvData;
uartThread.OnPrint += CommDataPrint; uartThread.OnPrint += CommDataPrint;
uartThread.OnPacketLog += PacketLogUpdate;
uartThread.SetPolling(chbPolling.Checked, sId, ref SystemData); uartThread.SetPolling(chbPolling.Checked, sId, ref SystemData);
if (uartThread.Start(ref Config, sId, chbPolling.Checked)) if (uartThread.Start(ref Config, sId, chbPolling.Checked))
@@ -813,6 +816,21 @@ namespace LFP_Manager.Forms
} }
} }
private void packetAnalyzerToolStripMenuItem_Click(object sender, EventArgs e)
{
if (PacketLogForm == null || PacketLogForm.IsDisposed)
{
PacketLogForm = new fmxPacketLog();
}
PacketLogForm.Show();
PacketLogForm.BringToFront();
}
private void PacketLogUpdate(DateTime timestamp, bool isTx, byte[] packet, string description)
{
PacketLogForm?.AddPacketLog(timestamp, isTx, packet, description);
}
#endregion #endregion
#region FORM EVENT #region FORM EVENT

354
LFP_Manager/Forms/fmxPacketLog.Designer.cs generated Normal file
View File

@@ -0,0 +1,354 @@
namespace LFP_Manager.Forms
{
partial class fmxPacketLog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.panelTop = new DevExpress.XtraEditors.PanelControl();
this.btnCapture = new DevExpress.XtraEditors.SimpleButton();
this.btnClear = new DevExpress.XtraEditors.SimpleButton();
this.chkAutoScroll = new DevExpress.XtraEditors.CheckEdit();
this.btnExport = new DevExpress.XtraEditors.SimpleButton();
this.cmbFilter = new DevExpress.XtraEditors.ComboBoxEdit();
this.lblFilter = new DevExpress.XtraEditors.LabelControl();
this.lblStatus = new DevExpress.XtraEditors.LabelControl();
this.splitContainerControl = new DevExpress.XtraEditors.SplitContainerControl();
this.gcPacketLog = new DevExpress.XtraGrid.GridControl();
this.gvPacketLog = new DevExpress.XtraGrid.Views.Grid.GridView();
this.colNo = new DevExpress.XtraGrid.Columns.GridColumn();
this.colTime = new DevExpress.XtraGrid.Columns.GridColumn();
this.colDir = new DevExpress.XtraGrid.Columns.GridColumn();
this.colDevId = new DevExpress.XtraGrid.Columns.GridColumn();
this.colFunc = new DevExpress.XtraGrid.Columns.GridColumn();
this.colLen = new DevExpress.XtraGrid.Columns.GridColumn();
this.colHex = new DevExpress.XtraGrid.Columns.GridColumn();
this.colDesc = new DevExpress.XtraGrid.Columns.GridColumn();
this.colCrc = new DevExpress.XtraGrid.Columns.GridColumn();
this.groupDetail = new DevExpress.XtraEditors.GroupControl();
this.txtDetail = new DevExpress.XtraEditors.MemoEdit();
((System.ComponentModel.ISupportInitialize)(this.panelTop)).BeginInit();
this.panelTop.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.chkAutoScroll.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cmbFilter.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl)).BeginInit();
this.splitContainerControl.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gcPacketLog)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gvPacketLog)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.groupDetail)).BeginInit();
this.groupDetail.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.txtDetail.Properties)).BeginInit();
this.SuspendLayout();
//
// panelTop
//
this.panelTop.Controls.Add(this.lblStatus);
this.panelTop.Controls.Add(this.lblFilter);
this.panelTop.Controls.Add(this.cmbFilter);
this.panelTop.Controls.Add(this.btnExport);
this.panelTop.Controls.Add(this.chkAutoScroll);
this.panelTop.Controls.Add(this.btnClear);
this.panelTop.Controls.Add(this.btnCapture);
this.panelTop.Dock = System.Windows.Forms.DockStyle.Top;
this.panelTop.Location = new System.Drawing.Point(0, 0);
this.panelTop.Name = "panelTop";
this.panelTop.Size = new System.Drawing.Size(984, 46);
this.panelTop.TabIndex = 0;
//
// btnCapture
//
this.btnCapture.Location = new System.Drawing.Point(12, 10);
this.btnCapture.Name = "btnCapture";
this.btnCapture.Size = new System.Drawing.Size(85, 26);
this.btnCapture.TabIndex = 0;
this.btnCapture.Text = "Pause";
this.btnCapture.Click += new System.EventHandler(this.btnCapture_Click);
//
// btnClear
//
this.btnClear.Location = new System.Drawing.Point(103, 10);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(75, 26);
this.btnClear.TabIndex = 1;
this.btnClear.Text = "Clear";
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// chkAutoScroll
//
this.chkAutoScroll.EditValue = true;
this.chkAutoScroll.Location = new System.Drawing.Point(190, 13);
this.chkAutoScroll.Name = "chkAutoScroll";
this.chkAutoScroll.Properties.Caption = "Auto Scroll";
this.chkAutoScroll.Size = new System.Drawing.Size(85, 20);
this.chkAutoScroll.TabIndex = 2;
//
// btnExport
//
this.btnExport.Location = new System.Drawing.Point(470, 10);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(95, 26);
this.btnExport.TabIndex = 3;
this.btnExport.Text = "Export Excel";
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// cmbFilter
//
this.cmbFilter.EditValue = "ALL";
this.cmbFilter.Location = new System.Drawing.Point(340, 13);
this.cmbFilter.Name = "cmbFilter";
this.cmbFilter.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.cmbFilter.Properties.Items.AddRange(new object[] {
"ALL",
"TX Only",
"RX Only",
"Error Only"});
this.cmbFilter.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.cmbFilter.Size = new System.Drawing.Size(110, 20);
this.cmbFilter.TabIndex = 4;
this.cmbFilter.SelectedIndexChanged += new System.EventHandler(this.cmbFilter_SelectedIndexChanged);
//
// lblFilter
//
this.lblFilter.Location = new System.Drawing.Point(295, 16);
this.lblFilter.Name = "lblFilter";
this.lblFilter.Size = new System.Drawing.Size(39, 14);
this.lblFilter.TabIndex = 5;
this.lblFilter.Text = "Filter :";
//
// lblStatus
//
this.lblStatus.Appearance.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblStatus.Appearance.Options.UseFont = true;
this.lblStatus.Location = new System.Drawing.Point(590, 16);
this.lblStatus.Name = "lblStatus";
this.lblStatus.Size = new System.Drawing.Size(200, 14);
this.lblStatus.TabIndex = 6;
this.lblStatus.Text = "Total: 0 | TX: 0 | RX: 0";
//
// splitContainerControl
//
this.splitContainerControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainerControl.Horizontal = false;
this.splitContainerControl.Location = new System.Drawing.Point(0, 46);
this.splitContainerControl.Name = "splitContainerControl";
this.splitContainerControl.Panel1.Controls.Add(this.gcPacketLog);
this.splitContainerControl.Panel1.Text = "Panel1";
this.splitContainerControl.Panel2.Controls.Add(this.groupDetail);
this.splitContainerControl.Panel2.Text = "Panel2";
this.splitContainerControl.Size = new System.Drawing.Size(984, 565);
this.splitContainerControl.SplitterPosition = 370;
this.splitContainerControl.TabIndex = 1;
//
// gcPacketLog
//
this.gcPacketLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.gcPacketLog.Location = new System.Drawing.Point(0, 0);
this.gcPacketLog.MainView = this.gvPacketLog;
this.gcPacketLog.Name = "gcPacketLog";
this.gcPacketLog.Size = new System.Drawing.Size(984, 370);
this.gcPacketLog.TabIndex = 0;
this.gcPacketLog.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gvPacketLog});
//
// gvPacketLog
//
this.gvPacketLog.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.colNo,
this.colTime,
this.colDir,
this.colDevId,
this.colFunc,
this.colLen,
this.colHex,
this.colDesc,
this.colCrc});
this.gvPacketLog.GridControl = this.gcPacketLog;
this.gvPacketLog.Name = "gvPacketLog";
this.gvPacketLog.OptionsBehavior.Editable = false;
this.gvPacketLog.OptionsBehavior.ReadOnly = true;
this.gvPacketLog.OptionsSelection.EnableAppearanceFocusedCell = false;
this.gvPacketLog.OptionsView.ShowGroupPanel = false;
this.gvPacketLog.OptionsView.ShowIndicator = false;
this.gvPacketLog.RowStyle += new DevExpress.XtraGrid.Views.Grid.RowStyleEventHandler(this.gvPacketLog_RowStyle);
this.gvPacketLog.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(this.gvPacketLog_FocusedRowChanged);
//
// colNo
//
this.colNo.Caption = "No";
this.colNo.FieldName = "no";
this.colNo.Name = "colNo";
this.colNo.Visible = true;
this.colNo.VisibleIndex = 0;
this.colNo.Width = 45;
//
// colTime
//
this.colTime.Caption = "Time";
this.colTime.FieldName = "time";
this.colTime.Name = "colTime";
this.colTime.Visible = true;
this.colTime.VisibleIndex = 1;
this.colTime.Width = 90;
//
// colDir
//
this.colDir.Caption = "Dir";
this.colDir.FieldName = "dir";
this.colDir.Name = "colDir";
this.colDir.Visible = true;
this.colDir.VisibleIndex = 2;
this.colDir.Width = 40;
//
// colDevId
//
this.colDevId.Caption = "ID";
this.colDevId.FieldName = "dev_id";
this.colDevId.Name = "colDevId";
this.colDevId.Visible = true;
this.colDevId.VisibleIndex = 3;
this.colDevId.Width = 40;
//
// colFunc
//
this.colFunc.Caption = "Func";
this.colFunc.FieldName = "func";
this.colFunc.Name = "colFunc";
this.colFunc.Visible = true;
this.colFunc.VisibleIndex = 4;
this.colFunc.Width = 50;
//
// colLen
//
this.colLen.Caption = "Len";
this.colLen.FieldName = "len";
this.colLen.Name = "colLen";
this.colLen.Visible = true;
this.colLen.VisibleIndex = 5;
this.colLen.Width = 40;
//
// colHex
//
this.colHex.Caption = "RAW HEX Dump";
this.colHex.FieldName = "hex";
this.colHex.Name = "colHex";
this.colHex.Visible = true;
this.colHex.VisibleIndex = 6;
this.colHex.Width = 350;
//
// colDesc
//
this.colDesc.Caption = "Description";
this.colDesc.FieldName = "desc";
this.colDesc.Name = "colDesc";
this.colDesc.Visible = true;
this.colDesc.VisibleIndex = 7;
this.colDesc.Width = 260;
//
// colCrc
//
this.colCrc.Caption = "CRC";
this.colCrc.FieldName = "crc";
this.colCrc.Name = "colCrc";
this.colCrc.Visible = true;
this.colCrc.VisibleIndex = 8;
this.colCrc.Width = 55;
//
// groupDetail
//
this.groupDetail.Controls.Add(this.txtDetail);
this.groupDetail.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupDetail.Location = new System.Drawing.Point(0, 0);
this.groupDetail.Name = "groupDetail";
this.groupDetail.Size = new System.Drawing.Size(984, 185);
this.groupDetail.TabIndex = 0;
this.groupDetail.Text = "Packet Inspector & Analysis";
//
// txtDetail
//
this.txtDetail.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtDetail.Location = new System.Drawing.Point(2, 23);
this.txtDetail.Name = "txtDetail";
this.txtDetail.Properties.Appearance.Font = new System.Drawing.Font("Consolas", 9.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtDetail.Properties.Appearance.Options.UseFont = true;
this.txtDetail.Properties.ReadOnly = true;
this.txtDetail.Size = new System.Drawing.Size(980, 160);
this.txtDetail.TabIndex = 0;
//
// fmxPacketLog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(984, 611);
this.Controls.Add(this.splitContainerControl);
this.Controls.Add(this.panelTop);
this.IconOptions.Image = global::LFP_Manager.Properties.Resources.AMO_LOGO1;
this.Name = "fmxPacketLog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "RS232 Packet Analyzer";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.fmxPacketLog_FormClosing);
((System.ComponentModel.ISupportInitialize)(this.panelTop)).EndInit();
this.panelTop.ResumeLayout(false);
this.panelTop.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.chkAutoScroll.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cmbFilter.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl)).EndInit();
this.splitContainerControl.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gcPacketLog)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gvPacketLog)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.groupDetail)).EndInit();
this.groupDetail.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.txtDetail.Properties)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.PanelControl panelTop;
private DevExpress.XtraEditors.SimpleButton btnCapture;
private DevExpress.XtraEditors.SimpleButton btnClear;
private DevExpress.XtraEditors.CheckEdit chkAutoScroll;
private DevExpress.XtraEditors.SimpleButton btnExport;
private DevExpress.XtraEditors.ComboBoxEdit cmbFilter;
private DevExpress.XtraEditors.LabelControl lblFilter;
private DevExpress.XtraEditors.LabelControl lblStatus;
private DevExpress.XtraEditors.SplitContainerControl splitContainerControl;
private DevExpress.XtraGrid.GridControl gcPacketLog;
private DevExpress.XtraGrid.Views.Grid.GridView gvPacketLog;
private DevExpress.XtraGrid.Columns.GridColumn colNo;
private DevExpress.XtraGrid.Columns.GridColumn colTime;
private DevExpress.XtraGrid.Columns.GridColumn colDir;
private DevExpress.XtraGrid.Columns.GridColumn colDevId;
private DevExpress.XtraGrid.Columns.GridColumn colFunc;
private DevExpress.XtraGrid.Columns.GridColumn colLen;
private DevExpress.XtraGrid.Columns.GridColumn colHex;
private DevExpress.XtraGrid.Columns.GridColumn colDesc;
private DevExpress.XtraGrid.Columns.GridColumn colCrc;
private DevExpress.XtraEditors.GroupControl groupDetail;
private DevExpress.XtraEditors.MemoEdit txtDetail;
}
}

View File

@@ -0,0 +1,369 @@
using System;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Views.Grid;
using LFP_Manager.Function;
namespace LFP_Manager.Forms
{
public partial class fmxPacketLog : DevExpress.XtraEditors.XtraForm
{
private DataTable packetTable = null;
private int packetIndex = 0;
private int txCount = 0;
private int rxCount = 0;
private bool isCapturing = true;
private const int MAX_LOG_COUNT = 5000;
public fmxPacketLog()
{
InitializeComponent();
InitDataTable();
}
private void InitDataTable()
{
packetTable = new DataTable();
packetTable.Columns.Add("no", typeof(int));
packetTable.Columns.Add("time", typeof(string));
packetTable.Columns.Add("dir", typeof(string));
packetTable.Columns.Add("dev_id", typeof(string));
packetTable.Columns.Add("func", typeof(string));
packetTable.Columns.Add("len", typeof(int));
packetTable.Columns.Add("hex", typeof(string));
packetTable.Columns.Add("desc", typeof(string));
packetTable.Columns.Add("crc", typeof(string));
packetTable.Columns.Add("raw_bytes", typeof(object));
gcPacketLog.DataSource = packetTable;
ApplyFilter();
}
public void AddPacketLog(DateTime timestamp, bool isTx, byte[] data, string description)
{
if (!isCapturing || data == null || data.Length == 0) return;
if (this.InvokeRequired)
{
this.BeginInvoke(new Action(() => AddPacketLogRow(timestamp, isTx, data, description)));
}
else
{
AddPacketLogRow(timestamp, isTx, data, description);
}
}
private void AddPacketLogRow(DateTime timestamp, bool isTx, byte[] data, string description)
{
try
{
if (packetTable == null) return;
// Max rows management
if (packetTable.Rows.Count >= MAX_LOG_COUNT)
{
for (int i = 0; i < 500; i++)
{
if (packetTable.Rows.Count > 0)
packetTable.Rows.RemoveAt(0);
}
}
packetIndex++;
if (isTx) txCount++;
else rxCount++;
string dir = isTx ? "TX" : "RX";
string devId = data.Length > 0 ? string.Format("0x{0:X2}", data[0]) : "-";
string func = data.Length > 1 ? string.Format("0x{0:X2}", data[1]) : "-";
int len = data.Length;
StringBuilder sbHex = new StringBuilder(data.Length * 3);
for (int i = 0; i < data.Length; i++)
{
sbHex.AppendFormat("{0:X2} ", data[i]);
}
string hex = sbHex.ToString().TrimEnd();
// CRC Check
string crcResult = "OK";
if (data.Length >= 4)
{
byte[] calcCrc = csSerialCommFunction.GetCRC(data, data.Length - 2);
byte rxCrcH = data[data.Length - 2];
byte rxCrcL = data[data.Length - 1];
if (calcCrc[1] != rxCrcH || calcCrc[0] != rxCrcL)
{
crcResult = "ERR";
}
}
DataRow row = packetTable.NewRow();
row["no"] = packetIndex;
row["time"] = timestamp.ToString("HH:mm:ss.fff");
row["dir"] = dir;
row["dev_id"] = devId;
row["func"] = func;
row["len"] = len;
row["hex"] = hex;
row["desc"] = description;
row["crc"] = crcResult;
row["raw_bytes"] = data;
packetTable.Rows.Add(row);
lblStatus.Text = string.Format("Total: {0} | TX: {1} | RX: {2}", packetIndex, txCount, rxCount);
if (chkAutoScroll.Checked && gvPacketLog.RowCount > 0)
{
gvPacketLog.MoveLast();
}
}
catch
{
}
}
private void gvPacketLog_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
{
DataRow row = gvPacketLog.GetFocusedDataRow();
if (row == null)
{
txtDetail.Text = string.Empty;
return;
}
byte[] rawBytes = row["raw_bytes"] as byte[];
string dir = row["dir"].ToString();
string desc = row["desc"].ToString();
string time = row["time"].ToString();
txtDetail.Text = AnalyzePacket(rawBytes, dir, desc, time);
}
private string AnalyzePacket(byte[] data, string dir, string desc, string time)
{
if (data == null || data.Length == 0) return "No Data";
StringBuilder sb = new StringBuilder();
sb.AppendLine("================================================================================");
sb.AppendLine(string.Format("[{0}] {1} (Length: {2} bytes) - {3}", dir, desc, data.Length, time));
sb.AppendLine("================================================================================");
// 1. Raw HEX Dump formatted
sb.AppendLine("[RAW HEX DUMP]");
for (int i = 0; i < data.Length; i += 16)
{
sb.AppendFormat("{0:X4}: ", i);
int count = Math.Min(16, data.Length - i);
for (int j = 0; j < count; j++)
{
sb.AppendFormat("{0:X2} ", data[i + j]);
}
sb.AppendLine();
}
sb.AppendLine();
// 2. Modbus Protocol Interpretation
sb.AppendLine("[MODBUS FRAME INTERPRETATION]");
if (data.Length >= 2)
{
byte devId = data[0];
byte funcCode = data[1];
sb.AppendLine(string.Format(" - Device (Slave) Address : 0x{0:X2} ({0})", devId));
sb.AppendLine(string.Format(" - Function Code : 0x{0:X2} ({1})", funcCode, GetFunctionCodeName(funcCode)));
if (dir == "TX")
{
if (data.Length >= 6)
{
ushort regAddr = (ushort)((data[2] << 8) | data[3]);
ushort regCount = (ushort)((data[4] << 8) | data[5]);
sb.AppendLine(string.Format(" - Target Register Address: 0x{0:X4} ({0})", regAddr));
sb.AppendLine(string.Format(" - Register Count / Value : 0x{0:X4} ({0})", regCount));
}
}
else // RX
{
if (funcCode == 0x03 && data.Length >= 3)
{
byte byteCount = data[2];
sb.AppendLine(string.Format(" - Data Byte Count : {0} bytes ({1} registers)", byteCount, byteCount / 2));
int regIndex = 0;
for (int p = 3; p + 1 < data.Length - 2; p += 2)
{
ushort val = (ushort)((data[p] << 8) | data[p + 1]);
sb.AppendLine(string.Format(" [Reg +{0:D2}] Offset 0x{1:X2} : 0x{2:X4} ({3})", regIndex++, p - 3, val, (short)val));
}
}
else if (funcCode > 0x80)
{
byte errCode = data.Length > 2 ? data[2] : (byte)0;
sb.AppendLine(string.Format(" - Modbus Exception Code : 0x{0:X2} ({1})", errCode, GetExceptionName(errCode)));
}
}
// CRC Check
if (data.Length >= 4)
{
byte[] calcCrc = csSerialCommFunction.GetCRC(data, data.Length - 2);
byte rxCrcH = data[data.Length - 2];
byte rxCrcL = data[data.Length - 1];
bool crcOk = (calcCrc[1] == rxCrcH && calcCrc[0] == rxCrcL);
sb.AppendLine(string.Format(" - CRC16 Checksum : [H:0x{0:X2}, L:0x{1:X2}] (Calc: 0x{2:X2}{3:X2}) -> {4}",
rxCrcH, rxCrcL, calcCrc[1], calcCrc[0], crcOk ? "VALID (OK)" : "INVALID (MISMATCH)"));
}
}
return sb.ToString();
}
private string GetFunctionCodeName(byte func)
{
switch (func)
{
case 0x01: return "Read Coil Status (0x01)";
case 0x02: return "Read Input Status (0x02)";
case 0x03: return "Read Holding Registers (0x03)";
case 0x04: return "Read Input Registers (0x04)";
case 0x05: return "Force Single Coil (0x05)";
case 0x06: return "Preset Single Register (0x06)";
case 0x10: return "Preset Multiple Registers (0x10)";
default:
if (func > 0x80) return string.Format("Exception Response (0x{0:X2})", func);
return string.Format("Custom / Unknown (0x{0:X2})", func);
}
}
private string GetExceptionName(byte err)
{
switch (err)
{
case 0x01: return "Illegal Function";
case 0x02: return "Illegal Data Address";
case 0x03: return "Illegal Data Value";
case 0x04: return "Slave Device Failure";
case 0x05: return "Acknowledge";
case 0x06: return "Slave Device Busy";
default: return "Unknown Exception";
}
}
private void gvPacketLog_RowStyle(object sender, RowStyleEventArgs e)
{
if (e.RowHandle < 0) return;
DataRow row = gvPacketLog.GetDataRow(e.RowHandle);
if (row == null) return;
string dir = row["dir"].ToString();
string crc = row["crc"].ToString();
if (crc == "ERR")
{
e.Appearance.ForeColor = Color.Red;
e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold);
}
else if (dir == "TX")
{
e.Appearance.ForeColor = Color.DarkBlue;
}
else if (dir == "RX")
{
e.Appearance.ForeColor = Color.DarkGreen;
}
}
private void btnCapture_Click(object sender, EventArgs e)
{
isCapturing = !isCapturing;
btnCapture.Text = isCapturing ? "Pause" : "Resume";
btnCapture.Appearance.ForeColor = isCapturing ? Color.Black : Color.DarkRed;
}
private void btnClear_Click(object sender, EventArgs e)
{
packetTable?.Rows.Clear();
packetIndex = 0;
txCount = 0;
rxCount = 0;
lblStatus.Text = "Total: 0 | TX: 0 | RX: 0";
txtDetail.Text = string.Empty;
}
private void cmbFilter_SelectedIndexChanged(object sender, EventArgs e)
{
ApplyFilter();
}
private void ApplyFilter()
{
if (packetTable == null) return;
string selected = cmbFilter.Text;
DataView dv = packetTable.DefaultView;
if (selected == "TX Only")
{
dv.RowFilter = "dir = 'TX'";
}
else if (selected == "RX Only")
{
dv.RowFilter = "dir = 'RX'";
}
else if (selected == "Error Only")
{
dv.RowFilter = "crc = 'ERR'";
}
else
{
dv.RowFilter = string.Empty;
}
}
private void btnExport_Click(object sender, EventArgs e)
{
if (packetTable == null || packetTable.Rows.Count == 0)
{
MessageBox.Show("No packet logs to export.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
SaveFileDialog sDialog = new SaveFileDialog();
sDialog.Title = "Export Packet Logs";
sDialog.DefaultExt = "xls";
sDialog.Filter = "Excel files (*.xls)|*.xls|All files (*.*)|*.*";
if (sDialog.ShowDialog() == DialogResult.OK)
{
try
{
DataTable exportTable = packetTable.DefaultView.ToTable(false, "no", "time", "dir", "dev_id", "func", "len", "hex", "desc", "crc");
csExcelExport.ExportToExcelExt(exportTable, sDialog.FileName);
MessageBox.Show("Complete Exporting Packet Log File.", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
private void fmxPacketLog_FormClosing(object sender, FormClosingEventArgs e)
{
// Just hide on close so it can be re-opened quickly
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
this.Hide();
}
}
}
}

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -758,6 +758,9 @@ namespace LFP_Manager.Function
case 137: // Anti-Theft Gyro-Scope case 137: // Anti-Theft Gyro-Scope
rSystemData.CalibriationData.AntiTheft.GyroScope = reg_value; rSystemData.CalibriationData.AntiTheft.GyroScope = reg_value;
break; break;
case 138: // Anti-Theft Activated Status
rSystemData.CalibriationData.AntiTheft.Status = reg_value;
break;
} }
} }

Binary file not shown.

View File

@@ -1,530 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BE0785A4-0CCB-44C5-A8C0-1AA2245E71F4}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LFP_Manager</RootNamespace>
<AssemblyName>LFP_Manager_GL</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\AMO_LOGO.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="DevExpress.Charts.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Drawing.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Data.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Images.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Mvvm.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Pdf.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Office.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.RichEdit.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.RichEdit.v22.2.Export, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Printing.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Data.Desktop.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Sparkline.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.TreeMap.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Xpo.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraBars.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v22.2.UI, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v22.2.Wizard, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGantt.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraGauges.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGauges.v22.2.Win, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGrid.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraLayout.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraNavBar.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraTreeList.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraTreeMap.v22.2.UI, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraTreeMap.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="IPAddressControlLib">
<HintPath>dll\IPAddressControlLib.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>dll\log4net.dll</HintPath>
</Reference>
<Reference Include="SnmpSharpNet, Version=0.9.4.0, Culture=neutral, PublicKeyToken=b2181aa3b9571feb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>dll\SnmpSharpNet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.Linq" />
<Reference Include="System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net451\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.EF6, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.113.0\lib\net451\System.Data.SQLite.EF6.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.113.0\lib\net451\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
<Reference Include="System.Security" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Tftp.Net">
<HintPath>dll\Tftp.Net.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Controls\ucCalibration.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCalibration.Designer.cs">
<DependentUpon>ucCalibration.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucCalibrationView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCalibrationView.Designer.cs">
<DependentUpon>ucCalibrationView.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucCommConfig.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCommConfig.Designer.cs">
<DependentUpon>ucCommConfig.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucDataLog.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucDataLog.Designer.cs">
<DependentUpon>ucDataLog.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucEtcStatusView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucEtcStatusView.Designer.cs">
<DependentUpon>ucEtcStatusView.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucEventLog.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucEventLog.Designer.cs">
<DependentUpon>ucEventLog.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucHistroy.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucHistroy.Designer.cs">
<DependentUpon>ucHistroy.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucMainStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucMainStatus.Designer.cs">
<DependentUpon>ucMainStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucModuleMainB.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucModuleMainB.Designer.cs">
<DependentUpon>ucModuleMainB.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucParamSet.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucParamSet.Designer.cs">
<DependentUpon>ucParamSet.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucShelfStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucShelfStatus.Designer.cs">
<DependentUpon>ucShelfStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucStatus.designer.cs">
<DependentUpon>ucStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucTargetControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucTargetControl.Designer.cs">
<DependentUpon>ucTargetControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucTftpClientcs.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucTftpClientcs.Designer.cs">
<DependentUpon>ucTftpClientcs.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucModuleMainA.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucModuleMainA.Designer.cs">
<DependentUpon>ucModuleMainA.cs</DependentUpon>
</Compile>
<Compile Include="DataStructure\csCanConstData.cs" />
<Compile Include="DataStructure\csDbConstData.cs" />
<Compile Include="Forms\fmxEtcStatus.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxEtcStatus.Designer.cs">
<DependentUpon>fmxEtcStatus.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxExcelFile.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxExcelFile.designer.cs">
<DependentUpon>fmxExcelFile.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwImageConverter.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwImageConverter.Designer.cs">
<DependentUpon>fmxFwImageConverter.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxCalibration.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxCalibration.Designer.cs">
<DependentUpon>fmxCalibration.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwUpdate.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwUpdate.Designer.cs">
<DependentUpon>fmxFwUpdate.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwUpdateTftp.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwUpdateTftp.Designer.cs">
<DependentUpon>fmxFwUpdateTftp.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxHistory.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxHistory.Designer.cs">
<DependentUpon>fmxHistory.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxInventoryConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxInventoryConfig.designer.cs">
<DependentUpon>fmxInventoryConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxModuleDetail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxModuleDetail.Designer.cs">
<DependentUpon>fmxModuleDetail.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxParamConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxParamConfig.Designer.cs">
<DependentUpon>fmxParamConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxSystemSet.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxSystemSet.Designer.cs">
<DependentUpon>fmxSystemSet.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxWait.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxWait.Designer.cs">
<DependentUpon>fmxWait.cs</DependentUpon>
</Compile>
<Compile Include="Function\csCanCommFunction.cs" />
<Compile Include="Function\csCanFwUpdateFunction.cs" />
<Compile Include="Function\csExcelExport.cs" />
<Compile Include="Function\csExcelFunction.cs" />
<Compile Include="Function\csExtCANControlFunction.cs" />
<Compile Include="Function\csHistoryFunction.cs" />
<Compile Include="Function\csMakeTcpDataFunction.cs" />
<Compile Include="Function\csUartCanCommFunction.cs" />
<Compile Include="Threads\csCanThread.cs" />
<Compile Include="Threads\csDbThread.cs" />
<Compile Include="Threads\csSnmpThread.cs" />
<Compile Include="DataStructure\csConstData.cs" />
<Compile Include="DataStructure\csDataStructure.cs" />
<Compile Include="Forms\fmxCommConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxCommConfig.Designer.cs">
<DependentUpon>fmxCommConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxMain.Designer.cs">
<DependentUpon>fmxMain.cs</DependentUpon>
</Compile>
<Compile Include="Function\csIniControlFunction.cs" />
<Compile Include="Function\csMakeDataFunction.cs" />
<Compile Include="Function\csSerialCommFunction.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Threads\csUartCanThread.cs" />
<Compile Include="Threads\csUartThread.cs" />
<Compile Include="Utils\csDBUtils.cs" />
<Compile Include="Utils\csExcelControl.cs" />
<Compile Include="Utils\csLog.cs" />
<Compile Include="Utils\csUtils.cs" />
<EmbeddedResource Include="Controls\ucCalibration.resx">
<DependentUpon>ucCalibration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucCalibrationView.resx">
<DependentUpon>ucCalibrationView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucCommConfig.resx">
<DependentUpon>ucCommConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucDataLog.resx">
<DependentUpon>ucDataLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucEtcStatusView.resx">
<DependentUpon>ucEtcStatusView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucEventLog.resx">
<DependentUpon>ucEventLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucHistroy.resx">
<DependentUpon>ucHistroy.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucMainStatus.resx">
<DependentUpon>ucMainStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucModuleMainA.resx">
<DependentUpon>ucModuleMainA.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucModuleMainB.resx">
<DependentUpon>ucModuleMainB.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucParamSet.resx">
<DependentUpon>ucParamSet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucShelfStatus.resx">
<DependentUpon>ucShelfStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucStatus.resx">
<DependentUpon>ucStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucTargetControl.resx">
<DependentUpon>ucTargetControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucTftpClientcs.resx">
<DependentUpon>ucTftpClientcs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxEtcStatus.resx">
<DependentUpon>fmxEtcStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxExcelFile.resx">
<DependentUpon>fmxExcelFile.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwImageConverter.resx">
<DependentUpon>fmxFwImageConverter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxCalibration.resx">
<DependentUpon>fmxCalibration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxCommConfig.resx">
<DependentUpon>fmxCommConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwUpdate.resx">
<DependentUpon>fmxFwUpdate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwUpdateTftp.resx">
<DependentUpon>fmxFwUpdateTftp.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxHistory.resx">
<DependentUpon>fmxHistory.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxInventoryConfig.resx">
<DependentUpon>fmxInventoryConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxMain.resx">
<DependentUpon>fmxMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxModuleDetail.resx">
<DependentUpon>fmxModuleDetail.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxParamConfig.resx">
<DependentUpon>fmxParamConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxSystemSet.resx">
<DependentUpon>fmxSystemSet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxWait.resx">
<DependentUpon>fmxWait.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Resources\logo.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AMO_LOGO.ico" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="DB Schema\DB_SCHEMA_TABLE.sql" />
<Content Include="DB Schema\LOG_DB_SCHEMA_TABLE.sql" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(TargetDir)\Library" mkdir "$(TargetDir)\Library"
if not exist "$(TargetDir)\Library\kerneldlls" mkdir "$(TargetDir)\Library\kerneldlls"
move "$(TargetDir)\*.dll" "$(TargetDir)\Library"
move "$(TargetDir)\*.pdb" "$(TargetDir)\Library"
move "$(TargetDir)\*.xml" "$(TargetDir)\Library"
copy "$(ProjectDir)\dll\*.dll" "$(TargetDir)\Library"
copy "$(ProjectDir)\dll\kerneldlls\*.*" "$(TargetDir)\Library\kerneldlls"
if not exist "$(TargetDir)\sql" mkdir "$(TargetDir)\sql"
copy "$(ProjectDir)\DB Schema\*.sql" "$(TargetDir)\sql"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>if exist "$(TargetDir)\library" rmdir /s /q "$(TargetDir)\library"
if exist "$(TargetDir)\sql" rmdir /s /q "$(TargetDir)\sql"</PreBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,526 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BE0785A4-0CCB-44C5-A8C0-1AA2245E71F4}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LFP_Manager</RootNamespace>
<AssemblyName>LFP_Manager_GL</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\AMO_LOGO.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="DevExpress.Charts.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Data.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Images.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Mvvm.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Pdf.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Office.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.RichEdit.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.RichEdit.v20.1.Export, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Printing.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Data.Desktop.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Sparkline.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.TreeMap.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Xpo.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraBars.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v20.1.UI, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v20.1.Wizard, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraEditors.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGantt.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraGauges.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGauges.v20.1.Win, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGrid.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraLayout.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraNavBar.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraTreeList.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraTreeMap.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="IPAddressControlLib">
<HintPath>dll\IPAddressControlLib.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>dll\log4net.dll</HintPath>
</Reference>
<Reference Include="SnmpSharpNet, Version=0.9.4.0, Culture=neutral, PublicKeyToken=b2181aa3b9571feb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>dll\SnmpSharpNet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.Linq" />
<Reference Include="System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net451\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.EF6, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.113.0\lib\net451\System.Data.SQLite.EF6.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.113.0\lib\net451\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
<Reference Include="System.Security" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Tftp.Net">
<HintPath>dll\Tftp.Net.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Controls\ucCalibration.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCalibration.Designer.cs">
<DependentUpon>ucCalibration.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucCalibrationView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCalibrationView.Designer.cs">
<DependentUpon>ucCalibrationView.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucCommConfig.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCommConfig.Designer.cs">
<DependentUpon>ucCommConfig.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucDataLog.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucDataLog.Designer.cs">
<DependentUpon>ucDataLog.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucEtcStatusView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucEtcStatusView.Designer.cs">
<DependentUpon>ucEtcStatusView.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucEventLog.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucEventLog.Designer.cs">
<DependentUpon>ucEventLog.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucHistroy.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucHistroy.Designer.cs">
<DependentUpon>ucHistroy.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucMainStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucMainStatus.Designer.cs">
<DependentUpon>ucMainStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucModuleMainB.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucModuleMainB.Designer.cs">
<DependentUpon>ucModuleMainB.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucParamSet.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucParamSet.Designer.cs">
<DependentUpon>ucParamSet.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucShelfStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucShelfStatus.Designer.cs">
<DependentUpon>ucShelfStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucStatus.designer.cs">
<DependentUpon>ucStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucTargetControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucTargetControl.Designer.cs">
<DependentUpon>ucTargetControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucTftpClientcs.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucTftpClientcs.Designer.cs">
<DependentUpon>ucTftpClientcs.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucModuleMainA.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucModuleMainA.Designer.cs">
<DependentUpon>ucModuleMainA.cs</DependentUpon>
</Compile>
<Compile Include="DataStructure\csCanConstData.cs" />
<Compile Include="DataStructure\csDbConstData.cs" />
<Compile Include="Forms\fmxEtcStatus.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxEtcStatus.Designer.cs">
<DependentUpon>fmxEtcStatus.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxExcelFile.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxExcelFile.designer.cs">
<DependentUpon>fmxExcelFile.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwImageConverter.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwImageConverter.Designer.cs">
<DependentUpon>fmxFwImageConverter.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxCalibration.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxCalibration.Designer.cs">
<DependentUpon>fmxCalibration.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwUpdate.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwUpdate.Designer.cs">
<DependentUpon>fmxFwUpdate.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwUpdateTftp.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwUpdateTftp.Designer.cs">
<DependentUpon>fmxFwUpdateTftp.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxHistory.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxHistory.Designer.cs">
<DependentUpon>fmxHistory.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxInventoryConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxInventoryConfig.designer.cs">
<DependentUpon>fmxInventoryConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxModuleDetail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxModuleDetail.Designer.cs">
<DependentUpon>fmxModuleDetail.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxParamConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxParamConfig.Designer.cs">
<DependentUpon>fmxParamConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxSystemSet.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxSystemSet.Designer.cs">
<DependentUpon>fmxSystemSet.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxWait.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxWait.Designer.cs">
<DependentUpon>fmxWait.cs</DependentUpon>
</Compile>
<Compile Include="Function\csCanCommFunction.cs" />
<Compile Include="Function\csCanFwUpdateFunction.cs" />
<Compile Include="Function\csExcelExport.cs" />
<Compile Include="Function\csExcelFunction.cs" />
<Compile Include="Function\csExtCANControlFunction.cs" />
<Compile Include="Function\csHistoryFunction.cs" />
<Compile Include="Function\csMakeTcpDataFunction.cs" />
<Compile Include="Function\csUartCanCommFunction.cs" />
<Compile Include="Threads\csCanThread.cs" />
<Compile Include="Threads\csDbThread.cs" />
<Compile Include="Threads\csSnmpThread.cs" />
<Compile Include="DataStructure\csConstData.cs" />
<Compile Include="DataStructure\csDataStructure.cs" />
<Compile Include="Forms\fmxCommConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxCommConfig.Designer.cs">
<DependentUpon>fmxCommConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxMain.Designer.cs">
<DependentUpon>fmxMain.cs</DependentUpon>
</Compile>
<Compile Include="Function\csIniControlFunction.cs" />
<Compile Include="Function\csMakeDataFunction.cs" />
<Compile Include="Function\csSerialCommFunction.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Threads\csUartCanThread.cs" />
<Compile Include="Threads\csUartThread.cs" />
<Compile Include="Utils\csDBUtils.cs" />
<Compile Include="Utils\csExcelControl.cs" />
<Compile Include="Utils\csLog.cs" />
<Compile Include="Utils\csUtils.cs" />
<EmbeddedResource Include="Controls\ucCalibration.resx">
<DependentUpon>ucCalibration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucCalibrationView.resx">
<DependentUpon>ucCalibrationView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucCommConfig.resx">
<DependentUpon>ucCommConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucDataLog.resx">
<DependentUpon>ucDataLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucEtcStatusView.resx">
<DependentUpon>ucEtcStatusView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucEventLog.resx">
<DependentUpon>ucEventLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucHistroy.resx">
<DependentUpon>ucHistroy.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucMainStatus.resx">
<DependentUpon>ucMainStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucModuleMainA.resx">
<DependentUpon>ucModuleMainA.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucModuleMainB.resx">
<DependentUpon>ucModuleMainB.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucParamSet.resx">
<DependentUpon>ucParamSet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucShelfStatus.resx">
<DependentUpon>ucShelfStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucStatus.resx">
<DependentUpon>ucStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucTargetControl.resx">
<DependentUpon>ucTargetControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucTftpClientcs.resx">
<DependentUpon>ucTftpClientcs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxEtcStatus.resx">
<DependentUpon>fmxEtcStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxExcelFile.resx">
<DependentUpon>fmxExcelFile.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwImageConverter.resx">
<DependentUpon>fmxFwImageConverter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxCalibration.resx">
<DependentUpon>fmxCalibration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxCommConfig.resx">
<DependentUpon>fmxCommConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwUpdate.resx">
<DependentUpon>fmxFwUpdate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwUpdateTftp.resx">
<DependentUpon>fmxFwUpdateTftp.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxHistory.resx">
<DependentUpon>fmxHistory.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxInventoryConfig.resx">
<DependentUpon>fmxInventoryConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxMain.resx">
<DependentUpon>fmxMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxModuleDetail.resx">
<DependentUpon>fmxModuleDetail.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxParamConfig.resx">
<DependentUpon>fmxParamConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxSystemSet.resx">
<DependentUpon>fmxSystemSet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxWait.resx">
<DependentUpon>fmxWait.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Resources\logo.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AMO_LOGO.ico" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="DB Schema\DB_SCHEMA_TABLE.sql" />
<Content Include="DB Schema\LOG_DB_SCHEMA_TABLE.sql" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(TargetDir)\Library" mkdir "$(TargetDir)\Library"
if not exist "$(TargetDir)\Library\kerneldlls" mkdir "$(TargetDir)\Library\kerneldlls"
move "$(TargetDir)\*.dll" "$(TargetDir)\Library"
move "$(TargetDir)\*.pdb" "$(TargetDir)\Library"
move "$(TargetDir)\*.xml" "$(TargetDir)\Library"
copy "$(ProjectDir)\dll\*.dll" "$(TargetDir)\Library"
copy "$(ProjectDir)\dll\kerneldlls\*.*" "$(TargetDir)\Library\kerneldlls"
if not exist "$(TargetDir)\sql" mkdir "$(TargetDir)\sql"
copy "$(ProjectDir)\DB Schema\*.sql" "$(TargetDir)\sql"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>if exist "$(TargetDir)\library" rmdir /s /q "$(TargetDir)\library"
if exist "$(TargetDir)\sql" rmdir /s /q "$(TargetDir)\sql"</PreBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,411 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BE0785A4-0CCB-44C5-A8C0-1AA2245E71F4}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LFP_Manager</RootNamespace>
<AssemblyName>LFP_Manager_JP</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\AMO_LOGO.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Charts.v13.1.Core, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Data.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Printing.v13.1.Core, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Utils.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Xpo.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraBars.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v13.1.UI, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v13.1.Wizard, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraEditors.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGauges.v13.1.Core, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGauges.v13.1.Win, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGrid.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraLayout.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraNavBar.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="IPAddressControlLib">
<HintPath>dll\IPAddressControlLib.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>dll\log4net.dll</HintPath>
</Reference>
<Reference Include="SnmpSharpNet, Version=0.9.4.0, Culture=neutral, PublicKeyToken=b2181aa3b9571feb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>dll\SnmpSharpNet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.SQLite, Version=1.0.105.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>dll\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Tftp.Net">
<HintPath>dll\Tftp.Net.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Controls\ucCalibration.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCalibration.Designer.cs">
<DependentUpon>ucCalibration.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucCommConfig.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCommConfig.Designer.cs">
<DependentUpon>ucCommConfig.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucDataLog.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucDataLog.Designer.cs">
<DependentUpon>ucDataLog.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucEventLog.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucEventLog.Designer.cs">
<DependentUpon>ucEventLog.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucHistroy.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucHistroy.Designer.cs">
<DependentUpon>ucHistroy.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucMainStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucMainStatus.Designer.cs">
<DependentUpon>ucMainStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucParamSet.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucParamSet.Designer.cs">
<DependentUpon>ucParamSet.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucShelfStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucShelfStatus.Designer.cs">
<DependentUpon>ucShelfStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucStatus.designer.cs">
<DependentUpon>ucStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucTargetControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucTargetControl.Designer.cs">
<DependentUpon>ucTargetControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucTftpClientcs.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucTftpClientcs.Designer.cs">
<DependentUpon>ucTftpClientcs.cs</DependentUpon>
</Compile>
<Compile Include="DataStructure\csCanConstData.cs" />
<Compile Include="DataStructure\csDbConstData.cs" />
<Compile Include="Forms\fmxExcelFile.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxExcelFile.designer.cs">
<DependentUpon>fmxExcelFile.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwImageConverter.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwImageConverter.Designer.cs">
<DependentUpon>fmxFwImageConverter.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxCalibration.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxCalibration.Designer.cs">
<DependentUpon>fmxCalibration.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwUpdate.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwUpdate.Designer.cs">
<DependentUpon>fmxFwUpdate.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwUpdateTftp.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwUpdateTftp.Designer.cs">
<DependentUpon>fmxFwUpdateTftp.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxHistorycs.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxHistorycs.Designer.cs">
<DependentUpon>fmxHistorycs.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxInventoryConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxInventoryConfig.designer.cs">
<DependentUpon>fmxInventoryConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxParamConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxParamConfig.Designer.cs">
<DependentUpon>fmxParamConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxSystemSet.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxSystemSet.Designer.cs">
<DependentUpon>fmxSystemSet.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxWait.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxWait.Designer.cs">
<DependentUpon>fmxWait.cs</DependentUpon>
</Compile>
<Compile Include="Function\csCanCommFunction.cs" />
<Compile Include="Function\csCanFwUpdateFunction.cs" />
<Compile Include="Function\csExcelExport.cs" />
<Compile Include="Function\csExcelFunction.cs" />
<Compile Include="Function\csExtCANControlFunction.cs" />
<Compile Include="Function\csHistoryFunction.cs" />
<Compile Include="Function\csMakeTcpDataFunction.cs" />
<Compile Include="Threads\csCanThread.cs" />
<Compile Include="Threads\csDbThread.cs" />
<Compile Include="Threads\csMakeTcpDataFunction.cs" />
<Compile Include="Threads\csSnmpThread.cs" />
<Compile Include="DataStructure\csConstData.cs" />
<Compile Include="DataStructure\csDataStructure.cs" />
<Compile Include="Forms\fmxCommConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxCommConfig.Designer.cs">
<DependentUpon>fmxCommConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxMain.Designer.cs">
<DependentUpon>fmxMain.cs</DependentUpon>
</Compile>
<Compile Include="Function\csIniControlFunction.cs" />
<Compile Include="Function\csMakeDataFunction.cs" />
<Compile Include="Function\csSerialCommFunction.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Threads\csUartThread.cs" />
<Compile Include="Utils\csDBUtils.cs" />
<Compile Include="Utils\csExcelControl.cs" />
<Compile Include="Utils\csLog.cs" />
<Compile Include="Utils\csUtils.cs" />
<EmbeddedResource Include="Controls\ucCalibration.resx">
<DependentUpon>ucCalibration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucCommConfig.resx">
<DependentUpon>ucCommConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucDataLog.resx">
<DependentUpon>ucDataLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucEventLog.resx">
<DependentUpon>ucEventLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucHistroy.resx">
<DependentUpon>ucHistroy.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucMainStatus.resx">
<DependentUpon>ucMainStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucParamSet.resx">
<DependentUpon>ucParamSet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucShelfStatus.resx">
<DependentUpon>ucShelfStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucStatus.resx">
<DependentUpon>ucStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucTargetControl.resx">
<DependentUpon>ucTargetControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucTftpClientcs.resx">
<DependentUpon>ucTftpClientcs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxExcelFile.resx">
<DependentUpon>fmxExcelFile.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwImageConverter.resx">
<DependentUpon>fmxFwImageConverter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxCalibration.resx">
<DependentUpon>fmxCalibration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxCommConfig.resx">
<DependentUpon>fmxCommConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwUpdate.resx">
<DependentUpon>fmxFwUpdate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwUpdateTftp.resx">
<DependentUpon>fmxFwUpdateTftp.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxHistorycs.resx">
<DependentUpon>fmxHistorycs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxInventoryConfig.resx">
<DependentUpon>fmxInventoryConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxMain.resx">
<DependentUpon>fmxMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxParamConfig.resx">
<DependentUpon>fmxParamConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxSystemSet.resx">
<DependentUpon>fmxSystemSet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxWait.resx">
<DependentUpon>fmxWait.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Resources\logo.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AMO_LOGO.ico" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="DB Schema\DB_SCHEMA_TABLE.sql" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(TargetDir)\Library" mkdir "$(TargetDir)\Library"
move "$(TargetDir)\*.dll" "$(TargetDir)\Library"
move "$(TargetDir)\*.pdb" "$(TargetDir)\Library"
move "$(TargetDir)\*.xml" "$(TargetDir)\Library"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>if not exist "$(TargetDir)\sql" mkdir "$(TargetDir)\sql"
copy "$(ProjectDir)\DB Schema\*.sql" "$(TargetDir)\sql"</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,508 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BE0785A4-0CCB-44C5-A8C0-1AA2245E71F4}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LFP_Manager</RootNamespace>
<AssemblyName>LFP_Manager_M20</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\AMO_LOGO.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="DevExpress.Charts.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Data.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Images.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Mvvm.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Pdf.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Office.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.RichEdit.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.RichEdit.v20.1.Export, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Printing.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Data.Desktop.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Sparkline.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.TreeMap.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Xpo.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraBars.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v20.1.UI, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraCharts.v20.1.Wizard, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraEditors.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGantt.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraGauges.v20.1.Core, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGauges.v20.1.Win, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGrid.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraLayout.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraNavBar.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraTreeList.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraTreeMap.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="IPAddressControlLib">
<HintPath>dll\IPAddressControlLib.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>dll\log4net.dll</HintPath>
</Reference>
<Reference Include="SnmpSharpNet, Version=0.9.4.0, Culture=neutral, PublicKeyToken=b2181aa3b9571feb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>dll\SnmpSharpNet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.Linq" />
<Reference Include="System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net451\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.EF6, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.113.0\lib\net451\System.Data.SQLite.EF6.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.113.0\lib\net451\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
<Reference Include="System.Security" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Tftp.Net">
<HintPath>dll\Tftp.Net.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Controls\ucCalibration.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCalibration.Designer.cs">
<DependentUpon>ucCalibration.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucCalibrationView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCalibrationView.Designer.cs">
<DependentUpon>ucCalibrationView.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucCommConfig.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucCommConfig.Designer.cs">
<DependentUpon>ucCommConfig.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucDataLog.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucDataLog.Designer.cs">
<DependentUpon>ucDataLog.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucEventLog.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucEventLog.Designer.cs">
<DependentUpon>ucEventLog.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucHistroy.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucHistroy.Designer.cs">
<DependentUpon>ucHistroy.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucMainStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucMainStatus.Designer.cs">
<DependentUpon>ucMainStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucModuleMainB.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucModuleMainB.Designer.cs">
<DependentUpon>ucModuleMainB.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucParamSet.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucParamSet.Designer.cs">
<DependentUpon>ucParamSet.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucShelfStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucShelfStatus.Designer.cs">
<DependentUpon>ucShelfStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucStatus.designer.cs">
<DependentUpon>ucStatus.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucTargetControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucTargetControl.Designer.cs">
<DependentUpon>ucTargetControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucTftpClientcs.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucTftpClientcs.Designer.cs">
<DependentUpon>ucTftpClientcs.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ucModuleMainA.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ucModuleMainA.Designer.cs">
<DependentUpon>ucModuleMainA.cs</DependentUpon>
</Compile>
<Compile Include="DataStructure\csCanConstData.cs" />
<Compile Include="DataStructure\csDbConstData.cs" />
<Compile Include="Forms\fmxExcelFile.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxExcelFile.designer.cs">
<DependentUpon>fmxExcelFile.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwImageConverter.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwImageConverter.Designer.cs">
<DependentUpon>fmxFwImageConverter.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxCalibration.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxCalibration.Designer.cs">
<DependentUpon>fmxCalibration.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwUpdate.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwUpdate.Designer.cs">
<DependentUpon>fmxFwUpdate.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxFwUpdateTftp.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxFwUpdateTftp.Designer.cs">
<DependentUpon>fmxFwUpdateTftp.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxHistory.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxHistory.Designer.cs">
<DependentUpon>fmxHistory.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxInventoryConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxInventoryConfig.designer.cs">
<DependentUpon>fmxInventoryConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxModuleDetail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxModuleDetail.Designer.cs">
<DependentUpon>fmxModuleDetail.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxParamConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxParamConfig.Designer.cs">
<DependentUpon>fmxParamConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxSystemSet.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxSystemSet.Designer.cs">
<DependentUpon>fmxSystemSet.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxWait.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxWait.Designer.cs">
<DependentUpon>fmxWait.cs</DependentUpon>
</Compile>
<Compile Include="Function\csCanCommFunction.cs" />
<Compile Include="Function\csCanFwUpdateFunction.cs" />
<Compile Include="Function\csExcelExport.cs" />
<Compile Include="Function\csExcelFunction.cs" />
<Compile Include="Function\csExtCANControlFunction.cs" />
<Compile Include="Function\csHistoryFunction.cs" />
<Compile Include="Function\csMakeTcpDataFunction.cs" />
<Compile Include="Function\csUartCanCommFunction.cs" />
<Compile Include="Threads\csCanThread.cs" />
<Compile Include="Threads\csDbThread.cs" />
<Compile Include="Threads\csSnmpThread.cs" />
<Compile Include="DataStructure\csConstData.cs" />
<Compile Include="DataStructure\csDataStructure.cs" />
<Compile Include="Forms\fmxCommConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxCommConfig.Designer.cs">
<DependentUpon>fmxCommConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxMain.Designer.cs">
<DependentUpon>fmxMain.cs</DependentUpon>
</Compile>
<Compile Include="Function\csIniControlFunction.cs" />
<Compile Include="Function\csMakeDataFunction.cs" />
<Compile Include="Function\csSerialCommFunction.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Threads\csUartCanThread.cs" />
<Compile Include="Threads\csUartThread.cs" />
<Compile Include="Utils\csDBUtils.cs" />
<Compile Include="Utils\csExcelControl.cs" />
<Compile Include="Utils\csLog.cs" />
<Compile Include="Utils\csUtils.cs" />
<EmbeddedResource Include="Controls\ucCalibration.resx">
<DependentUpon>ucCalibration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucCalibrationView.resx">
<DependentUpon>ucCalibrationView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucCommConfig.resx">
<DependentUpon>ucCommConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucDataLog.resx">
<DependentUpon>ucDataLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucEventLog.resx">
<DependentUpon>ucEventLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucHistroy.resx">
<DependentUpon>ucHistroy.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucMainStatus.resx">
<DependentUpon>ucMainStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucModuleMainA.resx">
<DependentUpon>ucModuleMainA.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucModuleMainB.resx">
<DependentUpon>ucModuleMainB.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucParamSet.resx">
<DependentUpon>ucParamSet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucShelfStatus.resx">
<DependentUpon>ucShelfStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucStatus.resx">
<DependentUpon>ucStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucTargetControl.resx">
<DependentUpon>ucTargetControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ucTftpClientcs.resx">
<DependentUpon>ucTftpClientcs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxExcelFile.resx">
<DependentUpon>fmxExcelFile.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwImageConverter.resx">
<DependentUpon>fmxFwImageConverter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxCalibration.resx">
<DependentUpon>fmxCalibration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxCommConfig.resx">
<DependentUpon>fmxCommConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwUpdate.resx">
<DependentUpon>fmxFwUpdate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxFwUpdateTftp.resx">
<DependentUpon>fmxFwUpdateTftp.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxHistory.resx">
<DependentUpon>fmxHistory.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxInventoryConfig.resx">
<DependentUpon>fmxInventoryConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxMain.resx">
<DependentUpon>fmxMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxModuleDetail.resx">
<DependentUpon>fmxModuleDetail.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxParamConfig.resx">
<DependentUpon>fmxParamConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxSystemSet.resx">
<DependentUpon>fmxSystemSet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxWait.resx">
<DependentUpon>fmxWait.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Resources\logo.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AMO_LOGO.ico" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="DB Schema\DB_SCHEMA_TABLE.sql" />
<Content Include="DB Schema\LOG_DB_SCHEMA_TABLE.sql" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(TargetDir)\Library" mkdir "$(TargetDir)\Library"
if not exist "$(TargetDir)\Library\kerneldlls" mkdir "$(TargetDir)\Library\kerneldlls"
move "$(TargetDir)\*.dll" "$(TargetDir)\Library"
move "$(TargetDir)\*.pdb" "$(TargetDir)\Library"
move "$(TargetDir)\*.xml" "$(TargetDir)\Library"
copy "$(ProjectDir)\dll\*.dll" "$(TargetDir)\Library"
copy "$(ProjectDir)\dll\kerneldlls\*.*" "$(TargetDir)\Library\kerneldlls"
if not exist "$(TargetDir)\sql" mkdir "$(TargetDir)\sql"
copy "$(ProjectDir)\DB Schema\*.sql" "$(TargetDir)\sql"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>if exist "$(TargetDir)\library" rmdir /s /q "$(TargetDir)\library"
if exist "$(TargetDir)\sql" rmdir /s /q "$(TargetDir)\sql"</PreBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -289,6 +289,12 @@
<Compile Include="Forms\fmxHistory.Designer.cs"> <Compile Include="Forms\fmxHistory.Designer.cs">
<DependentUpon>fmxHistory.cs</DependentUpon> <DependentUpon>fmxHistory.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\fmxPacketLog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\fmxPacketLog.Designer.cs">
<DependentUpon>fmxPacketLog.cs</DependentUpon>
</Compile>
<Compile Include="Forms\fmxInventoryConfig.cs"> <Compile Include="Forms\fmxInventoryConfig.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -416,6 +422,9 @@
<EmbeddedResource Include="Forms\fmxHistory.resx"> <EmbeddedResource Include="Forms\fmxHistory.resx">
<DependentUpon>fmxHistory.cs</DependentUpon> <DependentUpon>fmxHistory.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\fmxPacketLog.resx">
<DependentUpon>fmxPacketLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\fmxInventoryConfig.resx"> <EmbeddedResource Include="Forms\fmxInventoryConfig.resx">
<DependentUpon>fmxInventoryConfig.cs</DependentUpon> <DependentUpon>fmxInventoryConfig.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.1.0")] [assembly: AssemblyVersion("1.1.1.1")]
[assembly: AssemblyFileVersion("1.1.1.0")] [assembly: AssemblyFileVersion("1.1.1.1")]

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Concurrent;
using System.Threading;
using System.IO.Ports; using System.IO.Ports;
using System.Threading;
using System.Windows.Forms; using System.Windows.Forms;
using LFP_Manager.DataStructure; using LFP_Manager.DataStructure;
@@ -12,6 +12,7 @@ namespace LFP_Manager.Threads
public delegate void UartDataUpdate(object sender, ref DeviceSystemData aSystemData); public delegate void UartDataUpdate(object sender, ref DeviceSystemData aSystemData);
public delegate void UartDataRecv(byte[] data); public delegate void UartDataRecv(byte[] data);
public delegate void UartDataPrint(object sender, string msg); public delegate void UartDataPrint(object sender, string msg);
public delegate void UartPacketLogEvent(DateTime timestamp, bool isTx, byte[] packet, string description);
class csUartThread class csUartThread
{ {
@@ -28,23 +29,14 @@ namespace LFP_Manager.Threads
private bool AutoUartTx = true; private bool AutoUartTx = true;
private int addr_ch = 0; private int addr_ch = 0;
private ushort RequestRegAddr = 0x0000; //Byul Init 0x0000
private ushort RequestRegLen = 50;
private bool rFlag = false;
private int wFlag = 0;
private ushort ReadRegAddr = 0x0000; //Byul Init 0x0000 // Thread-Safe TX Queue
private ushort ReadRegLen = 0x0000; //Byul Init 0x0000 private readonly ConcurrentQueue<TUartTxItem> txQueue = new ConcurrentQueue<TUartTxItem>();
private ushort WriteRegAddr = 0x0000; //Byul Init 0x0000
private short WriteCoilRegData = 0;
private byte[] WriteRegData;
private TUartTxBuff uartTxBuff = null;
public event UartDataUpdate OnUpdate = null; public event UartDataUpdate OnUpdate = null;
public event UartDataRecv OnDataRecv = null; public event UartDataRecv OnDataRecv = null;
public event UartDataPrint OnPrint = null; public event UartDataPrint OnPrint = null;
public event UartPacketLogEvent OnPacketLog = null;
#endregion #endregion
@@ -56,8 +48,6 @@ namespace LFP_Manager.Threads
Config = aConfig; Config = aConfig;
SystemData = aSystemData; SystemData = aSystemData;
uartTxBuff = new TUartTxBuff();
serialComm = new Thread(uartCommThread); serialComm = new Thread(uartCommThread);
} }
@@ -130,13 +120,10 @@ namespace LFP_Manager.Threads
private void sErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) private void sErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
{ {
//
//csMakeDataFunction.SetData()
} }
private void sPinChanged(object sender, System.IO.Ports.SerialPinChangedEventArgs e) private void sPinChanged(object sender, System.IO.Ports.SerialPinChangedEventArgs e)
{ {
//
} }
private bool Open(string cPort, int cBaudrate) private bool Open(string cPort, int cBaudrate)
@@ -174,7 +161,7 @@ namespace LFP_Manager.Threads
#endregion #endregion
#region PUBLIC FUNCTION #region PUBLIC TX FUNCTIONS (QUEUE BASED)
public void SetPolling(bool flag, int sId, ref DeviceSystemData aSystemData) public void SetPolling(bool flag, int sId, ref DeviceSystemData aSystemData)
{ {
@@ -189,52 +176,66 @@ namespace LFP_Manager.Threads
AutoUartTx = autoTx; AutoUartTx = autoTx;
} }
public void SetWriteCoilReg(ushort WriteAddr, short WriteData) /// <summary>
/// 공통 TX 큐 삽입 메서드
/// </summary>
public void EnqueueTx(TUartTxItem item)
{ {
wFlag = 2; if (item != null)
WriteRegAddr = WriteAddr;
WriteCoilRegData = WriteData;
for (int i = 0; i < 500; i += 10)
{ {
Thread.Sleep(10); txQueue.Enqueue(item);
Application.DoEvents();
} }
} }
/// <summary>
/// 원시 패킷 전송 (FW 업데이트 등)
/// </summary>
public void SendRawPacket(byte[] rawData, bool expectReply = true)
{
if (rawData == null || rawData.Length == 0) return;
TUartTxItem item = new TUartTxItem(UartTxType.Raw, SystemId, 0, (ushort)rawData.Length, rawData, expectReply, Config.RecvWaitTime);
EnqueueTx(item);
}
/// <summary>
/// 코일 레지스터 쓰기 (TX 큐 삽입)
/// </summary>
public void SetWriteCoilReg(ushort WriteAddr, short WriteData)
{
byte[] data = csSerialCommFunction.MakeWriteCoilData((ushort)SystemId, WriteAddr, WriteData);
TUartTxItem item = new TUartTxItem(UartTxType.WriteCoil, SystemId, WriteAddr, 1, data, true, Config.RecvWaitTime);
EnqueueTx(item);
}
/// <summary>
/// 레지스터 쓰기 (TX 큐 삽입)
/// </summary>
public void SetWriteReg(ushort WriteAddr, byte[] WriteData, bool ReplyFlag) public void SetWriteReg(ushort WriteAddr, byte[] WriteData, bool ReplyFlag)
{ {
wFlag = 1; if (WriteData == null) return;
TUartTxItem item = new TUartTxItem(UartTxType.WriteReg, SystemId, WriteAddr, (ushort)WriteData.Length, WriteData, ReplyFlag, Config.RecvWaitTime);
WriteRegAddr = WriteAddr; EnqueueTx(item);
TUartTRxData uartTRxData = new TUartTRxData();
uartTRxData.type = wFlag;
//uartTRxData.data = csSerialCommFunction.MakeWriteRegisterData((ushort)SystemId, WriteRegAddr, WriteData);
uartTRxData.data = WriteData;
uartTRxData.length = uartTRxData.data.Length;
uartTxBuff?.PutBuff(uartTRxData);
} }
/// <summary>
/// 레지스터 읽기 (TX 큐 삽입)
/// </summary>
public void SetReadReg(ushort ReadAddr, ushort ReadLen, bool ReplyFlag) public void SetReadReg(ushort ReadAddr, ushort ReadLen, bool ReplyFlag)
{ {
wFlag = 4; byte[] data = csSerialCommFunction.MakeReadRegisterData((ushort)SystemId, csSerialCommFunction.READ_HOLDING_REG, ReadAddr, ReadLen);
ReadRegAddr = ReadAddr; TUartTxItem item = new TUartTxItem(UartTxType.ReadReg, SystemId, ReadAddr, ReadLen, data, ReplyFlag, Config.RecvWaitTime);
ReadRegLen = ReadLen; EnqueueTx(item);
} }
/// <summary>
/// 파라미터 레지스터 쓰기 (TX 큐 삽입)
/// </summary>
public void SetParam(ushort WriteAddr, short[] WriteData) public void SetParam(ushort WriteAddr, short[] WriteData)
{ {
wFlag = 1; if (WriteData == null) return;
byte[] data = csSerialCommFunction.MakeWriteRegisterData((ushort)SystemId, WriteAddr, WriteData);
WriteRegAddr = WriteAddr; TUartTxItem item = new TUartTxItem(UartTxType.WriteParam, SystemId, WriteAddr, (ushort)WriteData.Length, data, true, Config.RecvWaitTime);
EnqueueTx(item);
TUartTRxData uartTRxData = new TUartTRxData();
uartTRxData.type = wFlag;
uartTRxData.data = csSerialCommFunction.MakeWriteRegisterData((ushort)SystemId, WriteRegAddr, WriteData);
uartTRxData.length = uartTRxData.data.Length;
uartTxBuff?.PutBuff(uartTRxData);
} }
public void SendProcessFromApp(int sId, int mode, int index, int flag, ref DeviceParamData aParam, ref DeviceCalibration aCalib) public void SendProcessFromApp(int sId, int mode, int index, int flag, ref DeviceParamData aParam, ref DeviceCalibration aCalib)
@@ -315,13 +316,8 @@ namespace LFP_Manager.Threads
break; break;
case csConstData.UART_PARAM_LIST.DEFAULT_PARAM: // Default Parameter case csConstData.UART_PARAM_LIST.DEFAULT_PARAM: // Default Parameter
int i = 0; int i = 0;
Forms.fmxWait WaitForm = new Forms.fmxWait();
WaitForm.StartPosition = FormStartPosition.CenterScreen;
try try
{ {
//WaitForm.Show();
data = new short[1]; data = new short[1];
i = csConstData.UART_PARAM_LIST.CELL_UNDER_VOLTAGE; i = csConstData.UART_PARAM_LIST.CELL_UNDER_VOLTAGE;
@@ -385,10 +381,6 @@ namespace LFP_Manager.Threads
catch (Exception) catch (Exception)
{ {
}
finally
{
//WaitForm?.Close();
} }
break; break;
case 15: // Capcity change case 15: // Capcity change
@@ -413,16 +405,11 @@ namespace LFP_Manager.Threads
case 18: case 18:
data = new short[1]; data = new short[1];
i = csConstData.UART_CALIB_ADDR_LIST.ANTI_THEFT; i = csConstData.UART_CALIB_ADDR_LIST.ANTI_THEFT;
//data[0] = (short)aCalib.AntiTheft.Comm; SetParam((ushort)(i + 0), data);
data[0] = (short)aCalib.AntiTheft.GyroScope; SetParam((ushort)(i + 1), data); data[0] = (short)aCalib.AntiTheft.GyroScope; SetParam((ushort)(i + 1), data);
break; break;
case 19: case 19:
data = new short[1]; data = new short[1];
i = csConstData.UART_CALIB_ADDR_LIST.ANTI_THEFT; i = csConstData.UART_CALIB_ADDR_LIST.ANTI_THEFT;
//data[0] = (short)0; SetParam((ushort)(i + 0), data);
data[0] = (short)0; SetParam((ushort)(i + 1), data);
//data[0] = (short)aCalib.AntiTheft.Comm; SetParam((ushort)(i + 0), data);
data[0] = (short)aCalib.AntiTheft.GyroScope; SetParam((ushort)(i + 1), data); data[0] = (short)aCalib.AntiTheft.GyroScope; SetParam((ushort)(i + 1), data);
break; break;
default: default:
@@ -471,176 +458,84 @@ namespace LFP_Manager.Threads
#endregion #endregion
#region TX BUFFERING #region POLLING GENERATOR
private byte[] MakeWriteRegData(ushort DevID, ushort WriteAddr, ushort WriteLen, ref ushort[] WriteData) /// <summary>
/// 다음 주기 Polling 패킷 아이템 생성
/// </summary>
private TUartTxItem CreateNextPollingItem()
{ {
byte[] wData = null; ushort reqAddr = 0x0000;
ushort reqLen = 50;
ushort sCmd = csSerialCommFunction.READ_HOLDING_REG;
if (WriteLen > 0) switch (addr_ch)
{ {
case 0:
} addr_ch = 1;
reqAddr = 0x0000;
return wData; reqLen = 0x0031; // 49
} sCmd = csSerialCommFunction.READ_HOLDING_REG;
private string MakeCheckSum(byte[] sData, int len)
{
string result = "";
int checksum = 0;
for (int i = 0; i < len; i++)
{
checksum += sData[i + 1];
}
checksum = ~checksum + 1;
result = String.Format("{0:X2}{1:X2}", (byte)(checksum >> 8), (byte)checksum);
return result;
}
private byte[] MakeTxDataVision(ref bool wData)
{
byte[] sData = null;
if ((uartTxBuff != null) && (uartTxBuff.CheckBuff()))
{
TUartTRxData sBuff = uartTxBuff.GetBuff();
if (sBuff != null)
{
sData = sBuff.data;
wData = true;
rFlag = true;
}
}
else if (wFlag == 2)
{
sData = csSerialCommFunction.MakeWriteCoilData((ushort)SystemId, WriteRegAddr, WriteCoilRegData);
if (wFlag != 0) wFlag = 0;
rFlag = true;
}
else if (wFlag == 3)
{
sData = WriteRegData;
if (wFlag != 0) wFlag = 0;
rFlag = true;
}
else if (wFlag == 4)
{
sData = csSerialCommFunction.MakeReadRegisterData((ushort)SystemId, csSerialCommFunction.READ_HOLDING_REG, ReadRegAddr, ReadRegLen);
if (wFlag != 0) wFlag = 0;
rFlag = true;
}
else
{
if (UartPolling && AutoUartTx)
{
ushort sCmd;
switch (addr_ch)
{
case 0:
addr_ch = 1;
RequestRegAddr = 0x0000; //Byul Init 0x0000
RequestRegLen = 0x0031;
sCmd = csSerialCommFunction.READ_HOLDING_REG;
rFlag = true;
break;
case 1:
addr_ch = 4;
RequestRegAddr = 58;
RequestRegLen = 138-58;
sCmd = csSerialCommFunction.READ_HOLDING_REG;
rFlag = true;
break;
case 2:
addr_ch = 3;
RequestRegAddr = 0x3078;
RequestRegLen = 8;
sCmd = csSerialCommFunction.READ_COIL_STATUS;
rFlag = true;
break;
case 3:
addr_ch = 4;
RequestRegAddr = 0x502E;
RequestRegLen = 1;
sCmd = csSerialCommFunction.READ_COIL_STATUS;
rFlag = true;
break;
case 4:
if (Config.ModuleQty > 1)
{
SystemId++;
if (SystemId > Config.ModuleQty)
{
SystemId = 1;
}
}
addr_ch = 0;
sCmd = csSerialCommFunction.NO_CMD;
rFlag = false;
break;
default:
addr_ch = 0;
RequestRegAddr = 0x0000; //Byul Init 0x0000
RequestRegLen = 100;
sCmd = csSerialCommFunction.READ_HOLDING_REG;
break;
}
if (sCmd == csSerialCommFunction.NO_CMD)
{
sData = null;
}
else
{
sData = csSerialCommFunction.MakeReadRegisterData((ushort)SystemId, sCmd, RequestRegAddr, RequestRegLen);
}
}
}
return sData;
}
private byte ReqCmd = 0x42;
private byte RequstedCmd;
private byte[] TxProcess()
{
byte[] result = null;
switch (ReqCmd)
{
case 0x42: // Get the number of PACK
csSerialCommFunction.MakeTxData(0x01, ReqCmd, 2);
RequstedCmd = ReqCmd;
ReqCmd = 0x46;
break; break;
case 0x46: // Ger the analog information case 1:
csSerialCommFunction.MakeTxData(0x01, ReqCmd, 2); addr_ch = 4;
RequstedCmd = ReqCmd; reqAddr = 58;
ReqCmd = 0x46; reqLen = 139 - 58; // 81 (Registers 58 ~ 138)
sCmd = csSerialCommFunction.READ_HOLDING_REG;
break; break;
case 0x90: // Ger warning information case 2:
csSerialCommFunction.MakeTxData(0x01, ReqCmd, 2); addr_ch = 3;
RequstedCmd = ReqCmd; reqAddr = 0x3078;
ReqCmd = 0x46; reqLen = 8;
sCmd = csSerialCommFunction.READ_COIL_STATUS;
break;
case 3:
addr_ch = 4;
reqAddr = 0x502E;
reqLen = 1;
sCmd = csSerialCommFunction.READ_COIL_STATUS;
break;
case 4:
if (Config.ModuleQty > 1)
{
SystemId++;
if (SystemId > Config.ModuleQty)
{
SystemId = 1;
}
}
addr_ch = 0;
sCmd = csSerialCommFunction.NO_CMD;
break; break;
default: default:
ReqCmd = 0x42; addr_ch = 0;
reqAddr = 0x0000;
reqLen = 100;
sCmd = csSerialCommFunction.READ_HOLDING_REG;
break; break;
} }
return result; if (sCmd == csSerialCommFunction.NO_CMD)
{
return null;
}
byte[] sData = csSerialCommFunction.MakeReadRegisterData((ushort)SystemId, sCmd, reqAddr, reqLen);
if (sData == null || sData.Length == 0)
{
return null;
}
return new TUartTxItem(UartTxType.Polling, SystemId, reqAddr, reqLen, sData, true, Config.RecvWaitTime);
} }
#endregion #endregion
#region COMM THREAD #region COMM THREAD (QUEUE BASED PIPELINE)
private readonly byte[] ReadBuf = new byte[BUFFER_SIZE]; private readonly byte[] ReadBuf = new byte[BUFFER_SIZE];
ushort rPosition = 0; private ushort rPosition = 0;
bool BuffStart = false; private bool BuffStart = false;
private void RecvPacketInit() private void RecvPacketInit()
{ {
@@ -650,153 +545,180 @@ namespace LFP_Manager.Threads
private void uartCommThread() private void uartCommThread()
{ {
int RecvTimeout = Config.RecvWaitTime;
int getData = 0; int getData = 0;
byte cData = 0; byte cData = 0;
int TimeOutCount = 0; int TimeOutCount = 0;
StartSend:
while (SerialPortThreadEnd == false) while (SerialPortThreadEnd == false)
{ {
if ((sPort == null) || (sPort.IsOpen == false)) continue; if ((sPort == null) || (sPort.IsOpen == false))
//if (UartPolling)
if (true)
{ {
bool wMode = false; Thread.Sleep(50);
byte[] txData = MakeTxDataVision(ref wMode); continue;
if (sPort == null) return; }
if (txData != null)
// 1. 큐가 비어있고 Polling이 활성화되어 있을 때 다음 Polling 패킷을 TX 큐에 삽입
if (txQueue.IsEmpty && UartPolling && AutoUartTx)
{
TUartTxItem pollItem = CreateNextPollingItem();
if (pollItem != null)
{ {
FlushBuff(); txQueue.Enqueue(pollItem);
sPort.Write(txData, 0, txData.Length);
} }
else
if (rFlag == true)
{ {
int rTimeOut = RecvTimeout; Thread.Sleep(10);
RecvPacketInit(); continue;
}
}
while (rTimeOut > 0) // 2. TX 큐에서 패킷 1개 꺼내기
if (!txQueue.TryDequeue(out TUartTxItem currentTx) || currentTx == null || currentTx.Data == null || currentTx.Data.Length == 0)
{
Thread.Sleep(20);
continue;
}
// 3. SerialPort로 패킷 전송
try
{
FlushBuff();
sPort.Write(currentTx.Data, 0, currentTx.Data.Length);
OnPacketLog?.Invoke(DateTime.Now, true, currentTx.Data, GetTxDescription(currentTx));
}
catch (Exception)
{
Thread.Sleep(50);
continue;
}
// 4. 응답 대기 및 수신 처리
if (currentTx.ExpectReply)
{
int rTimeOut = currentTx.TimeoutMs > 0 ? currentTx.TimeoutMs : Config.RecvWaitTime;
RecvPacketInit();
bool packetHandled = false;
while (rTimeOut > 0 && SerialPortThreadEnd == false)
{
if (((getData = GetBuff()) & 0x0100) != 0x0000)
{ {
if (((getData = GetBuff()) & 0x0100) != 0x0000) rTimeOut = currentTx.TimeoutMs > 0 ? currentTx.TimeoutMs : Config.RecvWaitTime;
cData = (byte)(getData & 0x00FF);
if (rPosition >= BUFFER_SIZE) RecvPacketInit();
if (BuffStart == false)
{ {
rTimeOut = RecvTimeout; if ((cData == (byte)currentTx.SystemId) || (cData == (byte)0x7F) || (cData == (byte)SystemId))
cData = (byte)(getData & 0x00FF);
if (rPosition >= BUFFER_SIZE) RecvPacketInit();
if (BuffStart == false)
{
if ((cData == (byte)SystemId) || (cData == (byte)0x7F))
{
rPosition = 0;
ReadBuf[rPosition++] = cData;
BuffStart = true;
}
}
else
{ {
rPosition = 0;
ReadBuf[rPosition++] = cData; ReadBuf[rPosition++] = cData;
BuffStart = true;
switch (csSerialCommFunction.ModbusPacketFromSlaveCheck(ReadBuf, rPosition))
{
case 0: // Need more data
break;
case 1: // Packet OK, no error
TimeOutCount = 0;
int mID = ReadBuf[0];
if (mID > 0) mID--;
SystemData.CommFail = false;
SystemData.ShelfCommFail = false;
if (wMode == false)
{
short[] result_code = csSerialCommFunction.SerialRxProcess(ReadBuf, RequestRegAddr, rPosition, ref SystemData);
OnUpdate?.Invoke(this, ref SystemData);
}
else
{
wMode = false;
WriteRegAddr = 0;
if (OnDataRecv != null)
{
byte[] adata = new byte[rPosition + 1];
for (int j = 0; j < adata.Length; j++) { adata[j] = ReadBuf[j]; }
OnDataRecv(adata);
}
}
rFlag = false;
Thread.Sleep(5);
goto StartSend;
case 2: // Fw Update Packet OK
TimeOutCount = 0;
rFlag = false;
if (OnDataRecv != null)
{
byte[] adata = new byte[rPosition + 1];
for (int j = 0; j < adata.Length; j++)
{
adata[j] = ReadBuf[j];
}
OnDataRecv(adata);
}
goto StartSend;
case -1: // Packet error
RecvPacketInit();
Thread.Sleep(100);
goto StartSend;
default:
break;
}
} }
} }
else else
{ {
Thread.Sleep(1); ReadBuf[rPosition++] = cData;
if (rTimeOut > 0)
int checkResult = csSerialCommFunction.ModbusPacketFromSlaveCheck(ReadBuf, rPosition);
if (checkResult == 0)
{ {
rTimeOut--; // Need more data
}
else if (checkResult == 1)
{
// Packet OK
TimeOutCount = 0;
SystemData.CommFail = false;
SystemData.ShelfCommFail = false;
byte[] rxPacket = new byte[rPosition];
Array.Copy(ReadBuf, rxPacket, rPosition);
OnPacketLog?.Invoke(DateTime.Now, false, rxPacket, GetRxDescription(rxPacket, currentTx));
if (currentTx.TxType == UartTxType.Polling)
{
csSerialCommFunction.SerialRxProcess(ReadBuf, currentTx.RegAddr, rPosition, ref SystemData);
OnUpdate?.Invoke(this, ref SystemData);
}
else
{
if (OnDataRecv != null)
{
byte[] adata = new byte[rPosition + 1];
for (int j = 0; j < adata.Length; j++) { adata[j] = ReadBuf[j]; }
OnDataRecv(adata);
}
}
packetHandled = true;
Thread.Sleep(5);
break;
}
else if (checkResult == 2)
{
// Fw Update Packet OK
TimeOutCount = 0;
byte[] rxPacket = new byte[rPosition];
Array.Copy(ReadBuf, rxPacket, rPosition);
OnPacketLog?.Invoke(DateTime.Now, false, rxPacket, "Fw Update Response OK");
if (OnDataRecv != null)
{
byte[] adata = new byte[rPosition + 1];
for (int j = 0; j < adata.Length; j++) { adata[j] = ReadBuf[j]; }
OnDataRecv(adata);
}
packetHandled = true;
Thread.Sleep(5);
break;
}
else if (checkResult == -1)
{
// Packet Error
byte[] rxPacket = new byte[rPosition];
Array.Copy(ReadBuf, rxPacket, rPosition);
OnPacketLog?.Invoke(DateTime.Now, false, rxPacket, "Packet CRC/Format Error");
RecvPacketInit();
Thread.Sleep(20);
packetHandled = true;
break;
} }
} }
} }
if (rPosition > 0)
{
Thread.Sleep(1);
}
else else
{ {
WriteRegAddr = 0; Thread.Sleep(1);
TimeOutCount++; rTimeOut--;
if (TimeOutCount >= 5) }
}
// 타임아웃 처리
if (!packetHandled)
{
TimeOutCount++;
if (TimeOutCount >= 5)
{
TimeOutCount = 5;
if (SystemData.ShelfCommFail == false)
{ {
TimeOutCount = 5; SystemData.ShelfCommFail = true;
//SystemData[0].CommFail = true; DataInit();
if (SystemData.ShelfCommFail == false)
{
SystemData.ShelfCommFail = true;
DataInit();
}
} }
Thread.Sleep(100);
} }
OnUpdate?.Invoke(this, ref SystemData); OnUpdate?.Invoke(this, ref SystemData);
Thread.Sleep(1); Thread.Sleep(50);
} }
else
{
Thread.Sleep(100);
} /* if (rFlag == true) */
rPosition = 0; rPosition = 0;
} }
else else
{ {
Thread.Sleep(100); // No reply expected
Thread.Sleep(10);
} }
} }
} }
@@ -850,5 +772,62 @@ namespace LFP_Manager.Threads
} }
#endregion #endregion
#region PACKET LOG HELPERS
private string GetTxDescription(TUartTxItem item)
{
if (item == null) return "Unknown TX";
switch (item.TxType)
{
case UartTxType.Polling:
return string.Format("Polling (ID:{0}, Addr:0x{1:X4}, Len:{2})", item.SystemId, item.RegAddr, item.RegLen);
case UartTxType.WriteParam:
return string.Format("Write Param (ID:{0}, Addr:0x{1:X4})", item.SystemId, item.RegAddr);
case UartTxType.WriteCoil:
return string.Format("Write Coil (ID:{0}, Addr:0x{1:X4})", item.SystemId, item.RegAddr);
case UartTxType.WriteReg:
return string.Format("Write Reg (ID:{0}, Addr:0x{1:X4}, Len:{2})", item.SystemId, item.RegAddr, item.RegLen);
case UartTxType.ReadReg:
return string.Format("Read Reg (ID:{0}, Addr:0x{1:X4}, Len:{2})", item.SystemId, item.RegAddr, item.RegLen);
case UartTxType.FwUpdate:
return string.Format("FW Update (ID:{0}, Len:{1})", item.SystemId, item.Data != null ? item.Data.Length : 0);
default:
return string.Format("RAW TX (ID:{0}, Len:{1})", item.SystemId, item.Data != null ? item.Data.Length : 0);
}
}
private string GetRxDescription(byte[] rxPacket, TUartTxItem item)
{
if (rxPacket == null || rxPacket.Length < 3) return "Unknown RX";
byte devId = rxPacket[0];
byte funcCode = rxPacket[1];
if (funcCode == 0x03)
{
byte byteCount = rxPacket[2];
if (item != null && item.TxType == UartTxType.Polling)
{
return string.Format("Polling Response (ID:{0}, Bytes:{1})", devId, byteCount);
}
return string.Format("Read Holding Reg Response (ID:{0}, Bytes:{1})", devId, byteCount);
}
else if (funcCode == 0x05)
{
return string.Format("Write Coil Response (ID:{0})", devId);
}
else if (funcCode == 0x06 || funcCode == 0x10)
{
return string.Format("Write Reg Response (ID:{0})", devId);
}
else if (funcCode > 0x80)
{
byte errCode = rxPacket.Length > 2 ? rxPacket[2] : (byte)0;
return string.Format("Modbus Error Response (ID:{0}, Func:0x{1:X2}, ErrCode:0x{2:X2})", devId, funcCode, errCode);
}
return string.Format("RX Data (ID:{0}, Func:0x{1:X2}, Len:{2})", devId, funcCode, rxPacket.Length);
}
#endregion
} }
} }

View File

@@ -294,8 +294,9 @@ namespace LFP_Manager.Utils
private static string GetStatusString(short aStatus, short aProtection = 0) private static string GetStatusString(short aStatus, short aProtection = 0)
{ {
string result = ""; string result = "";
ushort uStatus = (ushort)(aStatus & 0x7FFF);
switch ((ushort)aStatus) switch (uStatus)
{ {
case 0x0000: case 0x0000:
result = "STANDBY"; result = "STANDBY";
@@ -321,23 +322,8 @@ namespace LFP_Manager.Utils
case 0x0032: case 0x0032:
result = "POWER-ON"; result = "POWER-ON";
break; break;
case 0x8000:
result = "STANDBY-HEAT";
break;
case 0x8001:
result = "CHARGING-HEAT";
break;
case 0x8002:
result = "DISCHARGING-HEAT";
break;
case 0x8004:
result = "TRIP-HEAT";
break;
case 0x8008:
result = "CHG-LIMIT-HEAT";
break;
default: default:
result = string.Format("UNKNOWN(0x{0:X4})", (ushort)aStatus); result = string.Format("UNKNOWN(0x{0:X4})", uStatus);
break; break;
} }
return result; return result;