connection

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	*internal.BaseModule
	// contains filtered or unexported fields
}

Connection provides support for managing the connection to the robot.

func New

func New(ub unitybridge.UnityBridge,
	l *logger.Logger, appID uint64, typ Type) (*Connection, error)

New creates a new Connection instance with the given UnityBridge instance and logger.

func (*Connection) SignalQualityBars

func (c *Connection) SignalQualityBars() uint8

SignalQualityBars returns the current signal quality as a number of bars (1 to 4).

func (*Connection) SignalQualityLevel

func (c *Connection) SignalQualityLevel() uint8

SignalQualityLevel returns the current signal quality level. 0 means no signal whatsoever and 60 appears to be the strongest value.

func (*Connection) Start

func (c *Connection) Start() error

Start starts the connection module. It will try to find a robot broadcasting in the network and connect to it.

func (*Connection) Stop

func (cm *Connection) Stop() error

Stop stops the connection module.

type Type

type Type uint8
const (
	TypeWiFiDirect Type = iota
	TypeRouter
)

Jump to

Keyboard shortcuts

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