Documentation ¶
Index ¶
- Constants
- func CreateCertificate() (tls.Certificate, error)
- func GetX509KeyPair(cert tls.Certificate) (string, string, error)
- func SkiFromCert(cert tls.Certificate) (string, error)
- func WrapError(err error) error
- type Config
- type Connector
- type Device
- type EEBus
- func (c *EEBus) ControllableSystem() *UseCasesCS
- func (c *EEBus) Debug(args ...interface{})
- func (c *EEBus) Debugf(format string, args ...interface{})
- func (c *EEBus) Error(args ...interface{})
- func (c *EEBus) Errorf(format string, args ...interface{})
- func (c *EEBus) Evse() *UseCasesEVSE
- func (c *EEBus) Info(args ...interface{})
- func (c *EEBus) Infof(format string, args ...interface{})
- func (c *EEBus) RegisterDevice(ski, ip string, device Device) error
- func (c *EEBus) RemoteSKIConnected(service eebusapi.ServiceInterface, ski string)
- func (c *EEBus) RemoteSKIDisconnected(service eebusapi.ServiceInterface, ski string)
- func (c *EEBus) Run()
- func (c *EEBus) ServicePairingDetailUpdate(ski string, detail *shipapi.ConnectionStateDetail)
- func (c *EEBus) ServiceShipIDUpdate(ski string, shipdID string)
- func (c *EEBus) Shutdown()
- func (c *EEBus) Trace(args ...interface{})
- func (c *EEBus) Tracef(format string, args ...interface{})
- func (c *EEBus) VisibleRemoteServicesUpdated(service eebusapi.ServiceInterface, entries []shipapi.RemoteService)
- type UseCasesCS
- type UseCasesEVSE
Constants ¶
const ( BrandName string = "EVCC" Model string = "HEMS" DeviceCode string = "EVCC_HEMS_01" // used as common name in cert generation )
Variables ¶
This section is empty.
Functions ¶
func CreateCertificate ¶
func CreateCertificate() (tls.Certificate, error)
CreateCertificate returns a newly created EEBUS compatible certificate
func GetX509KeyPair ¶
func GetX509KeyPair(cert tls.Certificate) (string, string, error)
GetX509KeyPair saves returns the cert and key string values
func SkiFromCert ¶
func SkiFromCert(cert tls.Certificate) (string, error)
SkiFromCert extracts SKI from certificate
Types ¶
type Config ¶
type Config struct { URI string ShipID string Interfaces []string Certificate struct { Public, Private string } }
func (Config) Configured ¶
Configured returns true if the EEbus server is configured
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func NewConnector ¶
func NewConnector() *Connector
type Device ¶
type Device interface { Connect(connected bool) UseCaseEvent(device spineapi.DeviceRemoteInterface, entity spineapi.EntityRemoteInterface, event eebusapi.EventType) }
type EEBus ¶
type EEBus struct { SKI string // contains filtered or unexported fields }
var Instance *EEBus
func (*EEBus) ControllableSystem ¶
func (c *EEBus) ControllableSystem() *UseCasesCS
func (*EEBus) Evse ¶
func (c *EEBus) Evse() *UseCasesEVSE
func (*EEBus) RemoteSKIConnected ¶
func (c *EEBus) RemoteSKIConnected(service eebusapi.ServiceInterface, ski string)
func (*EEBus) RemoteSKIDisconnected ¶
func (c *EEBus) RemoteSKIDisconnected(service eebusapi.ServiceInterface, ski string)
func (*EEBus) ServicePairingDetailUpdate ¶
func (c *EEBus) ServicePairingDetailUpdate(ski string, detail *shipapi.ConnectionStateDetail)
Provides the current pairing state for the remote service This is called whenever the state changes and can be used to provide user information for the pairing/connection process
func (*EEBus) ServiceShipIDUpdate ¶
Provides the SHIP ID the remote service reported during the handshake process This needs to be persisted and passed on for future remote service connections when using `PairRemoteService`
func (*EEBus) VisibleRemoteServicesUpdated ¶
func (c *EEBus) VisibleRemoteServicesUpdated(service eebusapi.ServiceInterface, entries []shipapi.RemoteService)
report all currently visible EEBUS services this is needed to provide an UI for pairing with other devices if not all incoming pairing requests should be accepted
type UseCasesCS ¶
type UseCasesCS struct { LPC ucapi.CsLPCInterface LPP ucapi.CsLPPInterface MGCP ucapi.MaMGCPInterface }
type UseCasesEVSE ¶
type UseCasesEVSE struct { EvseCC ucapi.CemEVSECCInterface EvCC ucapi.CemEVCCInterface EvCem ucapi.CemEVCEMInterface EvSoc ucapi.CemEVSOCInterface OpEV ucapi.CemOPEVInterface OscEV ucapi.CemOSCEVInterface }
EVSE UseCases