Documentation ¶
Index ¶
- func FetchConfig(ctx log.Interface, ttnConfig *TTNConfig) (*util.Config, error)
- func NewMultipleBootTimeSetter() multipleBootTimeSetter
- func ResetPin(pinNumber int) error
- func Run(ctx log.Interface, conf util.Config, ttnConfig TTNConfig, gpsPath string) error
- type BootTimeSetter
- type DownlinkManager
- type Manager
- type NetworkClient
- type RouterHealthCheck
- type StatusManager
- type TTNClient
- func (c *TTNClient) DefaultLocation() *account.AntennaLocation
- func (c *TTNClient) Downlinks() <-chan *router.DownlinkMessage
- func (c *TTNClient) FrequencyPlan() string
- func (c *TTNClient) GatewayID() string
- func (c *TTNClient) Ping() (time.Duration, error)
- func (c *TTNClient) RefreshRoutine(ctx context.Context) error
- func (c *TTNClient) SendStatus(status gateway.Status) error
- func (c *TTNClient) SendUplinks(messages []router.UplinkMessage)
- func (c *TTNClient) Stop()
- type TTNConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchConfig ¶
FetchConfig reads the configuration from the distant server
func NewMultipleBootTimeSetter ¶
func NewMultipleBootTimeSetter() multipleBootTimeSetter
Types ¶
type BootTimeSetter ¶
BootTimeSetter is an interface that implements every type that needs receive boot time (mostly to determine uptime afterwards)
type DownlinkManager ¶
type DownlinkManager interface { BootTimeSetter ScheduleDownlink(d *router.DownlinkMessage) }
DownlinkManager is an interface that starts scheduling every downlink that is given to it
func NewDownlinkManager ¶
func NewDownlinkManager(bgCtx context.Context, ctx log.Interface, conf util.Config, statusMgr StatusManager, sendingTimeMargin time.Duration) DownlinkManager
NewDownlinkManager returns a new downlink manager that runs as long as the context doesn't close
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager struct manages the routines during runtime, once the gateways and network
configuration have been set up. It startes a routine, that it only stopped when the users wants to close the program or that an error occurs.
func NewManager ¶
type NetworkClient ¶
type NetworkClient interface { SendStatus(status gateway.Status) error SendUplinks(messages []router.UplinkMessage) FrequencyPlan() string Downlinks() <-chan *router.DownlinkMessage GatewayID() string Ping() (time.Duration, error) DefaultLocation() *account.AntennaLocation Stop() RefreshRoutine(ctx context.Context) error }
func CreateNetworkClient ¶
func CreateNetworkClient(ctx log.Interface, ttnConfig TTNConfig) (NetworkClient, error)
type RouterHealthCheck ¶
type RouterHealthCheck struct { Conn *grpc.ClientConn Duration time.Duration Err error }
type StatusManager ¶
type StatusManager interface { BootTimeSetter HandledRXBatch(received, valid int) ReceivedTX() SentTX() GenerateStatus(rtt time.Duration) (*gateway.Status, error) }
func NewStatusManager ¶
func NewStatusManager(ctx log.Interface, frequencyPlan string, gatewayDescription string, isGPSChip bool, antennaLocation *account.AntennaLocation) StatusManager
type TTNClient ¶
type TTNClient struct {
// contains filtered or unexported fields
}
func (*TTNClient) DefaultLocation ¶
func (c *TTNClient) DefaultLocation() *account.AntennaLocation
func (*TTNClient) Downlinks ¶
func (c *TTNClient) Downlinks() <-chan *router.DownlinkMessage
func (*TTNClient) FrequencyPlan ¶
func (*TTNClient) SendUplinks ¶
func (c *TTNClient) SendUplinks(messages []router.UplinkMessage)
Click to show internal directories.
Click to hide internal directories.