Documentation ¶
Index ¶
- Constants
- Variables
- type CP
- func (cp *CP) ChangeAvailabilityRequest(connectorId int, availabilityType core.AvailabilityType) error
- func (cp *CP) ChangeConfigurationRequest(key, value string) error
- func (cp *CP) Connected() bool
- func (cp *CP) GetCompositeScheduleRequest(connectorId int, duration int) (*smartcharging.GetCompositeScheduleConfirmation, error)
- func (cp *CP) GetConfigurationRequest() (*core.GetConfigurationConfirmation, error)
- func (cp *CP) HasConnected() <-chan struct{}
- func (cp *CP) HasMeasurement(val types.Measurand) bool
- func (cp *CP) ID() string
- func (cp *CP) OnBootNotification(request *core.BootNotificationRequest) (*core.BootNotificationConfirmation, error)
- func (cp *CP) OnMeterValues(request *core.MeterValuesRequest) (*core.MeterValuesConfirmation, error)
- func (cp *CP) OnStartTransaction(request *core.StartTransactionRequest) (*core.StartTransactionConfirmation, error)
- func (cp *CP) OnStatusNotification(request *core.StatusNotificationRequest) (*core.StatusNotificationConfirmation, error)
- func (cp *CP) OnStopTransaction(request *core.StopTransactionRequest) (*core.StopTransactionConfirmation, error)
- func (cp *CP) RegisterID(id string)
- func (cp *CP) RemoteStartTransactionRequest(connectorId int, idTag string) error
- func (cp *CP) SetChargingProfileRequest(connectorId int, profile *types.ChargingProfile) error
- func (cp *CP) Setup(meterValues string, meterInterval time.Duration) error
- func (cp *CP) TriggerMessageRequest(connectorId int, requestedMessage remotetrigger.MessageTrigger) error
- type CS
- func (cs *CS) ChargePointDisconnected(chargePoint ocpp16.ChargePointConnection)
- func (cs *CS) ChargepointByID(id string) (*CP, error)
- func (cs *CS) Debug(args ...interface{})
- func (cs *CS) Debugf(f string, args ...interface{})
- func (cs *CS) Error(args ...interface{})
- func (cs *CS) Errorf(f string, args ...interface{})
- func (cs *CS) Info(args ...interface{})
- func (cs *CS) Infof(f string, args ...interface{})
- func (cs *CS) NewChargePoint(chargePoint ocpp16.ChargePointConnection)
- func (cs *CS) OnAuthorize(id string, request *core.AuthorizeRequest) (*core.AuthorizeConfirmation, error)
- func (cs *CS) OnBootNotification(id string, request *core.BootNotificationRequest) (*core.BootNotificationConfirmation, error)
- func (cs *CS) OnDataTransfer(id string, request *core.DataTransferRequest) (*core.DataTransferConfirmation, error)
- func (cs *CS) OnHeartbeat(id string, request *core.HeartbeatRequest) (*core.HeartbeatConfirmation, error)
- func (cs *CS) OnMeterValues(id string, request *core.MeterValuesRequest) (*core.MeterValuesConfirmation, error)
- func (cs *CS) OnStartTransaction(id string, request *core.StartTransactionRequest) (*core.StartTransactionConfirmation, error)
- func (cs *CS) OnStatusNotification(id string, request *core.StatusNotificationRequest) (*core.StatusNotificationConfirmation, error)
- func (cs *CS) OnStopTransaction(id string, request *core.StopTransactionRequest) (*core.StopTransactionConfirmation, error)
- func (cs *CS) RegisterChargepoint(id string, newfun func() *CP, init func(*CP) error) (*CP, error)
- type Connector
- func (conn *Connector) ChangeAvailabilityRequest(availabilityType core.AvailabilityType) error
- func (conn *Connector) CurrentPower() (float64, error)
- func (conn *Connector) Currents() (float64, float64, float64, error)
- func (conn *Connector) GetCompositeScheduleRequest(duration int) (*smartcharging.GetCompositeScheduleConfirmation, error)
- func (conn *Connector) GetMaxCurrent() (float64, error)
- func (conn *Connector) GetMaxPower() (float64, error)
- func (conn *Connector) GetScheduleLimit(duration int) (float64, error)
- func (conn *Connector) ID() int
- func (conn *Connector) IdTag() string
- func (conn *Connector) Initialized() error
- func (conn *Connector) NeedsAuthentication() bool
- func (conn *Connector) OnMeterValues(request *core.MeterValuesRequest) (*core.MeterValuesConfirmation, error)
- func (conn *Connector) OnStartTransaction(request *core.StartTransactionRequest) (*core.StartTransactionConfirmation, error)
- func (conn *Connector) OnStatusNotification(request *core.StatusNotificationRequest) (*core.StatusNotificationConfirmation, error)
- func (conn *Connector) OnStopTransaction(request *core.StopTransactionRequest) (*core.StopTransactionConfirmation, error)
- func (conn *Connector) RemoteStartTransactionRequest(idTag string) error
- func (conn *Connector) SetChargingProfileRequest(profile *types.ChargingProfile) error
- func (conn *Connector) Soc() (float64, error)
- func (conn *Connector) Status() (core.ChargePointStatus, error)
- func (conn *Connector) TestClock(clock clock.Clock)
- func (conn *Connector) TotalEnergy() (float64, error)
- func (conn *Connector) TransactionID() (int, error)
- func (conn *Connector) TriggerMessageRequest(requestedMessage remotetrigger.MessageTrigger) error
- func (conn *Connector) Voltages() (float64, float64, float64, error)
- func (conn *Connector) WatchDog(timeout time.Duration)
Constants ¶
const ( // Core profile keys KeyMeterValueSampleInterval = "MeterValueSampleInterval" KeyMeterValuesSampledData = "MeterValuesSampledData" KeyMeterValuesSampledDataMaxLength = "MeterValuesSampledDataMaxLength" KeyNumberOfConnectors = "NumberOfConnectors" KeySupportedFeatureProfiles = "SupportedFeatureProfiles" KeyWebSocketPingInterval = "WebSocketPingInterval" // SmartCharging profile keys KeyChargeProfileMaxStackLevel = "ChargeProfileMaxStackLevel" KeyChargingScheduleAllowedChargingRateUnit = "ChargingScheduleAllowedChargingRateUnit" KeyConnectorSwitch3to1PhaseSupported = "ConnectorSwitch3to1PhaseSupported" KeyMaxChargingProfilesInstalled = "MaxChargingProfilesInstalled" // Vendor specific keys KeyAlfenPlugAndChargeIdentifier = "PlugAndChargeIdentifier" KeyChargeAmpsPhaseSwitchingSupported = "ACPhaseSwitchingSupported" KeyEvBoxSupportedMeasurands = "evb_SupportedMeasurands" )
Variables ¶
var ( ErrInvalidRequest = errors.New("invalid request") ErrInvalidConnector = errors.New("invalid connector") ErrInvalidTransaction = errors.New("invalid transaction") )
var Timeout = 30 * time.Second // default request / response timeout on protocol level
Functions ¶
This section is empty.
Types ¶
type CP ¶
type CP struct { // configuration properties PhaseSwitching bool HasRemoteTriggerFeature bool ChargingRateUnit types.ChargingRateUnitType ChargingProfileId int StackLevel int NumberOfConnectors int IdTag string BootNotificationResult *core.BootNotificationRequest // contains filtered or unexported fields }
func (*CP) ChangeAvailabilityRequest ¶
func (cp *CP) ChangeAvailabilityRequest(connectorId int, availabilityType core.AvailabilityType) error
func (*CP) ChangeConfigurationRequest ¶
func (*CP) GetCompositeScheduleRequest ¶
func (cp *CP) GetCompositeScheduleRequest(connectorId int, duration int) (*smartcharging.GetCompositeScheduleConfirmation, error)
func (*CP) GetConfigurationRequest ¶
func (cp *CP) GetConfigurationRequest() (*core.GetConfigurationConfirmation, error)
func (*CP) HasConnected ¶
func (cp *CP) HasConnected() <-chan struct{}
func (*CP) HasMeasurement ¶
HasMeasurement checks if meterValuesSample contains given measurement
func (*CP) OnBootNotification ¶
func (cp *CP) OnBootNotification(request *core.BootNotificationRequest) (*core.BootNotificationConfirmation, error)
func (*CP) OnMeterValues ¶
func (cp *CP) OnMeterValues(request *core.MeterValuesRequest) (*core.MeterValuesConfirmation, error)
func (*CP) OnStartTransaction ¶
func (cp *CP) OnStartTransaction(request *core.StartTransactionRequest) (*core.StartTransactionConfirmation, error)
func (*CP) OnStatusNotification ¶
func (cp *CP) OnStatusNotification(request *core.StatusNotificationRequest) (*core.StatusNotificationConfirmation, error)
func (*CP) OnStopTransaction ¶
func (cp *CP) OnStopTransaction(request *core.StopTransactionRequest) (*core.StopTransactionConfirmation, error)
func (*CP) RegisterID ¶
func (*CP) RemoteStartTransactionRequest ¶
func (*CP) SetChargingProfileRequest ¶
func (cp *CP) SetChargingProfileRequest(connectorId int, profile *types.ChargingProfile) error
func (*CP) TriggerMessageRequest ¶
func (cp *CP) TriggerMessageRequest(connectorId int, requestedMessage remotetrigger.MessageTrigger) error
type CS ¶
type CS struct { ocpp16.CentralSystem // contains filtered or unexported fields }
func (*CS) ChargePointDisconnected ¶
func (cs *CS) ChargePointDisconnected(chargePoint ocpp16.ChargePointConnection)
ChargePointDisconnected implements ocpp16.ChargePointConnectionHandler
func (*CS) NewChargePoint ¶
func (cs *CS) NewChargePoint(chargePoint ocpp16.ChargePointConnection)
NewChargePoint implements ocpp16.ChargePointConnectionHandler
func (*CS) OnAuthorize ¶
func (cs *CS) OnAuthorize(id string, request *core.AuthorizeRequest) (*core.AuthorizeConfirmation, error)
func (*CS) OnBootNotification ¶
func (cs *CS) OnBootNotification(id string, request *core.BootNotificationRequest) (*core.BootNotificationConfirmation, error)
func (*CS) OnDataTransfer ¶
func (cs *CS) OnDataTransfer(id string, request *core.DataTransferRequest) (*core.DataTransferConfirmation, error)
func (*CS) OnHeartbeat ¶
func (cs *CS) OnHeartbeat(id string, request *core.HeartbeatRequest) (*core.HeartbeatConfirmation, error)
func (*CS) OnMeterValues ¶
func (cs *CS) OnMeterValues(id string, request *core.MeterValuesRequest) (*core.MeterValuesConfirmation, error)
func (*CS) OnStartTransaction ¶
func (cs *CS) OnStartTransaction(id string, request *core.StartTransactionRequest) (*core.StartTransactionConfirmation, error)
func (*CS) OnStatusNotification ¶
func (cs *CS) OnStatusNotification(id string, request *core.StatusNotificationRequest) (*core.StatusNotificationConfirmation, error)
func (*CS) OnStopTransaction ¶
func (cs *CS) OnStopTransaction(id string, request *core.StopTransactionRequest) (*core.StopTransactionConfirmation, error)
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func NewConnector ¶
func (*Connector) ChangeAvailabilityRequest ¶
func (conn *Connector) ChangeAvailabilityRequest(availabilityType core.AvailabilityType) error
func (*Connector) CurrentPower ¶
func (*Connector) GetCompositeScheduleRequest ¶
func (conn *Connector) GetCompositeScheduleRequest(duration int) (*smartcharging.GetCompositeScheduleConfirmation, error)
func (*Connector) GetMaxCurrent ¶
GetMaxCurrent returns the maximum phase current the charge point is set to offer
func (*Connector) GetMaxPower ¶
GetMaxPower returns the maximum power the charge point is set to offer
func (*Connector) GetScheduleLimit ¶
getScheduleLimit queries the current or power limit the charge point is currently set to offer
func (*Connector) Initialized ¶
Initialized waits for initial charge point status notification
func (*Connector) NeedsAuthentication ¶
NeedsAuthentication checks if local authentication or an initial RemoteStartTransaction is required
func (*Connector) OnMeterValues ¶
func (conn *Connector) OnMeterValues(request *core.MeterValuesRequest) (*core.MeterValuesConfirmation, error)
func (*Connector) OnStartTransaction ¶
func (conn *Connector) OnStartTransaction(request *core.StartTransactionRequest) (*core.StartTransactionConfirmation, error)
func (*Connector) OnStatusNotification ¶
func (conn *Connector) OnStatusNotification(request *core.StatusNotificationRequest) (*core.StatusNotificationConfirmation, error)
func (*Connector) OnStopTransaction ¶
func (conn *Connector) OnStopTransaction(request *core.StopTransactionRequest) (*core.StopTransactionConfirmation, error)
func (*Connector) RemoteStartTransactionRequest ¶
func (*Connector) SetChargingProfileRequest ¶
func (conn *Connector) SetChargingProfileRequest(profile *types.ChargingProfile) error
func (*Connector) Status ¶
func (conn *Connector) Status() (core.ChargePointStatus, error)
Status returns the unmapped charge point status
func (*Connector) TotalEnergy ¶
func (*Connector) TransactionID ¶
TransactionID returns the current transaction id
func (*Connector) TriggerMessageRequest ¶
func (conn *Connector) TriggerMessageRequest(requestedMessage remotetrigger.MessageTrigger) error