ErrorMessage.cs 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace EVCB_OCPP.Packet.Messages
  7. {
  8. public static class OCPPErrorCodes
  9. {
  10. /// <summary>未實作</summary>
  11. public static readonly string NotImplemented = "NotImplemented";
  12. /// <summary>可辨識的Action,但是目前不支援</summary>
  13. public static readonly string NotSupported = "NotSupported";
  14. /// <summary>可辨識的Action,處理過程中發生問題</summary>
  15. public static readonly string InternalError = "InternalError";
  16. /// <summary>
  17. /// 可辨識的Action,但資料(payload)不完整
  18. /// </summary>
  19. public static readonly string ProtocolError = "ProtocolError";
  20. /// <summary>
  21. /// 可辨識的Action,處理過程遇到安全性問題
  22. /// </summary>
  23. public static readonly string SecurityError = "SecurityError";
  24. /// <summary>
  25. /// 資料(payload)格式錯誤
  26. /// </summary>
  27. public static readonly string FormationViolation = "FormationViolation";
  28. /// <summary>
  29. /// /// <summary>
  30. /// 資料(payload)有無效參數
  31. /// </summary>
  32. /// </summary>
  33. public static readonly string PropertyConstraintViolation = "PropertyConstraintViolation";
  34. /// <summary>
  35. /// Payload for Action is syntactically correct but at
  36. /// least one of the fields violates occurence
  37. ///constraints
  38. /// </summary>
  39. public static readonly string OccurenceConstraintViolation = "OccurenceConstraintViolation";
  40. /// <summary>
  41. /// Payload for Action is syntactically correct but at
  42. ///least one of the fields violates data type
  43. ///constraints (e.g. “somestring”: 12)
  44. /// </summary>
  45. public static readonly string TypeConstraintViolation = "TypeConstraintViolation";
  46. /// <summary>
  47. /// 其他錯誤
  48. /// </summary>
  49. public static readonly string GenericError = "GenericError";
  50. }
  51. public static class OCPPErrorDescription
  52. {
  53. public static readonly string OccurenceConstraintViolation = "Payload for Action is syntactically correct but at least one of the fields violates occurence constraints";
  54. public static readonly string InternalError = "An internal error occurred and the receiver was not able to process the requested Action successfully";
  55. public static readonly string FormationViolation = "Unable to process action";
  56. public static readonly string NotImplemented = "Requested Action is not known by receiver";
  57. public static readonly string NotChecked = "This EVSE doesn't allow to send another message.";
  58. }
  59. }