warp

package
v0.0.0-...-3371691 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootTopic = "warp"
	Timeout   = 30 * time.Second
)
View Source
const (
	FeatureMeter          = "meter"
	FeatureMeterAllValues = "meter_all_values"
	FeatureMeterPhases    = "meter_phases"
	FeatureNfc            = "nfc"
)

Variables

This section is empty.

Functions

func ExternalControlStrings

func ExternalControlStrings() []string

ExternalControlStrings returns a slice of all String values of the enum

Types

type ChargeTrackerCurrentCharge

type ChargeTrackerCurrentCharge struct {
	UserID            int     `json:"user_id"`
	MeterStart        float64 `json:"meter_start"`
	AuthorizationType int     `json:"authorization_type"`
	AuthorizationInfo struct {
		TagType int    `json:"tag_type"`
		TagId   string `json:"tag_id"`
	} `json:"authorization_info"`
}

type EmConfig

type EmConfig struct {
	ContactorInstalled bool `json:"contactor_installed"`
	PhaseSwitchingMode int  `json:"phase_switching_mode"`
}

type EmState

type EmState struct {
	ExternalControl ExternalControl `json:"external_control"`
	PhasesSwitched  int             `json:"phases_switched"`
	Input3State     bool            `json:"input3_state"`
	Input4State     bool            `json:"input4_state"`
	RelayState      bool            `json:"relay_state"`
	ErrorFlags      int             `json:"error_flags"`
}

type EvseExternalCurrent

type EvseExternalCurrent struct {
	Current int `json:"current"`
}

type EvseState

type EvseState struct {
	Iec61851State          int   `json:"iec61851_state"`
	ChargerState           int   `json:"charger_state"`
	ContactorState         int   `json:"contactor_state"`
	ContactorError         int   `json:"contactor_error"`
	AllowedChargingCurrent int64 `json:"allowed_charging_current"`
	ErrorState             int   `json:"error_state"`
	LockState              int   `json:"lock_state"`
}

https://www.warp-charger.com/api.html#evse_state

type ExternalControl

type ExternalControl int
const (
	ExternalControlAvailable ExternalControl = iota
	ExternalControlDeactivated
	ExternalControlRuntimeConditionsNotMet
	ExternalControlCurrentlySwitching
)

func ExternalControlString

func ExternalControlString(s string) (ExternalControl, error)

ExternalControlString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ExternalControlValues

func ExternalControlValues() []ExternalControl

ExternalControlValues returns all values of the enum

func (ExternalControl) IsAExternalControl

func (i ExternalControl) IsAExternalControl() bool

IsAExternalControl returns "true" if the value is listed in the enum definition. "false" otherwise

func (ExternalControl) String

func (i ExternalControl) String() string

type LastNfcTag

type LastNfcTag struct {
	UserID int    `json:"user_id"`
	Type   int    `json:"tag_type"`
	ID     string `json:"tag_id"`
}

type LowLevelState

type LowLevelState struct {
	TimeSinceStateChange int64 `json:"time_since_state_change"`
	Uptime               int64 `json:"uptime"`
	LedState             int   `json:"led_state"`
	CpPwmDutyCycle       int   `json:"cp_pwm_duty_cycle"`
	AdcValues            []int `json:"adc_values"`
	Voltages             []int
	Resistances          []int
	Gpio                 []bool
}

https://www.warp-charger.com/api.html#evse_low_level_state

type MeterAllValues

type MeterAllValues struct {
	PhasesActive    []bool `json:"phases_active"`
	PhasesConnected []bool `json:"phases_connected"`
}

https://www.warp-charger.com/api.html#meter_all_values

type MeterState

type MeterState struct {
	State int `json:"state"` // Warp 1 only
}

https://www.warp-charger.com/api.html#meter_state

type MeterValues

type MeterValues struct {
	Power           float64 `json:"power"`
	EnergyRel       float64 `json:"energy_rel"`
	EnergyAbs       float64 `json:"energy_abs"`
	PhasesActive    []bool  `json:"phases_active"`
	PhasesConnected []bool  `json:"phases_connected"`
}

https://www.warp-charger.com/api.html#meter_values

type User

type User struct {
	ID          int    `json:"id"`
	Roles       int    `json:"roles"`
	Current     int    `json:"current"`
	DisplayName string `json:"display_name"`
	UserName    string `json:"username"`
}

type UsersConfig

type UsersConfig struct {
	Users []User `json:"users"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL