DefaultLanguage.cs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace MECF.Framework.RT.Core.Language
  6. {
  7. /// <summary>
  8. /// 系统的语言基类,默认也即是中文版本
  9. /// </summary>
  10. public class DefaultLanguage
  11. {
  12. #pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
  13. /***********************************************************************************
  14. *
  15. * 一般的错误信息
  16. *
  17. ************************************************************************************/
  18. public virtual string ConnectedFailed => "连接失败:";
  19. public virtual string ConnectedSuccess => "连接成功!";
  20. public virtual string UnknownError => "未知错误";
  21. public virtual string ErrorCode => "错误代号";
  22. public virtual string TextDescription => "文本描述";
  23. public virtual string ExceptionMessage => "错误信息:";
  24. public virtual string ExceptionSourse => "错误源:";
  25. public virtual string ExceptionType => "错误类型:";
  26. public virtual string ExceptionStackTrace => "错误堆栈:";
  27. public virtual string ExceptopnTargetSite => "错误方法:";
  28. public virtual string ExceprionCustomer => "用户自定义方法出错:";
  29. public virtual string SuccessText => "成功";
  30. public virtual string TwoParametersLengthIsNotSame => "两个参数的个数不一致";
  31. public virtual string NotSupportedDataType => "输入的类型不支持,请重新输入";
  32. public virtual string NotSupportedFunction => "当前的功能逻辑不支持";
  33. public virtual string DataLengthIsNotEnough => "接收的数据长度不足,应该值:{0},实际值:{1}";
  34. public virtual string ReceiveDataTimeout => "接收数据超时:";
  35. public virtual string ReceiveDataLengthTooShort => "接收的数据长度太短:";
  36. public virtual string MessageTip => "消息提示:";
  37. public virtual string Close => "关闭";
  38. public virtual string Time => "时间:";
  39. public virtual string SoftWare => "软件:";
  40. public virtual string BugSubmit => "Bug提交";
  41. public virtual string MailServerCenter => "邮件发送系统";
  42. public virtual string MailSendTail => "邮件服务系统自动发出,请勿回复!";
  43. public virtual string IpAddresError => "Ip地址输入异常,格式不正确";
  44. public virtual string Send => "发送";
  45. public virtual string Receive => "接收";
  46. /***********************************************************************************
  47. *
  48. * 系统相关的错误信息
  49. *
  50. ************************************************************************************/
  51. public virtual string SystemInstallOperater => "安装新系统:IP为";
  52. public virtual string SystemUpdateOperater => "更新新系统:IP为";
  53. /***********************************************************************************
  54. *
  55. * 套接字相关的信息描述
  56. *
  57. ************************************************************************************/
  58. public virtual string SocketIOException => "套接字传送数据异常:";
  59. public virtual string SocketSendException => "同步数据发送异常:";
  60. public virtual string SocketHeadReceiveException => "指令头接收异常:";
  61. public virtual string SocketContentReceiveException => "内容数据接收异常:";
  62. public virtual string SocketContentRemoteReceiveException => "对方内容数据接收异常:";
  63. public virtual string SocketAcceptCallbackException => "异步接受传入的连接尝试";
  64. public virtual string SocketReAcceptCallbackException => "重新异步接受传入的连接尝试";
  65. public virtual string SocketSendAsyncException => "异步数据发送出错:";
  66. public virtual string SocketEndSendException => "异步数据结束挂起发送出错";
  67. public virtual string SocketReceiveException => "异步数据发送出错:";
  68. public virtual string SocketEndReceiveException => "异步数据结束接收指令头出错";
  69. public virtual string SocketRemoteCloseException => "远程主机强迫关闭了一个现有的连接";
  70. /***********************************************************************************
  71. *
  72. * 文件相关的信息
  73. *
  74. ************************************************************************************/
  75. public virtual string FileDownloadSuccess => "文件下载成功";
  76. public virtual string FileDownloadFailed => "文件下载异常";
  77. public virtual string FileUploadFailed => "文件上传异常";
  78. public virtual string FileUploadSuccess => "文件上传成功";
  79. public virtual string FileDeleteFailed => "文件删除异常";
  80. public virtual string FileDeleteSuccess => "文件删除成功";
  81. public virtual string FileReceiveFailed => "确认文件接收异常";
  82. public virtual string FileNotExist => "文件不存在";
  83. public virtual string FileSaveFailed => "文件存储失败";
  84. public virtual string FileLoadFailed => "文件加载失败";
  85. public virtual string FileSendClientFailed => "文件发送的时候发生了异常";
  86. public virtual string FileWriteToNetFailed => "文件写入网络异常";
  87. public virtual string FileReadFromNetFailed => "从网络读取文件异常";
  88. public virtual string FilePathCreateFailed => "文件夹路径创建失败:";
  89. public virtual string FileRemoteNotExist => "对方文件不存在,无法接收!";
  90. /***********************************************************************************
  91. *
  92. * 服务器的引擎相关数据
  93. *
  94. ************************************************************************************/
  95. public virtual string TokenCheckFailed => "接收验证令牌不一致";
  96. public virtual string TokenCheckTimeout => "接收验证超时:";
  97. public virtual string CommandHeadCodeCheckFailed => "命令头校验失败";
  98. public virtual string CommandLengthCheckFailed => "命令长度检查失败";
  99. public virtual string NetClientAliasFailed => "客户端的别名接收失败:";
  100. public virtual string NetEngineStart => "启动引擎";
  101. public virtual string NetEngineClose => "关闭引擎";
  102. public virtual string NetClientOnline => "上线";
  103. public virtual string NetClientOffline => "下线";
  104. public virtual string NetClientBreak => "异常掉线";
  105. public virtual string NetClientFull => "服务器承载上限,收到超出的请求连接。";
  106. public virtual string NetClientLoginFailed => "客户端登录中错误:";
  107. public virtual string NetHeartCheckFailed => "心跳验证异常:";
  108. public virtual string NetHeartCheckTimeout => "心跳验证超时,强制下线:";
  109. public virtual string DataSourseFormatError => "数据源格式不正确";
  110. public virtual string ServerFileCheckFailed => "服务器确认文件失败,请重新上传";
  111. public virtual string ClientOnlineInfo => "客户端 [ {0} ] 上线";
  112. public virtual string ClientOfflineInfo => "客户端 [ {0} ] 下线";
  113. public virtual string ClientDisableLogin => "客户端 [ {0} ] 不被信任,禁止登录";
  114. /***********************************************************************************
  115. *
  116. * Client 相关
  117. *
  118. ************************************************************************************/
  119. public virtual string ReConnectServerSuccess => "重连服务器成功";
  120. public virtual string ReConnectServerAfterTenSeconds => "在10秒后重新连接服务器";
  121. public virtual string KeyIsNotAllowedNull => "关键字不允许为空";
  122. public virtual string KeyIsExistAlready => "当前的关键字已经存在";
  123. public virtual string KeyIsNotExist => "当前订阅的关键字不存在";
  124. public virtual string ConnectingServer => "正在连接服务器...";
  125. public virtual string ConnectFailedAndWait => "连接断开,等待{0}秒后重新连接";
  126. public virtual string AttemptConnectServer => "正在尝试第{0}次连接服务器";
  127. public virtual string ConnectServerSuccess => "连接服务器成功";
  128. public virtual string GetClientIpaddressFailed => "客户端IP地址获取失败";
  129. public virtual string ConnectionIsNotAvailable => "当前的连接不可用";
  130. public virtual string DeviceCurrentIsLoginRepeat => "当前设备的id重复登录";
  131. public virtual string DeviceCurrentIsLoginForbidden => "当前设备的id禁止登录";
  132. public virtual string PasswordCheckFailed => "密码验证失败";
  133. public virtual string DataTransformError => "数据转换失败,源数据:";
  134. public virtual string RemoteClosedConnection => "远程关闭了连接";
  135. /***********************************************************************************
  136. *
  137. * 日志 相关
  138. *
  139. ************************************************************************************/
  140. public virtual string LogNetDebug => "调试";
  141. public virtual string LogNetInfo => "信息";
  142. public virtual string LogNetWarn => "警告";
  143. public virtual string LogNetError => "错误";
  144. public virtual string LogNetFatal => "致命";
  145. public virtual string LogNetAbandon => "放弃";
  146. public virtual string LogNetAll => "全部";
  147. /***********************************************************************************
  148. *
  149. * Modbus相关
  150. *
  151. ************************************************************************************/
  152. public virtual string ModbusTcpFunctionCodeNotSupport => "不支持的功能码";
  153. public virtual string ModbusTcpFunctionCodeOverBound => "读取的数据越界";
  154. public virtual string ModbusTcpFunctionCodeQuantityOver => "读取长度超过最大值";
  155. public virtual string ModbusTcpFunctionCodeReadWriteException => "读写异常";
  156. public virtual string ModbusTcpReadCoilException => "读取线圈异常";
  157. public virtual string ModbusTcpWriteCoilException => "写入线圈异常";
  158. public virtual string ModbusTcpReadRegisterException => "读取寄存器异常";
  159. public virtual string ModbusTcpWriteRegisterException => "写入寄存器异常";
  160. public virtual string ModbusAddressMustMoreThanOne => "地址值在起始地址为1的情况下,必须大于1";
  161. public virtual string ModbusAsciiFormatCheckFailed => "Modbus的ascii指令检查失败,不是modbus-ascii报文";
  162. public virtual string ModbusCRCCheckFailed => "Modbus的CRC校验检查失败";
  163. public virtual string ModbusLRCCheckFailed => "Modbus的LRC校验检查失败";
  164. public virtual string ModbusMatchFailed => "不是标准的modbus协议";
  165. /***********************************************************************************
  166. *
  167. * Melsec PLC 相关
  168. *
  169. ************************************************************************************/
  170. public virtual string MelsecPleaseReferToManulDocument => "请查看三菱的通讯手册来查看报警的具体信息";
  171. public virtual string MelsecReadBitInfo => "读取位变量数组只能针对位软元件,如果读取字软元件,请调用Read方法";
  172. public virtual string MelsecCurrentTypeNotSupportedWordOperate => "当前的类型不支持字读写";
  173. public virtual string MelsecCurrentTypeNotSupportedBitOperate => "当前的类型不支持位读写";
  174. public virtual string MelsecFxReceiveZore => "接收的数据长度为0";
  175. public virtual string MelsecFxAckNagative => "PLC反馈的数据无效";
  176. public virtual string MelsecFxAckWrong => "PLC反馈信号错误:";
  177. public virtual string MelsecFxCrcCheckFailed => "PLC反馈报文的和校验失败!";
  178. /***********************************************************************************
  179. *
  180. * Siemens PLC 相关
  181. *
  182. ************************************************************************************/
  183. public virtual string SiemensDBAddressNotAllowedLargerThan255 => "DB块数据无法大于255";
  184. public virtual string SiemensReadLengthMustBeEvenNumber => "读取的数据长度必须为偶数";
  185. public virtual string SiemensWriteError => "写入数据异常,代号为:";
  186. public virtual string SiemensReadLengthCannotLargerThan19 => "读取的数组数量不允许大于19";
  187. public virtual string SiemensDataLengthCheckFailed => "数据块长度校验失败,请检查是否开启put/get以及关闭db块优化";
  188. public virtual string SiemensFWError => "发生了异常,具体信息查找Fetch/Write协议文档";
  189. /***********************************************************************************
  190. *
  191. * Omron PLC 相关
  192. *
  193. ************************************************************************************/
  194. public virtual string OmronAddressMustBeZeroToFiveteen => "输入的位地址只能在0-15之间";
  195. public virtual string OmronReceiveDataError => "数据接收异常";
  196. public virtual string OmronStatus0 => "通讯正常";
  197. public virtual string OmronStatus1 => "消息头不是FINS";
  198. public virtual string OmronStatus2 => "数据长度太长";
  199. public virtual string OmronStatus3 => "该命令不支持";
  200. public virtual string OmronStatus20 => "超过连接上限";
  201. public virtual string OmronStatus21 => "指定的节点已经处于连接中";
  202. public virtual string OmronStatus22 => "尝试去连接一个受保护的网络节点,该节点还未配置到PLC中";
  203. public virtual string OmronStatus23 => "当前客户端的网络节点超过正常范围";
  204. public virtual string OmronStatus24 => "当前客户端的网络节点已经被使用";
  205. public virtual string OmronStatus25 => "所有的网络节点已经被使用";
  206. /***********************************************************************************
  207. *
  208. * AB PLC 相关
  209. *
  210. ************************************************************************************/
  211. public virtual string AllenBradley04 => "它没有正确生成或匹配标记不存在。";
  212. public virtual string AllenBradley05 => "引用的特定项(通常是实例)无法找到。";
  213. public virtual string AllenBradley06 => "请求的数据量不适合响应缓冲区。 发生了部分数据传输。";
  214. public virtual string AllenBradley0A => "尝试处理其中一个属性时发生错误。";
  215. public virtual string AllenBradley13 => "命令中没有提供足够的命令数据/参数来执行所请求的服务。";
  216. public virtual string AllenBradley1C => "与属性计数相比,提供的属性数量不足。";
  217. public virtual string AllenBradley1E => "此服务中的服务请求出错。";
  218. public virtual string AllenBradley26 => "IOI字长与处理的IOI数量不匹配。";
  219. public virtual string AllenBradleySessionStatus00 => "成功";
  220. public virtual string AllenBradleySessionStatus01 => "发件人发出无效或不受支持的封装命令。";
  221. public virtual string AllenBradleySessionStatus02 => "接收器中的内存资源不足以处理命令。 这不是一个应用程序错误。 相反,只有在封装层无法获得所需内存资源的情况下才会导致此问题。";
  222. public virtual string AllenBradleySessionStatus03 => "封装消息的数据部分中的数据形成不良或不正确。";
  223. public virtual string AllenBradleySessionStatus64 => "向目标发送封装消息时,始发者使用了无效的会话句柄。";
  224. public virtual string AllenBradleySessionStatus65 => "目标收到一个无效长度的信息。";
  225. public virtual string AllenBradleySessionStatus69 => "不支持的封装协议修订。";
  226. /***********************************************************************************
  227. *
  228. * Panasonic PLC 相关
  229. *
  230. ************************************************************************************/
  231. public virtual string PanasonicReceiveLengthMustLargerThan9 => "接收数据长度必须大于9";
  232. public virtual string PanasonicAddressParameterCannotBeNull => "地址参数不允许为空";
  233. public virtual string PanasonicMewStatus20 => "错误未知";
  234. public virtual string PanasonicMewStatus21 => "NACK错误,远程单元无法被正确识别,或者发生了数据错误。";
  235. public virtual string PanasonicMewStatus22 => "WACK 错误:用于远程单元的接收缓冲区已满。";
  236. public virtual string PanasonicMewStatus23 => "多重端口错误:远程单元编号(01 至 16)设置与本地单元重复。";
  237. public virtual string PanasonicMewStatus24 => "传输格式错误:试图发送不符合传输格式的数据,或者某一帧数据溢出或发生了数据错误。";
  238. public virtual string PanasonicMewStatus25 => "硬件错误:传输系统硬件停止操作。";
  239. public virtual string PanasonicMewStatus26 => "单元号错误:远程单元的编号设置超出 01 至 63 的范围。";
  240. public virtual string PanasonicMewStatus27 => "不支持错误:接收方数据帧溢出. 试图在不同的模块之间发送不同帧长度的数据。";
  241. public virtual string PanasonicMewStatus28 => "无应答错误:远程单元不存在. (超时)。";
  242. public virtual string PanasonicMewStatus29 => "缓冲区关闭错误:试图发送或接收处于关闭状态的缓冲区。";
  243. public virtual string PanasonicMewStatus30 => "超时错误:持续处于传输禁止状态。";
  244. public virtual string PanasonicMewStatus40 => "BCC 错误:在指令数据中发生传输错误。";
  245. public virtual string PanasonicMewStatus41 => "格式错误:所发送的指令信息不符合传输格式。";
  246. public virtual string PanasonicMewStatus42 => "不支持错误:发送了一个未被支持的指令。向未被支持的目标站发送了指令。";
  247. public virtual string PanasonicMewStatus43 => "处理步骤错误:在处于传输请求信息挂起时,发送了其他指令。";
  248. public virtual string PanasonicMewStatus50 => "链接设置错误:设置了实际不存在的链接编号。";
  249. public virtual string PanasonicMewStatus51 => "同时操作错误:当向其他单元发出指令时,本地单元的传输缓冲区已满。";
  250. public virtual string PanasonicMewStatus52 => "传输禁止错误:无法向其他单元传输。";
  251. public virtual string PanasonicMewStatus53 => "忙错误:在接收到指令时,正在处理其他指令。";
  252. public virtual string PanasonicMewStatus60 => "参数错误:在指令中包含有无法使用的代码,或者代码没有附带区域指定参数(X, Y, D), 等以外。";
  253. public virtual string PanasonicMewStatus61 => "数据错误:触点编号,区域编号,数据代码格式(BCD,hex,等)上溢出, 下溢出以及区域指定错误。";
  254. public virtual string PanasonicMewStatus62 => "寄存器错误:过多记录数据在未记录状态下的操作(监控记录、跟踪记录等。)。";
  255. public virtual string PanasonicMewStatus63 => "PLC 模式错误:当一条指令发出时,运行模式不能够对指令进行处理。";
  256. public virtual string PanasonicMewStatus65 => "保护错误:在存储保护状态下执行写操作到程序区域或系统寄存器。";
  257. public virtual string PanasonicMewStatus66 => "地址错误:地址(程序地址、绝对地址等)数据编码形式(BCD、hex 等)、上溢、下溢或指定范围错误。";
  258. public virtual string PanasonicMewStatus67 => "丢失数据错误:要读的数据不存在。(读取没有写入注释寄存区的数据。。";
  259. #pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
  260. }
  261. }