Documentation ¶
Index ¶
- Constants
- func CreateCertificate() (tls.Certificate, error)
- func GetX509KeyPair(cert tls.Certificate) (string, string, error)
- func SkiFromCert(cert tls.Certificate) (string, error)
- type Config
- type EEBUSDeviceInterface
- type EEBus
- 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) Info(args ...interface{})
- func (c *EEBus) Infof(format string, args ...interface{})
- func (c *EEBus) RegisterEVSE(ski string, device EEBUSDeviceInterface) *UseCasesEVSE
- 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 UseCasesEVSE
Constants ¶
const ( EEBUSBrandName string = "EVCC" EEBUSModel string = "HEMS" EEBUSDeviceCode 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 EEBUSDeviceInterface ¶
type EEBUSDeviceInterface interface { DeviceConnect() DeviceDisconnect() UseCaseEventCB(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) RegisterEVSE ¶
func (c *EEBus) RegisterEVSE(ski string, device EEBUSDeviceInterface) *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 UseCasesEVSE ¶
type UseCasesEVSE struct { EvseCC ucapi.CemEVSECCInterface EvCC ucapi.CemEVCCInterface EvCem ucapi.CemEVCEMInterface EvSoc ucapi.CemEVSOCInterface OpEV ucapi.CemOPEVInterface OscEV ucapi.CemOSCEVInterface }
EVSE UseCases