Documentation
¶
Overview ¶
Package ocmf detects and validates Open Charge Metering Format (OCMF) records
Index ¶
Constants ¶
View Source
const Header = "OCMF"
Header is the literal string that identifies an OCMF record on the wire.
Variables ¶
This section is empty.
Functions ¶
func LooksLikeOCMF ¶
LooksLikeOCMF reports whether value appears to be an OCMF record, i.e. it starts with the "OCMF|" header used to identify the transfer format.
func Validate ¶
func Validate(value string) (*jsonschema.EvaluationResult, error)
Validate parses value as an OCMF record and validates it against the OCMF JSON Schema.
Types ¶
type Payload ¶
type Payload struct {
FV string `json:"FV,omitempty"`
GI string `json:"GI,omitempty"`
GS string `json:"GS,omitempty"`
GV string `json:"GV,omitempty"`
PG string `json:"PG,omitempty"`
MV string `json:"MV,omitempty"`
MM string `json:"MM,omitempty"`
MS string `json:"MS,omitempty"`
MF string `json:"MF,omitempty"`
IS *bool `json:"IS,omitempty"`
IL string `json:"IL,omitempty"`
IF []string `json:"IF,omitempty"`
IT string `json:"IT,omitempty"`
ID string `json:"ID,omitempty"`
CT string `json:"CT,omitempty"`
CI string `json:"CI,omitempty"`
RD []Reading `json:"RD,omitempty"`
}
Payload is the signed payload data.
Click to show internal directories.
Click to hide internal directories.