FileInfomation.cs
3.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace OnlineStore.DeviceLibrary.doubleStore
{
public class FileInfomation
{
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public FileInfomation()
{
}
/**
* 构造函数,除了AUTORUN和TROUBLE_STOP,其他都是固定值
*/
public FileInfomation(int AUTORUN, int TROUBLE_STOP)
{
this.AUTORUN = AUTORUN;
this.TROUBLE_STOP = TROUBLE_STOP;
}
/**
* 转换为文件内容
*/
public string[] ToFileString()
{
//String nextLine = "\r\n";
string[] data = new string[] {
"[STATUS]",
"ONLINE=" + ONLINE ,
"AUTORUN=" + AUTORUN ,
"PROCESS_WAITE=" + PROCESS_WAITE ,
"OTHER_LANE_WAIT=" + OTHER_LANE_WAIT ,
"TROUBLE_STOP=" + TROUBLE_STOP,
"PWAIT=" + PWAIT ,
"PCB_CHECK=" + PCB_CHECK ,
"CHANGE_OVER=" + CHANGE_OVER ,
};
return data;
}
public string[] WarnMsgToFileString(string Msg)
{
string jpnMsg = "テスト テスト テスト テスト テスト";
string engMsg = "test test test test test ";
string[] data = new string[]
{
"[Text_JPN]",
"MESSAGE=\""+jpnMsg+"\"",
"[Text_ENG]",
"MESSAGE=\""+engMsg+"\"",
"[Text_CHN]",
"MESSAGE=\""+Msg+"\"",
};
return data;
}
/**
* Online mode state 1:固定 fixed to 1
*/
public int ONLINE = 1;
/**
* 自動運転状態 * Auto operation state
* 0:停止中/1:自動運転中 * 0: Stopped/1: In auto operation
*/
public int AUTORUN = 1;
/**
* 工程待ち状態 * Process wait state * 0:固定 * fixed to 0
*/
public int PROCESS_WAITE = 0;
/**
* Other lane waiting * 0:固定 * fixed to 0
*/
public int OTHER_LANE_WAIT = 0;
/**
* In trouble stop * 0:トラブル停止中でない/1:トラブル停止中
* 0: Not in trouble stop/1: In trouble stop
*/
public int TROUBLE_STOP = 0;
/**
* 材料供給待ち停止中 * In material supply stop * 0:固定 * fixed to 0
*/
public int PWAIT = 0;
/**
* 基板確認中 * In board checking * 0:固定 * fixed to 0
*/
public int PCB_CHECK = 0;
/**
* 段取り替え中 * In changeover * 0:固定 * fixed to 0
*/
public int CHANGE_OVER = 0;
}
}