Versions in this module Expand all Collapse all v0 v0.2.0 Oct 11, 2026 Changes in this version + const PnC16VendorID + var PnC16 = map[string]PnC16Def + func ActionOf(ctx context.Context) string + func Known(version, action string) bool type DataTransfer16 + func PnC16Wrap(name string, payload any) (DataTransfer16, error) type DataTransfer16Conf + func PnC16Answer(name string, answer any) (DataTransfer16Conf, error) + type PnC16Def struct + FromCP bool + type PnCAuthorize16 struct + Certificate string + IDToken PnCIDToken16 + ISO15118CertificateHashData []PnCOCSPRequestData16 + type PnCAuthorize16Conf struct + CertificateStatus string + IDTokenInfo PnCIDTokenInfo16 + type PnCCertificateHashData16 struct + HashAlgorithm string + IssuerKeyHash string + IssuerNameHash string + SerialNumber string + type PnCCertificateHashDataChain16 struct + CertificateHashData PnCCertificateHashData16 + CertificateType string + ChildCertificateHashData []PnCCertificateHashData16 + type PnCCertificateSigned16 struct + CertificateChain string + type PnCDeleteCertificate16 struct + CertificateHashData PnCCertificateHashData16 + type PnCGet15118EVCertificate16 struct + Action string + EXIRequest string + ISO15118SchemaVersion string + type PnCGet15118EVCertificate16Conf struct + EXIResponse string + Status string + type PnCGetCertificateStatus16 struct + OCSPRequestData PnCOCSPRequestData16 + type PnCGetCertificateStatus16Conf struct + OCSPResult string + Status string + type PnCGetInstalledCertificateIDs16 struct + CertificateType []string + type PnCGetInstalledCertificateIDs16Conf struct + CertificateHashDataChain []PnCCertificateHashDataChain16 + Status string + type PnCIDToken16 struct + IDToken string + type PnCIDTokenInfo16 struct + CacheExpiryDateTime string + Status string + type PnCInstallCertificate16 struct + Certificate string + CertificateType string + type PnCOCSPRequestData16 struct + HashAlgorithm string + IssuerKeyHash string + IssuerNameHash string + ResponderURL string + SerialNumber string + type PnCSignCertificate16 struct + CSR string + type PnCStatusConf16 struct + Status string type RPCError + func PnC16Check(name string, response bool, payload json.RawMessage) (any, *RPCError) + func PnC16ReadAnswer(name string, conf json.RawMessage) (answer json.RawMessage, status string, ok bool, verr *RPCError) + func PnC16Unwrap(dt json.RawMessage) (name string, payload json.RawMessage, ok bool, verr *RPCError) + func ValidateRequest(version, action string, payload json.RawMessage) *RPCError + func ValidateResponse(version, action string, payload json.RawMessage) *RPCError v0.1.0 Oct 11, 2026 Changes in this version + const MsgCall + const MsgCallError + const MsgCallResult + const MsgCallResultError + const MsgSend + const SignedSuffix + const V16 + const V201 + const V21 + const WSAAnonymous + var ErrClosed = errors.New("the connection is closed") + var ErrTimeout = errors.New("no answer from the peer in time") + var In21 = in21 + var Out21 = out21 + var SendActions21 = sendActions21 + var V16In = v16In + var V16Out = v16Out + var V201In = v201In + var V201Out = v201Out + func BaseAction(a string) (string, bool) + func BasicAuthPassword(r *http.Request, id string) (pass string, ok bool) + func CheckAnswer(version, action string, res any, request ...json.RawMessage) (any, error) + func CheckIdentity(id string) error + func CheckSOAPEnvelope(raw []byte) error + func ClientCertNames(st *tls.ConnectionState, id string) bool + func Deviations(version, action string, response bool, raw json.RawMessage, verr *RPCError) (ok, enum, other bool) + func EchoesOnly(version, action string, b, request json.RawMessage) bool + func HasSchema(version, action string) bool + func Is2(version string) bool + func IsJWS(p json.RawMessage) bool + func IsSend(ctx context.Context) bool + func LoadSchemas() error + func MessageID(ctx context.Context) string + func NewMessageID() string + func OCAFiles() fs.FS + func OfferedSubprotocols(r *http.Request) []string + func PasswordOK(want, got string) bool + func ReadSOAPRequest(r *http.Request) (*SOAPRequest, *SOAPFault) + func Rezone(version, action string, response bool, raw json.RawMessage, loc *time.Location) (json.RawMessage, []string) + func SOAPCall(ctx context.Context, client *http.Client, identity, own, to, action string, ...) (json.RawMessage, error) + func SOAPCallCentralSystem(ctx context.Context, client *http.Client, identity, own, to, action string, ...) (json.RawMessage, error) + func SOAPFaultOf(e *RPCError) (string, string) + func SchemaFile(version, action string, response bool) []byte + func SchemaFiles(dir string) (map[string][]byte, error) + func SerialMismatch(serial, cn string) bool + func Subprotocols(versions []string) []string + func ValidateMessage(version, action string, response bool, raw json.RawMessage) error + func VersionOf(name string) string + func WithMessageID(ctx context.Context, id string) context.Context + func WriteChargePointSOAPResponse(w http.ResponseWriter, msgID, action string, res any) + func WriteSOAPFault(w http.ResponseWriter, relatesTo, sender, sub, reason string) + func WriteSOAPResponse(w http.ResponseWriter, msgID, action string, res any) + type AdditionalInfo struct + AdditionalIDToken string + Type string + type AuthorizationData16 struct + IDTag string + IDTagInfo *IDTagInfo16 + type AuthorizationData201 struct + IDToken IDToken + IDTokenInfo *IDTokenInfo + type Authorize16 struct + IDTag string + type Authorize16Conf struct + IDTagInfo IDTagInfo16 + type Authorize201 struct + Certificate string + IDToken IDToken + ISO15118CertificateHashData []OCSPRequestData + type Authorize201Conf struct + CertificateStatus string + IDTokenInfo IDTokenInfo + type BootNotification16 struct + ChargeBoxSerialNumber string + ChargePointModel string + ChargePointSerialNumber string + ChargePointVendor string + FirmwareVersion string + ICCID string + IMSI string + MeterSerialNumber string + MeterType string + type BootNotification16Conf struct + CurrentTime string + Interval int + Status string + type BootNotification201 struct + ChargingStation ChargingStation + Reason string + type BootNotification201Conf struct + CurrentTime string + Interval int + Status string + StatusInfo *StatusInfo + type CallError struct + Code string + Description string + Details any + func (e *CallError) Error() string + type CancelReservation16 struct + ReservationID int + type CancelReservation201 struct + ReservationID int + type CertificateHashData struct + HashAlgorithm string + IssuerKeyHash string + IssuerNameHash string + SerialNumber string + type CertificateHashDataChain struct + CertificateHashData CertificateHashData + CertificateType string + ChildCertificateHashData []CertificateHashData + type CertificateSigned16 struct + CertificateChain string + type CertificateSigned201 struct + CertificateChain string + CertificateType string + type CertificateSigned201Conf struct + Status string + StatusInfo *StatusInfo + type ChangeAvailability16 struct + ConnectorID int + Type string + type ChangeAvailability201 struct + EVSE *EVSE + OperationalStatus string + type ChangeConfiguration16 struct + Key string + Value string + type ChargingProfile16 struct + ChargingProfileID int + ChargingProfileKind string + ChargingProfilePurpose string + ChargingSchedule ChargingSchedule16 + RecurrencyKind string + StackLevel int + TransactionID *int + ValidFrom string + ValidTo string + type ChargingProfile201 struct + ChargingProfileKind string + ChargingProfilePurpose string + ChargingSchedule []ChargingSchedule201 + ID int + RecurrencyKind string + StackLevel int + TransactionID string + ValidFrom string + ValidTo string + type ChargingProfileCriterion struct + ChargingLimitSource []string + ChargingProfileID []int + ChargingProfilePurpose string + StackLevel *int + type ChargingSchedule16 struct + ChargingRateUnit string + ChargingSchedulePeriod []ChargingSchedulePeriod16 + Duration *int + MinChargingRate *float64 + StartSchedule string + type ChargingSchedule201 struct + ChargingRateUnit string + ChargingSchedulePeriod []ChargingSchedulePeriod201 + Duration *int + ID int + MinChargingRate *float64 + SalesTariff json.RawMessage + StartSchedule string + type ChargingSchedulePeriod16 struct + Limit float64 + NumberPhases *int + StartPeriod int + type ChargingSchedulePeriod201 struct + Limit float64 + NumberPhases *int + PhaseToUse *int + StartPeriod int + type ChargingStation struct + FirmwareVersion string + Model string + Modem *Modem + SerialNumber string + VendorName string + type ClearChargingProfile16 struct + ChargingProfilePurpose string + ConnectorID *int + ID *int + StackLevel *int + type ClearChargingProfile201 struct + ChargingProfileCriteria *ClearChargingProfileCriteria + ChargingProfileID *int + type ClearChargingProfileCriteria struct + ChargingProfilePurpose string + EVSEID *int + StackLevel *int + type ClearMonitoringResult struct + ID int + Status string + StatusInfo *StatusInfo + type ClearVariableMonitoring201 struct + ID []int + type ClearVariableMonitoring201Conf struct + ClearMonitoringResult []ClearMonitoringResult + type Component struct + EVSE *EVSE + Instance string + Name string + type ComponentVariable struct + Component Component + Variable *Variable + type CompositeSchedule201 struct + ChargingRateUnit string + ChargingSchedulePeriod []ChargingSchedulePeriod201 + Duration int + EVSEID int + ScheduleStart string + type Conn struct + CheckResult func(action string, payload json.RawMessage) error + OnResultError func(id, code, desc string) + func NewConn(ws *websocket.Conn, version string, timeout time.Duration, h Handler) *Conn + func NewSenderConn(version string, timeout time.Duration, ...) *Conn + func (c *Conn) Call(ctx context.Context, action string, req any) (json.RawMessage, error) + func (c *Conn) Close(reason string) + func (c *Conn) Done() <-chan struct{} + func (c *Conn) Err() error + func (c *Conn) IsSender() bool + func (c *Conn) Send(ctx context.Context, action string, payload any) error + func (c *Conn) Serve(ctx context.Context, ping time.Duration) error + func (c *Conn) SetHandler(h Handler) + func (c *Conn) Version() string + func (c *Conn) WriteRaw(ctx context.Context, b []byte) error + type DMVar struct + Component string + DataType string + Instance string + Required string + Unit string + Variable string + type DataTransfer16 struct + Data string + MessageID string + VendorID string + type DataTransfer16Conf struct + Data string + Status string + type DataTransfer201 struct + Data json.RawMessage + MessageID string + VendorID string + type DataTransfer201Conf struct + Data json.RawMessage + Status string + StatusInfo *StatusInfo + type DeleteCertificate16Conf struct + Status string + type DeleteCertificate201 struct + CertificateHashData CertificateHashData + type DeleteCertificate201Conf struct + Status string + StatusInfo *StatusInfo + type DeviceModel struct + Components []string + SecurityEvents map[string]bool + Vars []DMVar + func DeviceModelOf(version string) (*DeviceModel, error) + func MustDeviceModel(version string) *DeviceModel + type DiagnosticsStatusNotification16 struct + Status string + type EVSE struct + ConnectorID *int + ID int + type Empty struct + type ErrKind int + const KindFormat + const KindGeneric + const KindInternal + const KindMessageType + const KindNotImplemented + const KindNotSupported + const KindOccurrence + const KindProperty + const KindProtocol + const KindRPCFramework + const KindSecurity + const KindType + func (k ErrKind) Code(version string) string + type EventData struct + ActualValue string + Cause *int + Cleared *bool + Component Component + EventID int + EventNotificationType string + TechCode string + TechInfo string + Timestamp string + TransactionID string + Trigger string + Variable Variable + VariableMonitoringID *int + type ExtendedTriggerMessage16 struct + ConnectorID *int + RequestedMessage string + type ExtendedTriggerMessage16Conf struct + Status string + type Firmware struct + InstallDateTime string + Location string + RetrieveDateTime string + Signature string + SigningCertificate string + type FirmwareStatusNotification16 struct + Status string + type FirmwareStatusNotification201 struct + RequestID *int + Status string + type Get15118EVCertificate201 struct + Action string + EXIRequest string + ISO15118SchemaVersion string + type Get15118EVCertificate201Conf struct + EXIResponse string + Status string + StatusInfo *StatusInfo + type GetBaseReport201 struct + ReportBase string + RequestID int + type GetCertificateStatus201 struct + OCSPRequestData OCSPRequestData + type GetCertificateStatus201Conf struct + OCSPResult string + Status string + StatusInfo *StatusInfo + type GetChargingProfiles201 struct + ChargingProfile ChargingProfileCriterion + EVSEID *int + RequestID int + type GetChargingProfiles201Conf struct + Status string + StatusInfo *StatusInfo + type GetCompositeSchedule16 struct + ChargingRateUnit string + ConnectorID int + Duration int + type GetCompositeSchedule16Conf struct + ChargingSchedule *ChargingSchedule16 + ConnectorID *int + ScheduleStart string + Status string + type GetCompositeSchedule201 struct + ChargingRateUnit string + Duration int + EVSEID int + type GetCompositeSchedule201Conf struct + Schedule *CompositeSchedule201 + Status string + StatusInfo *StatusInfo + type GetConfiguration16 struct + Key []string + type GetConfiguration16Conf struct + ConfigurationKey []KeyValue16 + UnknownKey []string + type GetDiagnostics16 struct + Location string + Retries *int + RetryInterval *int + StartTime string + StopTime string + type GetDiagnostics16Conf struct + FileName string + type GetInstalledCertificateIds16 struct + CertificateType string + type GetInstalledCertificateIds16Conf struct + CertificateHashData []CertificateHashData + Status string + type GetInstalledCertificateIds201 struct + CertificateType []string + type GetInstalledCertificateIds201Conf struct + CertificateHashDataChain []CertificateHashDataChain + Status string + StatusInfo *StatusInfo + type GetLocalListVersion16Conf struct + ListVersion int + type GetLocalListVersion201Conf struct + VersionNumber int + type GetLog201 struct + Log LogParameters + LogType string + RequestID int + Retries *int + RetryInterval *int + type GetLog201Conf struct + Filename string + Status string + StatusInfo *StatusInfo + type GetMonitoringReport201 struct + ComponentVariable []ComponentVariable + MonitoringCriteria []string + RequestID int + type GetReport201 struct + ComponentCriteria []string + ComponentVariable []ComponentVariable + RequestID int + type GetVariableData struct + AttributeType string + Component Component + Variable Variable + type GetVariableResult struct + AttributeStatus string + AttributeStatusInfo *StatusInfo + AttributeType string + AttributeValue string + Component Component + Variable Variable + type GetVariables201 struct + GetVariableData []GetVariableData + type GetVariables201Conf struct + GetVariableResult []GetVariableResult + type Handler func(ctx context.Context, action string, payload json.RawMessage) (any, error) + type HeartbeatConf struct + CurrentTime string + type IDTagInfo16 struct + ExpiryDate string + ParentIDTag string + Status string + type IDToken struct + AdditionalInfo []AdditionalInfo + IDToken string + Type string + type IDTokenInfo struct + CacheExpiryDateTime string + ChargingPriority *int + EVSEID []int + GroupIDToken *IDToken + Language1 string + Language2 string + PersonalMessage json.RawMessage + Status string + type InstallCertificate16 struct + Certificate string + CertificateType string + type InstallCertificate16Conf struct + Status string + type InstallCertificate201 struct + Certificate string + CertificateType string + type InstallCertificate201Conf struct + Status string + StatusInfo *StatusInfo + type KeyValue16 struct + Key string + Readonly bool + Value *string + type LogParameters struct + LatestTimestamp string + OldestTimestamp string + RemoteLocation string + type LogStatusNotification201 struct + RequestID *int + Status string + type MeterValue16 struct + SampledValue []SampledValue16 + Timestamp string + type MeterValue201 struct + SampledValue []SampledValue201 + Timestamp string + type MeterValues16 struct + ConnectorID int + MeterValue []MeterValue16 + TransactionID *int32 + type MeterValues201 struct + EVSEID int + MeterValue []MeterValue201 + type Modem struct + ICCID string + IMSI string + type MonitoringData struct + Component Component + Variable Variable + VariableMonitoring []VariableMonitoring + type MsgDef struct + Conf reflect.Type + OK []string + Req reflect.Type + func Def[Req, Conf any](ok ...string) MsgDef + type MsgSigner struct + Leaf *x509.Certificate + Trusted []TrustedCert + func NewMsgSigner(certPEM, keyPEM []byte, trusted [][]byte, require bool) (*MsgSigner, error) + func (m *MsgSigner) Open(action string, p json.RawMessage) (json.RawMessage, *RPCError) + func (m *MsgSigner) Sign(action string, typ int, payload []byte) (json.RawMessage, error) + type NotifyEvent201 struct + EventData []EventData + GeneratedAt string + SeqNo int + Tbc bool + type NotifyMonitoringReport201 struct + GeneratedAt string + Monitor []MonitoringData + RequestID int + SeqNo int + Tbc bool + type NotifyReport201 struct + GeneratedAt string + ReportData []ReportData + RequestID int + SeqNo int + Tbc bool + type OCSPRequestData struct + HashAlgorithm string + IssuerKeyHash string + IssuerNameHash string + ResponderURL string + SerialNumber string + type RPCError struct + Desc string + Enum bool + Kind ErrKind + func DecodeIn(version, action string, md MsgDef, payload json.RawMessage) (any, *RPCError) + func DecodeLoose(t reflect.Type, payload json.RawMessage) (any, *RPCError) + func RPCErrorf(k ErrKind, f string, a ...any) *RPCError + func Validate(t reflect.Type, raw json.RawMessage, version string) (any, *RPCError) + func ValidateJSON(version, action string, response bool, raw json.RawMessage) (map[string]any, *RPCError) + func (e *RPCError) Error() string + type RemoteStartTransaction16 struct + ChargingProfile *ChargingProfile16 + ConnectorID *int + IDTag string + type RemoteStopTransaction16 struct + TransactionID int32 + type ReportChargingProfiles201 struct + ChargingLimitSource string + ChargingProfile []ChargingProfile201 + EVSEID int + RequestID int + Tbc bool + type ReportData struct + Component Component + Variable Variable + VariableAttribute []VariableAttribute + VariableCharacteristics *VariableCharacteristics + type ReportStatusConf201 struct + Status string + StatusInfo *StatusInfo + type RequestStartTransaction201 struct + ChargingProfile *ChargingProfile201 + EVSEID *int + GroupIDToken *IDToken + IDToken IDToken + RemoteStartID int + type RequestStartTransaction201Conf struct + Status string + StatusInfo *StatusInfo + TransactionID string + type RequestStopTransaction201 struct + TransactionID string + type ReservationStatusUpdate201 struct + ReservationID int + ReservationUpdateStatus string + type ReserveNow16 struct + ConnectorID int + ExpiryDate string + IDTag string + ParentIDTag string + ReservationID int + type ReserveNow201 struct + ConnectorType string + EVSEID *int + ExpiryDateTime string + GroupIDToken *IDToken + ID int + IDToken IDToken + type ReserveNow201Conf struct + Status string + StatusInfo *StatusInfo + type Reset16 struct + Type string + type Reset201 struct + EVSEID *int + Type string + type ResultError struct + Code string + Description string + func (e *ResultError) Error() string + type SOAPFault struct + Reason string + RelatesTo string + Sender string + Sub string + func (f *SOAPFault) Write(w http.ResponseWriter) + type SOAPRequest struct + From string + Identity string + MessageID string + func (q *SOAPRequest) Action() (string, *SOAPFault) + func (q *SOAPRequest) CheckWSDL() error + func (q *SOAPRequest) Payload(action string) (json.RawMessage, *SOAPFault) + type SampledValue16 struct + Context string + Format string + Location string + Measurand string + Phase string + Unit string + Value string + type SampledValue201 struct + Context string + Location string + Measurand string + Phase string + SignedMeterValue json.RawMessage + UnitOfMeasure *UnitOfMeasure + Value float64 + type SchemaError struct + Code string + Description string + Schema string + func (e *SchemaError) Error() string + type SecurityEventNotification201 struct + TechInfo string + Timestamp string + Type string + type SendLocalList16 struct + ListVersion int + LocalAuthorizationList []AuthorizationData16 + UpdateType string + type SendLocalList201 struct + LocalAuthorizationList []AuthorizationData201 + UpdateType string + VersionNumber int + type SendLocalList201Conf struct + Status string + StatusInfo *StatusInfo + type SetChargingProfile16 struct + CSChargingProfiles ChargingProfile16 + ConnectorID int + type SetChargingProfile201 struct + ChargingProfile ChargingProfile201 + EVSEID int + type SetMonitoringBase201 struct + MonitoringBase string + type SetMonitoringData struct + Component Component + ID *int + Severity int + Transaction *bool + Type string + Value float64 + Variable Variable + type SetMonitoringLevel201 struct + Severity int + type SetMonitoringResult struct + Component Component + ID *int + Severity int + Status string + StatusInfo *StatusInfo + Type string + Variable Variable + type SetVariableData struct + AttributeType string + AttributeValue string + Component Component + Variable Variable + type SetVariableMonitoring201 struct + SetMonitoringData []SetMonitoringData + type SetVariableMonitoring201Conf struct + SetMonitoringResult []SetMonitoringResult + type SetVariableResult struct + AttributeStatus string + AttributeStatusInfo *StatusInfo + AttributeType string + Component Component + Variable Variable + type SetVariables201 struct + SetVariableData []SetVariableData + type SetVariables201Conf struct + SetVariableResult []SetVariableResult + type SignCertificate16 struct + CSR string + type SignCertificate16Conf struct + Status string + type SignCertificate201 struct + CSR string + CertificateType string + type SignCertificate201Conf struct + Status string + StatusInfo *StatusInfo + type SignedFirmwareStatusNotification16 struct + RequestID *int + Status string + type SignedUpdateFirmware16 struct + Firmware Firmware + RequestID int + Retries *int + RetryInterval *int + type SignedUpdateFirmware16Conf struct + Status string + type StartTransaction16 struct + ConnectorID int + IDTag string + MeterStart int + ReservationID *int + Timestamp string + type StartTransaction16Conf struct + IDTagInfo IDTagInfo16 + TransactionID int32 + type StatusConf16 struct + Status string + type StatusConf201 struct + Status string + StatusInfo *StatusInfo + type StatusInfo struct + AdditionalInfo string + ReasonCode string + type StatusNotification16 struct + ConnectorID int + ErrorCode string + Info string + Status string + Timestamp string + VendorErrorCode string + VendorID string + type StatusNotification201 struct + ConnectorID int + ConnectorStatus string + EVSEID int + Timestamp string + type StopTransaction16 struct + IDTag string + MeterStop int + Reason string + Timestamp string + TransactionData []MeterValue16 + TransactionID int32 + type StopTransaction16Conf struct + IDTagInfo *IDTagInfo16 + type TransactionEvent201 struct + CableMaxCurrent *int + EVSE *EVSE + EventType string + IDToken *IDToken + MeterValue []MeterValue201 + NumberOfPhasesUsed *int + Offline bool + ReservationID *int + SeqNo int + Timestamp string + TransactionInfo TransactionInfo + TriggerReason string + type TransactionEvent201Conf struct + ChargingPriority *int + IDTokenInfo *IDTokenInfo + TotalCost *float64 + UpdatedPersonalMessage json.RawMessage + type TransactionInfo struct + ChargingState string + RemoteStartID *int + StoppedReason string + TimeSpentCharging *int + TransactionID string + type TriggerMessage16 struct + ConnectorID *int + RequestedMessage string + type TriggerMessage201 struct + EVSE *EVSE + RequestedMessage string + type TrustedCert struct + Cert *x509.Certificate + Index int + type UnitOfMeasure struct + Multiplier *int + Unit string + type UnlockConnector16 struct + ConnectorID int + type UnlockConnector201 struct + ConnectorID int + EVSEID int + type UnreachableError struct + Err error + func (e *UnreachableError) Error() string + func (e *UnreachableError) Unwrap() error + type UpdateFirmware16 struct + Location string + Retries *int + RetrieveDate string + RetryInterval *int + type UpdateFirmware201 struct + Firmware Firmware + RequestID int + Retries *int + RetryInterval *int + type Variable struct + Instance string + Name string + type VariableAttribute struct + Constant *bool + Mutability string + Persistent *bool + Type string + Value *string + type VariableCharacteristics struct + DataType string + MaxLimit *float64 + MinLimit *float64 + SupportsMonitoring bool + Unit string + ValuesList string + type VariableMonitoring struct + ID int + Severity int + Transaction bool + Type string + Value float64