Documentation
¶
Overview ¶
Package ems implements energy management system routines for EEBus Overload Protection by EV Charging Current Curtailment (OPEV) use case.
The energy management system referred to as "Energy Guard" in EEBus protocol is responsible for following scenarios:
curtails changing current of connected electric vehicles to avoid overload of electrical installation
provide heartbeat mechanism to remote EEBus node (typically wallbox) to check its availability
sends error states to remote EEBus node (typically wallbox)
Index ¶
- type EnergyGuard
- func (e *EnergyGuard) AllowWaitingForTrust(ski string) bool
- func (e *EnergyGuard) Debug(args ...interface{})
- func (e *EnergyGuard) Debugf(format string, args ...interface{})
- func (e *EnergyGuard) Error(args ...interface{})
- func (e *EnergyGuard) Errorf(format string, args ...interface{})
- func (e *EnergyGuard) Info(args ...interface{})
- func (e *EnergyGuard) Infof(format string, args ...interface{})
- func (e *EnergyGuard) RemoteSKIConnected(service api.ServiceInterface, ski string)
- func (e *EnergyGuard) RemoteSKIDisconnected(service api.ServiceInterface, ski string)
- func (e *EnergyGuard) ServicePairingDetailUpdate(ski string, detail *shipapi.ConnectionStateDetail)
- func (e *EnergyGuard) ServiceShipIDUpdate(ski string, shipdID string)
- func (e *EnergyGuard) Start()
- func (e *EnergyGuard) Stop()
- func (e *EnergyGuard) SubscribeData(onData onData) (id string)
- func (e *EnergyGuard) Trace(args ...interface{})
- func (e *EnergyGuard) Tracef(format string, args ...interface{})
- func (e *EnergyGuard) UnsubscribeData(id string) error
- func (e *EnergyGuard) VisibleRemoteServicesUpdated(service api.ServiceInterface, entries []shipapi.RemoteService)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnergyGuard ¶
type EnergyGuard struct {
// contains filtered or unexported fields
}
EnergyGuard handler for EEBUS node service
func NewEnergyGuard ¶
func NewEnergyGuard( config config.Config, ) *EnergyGuard
NewEnergyGuard creates an instance of EnergyGuard from configuration data.
func (*EnergyGuard) AllowWaitingForTrust ¶
func (e *EnergyGuard) AllowWaitingForTrust(ski string) bool
EEBUS Service interface used to check the remote EEBUS node Subject Key Identifier (SKI) with configuration data.
See https://pkg.go.dev/github.com/enbility/[email protected]/service#Service.AllowWaitingForTrust
func (*EnergyGuard) Debug ¶
func (e *EnergyGuard) Debug(args ...interface{})
Logging interface for Debug level
See https://pkg.go.dev/github.com/sirupsen/logrus#Logger.Debug
func (*EnergyGuard) Debugf ¶
func (e *EnergyGuard) Debugf(format string, args ...interface{})
Logging interface for Debug level with formatting
See https://pkg.go.dev/github.com/sirupsen/logrus#Logger.Debugf
func (*EnergyGuard) Error ¶
func (e *EnergyGuard) Error(args ...interface{})
Logging interface for Error level
See https://pkg.go.dev/github.com/sirupsen/logrus#Logger.Error
func (*EnergyGuard) Errorf ¶
func (e *EnergyGuard) Errorf(format string, args ...interface{})
Logging interface for Error level with formatting
See https://pkg.go.dev/github.com/sirupsen/logrus#Logger.Errorf
func (*EnergyGuard) Info ¶
func (e *EnergyGuard) Info(args ...interface{})
Logging interface for Info level
See https://pkg.go.dev/github.com/sirupsen/logrus#Logger.Info
func (*EnergyGuard) Infof ¶
func (e *EnergyGuard) Infof(format string, args ...interface{})
Logging interface for Info level with formatting
See https://pkg.go.dev/github.com/sirupsen/logrus#Logger.Infof
func (*EnergyGuard) RemoteSKIConnected ¶
func (e *EnergyGuard) RemoteSKIConnected(service api.ServiceInterface, ski string)
EEBUS Service interface used to notify a connection with a remote EEBUS node.
See https://pkg.go.dev/github.com/enbility/[email protected]/service#Service.RemoteSKIConnected
func (*EnergyGuard) RemoteSKIDisconnected ¶
func (e *EnergyGuard) RemoteSKIDisconnected(service api.ServiceInterface, ski string)
EEBUS Service interface used to notify a disconnection with a remote EEBUS node.
See https://pkg.go.dev/github.com/enbility/[email protected]/service#Service.RemoteSKIDisconnected
func (*EnergyGuard) ServicePairingDetailUpdate ¶
func (e *EnergyGuard) ServicePairingDetailUpdate(ski string, detail *shipapi.ConnectionStateDetail)
EEBUS Service interface used to provide the pairing state for the remote EEBUS node.
See https://pkg.go.dev/github.com/enbility/[email protected]/service#Service.ServicePairingDetailUpdate
func (*EnergyGuard) ServiceShipIDUpdate ¶
func (e *EnergyGuard) ServiceShipIDUpdate(ski string, shipdID string)
EEBUS Service interface used to provide the remote EEBUS node SHIP ID.
See https://pkg.go.dev/github.com/enbility/[email protected]/service#Service.ServiceShipIDUpdate
func (*EnergyGuard) Start ¶
func (e *EnergyGuard) Start()
Starts the EnergyGuard.
This includes starting the TIC2WebSocket client, registering to the remote EEBUS node, starting the EEBUS node service, and starting the overload protection algorithm.
func (*EnergyGuard) Stop ¶
func (e *EnergyGuard) Stop()
Stops the EnergyGuard.
This includes stopping the overload protection algorithm, stopping the EEBUS node service, disabling remote connection to wallbox and vehicle, and stopping the TIC2WebSocket client.
func (*EnergyGuard) SubscribeData ¶
func (e *EnergyGuard) SubscribeData(onData onData) (id string)
SubscribeData subscribes to data model updates and returns a subscription ID
func (*EnergyGuard) Trace ¶
func (e *EnergyGuard) Trace(args ...interface{})
Logging interface for Trace level
See https://pkg.go.dev/github.com/sirupsen/logrus#Logger.Trace
func (*EnergyGuard) Tracef ¶
func (e *EnergyGuard) Tracef(format string, args ...interface{})
Logging interface for Trace level with formatting
See https://pkg.go.dev/github.com/sirupsen/logrus#Logger.Tracef
func (*EnergyGuard) UnsubscribeData ¶
func (e *EnergyGuard) UnsubscribeData(id string) error
UnsubscribeData unsubscribes from data model updates using given subscription ID.
func (*EnergyGuard) VisibleRemoteServicesUpdated ¶
func (e *EnergyGuard) VisibleRemoteServicesUpdated(service api.ServiceInterface, entries []shipapi.RemoteService)
EEBUS Service interface used to notify when a remote EEBUS node is detected.