Documentation ¶
Index ¶
- Constants
- Variables
- func GetConnectors(connectorsFolderPath string) []*settings.Connector
- func GetSettings() *settings.Settings
- func InitSettings(settingsFilePath string)
- func SetupOcppConfigurationManager(filePath string, version configuration.ProtocolVersion, ...)
- func UpdateConnectorSessionInfo(evseId, connectorId int, session *settings.Session)
- func UpdateConnectorStatus(evseId, connectorId int, status core.ChargePointStatus)
- func WriteToFile(filename string, structure interface{}) (err error)
Constants ¶
View Source
const ( YamlFile = "yaml" YmlFile = "yml" JSON = "json" )
View Source
const ( Model = "chargepoint.info.ocpp.model" Vendor = "chargepoint.info.ocpp.vendor" MaxChargingTime = "chargepoint.info.maxChargingTime" ProtocolVersion = "chargepoint.info.protocolVersion" LoggingFormat = "chargepoint.logging.format" Debug = "debug" ApiEnabled = "api.enabled" ApiAddress = "api.address" ApiPort = "api.port" )
Variables ¶
View Source
var (
ConnectorSettings = sync.Map{}
)
View Source
var (
ErrUnsupportedFileFormat = errors.New("unsupported file format")
)
Functions ¶
func GetConnectors ¶
GetConnectors Scan the connectors folder, read all the connectors' settings and cache the settings.
func GetSettings ¶
GetSettings gets settings from cache or reads the settings file if the cached settings are not found.
func InitSettings ¶
func InitSettings(settingsFilePath string)
func SetupOcppConfigurationManager ¶
func SetupOcppConfigurationManager(filePath string, version configuration.ProtocolVersion, supportedProfiles ...string)
func UpdateConnectorSessionInfo ¶
UpdateConnectorSessionInfo update the Connector's Session object in the connector configuration file
func UpdateConnectorStatus ¶
func UpdateConnectorStatus(evseId, connectorId int, status core.ChargePointStatus)
UpdateConnectorStatus update the Connector's status in the connector configuration file
func WriteToFile ¶
WriteToFile writes come JSON/YAML/TOML structure to the specified path.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.