最新电影在线观看,jrs低调看直播,avav天堂,囯产精品宾馆在线精品酒店,亚洲精品成人区在线观看

歐標充電樁OCPP1.6-j協議代碼功能設計-第2篇

1.GetConfiguration獲得配置項

{
    "$schema": "//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
}

2.GetConfigurationResponse

{
    "$schema": "//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
}

3.GetConfiguration獲得配置項

{
    "$schema": "//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 中.

4.GetConfigurationResponse

{
    "$schema": "//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
}

5.GetDiagnostics獲得診斷信息

{
    "$schema": "//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,用于獲取充電樁的診斷信息,充電樁必須將其診斷數據上傳到該位置,并可選擇請求的診斷信息的開始和結束時間。

6.GetDiagnosticsResponse

{
    "$schema": "//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
}

7.GetLocalListVersion獲取本地列表版本

{
    "$schema": "//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 應用于指示充電點不支持本地授權列表。

8.GetLocalListVersionResponse

{
    "$schema": "//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"
    ]
}

9.Heartbeat心跳

{
    "$schema": "//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被要求這么做。

10.HeartbeatResponse

{
    "$schema": "//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"             
    ]
}

11.MeterValues電表值

{
    "$schema": "//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“獲取數據間隔來配置,并指定要獲取和報告的數據。

12.MeterValuesResponse

{
    "$schema": "//json-schema.org/draft-04/schema#",
    "id": "urn:OCPP:1.6:2019:12:MeterValuesResponse",
    "title": "MeterValuesResponse",
    "type": "object",
    "properties": {},
    "additionalProperties": false
}

聲明:本內容為作者獨立觀點,不代表電子星球立場。未經允許不得轉載。授權事宜與稿件投訴,請聯系:editor@netbroad.com
覺得內容不錯的朋友,別忘了一鍵三連哦!
贊 2
收藏 3
關注 8
成為作者 賺取收益
全部留言
0/200
成為第一個和作者交流的人吧