Documentation ¶
Index ¶
- func BytesToFloat32(b []byte) (f float32)
- func BytesToInt(b []byte) int
- func Float32Bytes(float float32) []byte
- func IntBytes(i int) []byte
- type Config
- type MinFloat32Heap
- type Sensorserver
- func (s *Sensorserver) Backup(c *gin.Context)
- func (s *Sensorserver) GetChart(c *gin.Context)
- func (s *Sensorserver) GetSensorData(c *gin.Context)
- func (s *Sensorserver) GetSensors(c *gin.Context)
- func (s *Sensorserver) GetSunriseAndSunset() string
- func (s *Sensorserver) Page(c *gin.Context)
- func (s *Sensorserver) PutMultiSensorData(c *gin.Context)
- func (s *Sensorserver) PutSensorData(c *gin.Context)
- func (s *Sensorserver) Stats(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToFloat32 ¶
BytesToFloat32 convert a byte Array to float32
func Float32Bytes ¶
Float32Bytes convert a float32 into a byte Array
Types ¶
type Config ¶
type Config struct { Port uint16 `toml:"port"` Database string `toml:"database"` Title string `toml:"title"` Caption string `toml:"caption"` Latitude float64 `toml:"latitude"` Longitude float64 `toml:"longitude"` MaxPoints int `toml:"maxPoints"` Sensors []string `toml:"sensors"` SubTitle string Duration string Type string TemplateDir string }
type MinFloat32Heap ¶
type MinFloat32Heap []float32
func (*MinFloat32Heap) Average ¶
func (h *MinFloat32Heap) Average() float32
func (MinFloat32Heap) Len ¶
func (h MinFloat32Heap) Len() int
func (MinFloat32Heap) Less ¶
func (h MinFloat32Heap) Less(i, j int) bool
func (*MinFloat32Heap) Pop ¶
func (h *MinFloat32Heap) Pop() interface{}
func (*MinFloat32Heap) Push ¶
func (h *MinFloat32Heap) Push(x interface{})
func (MinFloat32Heap) Swap ¶
func (h MinFloat32Heap) Swap(i, j int)
type Sensorserver ¶
type Sensorserver struct {
// contains filtered or unexported fields
}
func New ¶
func New(filename, datadir, templatedir string) (s *Sensorserver, port uint16, err error)
func (*Sensorserver) Backup ¶
func (s *Sensorserver) Backup(c *gin.Context)
Backup this method returns the hole database file
func (*Sensorserver) GetChart ¶
func (s *Sensorserver) GetChart(c *gin.Context)
func (*Sensorserver) GetSensorData ¶
func (s *Sensorserver) GetSensorData(c *gin.Context)
return data from a sensor in json format This function call reduceData!
func (*Sensorserver) GetSensors ¶
func (s *Sensorserver) GetSensors(c *gin.Context)
func (*Sensorserver) GetSunriseAndSunset ¶
func (s *Sensorserver) GetSunriseAndSunset() string
func (*Sensorserver) PutMultiSensorData ¶
func (s *Sensorserver) PutMultiSensorData(c *gin.Context)
func (*Sensorserver) PutSensorData ¶
func (s *Sensorserver) PutSensorData(c *gin.Context)
func (*Sensorserver) Stats ¶
func (s *Sensorserver) Stats(c *gin.Context)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.