Skip to content

Commit

Permalink
- added handling of Reset.req and Authorize.req / Authorize.conf
Browse files Browse the repository at this point in the history
- updated componenet schemas and device model management
- added device_model_management_base as base class for configuring and retrieving components and variables
- Added support for sending MeterValue.req and MeterValue within TransactionEvent.req
- Considering all configuration keys of SampledDataCtrlr and AlignedDataCtrlr
- moved database_handler to v16
- added database handler for v201
- added support for AuthCache
- added handling for ChangeAvailability.req
- added first support for DataTransfer.req (rejecting always) and NotifyEvent.req

Signed-off-by: pietfried <[email protected]>
  • Loading branch information
Pietfried committed May 24, 2023
1 parent be1d2c5 commit f67ba30
Show file tree
Hide file tree
Showing 62 changed files with 6,193 additions and 2,021 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.14)

project(ocpp
VERSION 0.7.0
VERSION 0.8.0
DESCRIPTION "A C++ implementation of the Open Charge Point Protocol"
LANGUAGES CXX
)
Expand Down
3 changes: 3 additions & 0 deletions config/v201/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set(OCPP2_0_1_PROFILE_SCHEMAS_DIR "component_schemas/")
set(SQL_INIT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/init.sql")

list(APPEND OCPP2_0_1_PROFILE_SCHEMAS
AlignedDataCtrlr.json
Expand Down Expand Up @@ -50,3 +51,5 @@ install(
FILES ${CONFIGS}
DESTINATION ${CMAKE_INSTALL_DATADIR}/everest/modules/OCPP201
)

install(FILES ${SQL_INIT_FILE} DESTINATION ${CMAKE_INSTALL_DATADIR}/everest/modules/OCPP201)
45 changes: 22 additions & 23 deletions config/v201/component_schemas/AlignedDataCtrlr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,34 @@
"description": "Schema for AlignedDataCtrlr",
"type": "object",
"properties": {
"Available": {
"Enabled": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "boolean"
},
"attributes": [
{
"type": "Actual",
"mutability": "ReadOnly"
"mutability": "ReadWrite"
}
],
"description": "If this variable reports a value of true",
"type": "boolean"
},
"Enabled": {
"Available": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "boolean"
},
"attributes": [
{
"type": "Actual",
"mutability": "ReadWrite"
"mutability": "ReadOnly"
}
],
"description": "If this variable reports a value of true",
"description": "If this variable reports a value of true, Clock-Aligned Data is supported.",
"type": "boolean"
},
"Interval": {
"AlignedDataInterval": {
"characteristics": {
"unit": "s",
"supportsMonitoring": true,
Expand All @@ -43,10 +42,10 @@
"mutability": "ReadWrite"
}
],
"description": "Size (in seconds) of the clock-aligned data interval",
"description": "Size (in seconds) of the clock-aligned data interval, intended to be transmitted in the MeterValuesRequest message.",
"type": "integer"
},
"Measurands": {
"AlignedDataMeasurands": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "MemberList"
Expand All @@ -57,10 +56,10 @@
"mutability": "ReadWrite"
}
],
"description": "Clock-aligned measurand(s) to be included in MeterValuesRequest",
"description": "Clock-aligned measurand(s) to be included in MeterValuesRequest, every AlignedDataInterval seconds.",
"type": "string"
},
"SendDuringIdle": {
"AlignedDataSendDuringIdle": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "boolean"
Expand All @@ -71,10 +70,10 @@
"mutability": "ReadWrite"
}
],
"description": "If set to true",
"description": "If set to true, the Charging Station SHALL NOT send clock aligned meter values when a transaction is ongoing.",
"type": "boolean"
},
"SignReadings": {
"AlignedDataSignReadings": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "boolean"
Expand All @@ -85,10 +84,10 @@
"mutability": "ReadWrite"
}
],
"description": "If set to true",
"description": "If set to true, the Charging Station SHALL include signed meter values in the SampledValueType in the MeterValuesRequest to the CSMS.",
"type": "boolean"
},
"TxEndedInterval": {
"AlignedDataTxEndedInterval": {
"characteristics": {
"unit": "s",
"supportsMonitoring": true,
Expand All @@ -100,10 +99,10 @@
"mutability": "ReadWrite"
}
],
"description": "Size (in seconds) of the clock-aligned data interval",
"description": "Size (in seconds) of the clock-aligned data interval, intended to be transmitted in the TransactionEventRequest (eventType = Ended) message.",
"type": "integer"
},
"TxEndedMeasurands": {
"AlignedDataTxEndedMeasurands": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "MemberList"
Expand All @@ -114,14 +113,14 @@
"mutability": "ReadWrite"
}
],
"description": "Clock-aligned measurands to be included in the meterValues element of TransactionEventRequest (eventType = Ended)",
"description": "Clock-aligned measurands to be included in the meterValues element of TransactionEventRequest (eventType = Ended), every SampledDataTxEndedInterval seconds from the start of the transaction.",
"type": "string"
}
},
"required": [
"Interval",
"Measurands",
"TxEndedInterval",
"TxEndedMeasurands"
"AlignedDataInterval",
"AlignedDataMeasurands",
"AlignedDataTxEndedInterval",
"AlignedDataTxEndedMeasurands"
]
}
}
18 changes: 9 additions & 9 deletions config/v201/component_schemas/AuthCacheCtrlr.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"mutability": "ReadOnly"
}
],
"description": "Authorization caching is available",
"description": "Authorization caching is available, but not necessarily enabled.",
"type": "boolean"
},
"Enabled": {
Expand All @@ -28,10 +28,10 @@
"mutability": "ReadWrite"
}
],
"description": "If set to true",
"description": "If set to true, Authorizaiton caching is enabled.",
"type": "boolean"
},
"LifeTime": {
"AuthCacheLifeTime": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "integer"
Expand All @@ -45,7 +45,7 @@
"description": "Indicates how long it takes until a token expires in the authorization cache since it is last used",
"type": "integer"
},
"Policy": {
"AuthCachePolicy": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "OptionList"
Expand All @@ -56,10 +56,10 @@
"mutability": "ReadWrite"
}
],
"description": "Cache Entry Replacement Policy: least recently used",
"description": "Cache Entry Replacement Policy: least recently used, least frequently used, first in first out, other custom mechanism.",
"type": "string"
},
"Storage": {
"AuthCacheStorage": {
"characteristics": {
"unit": "B",
"supportsMonitoring": true,
Expand All @@ -74,7 +74,7 @@
"description": "Indicates the number of bytes currently used by the Authorization Cache. MaxLimit indicates the maximum number of bytes that can be used by the Authorization Cache.",
"type": "integer"
},
"DisablePostAuthorize": {
"AuthCacheDisablePostAuthorize": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "boolean"
Expand All @@ -85,9 +85,9 @@
"mutability": "ReadWrite"
}
],
"description": "When set to true this variable disables the behavior to request authorization for an idToken that is stored in the cache with a status other than Accepted",
"description": "When set to true this variable disables the behavior to request authorization for an idToken that is stored in the cache with a status other than Accepted, as stated in C10.FR.03 and C12.FR.05.",
"type": "boolean"
}
},
"required": []
}
}
33 changes: 16 additions & 17 deletions config/v201/component_schemas/AuthCtrlr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,34 @@
"description": "Schema for AuthCtrlr",
"type": "object",
"properties": {
"AdditionalInfoItemsPerMessage": {
"Enabled": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "integer"
"dataType": "boolean"
},
"attributes": [
{
"type": "Actual",
"mutability": "ReadOnly"
"mutability": "ReadWrite"
}
],
"description": "Maximum number of AdditionalInfo items that can be sent in one message.",
"type": "integer"
"type": "boolean"
},
"AuthorizeRemoteStart": {
"AdditionalInfoItemsPerMessage": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "boolean"
"dataType": "integer"
},
"attributes": [
{
"type": "Actual",
"mutability": "ReadWrite"
"mutability": "ReadOnly"
}
],
"description": "Whether a remote request to start a transaction in the form of RequestStartTransactionRequest message should be authorized beforehand like a local action to start a transaction.",
"type": "boolean"
"description": "Maximum number of AdditionalInfo items that can be sent in one message.",
"type": "integer"
},
"Enabled": {
"AuthorizeRemoteStart": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "boolean"
Expand All @@ -42,7 +41,7 @@
"mutability": "ReadWrite"
}
],
"description": "If set to false",
"description": "Whether a remote request to start a transaction in the form of RequestStartTransactionRequest message should be authorized beforehand like a local action to start a transaction.",
"type": "boolean"
},
"LocalAuthorizeOffline": {
Expand All @@ -56,7 +55,7 @@
"mutability": "ReadWrite"
}
],
"description": "Whether the Charging Station",
"description": "Whether the Charging Station, when Offline, will start a transaction for locally-authorized identifiers,",
"type": "boolean"
},
"LocalPreAuthorize": {
Expand All @@ -70,7 +69,7 @@
"mutability": "ReadWrite"
}
],
"description": "Whether the Charging Station",
"description": "Whether the Charging Station, when online, will start a transaction for locally-authorized identifiers without waiting for or requesting an AuthorizeResponse from the CSMS.",
"type": "boolean"
},
"MasterPassGroupId": {
Expand All @@ -84,7 +83,7 @@
"mutability": "ReadWrite"
}
],
"description": "IdTokens that have this id as groupId belong to the Master Pass Group. Meaning they can stop any ongoing transaction",
"description": "IdTokens that have this id as groupId belong to the Master Pass Group. Meaning they can stop any ongoing transaction, but cannot start transactions.",
"type": "string"
},
"OfflineTxForUnknownIdEnabled": {
Expand Down Expand Up @@ -112,7 +111,7 @@
"mutability": "ReadWrite"
}
],
"description": "When set to true this instructs the Charging Station to not issue any AuthorizationRequests",
"description": "When set to true this instructs the Charging Station to not issue any AuthorizationRequests, but only use Authorization Cache and Local Authorization List to determine validity of idTokens.",
"type": "boolean"
}
},
Expand All @@ -121,4 +120,4 @@
"LocalAuthorizeOffline",
"LocalPreAuthorize"
]
}
}
15 changes: 14 additions & 1 deletion config/v201/component_schemas/CHAdeMOCtrlr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
"description": "Schema for CHAdeMOCtrlr",
"type": "object",
"properties": {
"Enabled": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "boolean"
},
"attributes": [
{
"type": "Actual",
"mutability": "ReadWrite"
}
],
"type": "boolean"
},
"SelftestActive": {
"characteristics": {
"supportsMonitoring": true,
Expand Down Expand Up @@ -96,4 +109,4 @@
}
},
"required": []
}
}
15 changes: 14 additions & 1 deletion config/v201/component_schemas/CPPWMController.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
"description": "Schema for CPPWMController",
"type": "object",
"properties": {
"Enabled": {
"characteristics": {
"supportsMonitoring": true,
"dataType": "boolean"
},
"attributes": [
{
"type": "Actual",
"mutability": "ReadWrite"
}
],
"type": "boolean"
},
"State": {
"characteristics": {
"supportsMonitoring": true,
Expand All @@ -18,4 +31,4 @@
}
},
"required": []
}
}
4 changes: 2 additions & 2 deletions config/v201/component_schemas/ChargingStation.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"mutability": "ReadWrite"
}
],
"description": "Indicates whether new sessions can be started on EVSEs",
"description": "Indicates whether new sessions can be started on EVSEs, while Charging Station is waiting for all EVSEs to become Available in order to start a pending firmware update",
"type": "boolean"
},
"AvailabilityState": {
Expand Down Expand Up @@ -91,4 +91,4 @@
"Available",
"SupplyPhases"
]
}
}
Loading

0 comments on commit f67ba30

Please sign in to comment.