Versions in this module Expand all Collapse all v1 v1.0.0 Feb 13, 2025 Changes in this version + const CommandAwake + const CommandChangeSampleFrequency + const CommandDelete + const CommandLogin + const CommandLogout + const CommandSleep + var ValidCommands = map[string]bool + func HandleLogs(dto routing.SensorLog) error + func HandleMeasurement(ctx context.Context, db *storage.DB, dto routing.SensorMeasurement) error + type Log struct + Level string + Message string + type Sensor struct + SerialNumber string + type SensorState struct + IsSleep bool + IsSleepChan chan bool + LogsError chan string + LogsInfo chan string + LogsWarning chan string + SampleFrequency float64 + SampleFrequencyChangeChan chan float64 + Sensor Sensor + func NewSensorState(serialNumber string, SampleFrequency float64) *SensorState + func (sensorState *SensorState) HandleAwake() + func (sensorState *SensorState) HandleChangeSampleFrequency(params map[string]interface{}) + func (sensorState *SensorState) HandleSleep() + type SineWave struct + Amplitude float64 + Frequency float64 + Phase float64 + func (sw *SineWave) Generate(dt float64) float64