Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CentralSystem ¶
type CentralSystem interface { // Run the central system on the given port // and handles each incoming ChargepointRequest Run(port string, cphandler ChargePointMessageHandler) error // GetServiceOf a chargepoint to enable // communication with the chargepoint // // the url parameter is *NOT* used if // the link between the CentralSystem // and Chargepoint is via Websocket GetServiceOf(cpID string, version ocpp.Version, url string) (service.ChargePoint, error) SetChargePointConnectionListener(ChargePointConnectionListener) SetChargePointDisconnectionListener(ChargePointConnectionListener) WaitConnect(cpID string) <-chan struct{} WaitDisconnect(cpID string) <-chan struct{} }
func New ¶
func New() CentralSystem
type ChargePointConnectionListener ¶
type ChargePointConnectionListener func(cpID string)
type ChargePointMessageHandler ¶
type ChargePointMessageHandler func(cprequest cpreq.ChargePointRequest, metadata ChargePointRequestMetadata) (cpresp.ChargePointResponse, error)
ChargePointMessageHandler handles the OCPP messages coming from the charger
Click to show internal directories.
Click to hide internal directories.