sim

package
v0.0.0-...-742d8af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataLoadExFile

func DataLoadExFile(file *string, e *EVChargers) (int, error)

func DataLoadJsonDir

func DataLoadJsonDir(dir *string, e *EVChargers) (int, error)

func DataLoadRandom

func DataLoadRandom(config *string, e *EVChargers) error

func DataPrint

func DataPrint(e *EVChargers)

DataPrint prints the entire database with all charger ports

Types

type ChargeData

type ChargeData struct {
	ResponseCode string        `json:"responseCode"`
	ResponseText string        `json:"responseText"`
	SgID         int           `json:"sgID"`
	NumStations  int           `json:"numStations"`
	GroupName    string        `json:"groupName"`
	SgLoad       string        `json:"sgLoad"`
	Stations     []StationData `json:"stationData"`
}

type ChargeRecord

type ChargeRecord struct {
	Ts   float64    `json:"ts"`
	Data ChargeData `json:"data"`
}

type EVChargers

type EVChargers struct {
	// contains filtered or unexported fields
}

func NewEvChargers

func NewEvChargers() *EVChargers

type SimulatorServer

type SimulatorServer struct {
	Ev *EVChargers
}

func (SimulatorServer) ClearShedState

func (SimulatorServer) GetCPNInstances

func (SimulatorServer) GetLoad

func (SimulatorServer) GetStationGroups

func (SimulatorServer) GetStations

func (SimulatorServer) ShedLoad

type StationData

type StationData struct {
	StationID   string        `json:"stationID"`
	StationName string        `json:"stationName"`
	Address     string        `json:"Address"`
	StationLoad float32       `json:"stationLoad"`
	Ports       []StationPort `json:"Port"`
}

type StationPort

type StationPort struct {
	PortNumber   string  `json:"portNumber"`
	UserID       string  `json:"userID"`
	CredentialID string  `json:"credentialID"`
	ShedState    int     `json:"shedState"`
	PortLoad     float32 `json:"portLoad"`
	AllowedLoad  float32 `json:"allowedLoad"`
	PercentShed  int     `json:"percentShed"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL