ocpp.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import {get, post} from '../http'
  2. const ocpp = {
  3. getOperationList: () => [
  4. {
  5. "name": "Change Availability",
  6. "value": "CA",
  7. "api": "ocppOperations/changeAvailability"
  8. },
  9. {
  10. "name": "Change Configuration",
  11. "value": "CC",
  12. "api": "ocppOperations/changeConfiguration"
  13. },
  14. {
  15. "name": "Remote Start Transaction",
  16. "value": "RSTART",
  17. "api": "ocppOperations/remoteStartTransaction"
  18. },
  19. {
  20. "name": "Remote Stop Transaction",
  21. "value": "RSTOP",
  22. "singleStation": true,
  23. "api": "ocppOperations/remoteStopTransaction"
  24. },
  25. {
  26. "name": "Reset",
  27. "value": "RS",
  28. "api": "ocppOperations/reset"
  29. },
  30. {
  31. "name": "Unlock Connector",
  32. "value": "UC",
  33. "singleStation": true,
  34. "api": "ocppOperations/unlockConnector"
  35. },
  36. {
  37. "name": "Get Configuration",
  38. "value": "GC",
  39. "api": "ocppOperations/getConfiguration"
  40. },
  41. {
  42. "name": "Clear Charging Profile",
  43. "value": "CCP",
  44. "singleStation": true,
  45. "api": "ocppOperations/clearChargingProfile"
  46. },
  47. {
  48. "name": "Set Charging Profile",
  49. "value": "SCP",
  50. "singleStation": true,
  51. "api": "ocppOperations/setChargingProfile"
  52. },
  53. {
  54. "name": "Update Firmware",
  55. "value": "UF",
  56. "api": "ocppOperations/updateFirmware"
  57. }
  58. ],
  59. getKeyTypeList: () => get('ocppOperations/getKeyTypeList'),
  60. getActiveIdTags: (params) => get('ocppOperations/getActiveIdTags', params),
  61. getResetTypeList: () => get('ocppOperations/getResetTypeList'),
  62. getStationPages: (params) => post('ocppOperations/getChargePointsPages', params),
  63. getConfigurationKeyList: () => get('ocppOperations/getConfigurationKeyList'),
  64. getAvailabilityTypeList: () => get('ocppOperations/getAvailabilityTypeList'),
  65. getChargingProfileList: () => get('ocppOperations/getChargingProfileList'),
  66. getClearChargingProfileFilterType: () => get('ocppOperations/getClearChargingProfileFilterType'),
  67. getConnectorIds: (param) => get('ocppOperations/getConnectorsByStationId', {stationId: param}),
  68. getActiveConnectorIds: (param) => get('ocppOperations/getActiveTransactionIdsByStationId', {stationId: param}),
  69. getTaskInfo: (id) => get('ocppOperations/getTaskInfo', {taskId: id}),
  70. sendPerform: (api, params) => post(api, params),
  71. }
  72. export default ocpp;