Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add 1.6 security extension datatypes #531

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
install_date_time: Optional[str] = None
signing_certificate: Optional[str] = None
proelke marked this conversation as resolved.
Show resolved Hide resolved
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
Loading