sensor

package
v0.0.0-...-7c2d75c Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package sensor provides access to sensors and telemetry data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sensor

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

Sensor type for reading out values

func CreateSensor

func CreateSensor(maximum int, source rand.Source) Sensor

Create a new sensor which allows reading out of values

func (Sensor) ReadOut

func (s Sensor) ReadOut() (t Telemetry)

Read out the sensor

type Telemetry

type Telemetry struct {
	DeviceId  string `json:"deviceId"`
	Timestamp string `json:"timestamp"`
	Value     int    `json:"value"`
}

Telemetry type holding all sensory data

Jump to

Keyboard shortcuts

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