Documentation
¶
Index ¶
- func Cmd(progName string, args []string)
- func NewDispatcher(lg *slog.Logger, pktProcs map[gpsprot.Tag]gpsprot.PacketProcessor, ...) (*gpsevent.Dispatcher, error)
- func NewSdHandler(minLevel slog.Level, w io.Writer) slog.Handler
- type Config
- type GPSConfig
- type HTTPConfig
- type LeapSecondConfig
- type LogConfig
- type NTPConfig
- type NTPSockConfig
- type PHCConfig
- type PTP4LConfig
- type PTPConfig
- type SdHandler
- type SerialConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDispatcher ¶
Types ¶
type Config ¶
type Config struct { Serial SerialConfig GPS GPSConfig PHC PHCConfig Proxy proxy.Config HTTP []HTTPConfig LeapSecond LeapSecondConfig PTP PTPConfig NTP NTPConfig Log LogConfig }
func LoadConfig ¶
type GPSConfig ¶
type GPSConfig struct { Config bool `toml:"config"` Mobile bool `toml:"mobile"` Resurvey bool `toml:"resurvey"` SurveyTime uint32 `toml:"surveyTime"` SurveyAcc float64 `toml:"surveyAcc"` FixedPosECEF geopos.ECEF `toml:"fixedPosECEF"` FixedPosAcc float64 `toml:"fixedPosAcc"` AntennaCableDelay float64 `toml:"antennaCableDelay"` // in nanoseconds AntennaCableLength float64 `toml:"antennaCableLength"` // in meters AntennaCableVF float64 `toml:"antennaCableVF"` // velocity factor TimeGNSS gpsprot.GNSS `toml:"timeGNSS"` PulseWidth float64 `toml:"pulseWidth"` SatellitesOutput *bool `toml:"satellitesOutput"` RTCMOutput *bool `toml:"rtcmOutput"` Vendor string `toml:"vendor"` }
func (*GPSConfig) CreatePacketProcessors ¶
type HTTPConfig ¶
type LeapSecondConfig ¶
type LogConfig ¶
type LogConfig struct { Interval int `toml:"interval"` Verbose bool `toml:"verbose"` Dir string `toml:"dir"` Clock bool `toml:"clock"` // whether to generate a clock log Event bool `toml:"event"` // whether to generate an event log Packet bool `toml:"packet"` // whether to generate a packet log }
func (*LogConfig) ClockPath ¶
ClockPath returns the path for the clock log file. phcPath is the path to the PHC device (e.g. /dev/ptp0)
func (*LogConfig) PacketPath ¶
type NTPConfig ¶
type NTPConfig struct {
Sock *NTPSockConfig `toml:"sock"`
}
type NTPSockConfig ¶
type NTPSockConfig struct {
Path string `toml:"path"`
}
type PHCConfig ¶
type PHCConfig struct { Interface string `toml:"interface"` Pin uint8 `toml:"pin"` Channel uint8 `toml:"channel"` Wait bool `toml:"wait"` }
type PTP4LConfig ¶
type PTP4LConfig struct {
UDSAddress string `toml:"udsAddress"`
}
type PTPConfig ¶
type PTPConfig struct { ClockAccuracy int `toml:"clockAccuracy"` DomainNumber uint8 `toml:"domainNumber"` MajorSdoID uint8 `toml:"majorSdoId"` MinorSdoID uint8 `toml:"minorSdoId"` PTP4L *PTP4LConfig `toml:"ptp4l"` }
type SerialConfig ¶
Click to show internal directories.
Click to hide internal directories.