Documentation
¶
Overview ¶
Package ble implements the Connector interface using BLE.
Index ¶
- Variables
- func VehicleLocalName(vin string) string
- type Advertisement
- type Connection
- func (c *Connection) AllowedLatency() time.Duration
- func (c *Connection) Close()
- func (c *Connection) PreferredAuthMethod() connector.AuthMethod
- func (c *Connection) Receive() <-chan []byte
- func (c *Connection) RetryInterval() time.Duration
- func (c *Connection) Send(_ context.Context, buffer []byte) error
- func (c *Connection) VIN() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMaxConnectionsExceeded = protocol.NewError("the vehicle is already connected to the maximum number of BLE devices", false, false)
Functions ¶
func VehicleLocalName ¶ added in v0.3.3
Types ¶
type Advertisement ¶ added in v0.3.3
type Advertisement = ble.Advertisement
func ScanVehicleBeacon ¶ added in v0.3.3
func ScanVehicleBeacon(ctx context.Context, vin string) (Advertisement, error)
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(ctx context.Context, vin string) (*Connection, error)
func NewConnectionToBleTarget ¶ added in v0.3.3
func NewConnectionToBleTarget(ctx context.Context, vin string, target Advertisement) (*Connection, error)
func (*Connection) AllowedLatency ¶ added in v0.1.0
func (c *Connection) AllowedLatency() time.Duration
func (*Connection) Close ¶
func (c *Connection) Close()
func (*Connection) PreferredAuthMethod ¶
func (c *Connection) PreferredAuthMethod() connector.AuthMethod
func (*Connection) Receive ¶
func (c *Connection) Receive() <-chan []byte
func (*Connection) RetryInterval ¶
func (c *Connection) RetryInterval() time.Duration
func (*Connection) VIN ¶
func (c *Connection) VIN() string
Click to show internal directories.
Click to hide internal directories.