Documentation ¶
Index ¶
- Constants
- func UniqueDeviceID() ([]byte, error)
- type Capabilities
- type Characteristics
- type Device
- type Device2EM
- type DeviceControl
- type DeviceDescription
- type DeviceInfo
- type DeviceStatus
- type EM2Device
- type Identification
- type PlanningRequest
- type PowerInfo
- type SEMP
- type Service
- type ServiceDefinition
- type SpecVersion
- type Timeframe
Constants ¶
View Source
const ( MethodMeasurement = "Measurement" MethodEstimation = "Estimation" )
method definitions
View Source
const ( StatusOn = "On" StatusOff = "Off" )
status definitions
Variables ¶
This section is empty.
Functions ¶
func UniqueDeviceID ¶
UniqueDeviceID creates a 6-bytes base device id from machine id
Types ¶
type Capabilities ¶
type Capabilities struct { CurrentPowerMethod string `xml:"CurrentPower>Method"` AbsoluteTimestamps bool `xml:"Timestamps>AbsoluteTimestamps"` InterruptionsAllowed bool `xml:"Interruptions>InterruptionsAllowed"` OptionalEnergy bool `xml:"Requests>OptionalEnergy"` }
Capabilities message definition
type Characteristics ¶
type Characteristics struct { MinPowerConsumption int MaxPowerConsumption int MinOnTime int `xml:",omitempty"` MinOffTime int `xml:",omitempty"` }
Characteristics message definition
type Device ¶
type Device struct { DeviceType string `xml:"deviceType"` FriendlyName string `xml:"friendlyName"` Manufacturer string `xml:"manufacturer"` ModelName string `xml:"modelName"` UDN string `xml:"UDN"` PresentationURL string `xml:"presentationURL"` ServiceDefinition ServiceDefinition `xml:"semp:X_SEMPSERVICE"` ServiceList []Service `xml:"serviceList"` // optional }
Device message definition
type Device2EM ¶
type Device2EM struct { Xmlns string `xml:"xmlns,attr"` DeviceInfo []DeviceInfo `xml:",omitempty"` DeviceStatus []DeviceStatus `xml:",omitempty"` PlanningRequest []PlanningRequest `xml:",omitempty"` }
Device2EM is the device to EM message
type DeviceControl ¶
type DeviceControl struct { DeviceID string `xml:"DeviceId"` On bool RecommendedPowerConsumption float64 // AN EVCharger Timestamp int }
DeviceControl message definition
type DeviceDescription ¶
type DeviceDescription struct { XMLName xml.Name `xml:"root"` Xmlns string `xml:"xmlns,attr"` SpecVersion SpecVersion `xml:"specVersion"` Device Device `xml:"device"` }
DeviceDescription message definition
type DeviceInfo ¶
type DeviceInfo struct { Identification Identification Characteristics Characteristics Capabilities Capabilities }
DeviceInfo message definition
type DeviceStatus ¶
type DeviceStatus struct { DeviceID string `xml:"DeviceId"` EMSignalsAccepted bool Status string PowerInfo PowerInfo `xml:"PowerConsumption>PowerInfo"` }
DeviceStatus message definition
type EM2Device ¶
type EM2Device struct { Xmlns string `xml:"xmlns,attr"` DeviceControl []DeviceControl `xml:",omitempty"` }
EM2Device is the EM to device message
type Identification ¶
type Identification struct { DeviceID string `xml:"DeviceId"` DeviceName string DeviceType string DeviceSerial string DeviceVendor string }
Identification message definition
type PlanningRequest ¶
type PlanningRequest struct {
Timeframe []Timeframe
}
PlanningRequest message definition
type SEMP ¶
type SEMP struct {
// contains filtered or unexported fields
}
SEMP is the SMA SEMP server
type Service ¶
type Service struct { ServiceType string `xml:"serviceType"` ServiceID string `xml:"serviceId"` SCPDURL string `xml:"SCPDURL"` ControlURL string `xml:"controlURL"` EventSubURL string `xml:"eventSubURL"` }
Service message definition
type ServiceDefinition ¶
type ServiceDefinition struct { Xmlns string `xml:"xmlns:semp,attr"` Server string `xml:"semp:server"` BasePath string `xml:"semp:basePath"` Transport string `xml:"semp:transport"` ExchangeFormat string `xml:"semp:exchangeFormat"` WsVersion string `xml:"semp:wsVersion"` }
ServiceDefinition message definition
type SpecVersion ¶
SpecVersion message definition
type Timeframe ¶
type Timeframe struct { DeviceID string `xml:"DeviceId"` EarliestStart int LatestEnd int MinRunningTime *int `xml:",omitempty"` MaxRunningTime *int `xml:",omitempty"` MinEnergy *int `xml:",omitempty"` // AN EVCharger MaxEnergy *int `xml:",omitempty"` // AN EVCharger MaxPowerConsumption *int `xml:",omitempty"` // SMA EV CHARGER style MinPowerConsumption *int `xml:",omitempty"` // SMA EV CHARGER style }
Timeframe message definition
Click to show internal directories.
Click to hide internal directories.