OCPP代码对应功能实现

Authorize授权

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:AuthorizeRequest",

    "title": "AuthorizeRequest",

    "type": "object",

    "properties": {

        "idTag": {   //这包含需要授权的 idtag

            "type": "string",

            "maxLength": 20

        }

    },

    "additionalProperties": false,

    "required": [

        "idTag"

    ]

}

发上列代码执行查询 idTag

Authorize授权反馈

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:AuthorizeResponse",

    "title": "AuthorizeResponse",

    "type": "object",

    "properties": {

        "idTagInfo": {

            "type": "object",

            "properties": {

                "expiryDate": {                 // 有效期限

                    "type": "string",

                    "format": "date-time"

                },

                "parentIdTag": {

                    "type": "string",

                    "maxLength": 20

                },

                "status": {

                    "type": "string",

                    "additionalProperties": false,

                    "enum": [                      //列举型别

                        "Accepted",                //已接受/同时发送Tx

                        "Blocked",                 //"已阻止

                        "Expired",                 //已过期

                        "Invalid",                 //无效

                        "ConcurrentTx"             //同时发送Tx

                    ]

                }

            },

            "additionalProperties": false,         //附加属性

            "required": [

                "status"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "idTagInfo"

    ]

}

本地授权列表中的身份标识可以标记为有效、过期、(暂时)阻止或列入黑名单,分别对应于idTagInfo 状态值 "已接受/同时发送Tx""已过期""已阻止""无效"

BootNotification启动通知

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:BootNotificationRequest",

    "title": "BootNotificationRequest",

    "type": "object",

    "properties": {

        "chargePointVendor": {         //充电桩供应商

            "type": "string",

            "maxLength": 20

        },

        "chargePointModel": {          //充电桩模式

            "type": "string",

            "maxLength": 20

        },

        "chargePointSerialNumber": {     // 充电桩序列号

            "type": "string",

            "maxLength": 25

        },

        "chargeBoxSerialNumber": {  //充电盒序列号

            "type": "string",

            "maxLength": 25

        },

        "firmwareVersion": {         //固件版本

            "type": "string",

            "maxLength": 50

        },

        "iccid": {                     // 集成电路卡ID 硬件ID卡

            "type": "string",

            "maxLength": 20

        },

        "imsi": {                    //国际移动用户识别码

            "type": "string",

            "maxLength": 20

        },

        "meterType": {               //仪表类型

            "type": "string",

            "maxLength": 25

        },

        "meterSerialNumber": {   //仪表序列号

            "type": "string",

            "maxLength": 25

        }

    },

    "additionalProperties": false,

    "required": [

        "chargePointVendor",    //充电点供应商

        "chargePointModel"      //充电点模型

    ]

}

BootNotificationResponse 启动通知响应

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:BootNotificationResponse",

    "title": "BootNotificationResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",           //接受

                "Pending",            //待定

                "Rejected"            //拒绝

            ]

        },

        "currentTime": {               //当前时间

            "type": "string",

            "format": "date-time"

        },

        "interval": {                 //间隔

            "type": "integer"

        }

    },

    "additionalProperties": false,

    "required": [

        "status",

        "currentTime",

        "interval"

    ]

}

CancelReservation取消预约

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:CancelReservationRequest",

    "title": "CancelReservationRequest",

    "type": "object",

    "properties": {

        "reservationId": {   //预定ID

            "type": "integer"

        }

    },

    "additionalProperties": false,

    "required": [

        "reservationId"

    ]

}

CancelReservationResponse 取消预约回应

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:CancelReservationResponse",

    "title": "CancelReservationResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",              //接受

                "Rejected"               //拒绝

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

ChangeAvailability切换可用状态

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ChangeAvailabilityRequest",

    "title": "ChangeAvailabilityRequest",

    "type": "object",

    "properties": {

        "connectorId": {               //枪口ID

            "type": "integer"

        },

        "type": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Inoperative",             //不工作

                "Operative"                //工作

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "connectorId",

        "type"

    ]

}

ChangeAvailabilityResponse 切换可用状态响应

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ChangeAvailabilityResponse",

    "title": "ChangeAvailabilityResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Rejected",

                "Scheduled"          //日程列表 记录当前状态和进行充电排序。

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

ChangeConfiguration改变配置

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ChangeConfigurationRequest",

    "title": "ChangeConfigurationRequest",

    "type": "object",

    "properties": {

        "key": {

            "type": "string",

            "maxLength": 50

        },

        "value": {

            "type": "string",

            "maxLength": 500

        }

    },

    "additionalProperties": false,

    "required": [

        "key",

        "value"

    ]

}

ChangeConfigurationResponse 改变配置响应

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ChangeConfigurationResponse",

    "title": "ChangeConfigurationResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Rejected",

                "RebootRequired",     //需要重新启动(重启)

                "NotSupported"        //不支持

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

ClearCache清除缓存

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ClearCacheRequest",

    "title": "ClearCacheRequest",

    "type": "object",

    "properties": {},

    "additionalProperties": false

}

ClearCacheResponse 清楚缓存响应

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ClearCacheResponse",

    "title": "ClearCacheResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Rejected"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

ClearChargingProfile清除充电配置文件

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ClearChargingProfileRequest",

    "title": "ClearChargingProfileRequest",

    "type": "object",

    "properties": {

        "id": {

            "type": "integer"

        },

        "connectorId": {                       //枪口ID

            "type": "integer"

        },

        "chargingProfilePurpose": {            //充电配置文件用途

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "ChargePointMaxProfile",        // 充电桩最大配置文件

                "TxDefaultProfile",             //Tx默认配置文件

                "TxProfile"                     //Tx配置文件

            ]

        },

        "stackLevel": {                         // 堆叠级别

            "type": "integer"

        }

    },

    "additionalProperties": false

}

ClearChargingProfileResponse  清除充电配置文件响应

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ClearChargingProfileResponse",

    "title": "ClearChargingProfileResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Unknown"     // 未知

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

DataTransfer数据传输

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:DataTransferRequest",

    "title": "DataTransferRequest",

    "type": "object",

    "properties": {

        "vendorId": {                    // 供应商ID

            "type": "string",

            "maxLength": 255

        },

        "messageId": {                  //消息ID

            "type": "string",

            "maxLength": 50

        },

        "data": {

            "type": "string"

        }

    },

    "additionalProperties": false,

    "required": [

        "vendorId"

    ]

}

如果请求的接收者没有实现特定vendorld,应返回“UnknownVendor”,且数据元素不应存在。如果 messageld(如果使用)不匹配,接收者要返回“UnknownMessageld”。其他所有情况下,“Accepted” “rejected”以及数据元素的应用都是参与各方之间特定供应商协议的一部分。

DataTransferResponse 数据传输响应

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:DataTransferResponse",

    "title": "DataTransferResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Rejected",

                "UnknownMessageId",      //未知消息ID

                "UnknownVendorId"        //未知供应商ID

            ]

        },

        "data": {

            "type": "string"

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

DiagnosticsStatusNotification诊断状态通知

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:DiagnosticsStatusNotificationRequest",

    "title": "DiagnosticsStatusNotificationRequest",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Idle",

                "Uploaded",

                "UploadFailed",

                "Uploading"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

充电桩发送一个通知,通知中央管理系统诊断上传的状态。充电桩要发送DiagnosticsStatusNotification.reqPDU, 通知中央管理系统诊断上传正忙或已经成功完成或失败。充电桩只有在收到诊断状态通知的 “TriggerMessage”后,且非诊断上传正忙状态时,发送“Idle”状态。

DiagnosticsStatusNotificationResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:DiagnosticsStatusNotificationResponse",

    "title": "DiagnosticsStatusNotificationResponse",

    "type": "object",

    "properties": {},

    "additionalProperties": false

}

FirmwareStatusNotification固件状态通知

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:FirmwareStatusNotificationRequest",

    "title": "FirmwareStatusNotificationRequest",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,   //附加属性

            "enum": [

                "Downloaded",

                "DownloadFailed",

                "Downloading",

                "Idle",

                "InstallationFailed",

                "Installing",

                "Installed"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

一个充电桩发送通知,通知平台固件更新的进展。充电桩应该发送FirmwareStatusNotification.reqPDU, 通知中央管理系统下载和安装固件更新的进展。充电桩只有在收到固件状态通知的“TriggerMessage”后,并 且不在固件下载/安装正忙状态时,发送“Idle”状态。

FirmwareStatusNotificationResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:FirmwareStatusNotificationResponse",

    "title": "FirmwareStatusNotificationResponse",

    "type": "object",

    "properties": {},

    "additionalProperties": false

}

GetCompositeSchedule获取日程安排

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:GetCompositeScheduleRequest",

    "title": "GetCompositeScheduleRequest",

    "type": "object",

    "properties": {

        "connectorId": {                  //枪口ID

            "type": "integer"

        },

    "duration": {                        //持续时间

        "type": "integer"

    },

    "chargingRateUnit": {               //收费率单位

        "type": "string",

        "additionalProperties": false,

        "enum": [

            "A",

            "W"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "connectorId",

        "duration"

    ]

}

平 台 可以通过发送 GetCompositeSchedule.req PDU 请求充电 桩 报 告 组 合 充 电 排 期 表 。 GetCompositeSchedule.conf PDU 中报告的计划是对所有充电计划和充电桩中可能存在的本地限制的计算结果。还可以考虑 IEC 15118 限制。

收到 GetCompositeSchedule.req 后,充电桩应计算达到 Duration 的计划时间间隔,并将它们发送到平台。如果请求中的 ConnectorId 设置为“0”,充电桩应报告请求时间段内充电桩的总预期充电量。

GetCompositeScheduleResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:GetCompositeScheduleResponse",

    "title": "GetCompositeScheduleResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Rejected"

            ]

        },

    "connectorId": {                   //枪口号

        "type": "integer"

        },

    "scheduleStart": {                 //预约充电时间

        "type": "string",

        "format": "date-time"

    },

    "chargingSchedule": {              //充电时间

        "type": "object",

        "properties": {

            "duration": {

                "type": "integer"

            },

            "startSchedule": {           //开始充电时间表

                "type": "string",

                "format": "date-time"

            },

            "chargingRateUnit": {          //收费率单位

                "type": "string",

                "additionalProperties": false,

                "enum": [

                    "A",

                    "W"

                    ]

            },

            "chargingSchedulePeriod": {        //充电时间段

                "type": "array",               //数组

                "items": {

                    "type": "object",

                    "properties": {

                        "startPeriod": {          //启动时间

                            "type": "integer"

                        },

                        "limit": {

                            "type": "number",

                            "multipleOf" : 0.1     //倍数

                        },

                        "numberPhases": {           //阶段数

                            "type": "integer"

                        }

                    },

                    "additionalProperties": false,

                    "required": [

                        "startPeriod",

                        "limit"

                        ]

                }

            },

            "minChargingRate": {              //最小充电速率

                "type": "number",

                "multipleOf" : 0.1

            }

        },

        "additionalProperties": false,

        "required": [

            "chargingRateUnit",                //收费率单位

            "chargingSchedulePeriod"           //收费时间

        ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

GetConfiguration获得配置项

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:GetConfigurationRequest",

    "title": "GetConfigurationRequest",

    "type": "object",

    "properties": {

        "key": {

            "type": "array",

            "items": {

                "type": "string",

                "maxLength": 50

            }

        }

    },

    "additionalProperties": false

}

GetConfigurationResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:GetConfigurationResponse",

    "title": "GetConfigurationResponse",

    "type": "object",

    "properties": {

        "configurationKey": {            //配置密钥

            "type": "array",

            "items": {

                "type": "object",

                "properties": {

                    "key": {

                        "type": "string",

                        "maxLength": 50

                    },

                    "readonly": {

                        "type": "boolean"  

//如果可以使用更改 配置消息设置该值,则为false

                    },

                    "value": {

                        "type": "string",

                        "maxLength": 500

                    }

                },

                "additionalProperties": false,

                "required": [

                    "key",

                    "readonly"

                ]

            }

        },

        "unknownKey": {                    //可选。请求的未知密钥

            "type": "array",

            "items": {

                "type": "string",

                "maxLength": 50

            }

        }

    },

    "additionalProperties": false

}

GetConfiguration获得配置项

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:GetConfigurationRequest",

    "title": "GetConfigurationRequest",

    "type": "object",

    "properties": {

        "key": {

            "type": "array",

            "items": {

                "type": "string",

                "maxLength": 50

            }

        }

    },

    "additionalProperties": false

}

如果请求 PDU 中的密钥列表为空或丢失(可选),则充电桩应返回 GetConfiguration.conf 中所有配置设置的列表。否则,充电桩应返回已识别密钥及其相应值和只读状态的列表。无法识别的密钥应作为 GetConfiguration.conf 的可选未知密钥列表元素的一部分放置在响应 PDU

GetConfigurationResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:GetConfigurationResponse",

    "title": "GetConfigurationResponse",

    "type": "object",

    "properties": {

        "configurationKey": {                           //可选。请求或已知密钥的列表

            "type": "array",

            "items": {

                "type": "object",

                "properties": {

                    "key": {

                        "type": "string",

                        "maxLength": 50

                    },

                    "readonly": {

                        "type": "boolean"

                    },

                    "value": {

                        "type": "string",

                        "maxLength": 500

                    }

                },

                "additionalProperties": false,

                "required": [

                    "key",

                    "readonly"

                ]

            }

        },

        "unknownKey": {                       //可选。请求的未知密钥

            "type": "array",

            "items": {

                "type": "string",

                "maxLength": 50

            }

        }

    },

    "additionalProperties": false

}

GetDiagnostics获得诊断信息

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:GetDiagnosticsRequest",

    "title": "GetDiagnosticsRequest",

    "type": "object",

    "properties": {

        "location": {

            "type": "string",

            "format": "uri"

        },

        "retries": {

            "type": "integer"

        },

        "retryInterval": { 

//可以使用 TransactionMessageAttempts 和 TransactionMessageRetryInterval 配置键配置充电桩重试此类失败的transaction相关消息的次数和间隔。

            "type": "integer"

        },

        "startTime": {

            "type": "string",

            "format": "date-time"

        },

        "stopTime": {

            "type": "string",

            "format": "date-time"

        }

    },

    "additionalProperties": false,

    "required": [

        "location"

    ]

}

平台可以请求充电桩以获取诊断信息。平台应发送 GetDiagnostics.req PDU,用于获取充电桩的诊断信息,充电桩必须将其诊断数据上传到该位置,并可选择请求的诊断信息的开始和结束时间。

GetDiagnosticsResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:GetDiagnosticsResponse",

    "title": "GetDiagnosticsResponse",

    "type": "object",

    "properties": {

        "fileName": {   

//可选。它包含文件的名称以及将要上传的诊断信息。 当没有可用的诊断信息时,此字段不存在

            "type": "string",

            "maxLength": 255

        }

    },

    "additionalProperties": false

}

GetLocalListVersion获取本地列表版本

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:GetLocalListVersionRequest",

    "title": "GetLocalListVersionRequest",

    "type": "object",

    "properties": {},

    "additionalProperties": false

}

充电桩应 使用包含其本地授权列表版本号的 GetLocalListVersion.conf PDU 进行响应版本号 0(零)应用于指示本地授权列表为空,版本号 -1 应用于指示充电点不支持本地授权列表。

GetLocalListVersionResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:GetLocalListVersionResponse",

    "title": "GetLocalListVersionResponse",

    "type": "object",

    "properties": {

        "listVersion": {

            "type": "integer"

        }

    },

    "additionalProperties": false,

    "required": [

        "listVersion"

    ]

}

Heartbeat心跳

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:HeartbeatRequest",

    "title": "HeartbeatRequest",

    "type": "object",

    "properties": {},

    "additionalProperties": false

}

当平台响应BootNotfication.conf且状态为已接受时,充电桩要依据PDU响应间隔调整心跳间隔,建议使内部时钟和平台的当前时间同步。如果平台返回的不是Accepted(已接受),那么间隔区的值指的是下次发送BootNotification请求之前的最小等待时间。如果interval值为0,充电桩则自行选择等待间隔,要避免平台收到大量请求。充电桩不能提前发送BootNotification.req,除非通过TriggerMessage.req被要求这么做。

HeartbeatResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:HeartbeatResponse",

    "title": "HeartbeatResponse",

    "type": "object",

    "properties": {

        "currentTime": {                    //当前时间

            "type": "string",

            "format": "date-time"

        }

    },

    "additionalProperties": false,

    "required": [

        "currentTime"            

    ]

}

MeterValues电表值

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:MeterValuesRequest",

    "title": "MeterValuesRequest",

    "type": "object",

    "properties": {

        "connectorId": {                //枪口ID

            "type": "integer"

        },

        "transactionId": {              //交易编号,订单编号

            "type": "integer"

        },

        "meterValue":                   //仪表值

            "type": "array",

            "items": {

                "type": "object",

                "properties": {

                    "timestamp": {          //时间戳

                        "type": "string",

                        "format": "date-time"

                    },

                    "sampledValue": {       //采样值

                        "type": "array",

                        "items": {

                            "type": "object",

                            "properties": {

                                "value": {

                                    "type": "string"

                                },

                                "context": {  

//可选的上下文字段指定了等处罚读取的原因/事件。

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "Interruption.Begin", //在中断开始时取的值。

                                        "Interruption.End", //中断后恢复时取的值。

                                        "Sample.Clock", //在时钟对齐间隔处取的值。

                  "Sample.Periodic",//作为相对于事务开始时间的定期样本获取的值。

                                "Transaction.Begin",//充电交易开始时的值。

                                     "Transaction.End",//充电交易结束时的值

                                "Trigger",  //为响应 TriggerMessage.req 而采用的值

                                        "Other" //适用于任何其他情况。

                                    ]

                                },

                                "format": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "Raw",  //值为原始

"SignedData"//签字数据

(十进制)数字或签名数据。 字段类型为字符串,以允许数字签名数据读取。十进制数值也是可以接受的,以允许温度和电流等测量值的小数值。

                                                         ]

                                },

                                "measurand": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

   "Energy.Active.Export.Register", //电动汽车输出的能源(瓦时或千瓦时)

 "Energy.Active.Import.Register",//电动汽车输入的能源(瓦时或千瓦时)"Energy.Reactive.Export.Register",//电动汽车输出的无功电能

"Energy.Reactive.Import.Register",//EV进口的输入电能

 "Energy.Active.Export.Interval",//电动汽车输出的能源(Wh或KWh)

                                        "Energy.Active.Import.Interval",

                                        "Energy.Reactive.Export.Interval",

                                        "Energy.Reactive.Import.Interval",

                                        "Power.Active.Export",

                                        "Power.Active.Import",

                                        "Power.Offered",

                                        "Power.Reactive.Export",

                                        "Power.Reactive.Import",

                                        "Power.Factor",

                                        "Current.Import",

                                        "Current.Export",

                                        "Current.Offered",

                                        "Voltage",

                                        "Frequency",

                                        "Temperature",

                                        "SoC",

                                        "RPM"

                                    ]

                                },

                                "phase": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "L1",

                                        "L2",

                                        "L3",

                                        "N",

                                        "L1-N",

                                        "L2-N",

                                        "L3-N",

                                        "L1-L2",

                                        "L2-L3",

                                        "L3-L1"

                                    ]

                                },

                                "location": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "Cable",

                                        "EV",

                                        "Inlet",

                                        "Outlet",

                                        "Body"

                                    ]

                                },

                                "unit": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "Wh",

                                        "kWh",

                                        "varh",

                                        "kvarh",

                                        "W",

                                        "kW",

                                        "VA",

                                        "kVA",

                                        "var",

                                        "kvar",

                                        "A",

                                        "V",

                                        "K",

                                        "Celcius",

                                        "Celsius",

                                        "Fahrenheit",

                                        "Percent"

                                    ]

                                }

                            },

                            "additionalProperties": false,

                            "required": [

                                "value"

                            ]

                        }

                    }

                },

                "additionalProperties": false,

                "required": [

                    "timestamp",

                    "sampledValue"

                ]      

            }

        }

    },

    "additionalProperties": false,

    "required": [

        "connectorId",

        "meterValue"

    ]

}

充电桩可以对电表或其他传感器/变频器硬件进行采样,来提供电表值的额外信息。由充电桩决定何时发送数值。这可以用ChangeConfiguration.req“获取数据间隔来配置,并指定要获取和报告的数据。

MeterValuesResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:MeterValuesResponse",

    "title": "MeterValuesResponse",

    "type": "object",

    "properties": {},

    "additionalProperties": false

}

RemoteStartTransaction远程开始交易

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:RemoteStartTransactionRequest",

    "title": "RemoteStartTransactionRequest",

    "type": "object",

    "properties": {

        "connectorId": {                        //枪口ID

            "type": "integer"

        },

        "idTag": {

            "type": "string",

            "maxLength": 20

        },

        "chargingProfile": {                      //充电配置

            "type": "object",

            "properties": {

                "chargingProfileId": {          //充电配置ID

                    "type": "integer"

                },

                "transactionId": {                //与这些电表值相关的事务。

                    "type": "integer"

                },

                "stackLevel": {

//计费配置文件的优先级由其 StackLevel 参数的值确定。在任何时间点,现行收费配置文件应为在该时间点有效的配置文件中具有最高堆栈级别的计费配置文件来决定,由其 validFrom validTo 参数确定。

                    "type": "integer"

                },

                "chargingProfilePurpose": {

//新交易事件的默认计划可用于实施收费策略。例如,防止在白天充电的策略。对于此目的的时间表,ChargingProfilePurpose应设置为"TxDefault profile"

                    "type": "string",

                    "additionalProperties": false,

                    "enum": [

                        "ChargePointMaxProfile",

                        "TxDefaultProfile",

                        "TxProfile"

                    ]

                },

                "chargingProfileKind": {         //充电配置类型)

                    "type": "string",

                    "additionalProperties": false,

                    "enum": [

                        "Absolute",

                        "Recurring",

                        "Relative"

                    ]

                },

                "recurrencyKind": { //(重复类型)

                    "type": "string",

                    "additionalProperties": false,

                    "enum": [

                        "Daily",         //每天

                        "Weekly"         //每周

                    ]

                },

                "validFrom": {  

//配置文件开始有效的时间点。如果不存在,则配置文件在充电桩收到后立即有效。当

ChargingProfilePurposeTxProfile时,请勿使用。

                    "type": "string",

                    "format": "date-time"

                },

                "validTo": {

//可选。配置文件停止有效的时间点。如果不存在,则该配置文件在被另一个 配置文件替换之前一直有效。当ChargingProfilePurposeTxProfile时,请勿使用。

                    "type": "string",

                    "format": "date-time"

                },

                "chargingSchedule": {           //(充电计划)

                    "type": "object",

                    "properties": {

                        "duration": {       //持续时间

                            "type": "integer"

                        },

                        "startSchedule": {

                            "type": "string",

                            "format": "date-time"

                        },

                        "chargingRateUnit": {    // 收费率单位

                            "type": "string",

                            "additionalProperties": false,

                            "enum": [

                                "A",

                                "W"

                            ]

                        },

                        "chargingSchedulePeriod": { //充电计划时长

                            "type": "array",

                            "items": {

                                "type": "object",

                                "properties": {

                                    "startPeriod": {

                                        "type": "integer"

                                    },

                                    "limit": {

                                        "type": "number",

                                        "multipleOf" : 0.1

                                    },

                                    "numberPhases": {

                                        "type": "integer"

                                    }

                                },

                                "additionalProperties": false,

                                "required": [

                                    "startPeriod",

                                    "limit"

                                ]

                            }

                        },

                        "minChargingRate": {   //电动汽车支持的最低充电速率。

                            "type": "number",

                            "multipleOf" : 0.1

                        }

                    },

                    "additionalProperties": false,

                    "required": [

                        "chargingRateUnit",

                        "chargingSchedulePeriod"

                    ]

                }

            },

            "additionalProperties": false,

            "required": [

                "chargingProfileId",

                "stackLevel",         //堆叠等级

                "chargingProfilePurpose",

                "chargingProfileKind",

                "chargingSchedule"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "idTag"

    ]

}

RemoteStartTransactionResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:RemoteStartTransactionResponse",

    "title": "RemoteStartTransactionResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Rejected"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

RemoteStopTransaction远程结束交易

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:RemoteStopTransactionRequest",

    "title": "RemoteStopTransactionRequest",

    "type": "object",

    "properties": {

        "transactionId": {    //交易编号

            "type": "integer"

        }

    },

    "additionalProperties": false,

    "required": [

        "transactionId"

    ]

}

RemoteStopTransactionResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:RemoteStopTransactionResponse",

    "title": "RemoteStopTransactionResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Rejected"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

ReserveNow立即预约

{

//平台可以向充电桩发出ReserveNow.req,以保留枪口供特定idTag使用。

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ReserveNowRequest",

    "title": "ReserveNowRequest",

    "type": "object",

    "properties": {

        "connectorId": {           //枪口ID

            "type": "integer"

        },

        "expiryDate": {          //充电预约结束的日期和时间。

            "type": "string",

            "format": "date-time"

        },

        "idTag": {

            "type": "string",

            "maxLength": 20

        },

        "parentIdTag": {

            "type": "string",

            "maxLength": 20

        },

        "reservationId": {  //预约ID

            "type": "integer"

        }

    },

    "additionalProperties": false,

    "required": [

        "connectorId",

        "expiryDate",

        "idTag",

        "reservationId"

    ]

}

ReserveNowResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ReserveNowResponse",

    "title": "ReserveNowResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",    //接受

                "Faulted",    // 失败

                "Occupied",  //以占用

                "Rejected",   //拒绝

                "Unavailable"   //不可用

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

Reset重置

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ResetRequest",

    "title": "ResetRequest",

    "type": "object",

    "properties": {

        "type": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Hard",   //硬重置

                "Soft"    //软重置

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "type"

]}

//平台应发送 Reset.req PDU 以请求充电桩自行重启。平台可以请求硬重置或软重置。收到 Reset.req PDU 后,充电桩应使用 Reset.conf PDU 进行响应。响应 的PDU 应包括充电桩是否将尝试自行重置。

ResetResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:ResetResponse",

    "title": "ResetResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Rejected"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

SendLocalList发送本地列表

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:SendLocalListRequest",

    "title": "SendLocalListRequest",

    "type": "object",

    "properties": {

        "listVersion": {     //列表版本号

            "type": "integer"

        },

        "localAuthorizationList": {    //获取本地列表版本号

            "type": "array",

            "items": {

                "type": "object",

                "properties": {

                    "idTag": {

                        "type": "string",

                        "maxLength": 20

                    },

                    "idTagInfo": {

                        "type": "object",

                        "properties": {

                            "expiryDate": {   //充电预约结束的日期和时间

                                "type": "string",

                                "format": "date-time"

                            },

                            "parentIdTag": {

                                "type": "string",

                                "maxLength": 20

                            },

                            "status": {

                                "type": "string",

                                "additionalProperties": false,

                                "enum": [

                                    "Accepted",

                                    "Blocked",  //以阻止

                                    "Expired",   //过期

                                    "Invalid",   //无效

                                    "ConcurrentTx"  //同时发送TX

                                ]

                            }

                        },

                        "additionalProperties": false,

                        "required": [

                            "status"

                        ]

                    }

                },

                "additionalProperties": false,

                "required": [

                    "idTag"

                ]

            }

        },

        "updateType": {        //更新类型

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Differential",  //指示必须使用此消息中的值更新当前本地授权列表。

                "Full"         //指示当前本地授权列表必须替换为此消息中的值。

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "listVersion",

        "updateType"

    ]

}

SendLocalListResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:SendLocalListResponse",

    "title": "SendLocalListResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Failed",

                "NotSupported",   //与充电桩支持的配置设置不匹配

                "VersionMismatch"  //版本不匹配

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

如果"key"与充电桩支持的配置设置不对应,则它应以"notsupproted" 状态进行回复。如果更改已成功执行,则充电点应以"accepted"状态进行响应。如果更改已成功执行,但需要重

新启动才能应用更改,则充电点应以"RebootRequired "状态进行响应。如果无法进行配置,充电点应以"Rejected"状态进行响应。

SetChargingProfile设置充电配置文件

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:SetChargingProfileRequest",

    "title": "SetChargingProfileRequest",

    "type": "object",

    "properties": {

        "connectorId": {                 //枪口ID

            "type": "integer"

        },

        "csChargingProfiles": {          //要在充电桩设置的充电配置文件。

            "type": "object",

            "properties": {

                "chargingProfileId": {     //充电配置ID

                    "type": "integer"

                },

                "transactionId": {  //可选。仅当收费配置文件用途设置为TxProfile时才有效,transaction Id 可用于将配置文件与特定事务进行匹配。

                    "type": "integer"

                },

                "stackLevel": {           //堆栈级别

                    "type": "integer"

                },

                "chargingProfilePurpose": {  //充电配置目的

                    "type": "string",

                    "additionalProperties": false,

                    "enum": [

                        "ChargePointMaxProfile",

                        "TxDefaultProfile",   //TX默认配置文件

                        "TxProfile"           //TX配置文件

                    ]

                },

                "chargingProfileKind": {     //充电配置类型

                    "type": "string",

                    "additionalProperties": false,

                    "enum": [

                        "Absolute",    //计划期间相对于计划中定义的固定时间点。

                        "Recurring",   //计划在第一个计划期间定期重新启动.

                        "Relative"  //计划周期相对于由充电桩确定的特定于情况的起始点(如充电会话的开始)。

                    ]

                },

                "recurrencyKind": {  //重复类型

                    "type": "string",

                    "additionalProperties": false,

                    "enum": [

                        "Daily",

                        "Weekly"

                    ]

                },

                "validFrom": {         //有效期至

                    "type": "string",

                    "format": "date-time"

                },

                "validTo": {    // 配置文件停止有效的时间点。如果不存在,则该配置文件在被另一个配置文件替换之前一直有效。

                    "type": "string",

                    "format": "date-time"

                },

                "chargingSchedule": {    //充电计划

                    "type": "object",

                    "properties": {

                        "duration": {

                            "type": "integer"

                        },

                        "startSchedule": {

                            "type": "string",

                            "format": "date-time"

                        },

                        "chargingRateUnit": {

                            "type": "string",

                            "additionalProperties": false,

                            "enum": [

                                "A",

                                "W"

                            ]

                        },

                        "chargingSchedulePeriod": {

                            "type": "array",

                            "items": {

                                "type": "object",

                                "properties": {

                                    "startPeriod": {

                                        "type": "integer"

                                    },

                                "limit": {

                                    "type": "number",

                                    "multipleOf" : 0.1

                                },

                                "numberPhases": {

                                        "type": "integer"

                                    }

                                },

                                "additionalProperties": false,

                                "required": [

                                    "startPeriod",

                                    "limit"

                                ]

                            }

                        },

                        "minChargingRate": {

                            "type": "number",

                            "multipleOf" : 0.1

                        }

                    },

                    "additionalProperties": false,

                    "required": [

                        "chargingRateUnit",

                        "chargingSchedulePeriod"

                    ]

                }

            },

            "additionalProperties": false,

            "required": [

                "chargingProfileId",

                "stackLevel",

                "chargingProfilePurpose",

                "chargingProfileKind",

                "chargingSchedule"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "connectorId",

        "csChargingProfiles"

    ]

}

SetChargingProfileResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:SetChargingProfileResponse",

    "title": "SetChargingProfileResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Rejected",

                "NotSupported"

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

StartTransaction开始交易

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:StartTransactionRequest",

    "title": "StartTransactionRequest",

    "type": "object",

    "properties": {

        "connectorId": {

            "type": "integer"

        },

        "idTag": {   //充电桩必须用于启动充电事务的标识符idtag。

            "type": "string",

            "maxLength": 20

        },

        "meterStart": {    //这包含充电事务开始时枪口的计量值(以Wh 为单位)。

            "type": "integer"

        },

        "reservationId": {  //此预约的唯一ID

            "type": "integer"

        },

        "timestamp": {    //时间戳

            "type": "string",

            "format": "date-time"

        }

    },

    "additionalProperties": false,

    "required": [

        "connectorId",

        "idTag",

        "meterStart",

        "timestamp"

    ]

}

StartTransactionResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:StartTransactionResponse",

    "title": "StartTransactionResponse",

    "type": "object",

    "properties": {

        "idTagInfo": {

            "type": "object",

            "properties": {

                "expiryDate": {

                    "type": "string",

                    "format": "date-time"

                },

                "parentIdTag": {

                    "type": "string",

                    "maxLength": 20

                },

                "status": {

                    "type": "string",

                    "additionalProperties": false,

                    "enum": [

                        "Accepted", 

                        "Blocked",  //以阻止

                        "Expired",  //已过期。不允许充电

                        "Invalid",

                        "ConcurrentTx"

                    ]

                }

            },

            "additionalProperties": false,

            "required": [

                "status"

            ]

        },

        "transactionId": {  //请求停止充电桩事务的标识符。

            "type": "integer"

        }

    },

    "additionalProperties": false,

    "required": [

        "idTagInfo",

        "transactionId"

    ]

}

StatusNotification状态通知

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:StatusNotificationRequest",

    "title": "StatusNotificationRequest",

    "type": "object",

    "properties": {

        "connectorId": {

            "type": "integer"

        },

        "errorCode": {   //这包含充电桩报告的错误代码。

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "ConnectorLockFailure",

                "EVCommunicationError",

                "GroundFailure",

                "HighTemperature",

                "InternalError",

                "LocalListConflict",

                "NoError",

                "OtherError",

                "OverCurrentFailure",

                "PowerMeterFailure",

                "PowerSwitchFailure",

                "ReaderFailure",

                "ResetFailure",

                "UnderVoltage",

                "OverVoltage",

                "WeakSignal"

            ]

        },

        "info": { //与错误相关的其他自由格式的信息

            "type": "string",

            "maxLength": 50

        },

        "status": { //这包含充电桩的当前状态

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Available",

                "Preparing",

                "Charging",

                "SuspendedEVSE",

                "SuspendedEV",

                "Finishing",

                "Reserved",

                "Unavailable",

                "Faulted"

            ]

        },

        "timestamp": {  //报告状态的时间。

            "type": "string",

            "format": "date-time"

        },

        "vendorId": { //这标识了特定供应商的ID

            "type": "string",

            "maxLength": 255

        },

        "vendorErrorCode": { //这包含特定供应商的错误代码。

            "type": "string",

            "maxLength": 50

        }

    },

    "additionalProperties": false,

    "required": [

        "connectorId",

        "errorCode",

        "status"

    ]

}

StatusNotificationResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:StatusNotificationResponse",

    "title": "StatusNotificationResponse",

    "type": "object",

    "properties": {},

    "additionalProperties": false

}

StopTransaction停止交易

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:StopTransactionRequest",

    "title": "StopTransactionRequest",

    "type": "object",

    "properties": {

        "idTag": {

            "type": "string",

            "maxLength": 20

        },

        "meterStop": { //这包含充电事务结束时枪口的电表计量值(以 Wh 为单位)。

            "type": "integer"

        },

        "timestamp": {  //这包含停止充电事务的日期和时间。

            "type": "string",

            "format": "date-time"

        },

        "transactionId": { //这包含StartTransaction.conf 收到的transaction ID

            "type": "integer"

        },

        "reason": { //这包含充电事务停止的原因。仅当Reasonlocal时,才可以省略

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "EmergencyStop",

                "EVDisconnected",

                "HardReset",

                "Local",

                "Other",

                "PowerLoss",

                "Reboot",

                "Remote",

                "SoftReset",

                "UnlockCommand",

                "DeAuthorized" //充电事物停止

            ]

        },

        "transactionData": {  //这包含与计费目的相关的充电事务使用情况详细信息。

            "type": "array",

            "items": {

                "type": "object",

                "properties": {

                    "timestamp": {

                        "type": "string",

                        "format": "date-time"

                    },

                    "sampledValue": {

                        "type": "array",

                        "items": {

                            "type": "object",

                            "properties": {

                                "value": {

                                    "type": "string"

                                },

                                "context": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "Interruption.Begin",

                                        "Interruption.End",

                                        "Sample.Clock",

                                        "Sample.Periodic",

                                        "Transaction.Begin",

                                        "Transaction.End",

                                        "Trigger",

                                        "Other"

                                    ]

                                }, 

                                "format": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "Raw",

                                        "SignedData"

                                    ]

                                },

                                "measurand": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "Energy.Active.Export.Register",

                                        "Energy.Active.Import.Register",

                                        "Energy.Reactive.Export.Register",

                                        "Energy.Reactive.Import.Register",

                                        "Energy.Active.Export.Interval",

                                        "Energy.Active.Import.Interval",

                                        "Energy.Reactive.Export.Interval",

                                        "Energy.Reactive.Import.Interval",

                                        "Power.Active.Export",

                                        "Power.Active.Import",

                                        "Power.Offered",

                                        "Power.Reactive.Export",

                                        "Power.Reactive.Import",

                                        "Power.Factor",

                                        "Current.Import",

                                        "Current.Export",

                                        "Current.Offered",

                                        "Voltage",

                                        "Frequency",

                                        "Temperature",

                                        "SoC",

                                        "RPM"

                                    ]

                                },

                                "phase": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "L1",

                                        "L2",

                                        "L3",

                                        "N",

                                        "L1-N",

                                        "L2-N",

                                        "L3-N",

                                        "L1-L2",

                                        "L2-L3",

                                        "L3-L1"

                                    ]

                                },

                                "location": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "Cable",

                                        "EV",

                                        "Inlet",

                                        "Outlet",

                                        "Body"

                                    ]

                                },

                                "unit": {

                                    "type": "string",

                                    "additionalProperties": false,

                                    "enum": [

                                        "Wh",

                                        "kWh",

                                        "varh",

                                        "kvarh",

                                        "W",

                                        "kW",

                                        "VA",

                                        "kVA",

                                        "var",

                                        "kvar",

                                        "A",

                                        "V",

                                        "K",

                                        "Celcius",

                                        "Fahrenheit",

                                        "Percent"

                                    ]

                                }

                            },

                            "additionalProperties": false,

                            "required": [

                                "value"

                            ]

                        }

                    }

                },

                "additionalProperties": false,

                "required": [

                    "timestamp",

                    "sampledValue"

                ]

            }

        }

    },

    "additionalProperties": false,

    "required": [

        "transactionId",

        "timestamp",

        "meterStop"

    ]

}

StopTransactionResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:StopTransactionResponse",

    "title": "StopTransactionResponse",

    "type": "object",

    "properties": {

        "idTagInfo": {

            "type": "object",

            "properties": {

                "expiryDate": {  //充电预约结束时间

                    "type": "string",

                    "format": "date-time"

                },

                "parentIdTag": {

                    "type": "string",

                    "maxLength": 20

                },

                "status": {

                    "type": "string",

                    "additionalProperties": false,

                    "enum": [

                        "Accepted",

                        "Blocked",

                        "Expired",

                        "Invalid",

                        "ConcurrentTx"

                    ]

                }

            },

            "additionalProperties": false,

            "required": [

                "status"

            ]

        }

    },

    "additionalProperties": false

}

TriggerMessage触发器消息

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:TriggerMessageRequest",

    "title": "TriggerMessageRequest",

    "type": "object",

    "properties": {

        "requestedMessage": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "BootNotification", //启动通知

                "DiagnosticsStatusNotification", //诊断状态通知

                "FirmwareStatusNotification", //固件状态通知

                "Heartbeat",                   //心跳

                "MeterValues",                 //电表值

                "StatusNotification"           //状态通知

            ]

        },

        "connectorId": {  //仅当请求应用于特定枪口时才填写。

            "type": "integer"

        }

    },

    "additionalProperties": false,

    "required": [

        "requestedMessage"

    ]

}

TriggerMessageResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:TriggerMessageResponse",

    "title": "TriggerMessageResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Accepted",

                "Rejected",

                "NotImplemented" //无法发送的请求通知

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

UnlockConnector解锁枪口

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:UnlockConnectorRequest",

    "title": "UnlockConnectorRequest",

    "type": "object",

    "properties": {

        "connectorId": {           //枪口ID

            "type": "integer"

        }

    },

    "additionalProperties": false,

    "required": [

        "connectorId"

    ]

}

UnlockConnectorResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:UnlockConnectorResponse",

    "title": "UnlockConnectorResponse",

    "type": "object",

    "properties": {

        "status": {

            "type": "string",

            "additionalProperties": false,

            "enum": [

                "Unlocked",      //枪口以成功解锁

                "UnlockFailed",  //无法解锁枪口

                "NotSupported"   //充电点指示请求不受支持。

            ]

        }

    },

    "additionalProperties": false,

    "required": [

        "status"

    ]

}

UpdateFirmware升级固件

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:UpdateFirmwareRequest",

    "title": "UpdateFirmwareRequest",

    "type": "object",

    "properties": {

        "location": {     //它包含一个字符串,其中包含指向从中检索软件位置的URI

            "type": "string",

            "format": "uri"

        },

        "retries": {  //指定了充电桩在放弃之前必须尝试下载固件的次数。如果此字段不存 在,则由充电桩决定要重试多少次。

            "type": "integer"

        },

        "retrieveDate": { //这包含充电桩必须检索(新)软件的日期和时间。

            "type": "string",

            "format": "date-time"

        },

        "retryInterval": { //可以尝试重试的时间间隔(以秒为单位)。如果此字段不存在,则由充电桩决定在两次尝试之间等待多长时间。

            "type": "integer"

        }

    },

    "additionalProperties": false,

    "required": [

        "location",

        "retrieveDate"

    ]

}

UpdateFirmwareResponse

{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "id": "urn:OCPP:1.6:2019:12:UpdateFirmwareResponse",

    "title": "UpdateFirmwareResponse",

    "type": "object",

    "properties": {},

    "additionalProperties": false

}

                  

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Jackson Qian

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值