Documentation
¶
Overview ¶
Package model reads Chargerfiles. A Chargerfile declares one model: a kind of charger that many chargers can be instantiated from.
Index ¶
Constants ¶
const ( OnEvFullStop = "stop" OnEvFullSuspend = "suspend" StartOnTap = "tap" StartOnPlug = "plug" )
Behavior settings accepted in a Chargerfile.
const ( DefaultVoltage = 230 DefaultPhases = 3 )
The electrical supply assumed when a Chargerfile does not say.
const OCPP16 = "1.6"
OCPP16 is the one OCPP version a charger can speak for now, and the default. It is OCPP 1.6 with JSON over WebSocket, also written 1.6J.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
Vendor string
Name string
Firmware string
// OCPP is the OCPP version the charger speaks. Empty means the default.
OCPP string
Connectors []Connector
// Config holds the default values of OCPP configuration keys.
Config map[string]string
OnEvFull string // OnEvFullStop or OnEvFullSuspend
StartOn string // StartOnTap or StartOnPlug
StartTag string // idTag used when StartOn is StartOnPlug
// DataTransfer lists the vendor IDs whose DataTransfer requests from the
// CSMS the charger accepts.
DataTransfer []string
// Voltage and Phases turn a limit a charging profile gives in amps into
// power: amps x Voltage x Phases. Zero means the default.
Voltage float64
Phases int
}
Model is a kind of charger, as declared by one Chargerfile.
func Parse ¶
Parse reads and validates the contents of a Chargerfile. When the file has several problems, the returned error lists all of them.
func (*Model) OCPPVersion ¶ added in v0.1.1
OCPPVersion returns the OCPP version the charger speaks.