Documentation ¶
Index ¶
Constants ¶
View Source
const ( MinBatteryValue = 0 MaxBatteryValue = 100 MinBatteryChargeTime = time.Hour MaxBatteryChargeTime = 10 * time.Hour )
View Source
const ( MinDescriptionValue = 0 MaxDescriptionValue = 256 )
View Source
const ( Running = DeviceStatus(gpsgen.Running) Stopped = DeviceStatus(gpsgen.Stopped) Paused = DeviceStatus(gpsgen.Stopped + 1) )
View Source
const ( MinElevationValue = 0 MaxElevationValue = 10000 )
View Source
const ( MinOfflineValue = 0 MaxOfflineValue = 900 )
View Source
const ( MinSpeedValue = 1 MaxSpeedValue = 100 )
Variables ¶
View Source
var ( ErrInvalidMinValue = errors.New("invalid minimum value") ErrInvalidMaxValue = errors.New("invalid maximum value") ErrInvalidRangeValue = errors.New("invalid range values") ErrInvalidMinChargeTime = errors.New("invalid minimum charge time") ErrInvalidMaxChargeTime = errors.New("invlaid maximum charge time") ErrInvalidMinAmplitude = errors.New("invalid minimum amplitude") ErrInvalidMaxAmplitude = errors.New("invalid maximum amplitude") ErrInvalidName = errors.New("invalid name value") ErrInvalidID = errors.New("invalid id") )
Functions ¶
This section is empty.
Types ¶
type Battery ¶
type Battery struct {
// contains filtered or unexported fields
}
func ParseBattery ¶
func (Battery) ChargeTime ¶
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
func ParseColor ¶
func RandomColor ¶
func RandomColor() Color
type CustomID ¶
type CustomID struct {
// contains filtered or unexported fields
}
func ParseCustomID ¶
type Description ¶
type Description struct {
// contains filtered or unexported fields
}
func ParseDescription ¶
func ParseDescription(val string) (Description, error)
func (Description) String ¶
func (d Description) String() string
func (Description) Validate ¶
func (d Description) Validate() error
type DeviceStatus ¶
type DeviceStatus gpsgen.Status
func ParseDeviceStatus ¶
func ParseDeviceStatus(status int) (DeviceStatus, error)
func (DeviceStatus) String ¶
func (t DeviceStatus) String() string
func (DeviceStatus) Validate ¶
func (t DeviceStatus) Validate() error
type Elevation ¶
type Elevation struct {
// contains filtered or unexported fields
}
func ParseElevation ¶
func (Elevation) Mode ¶
func (e Elevation) Mode() types.SensorMode
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func ParseModel ¶
func RandomModel ¶
func RandomModel() Model
type Navigator ¶
type Navigator struct {}
func NavigatorFromProc ¶
func NavigatorFromProc(proc *gpsgen.Device) Navigator
type Sensor ¶
type Sensor struct {
// contains filtered or unexported fields
}
func ParseSensor ¶
func (Sensor) Mode ¶
func (s Sensor) Mode() SensorMode
type SensorMode ¶
type SensorMode = stdtypes.SensorMode
Click to show internal directories.
Click to hide internal directories.