sensor

package
v0.0.0-...-ab68a60 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

MIT License -----------

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT License -----------

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT License -----------

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acceleration

type Acceleration struct {
	X int16
	Y int16
	Z int16
	T int16
}

func (Acceleration) Pack

func (a Acceleration) Pack() *pb.Accelerometer

type AltitudePressure

type AltitudePressure struct {
	Pressure int32
	Altitude int32
}

func (AltitudePressure) Pack

func (ap AltitudePressure) Pack() (*pb.Pressure, *pb.Altitude)

type Angle

type Angle struct {
	X int16
	Y int16
	Z int16
	T int16
}

func (Angle) Pack

func (a Angle) Pack() *pb.Angle

type GPSDSensor

type GPSDSensor struct {
	Addr string
	// contains filtered or unexported fields
}

type Gyroscope

type Gyroscope struct {
	X int16
	Y int16
	Z int16
	T int16
}

func (Gyroscope) Pack

func (g Gyroscope) Pack() *pb.Gyroscope

type HWT901BSensor

type HWT901BSensor struct {
	DevicePath string
	// contains filtered or unexported fields
}

type LonLat

type LonLat struct {
	Lon int
	Lat int
}

func (LonLat) Pack

func (ll LonLat) Pack() *pb.LonLat

type Magnetometer

type Magnetometer struct {
	X int16
	Y int16
	Z int16
	T int16
}

func (Magnetometer) Pack

func (m Magnetometer) Pack() *pb.Magnetometer

type Monitor

type Monitor struct {
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(state *event.State) (m Monitor, err error)

func (*Monitor) Poll

func (m *Monitor) Poll()

func (*Monitor) Register

func (m *Monitor) Register(s Sensor)

func (*Monitor) RegisterChannel

func (m *Monitor) RegisterChannel(ch chan *pb.SensorReport)

func (*Monitor) SetPollInterval

func (m *Monitor) SetPollInterval(interval time.Duration)

type Sensor

type Sensor interface {
	// contains filtered or unexported methods
}

type Time

type Time struct {
	Year        byte
	Month       byte
	Day         byte
	Hour        byte
	Minute      byte
	Second      byte
	Millisecond int16
}

func (Time) Pack

func (x Time) Pack() *pb.Time

Jump to

Keyboard shortcuts

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