Documentation
¶
Index ¶
- Variables
- func Register(identifier Identifier, factory ProtocolFactory)
- type AveragePositionPayload
- type BaseInfo
- type CasterInfo
- type Coordinates
- type DialFunc
- type IOConfig
- type IOConfigSettings
- type Identifier
- type NTRIPCliConfig
- type NTRIPPayload
- type NetworkInfo
- type Operations
- type Protocol
- type ProtocolFactory
- type ProtocolOptionFunc
- type ProtocolOptions
- type Registry
- type SetBaseCorrectionsFunc
- func WithNTRIPAddress(value string) SetBaseCorrectionsFunc
- func WithNTRIPMountPoint(value string) SetBaseCorrectionsFunc
- func WithNTRIPPassword(value string) SetBaseCorrectionsFunc
- func WithNTRIPPort(value int) SetBaseCorrectionsFunc
- func WithNTRIPUsername(value string) SetBaseCorrectionsFunc
- func WithSendPositionToBase(value bool) SetBaseCorrectionsFunc
- type SetBaseCorrectionsOptions
- type SetBaseOptionFunc
- func WithAccumulation(value int) SetBaseOptionFunc
- func WithBaseAntennaOffset(value float64) SetBaseOptionFunc
- func WithBaseHeight(value float64) SetBaseOptionFunc
- func WithBaseLatitude(value float64) SetBaseOptionFunc
- func WithBaseLongitude(value float64) SetBaseOptionFunc
- func WithBaseMode(value string) SetBaseOptionFunc
- type SetBaseOptions
- type SetModemOptions
- type SetModemOptionsFunc
- type StreamInfo
- type TaskMessage
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Register ¶
func Register(identifier Identifier, factory ProtocolFactory)
Types ¶
type AveragePositionPayload ¶
type AveragePositionPayload struct {
Coordinates Coordinates `json:"coordinates"`
AntennaOffset float64 `json:"antenna_offset"`
}
type CasterInfo ¶
type CasterInfo struct {
Country string `json:"country"`
Distance float64 `json:"distance"`
FallbackHost string `json:"fallback_host"`
FallbackPort string `json:"fallback_port"`
Host string `json:"host"`
ID string `json:"id"`
Latitude string `json:"latitude"`
Longitude string `json:"longitude"`
NMEA string `json:"nmea"`
Operator string `json:"operator"`
OtherDetails *string `json:"other_details"`
Port string `json:"port"`
Site string `json:"site"`
}
type Coordinates ¶
type IOConfig ¶
type IOConfig struct {
IOType string `json:"io_type"`
Settings IOConfigSettings `json:"settings"`
}
type IOConfigSettings ¶
type IOConfigSettings struct {
NTRIPCli NTRIPCliConfig `json:"ntripcli"`
}
type Identifier ¶
type Identifier string
type NTRIPCliConfig ¶
type NTRIPPayload ¶
type NTRIPPayload struct {
CAS []CasterInfo `json:"cas"`
Net []NetworkInfo `json:"net"`
Str []StreamInfo `json:"str"`
}
type NetworkInfo ¶
type NetworkInfo struct {
Authentication string `json:"authentication"`
Distance *float64 `json:"distance"`
Fee string `json:"fee"`
ID string `json:"id"`
Operator string `json:"operator"`
OtherDetails string `json:"other_details"`
WebNet string `json:"web_net"`
WebReg string `json:"web_reg"`
WebStr string `json:"web_str"`
}
type Operations ¶
type Operations interface {
// Connect initiates a new connection to the ReachView service
// It should be called before any other operation
Connect(ctx context.Context) error
// Close closes the current connection to the ReachView service
Close(ctx context.Context) error
// Alive returns true if the ReachView websocket connection is alive, false otherwise
Alive(ctx context.Context) (bool, error)
// Version returns the current ReachView version,
// true if the module uses the stable channel or an error
Version(ctx context.Context) (string, bool, error)
// On listens for messages of the given type on ReachView websocket connection
On(ctx context.Context, mType string) (chan any, error)
// Emit sends the given message on the ReachView websocket connection
Emit(ctx context.Context, mType string, message any) error
// Configuration retrieves the module's configuration
Configuration(ctx context.Context) (any, error)
// SetBase updates the base configuration
SetBase(ctx context.Context, funcs ...SetBaseOptionFunc) error
GetBaseInfo(ctx context.Context) (*BaseInfo, error)
// Reboot restarts the module
Reboot(ctx context.Context) error
// AveragePosition gathers data and computes the average position
AveragePosition(ctx context.Context) (*TaskMessage[AveragePositionPayload], error)
//GetNTRIPMountPoint retrieves availables mount point
GetNTRIPMountPoint(ctx context.Context) (*TaskMessage[NTRIPPayload], error)
//SetBaseCorrections updates the corrections obtaining station
SetBaseCorrections(ctx context.Context, funcs ...SetBaseCorrectionsFunc) error
//SetModem updates mobile data config
SetModem(ctx context.Context, funcs ...SetModemOptionsFunc) error
//GetModemConfiguration mobile data config
GetModemConfiguration(ctx context.Context) (any, error)
//GetModemAuthentication mobile data config
GetModemAuthentication(ctx context.Context) (any, error)
//SetDeviceAntennaHeight update device config
SetDeviceAntennaHeight(ctx context.Context, funcs ...SetBaseOptionFunc) error
}
type Protocol ¶
type Protocol interface {
Identifier() Identifier
Available(ctx context.Context, addr string) (bool, error)
Operations(addr string) Operations
}
type ProtocolFactory ¶
type ProtocolFactory func(opts *ProtocolOptions) (Protocol, error)
type ProtocolOptionFunc ¶
type ProtocolOptionFunc func(opts *ProtocolOptions)
func WithProtocolDial ¶
func WithProtocolDial(dial DialFunc) ProtocolOptionFunc
func WithProtocolLogger ¶
func WithProtocolLogger(logger logger.Logger) ProtocolOptionFunc
type ProtocolOptions ¶
func NewProtocolOptions ¶
func NewProtocolOptions(funcs ...ProtocolOptionFunc) *ProtocolOptions
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func DefaultRegistry ¶
func DefaultRegistry() *Registry
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) Availables ¶
func (*Registry) Get ¶
func (r *Registry) Get(identifier Identifier, funcs ...ProtocolOptionFunc) (Protocol, error)
func (*Registry) Register ¶
func (r *Registry) Register(identifier Identifier, factory ProtocolFactory)
type SetBaseCorrectionsFunc ¶
type SetBaseCorrectionsFunc func(opts *SetBaseCorrectionsOptions)
func WithNTRIPAddress ¶
func WithNTRIPAddress(value string) SetBaseCorrectionsFunc
func WithNTRIPMountPoint ¶
func WithNTRIPMountPoint(value string) SetBaseCorrectionsFunc
func WithNTRIPPassword ¶
func WithNTRIPPassword(value string) SetBaseCorrectionsFunc
func WithNTRIPPort ¶
func WithNTRIPPort(value int) SetBaseCorrectionsFunc
func WithNTRIPUsername ¶
func WithNTRIPUsername(value string) SetBaseCorrectionsFunc
func WithSendPositionToBase ¶
func WithSendPositionToBase(value bool) SetBaseCorrectionsFunc
type SetBaseCorrectionsOptions ¶
type SetBaseCorrectionsOptions struct {
Address *string
Port *int
Username *string
Password *string
MountPoint *string
SendPositionToBase *bool
}
func NewSetBaseCorrectionsOptions ¶
func NewSetBaseCorrectionsOptions(funcs ...SetBaseCorrectionsFunc) *SetBaseCorrectionsOptions
type SetBaseOptionFunc ¶
type SetBaseOptionFunc func(opts *SetBaseOptions)
func WithAccumulation ¶
func WithAccumulation(value int) SetBaseOptionFunc
func WithBaseAntennaOffset ¶
func WithBaseAntennaOffset(value float64) SetBaseOptionFunc
func WithBaseHeight ¶
func WithBaseHeight(value float64) SetBaseOptionFunc
func WithBaseLatitude ¶
func WithBaseLatitude(value float64) SetBaseOptionFunc
func WithBaseLongitude ¶
func WithBaseLongitude(value float64) SetBaseOptionFunc
func WithBaseMode ¶
func WithBaseMode(value string) SetBaseOptionFunc
type SetBaseOptions ¶
type SetBaseOptions struct {
Mode *string
AntennaOffset *float64
Latitude *float64
Longitude *float64
Height *float64
Accumulation *int
}
func NewSetBaseOptions ¶
func NewSetBaseOptions(funcs ...SetBaseOptionFunc) *SetBaseOptions
type SetModemOptions ¶
type SetModemOptions struct {
Apn *string
Type *string
Username *string
Password *string
Pin *string
}
func NewSetModemOptions ¶
func NewSetModemOptions(funcs ...SetModemOptionsFunc) *SetModemOptions
type SetModemOptionsFunc ¶
type SetModemOptionsFunc func(opts *SetModemOptions)
func WithApn ¶
func WithApn(value string) SetModemOptionsFunc
func WithPassword ¶
func WithPassword(value string) SetModemOptionsFunc
func WithPin ¶
func WithPin(value string) SetModemOptionsFunc
func WithType ¶
func WithType(value string) SetModemOptionsFunc
func WithUsername ¶
func WithUsername(value string) SetModemOptionsFunc
type StreamInfo ¶
type StreamInfo struct {
Authentication string `json:"authentication"`
Bitrate string `json:"bitrate"`
Carrier string `json:"carrier"`
ComprEncryp string `json:"compr_encryp"`
Country string `json:"country"`
Distance float64 `json:"distance"`
Fee string `json:"fee"`
Format string `json:"format"`
FormatDetails string `json:"format_details"`
Generator string `json:"generator"`
ID string `json:"id"`
Latitude string `json:"latitude"`
Longitude string `json:"longitude"`
Mountpoint string `json:"mountpoint"`
Network string `json:"network"`
NMEA string `json:"nmea"`
OtherDetails string `json:"other_details"`
Solution string `json:"solution"`
}
type TaskMessage ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.