Documentation
¶
Overview ¶
Package sitefile reads site files. A site file declares a site: a named group of chargers that are started and stopped together.
Index ¶
Constants ¶
const DefaultName = "site.yaml"
DefaultName is the site file looked for when none is named.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Charger ¶
type Charger struct {
// ID is the charge point ID.
ID string
// Name is the name the file gives the charger, or empty to have one
// made up.
Name string
// Model is the charger's model, with the entry's configuration
// overrides applied.
Model *model.Model
CSMS charger.CSMS
// EV names the EV preset used when a plug does not name one, or is
// empty.
EV string
}
Charger is one charger the site will run.
type Entry ¶
type Entry struct {
// Name is the entry's name. It is used only inside the file.
Name string
Chargers []Charger
}
Entry is one entry under "chargers": a model instantiated one or more times.
type Site ¶
type Site struct {
Name string
// Path is the absolute path of the site file.
Path string
// Speed multiplies the rate of EV charging. It is 1 unless the file
// says otherwise.
Speed float64
// ConnectRate is the most new connections to open per second. Zero
// means no limit: every charger connects at once.
ConnectRate float64
// LogMaxSize and LogFiles cap the site's log: at most LogFiles files of
// LogMaxSize bytes. Zero stands for the defaults, 10 MB and 3.
LogMaxSize int64
LogFiles int
// EVs holds the EV presets by name.
EVs map[string]ev.Overrides
// Entries are the charger entries, in the order the file lists them.
Entries []Entry
}
Site is a site as declared by one site file.
func Load ¶
Load reads and validates the site file at path, together with the Chargerfiles it refers to.