173 lines
		
	
	
		
			5.7 KiB
		
	
	
	
		
			C#
		
	
			
		
		
	
	
			173 lines
		
	
	
		
			5.7 KiB
		
	
	
	
		
			C#
		
	
| using System;
 | |
| using System.Linq;
 | |
| using System.Collections.Generic;
 | |
| using System.Text;
 | |
| using System.Collections.ObjectModel;
 | |
| 
 | |
| namespace INT_LKD
 | |
| {
 | |
|     public class ModbusData
 | |
|     {
 | |
| 
 | |
|     }
 | |
| 
 | |
|     public class _30000_ModbusAddress
 | |
|     {
 | |
|         public const int _01_1_IsProcessing = 3010;
 | |
|         public const int _02_1_IsLeak = 3011;
 | |
|         public const int _03_2_IsProcessing = 3012;
 | |
|         public const int _04_2_IsLeak = 3013;
 | |
|         public const int _05_3_IsProcessing = 3014;
 | |
|         public const int _06_3_IsLeak = 3015;
 | |
|         public const int _07_4_IsProcessing = 3016;
 | |
|         public const int _08_4_IsLeak = 3017;
 | |
|         public const int _09_5_IsProcessing = 3018;
 | |
|         public const int _10_5_IsLeak = 3019;
 | |
|         public const int _11_6_IsProcessing = 3020;
 | |
|         public const int _12_6_IsLeak = 3021;
 | |
|         public const int _13_7_IsProcessing = 3022;
 | |
|         public const int _14_7_IsLeak = 3023;
 | |
|         public const int _15_8_IsProcessing = 3024;
 | |
|         public const int _16_8_IsLeak = 3025;
 | |
|         public const int _17_9_IsProcessing = 3026;
 | |
|         public const int _18_9_IsLeak = 3027;
 | |
|         public const int _19_10_IsProcessing = 3028;
 | |
|         public const int _20_10_IsLeak = 3029;
 | |
|         public const int _21_11_IsProcessing = 3030;
 | |
|         public const int _22_11_IsLeak = 3031;
 | |
|         public const int _23_12_IsProcessing = 3032;
 | |
|         public const int _24_12_IsLeak = 3033;
 | |
|     }
 | |
|     public class _30000_ModbusData
 | |
|     {
 | |
|         #region Field
 | |
|         public Collection<short> m_CollectionIsProcessing;
 | |
|         public Collection<short> m_CollectionIsLeak;
 | |
|         public Collection<string> m_CollectionIsProcessingHexa;
 | |
|         public Collection<string> m_CollectionIsLeakHexa;
 | |
|         #endregion
 | |
| 
 | |
|         #region Constructor
 | |
|         public _30000_ModbusData()
 | |
|         {
 | |
|             this.Initialization();
 | |
|         }
 | |
|         #endregion
 | |
| 
 | |
|         #region Property
 | |
|         public Collection<short> CollectionIsProcessing
 | |
|         {
 | |
|             get { return this.m_CollectionIsProcessing; }
 | |
|             private set { this.m_CollectionIsProcessing = value; }
 | |
|         }
 | |
|         public Collection<short> CollectionIsLeak
 | |
|         {
 | |
|             get { return this.m_CollectionIsLeak; }
 | |
|             private set { this.m_CollectionIsLeak = value; }
 | |
|         }
 | |
|         public Collection<string> CollectionIsProcessingHexa
 | |
|         {
 | |
|             get { return this.m_CollectionIsProcessingHexa; }
 | |
|             private set { this.m_CollectionIsProcessingHexa = value; }
 | |
|         }
 | |
|         public Collection<string> CollectionIsLeakHexa
 | |
|         {
 | |
|             get { return this.m_CollectionIsLeakHexa; }
 | |
|             private set { this.m_CollectionIsLeakHexa = value; }
 | |
|         } 
 | |
|         #endregion
 | |
| 
 | |
|         #region Method
 | |
|         public void Initialization()
 | |
|         {
 | |
|             this.CollectionIsProcessing = new Collection<short>();
 | |
|             for (int i = 0; i < 12; i++)
 | |
|                 this.CollectionIsProcessing.Add(0);
 | |
| 
 | |
|             this.CollectionIsLeak = new Collection<short>();
 | |
|             for (int i = 0; i < 12; i++)
 | |
|                 this.CollectionIsLeak.Add(0);
 | |
| 
 | |
|             this.CollectionIsProcessingHexa = new Collection<string>();
 | |
|             for (int i = 0; i < 12; i++)
 | |
|                 this.CollectionIsProcessingHexa.Add(this.CollectionIsProcessing[i].ToString("X8"));
 | |
| 
 | |
|             this.CollectionIsLeakHexa = new Collection<string>();
 | |
|             for (int i = 0; i < 12; i++)
 | |
|                 this.CollectionIsLeakHexa.Add(this.CollectionIsLeak[i].ToString("X8"));
 | |
|         }
 | |
| 
 | |
|         public void SettingHexa()
 | |
|         {
 | |
|             if(this.CollectionIsProcessingHexa.Count > 0)
 | |
|                 this.CollectionIsProcessingHexa.Clear();
 | |
|             for (int i = 0; i < 12; i++)
 | |
|                 this.CollectionIsProcessingHexa.Add(this.CollectionIsProcessing[i].ToString("X8"));
 | |
| 
 | |
|             if (this.CollectionIsLeakHexa.Count > 0)
 | |
|                 this.CollectionIsLeakHexa.Clear();
 | |
|             for (int i = 0; i < 12; i++)
 | |
|                 this.CollectionIsLeakHexa.Add(this.CollectionIsLeak[i].ToString("X8"));
 | |
|         }
 | |
|         #endregion
 | |
|     }
 | |
| 
 | |
|     public class _40000_ModbusAddress
 | |
|     {
 | |
|         public const int _03_Operation = 12;
 | |
|         public const int _04_OperationResult = 13;
 | |
|         public const int _05_ProductChange = 14;
 | |
|         public const int _06_ProductChange = 15;
 | |
|         public const int _07_ProductChangeResult = 16;
 | |
|     }
 | |
|     public class _40000_ModbusData
 | |
|     {
 | |
|         #region Field
 | |
|         private int m_40013_Operation;
 | |
|         private int m_40014_OperationResult;
 | |
|         private int m_40015_ProductChange;
 | |
|         private int m_40017_ProductChangeResult;
 | |
|         #endregion
 | |
| 
 | |
|         #region Constructor
 | |
|         public _40000_ModbusData()
 | |
|         {
 | |
|             this.Initialization();
 | |
|         }
 | |
|         #endregion
 | |
| 
 | |
|         #region Property
 | |
|         public int _40013_Operation
 | |
|         {
 | |
|             get { return this.m_40013_Operation; }
 | |
|             set { this.m_40013_Operation = value; }
 | |
|         }
 | |
|         public int _40014_OperationResult
 | |
|         {
 | |
|             get { return this.m_40014_OperationResult; }
 | |
|             set { this.m_40014_OperationResult = value; }
 | |
|         }
 | |
|         public int _40015_ProductChange
 | |
|         {
 | |
|             get { return this.m_40015_ProductChange; }
 | |
|             set { this.m_40015_ProductChange = value; }
 | |
|         }
 | |
|         public int _40017_ProductChangeResult
 | |
|         {
 | |
|             get { return this.m_40017_ProductChangeResult; }
 | |
|             set { this.m_40017_ProductChangeResult = value; }
 | |
|         }
 | |
|         #endregion
 | |
| 
 | |
|         #region Method
 | |
|         public void Initialization()
 | |
|         {
 | |
|             this._40013_Operation = 0;
 | |
|             this._40014_OperationResult = 0;
 | |
|             this._40015_ProductChange = 0;
 | |
|             this._40017_ProductChangeResult = 0;
 | |
|         }
 | |
|         #endregion
 | |
|     }
 | |
| }
 |