Skip to content

Commit

Permalink
Merge branch 'master' into OCPP-2.0.1-add-additional-security-events-…
Browse files Browse the repository at this point in the history
…in-v1.3
  • Loading branch information
OrangeTux authored Dec 1, 2023
2 parents 4b82a37 + 98a7d39 commit 8975101
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change log


- [#531] (https://github.com/mobilityhouse/ocpp/pull/531) Add 1.6 security extension datatypes
=======
- [#528](https://github.com/mobilityhouse/ocpp/issues/528) v2.0.1 CertificateHashDataChainType childCertificateHashData requires the default of None
- [#510](https://github.com/mobilityhouse/ocpp/issues/510) v2.0.1 UnitOfMeasureType - Enums missing and update docstring to allow use for variableCharacteristics
- [#508](https://github.com/mobilityhouse/ocpp/issues/508) Exception - OccurrenceConstraintViolationError doc string correction

Expand Down
43 changes: 43 additions & 0 deletions ocpp/v16/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
ChargingProfilePurposeType,
ChargingRateUnitType,
CiStringType,
HashAlgorithm,
Location,
Measurand,
Phase,
Expand Down Expand Up @@ -121,3 +122,45 @@ class MeterValue:

timestamp: str
sampled_value: List[SampledValue]


# Security Extension


@dataclass
class CertificateHashData:
"""
CertificateHashDataType is used by:
DeleteCertificate.req, GetInstalledCertificateIds.conf
"""

hash_algorithm: HashAlgorithm
issuer_name_hash: str
issuer_key_hash: str
serial_number: str


@dataclass
class Firmware:
"""
Represents a copy of the firmware that can be loaded/updated on the Charge Point.
FirmwareType is used by: SignedUpdateFirmware.req
"""

location: str
retrieve_date_time: str
signing_certificate: str
install_date_time: Optional[str] = None
signature: Optional[str] = None


@dataclass
class LogParameters:
"""
Class for detailed information the retrieval of logging entries.
LogParametersType is used by: GetLog.req
"""

remote_location: str
oldest_timestamp: Optional[str] = None
latest_timestamp: Optional[str] = None
2 changes: 1 addition & 1 deletion ocpp/v201/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class CertificateHashDataChainType:

certificate_type: enums.GetCertificateIdUseType
certificate_hash_data: CertificateHashDataType
child_certificate_hash_data: Optional[List[CertificateHashDataType]]
child_certificate_hash_data: Optional[List[CertificateHashDataType]] = None


@dataclass
Expand Down

0 comments on commit 8975101

Please sign in to comment.