2017-12-02 03:13:08 +00:00
|
|
|
package service
|
|
|
|
|
2017-12-05 10:02:58 +00:00
|
|
|
import (
|
2018-03-26 06:55:38 +00:00
|
|
|
"context"
|
2017-12-08 12:01:38 +00:00
|
|
|
"reflect"
|
|
|
|
|
|
|
|
cda "git.loafle.net/commons_go/di/annotation"
|
|
|
|
cdr "git.loafle.net/commons_go/di/registry"
|
2018-03-26 06:55:38 +00:00
|
|
|
oocmci "git.loafle.net/overflow/overflow_commons_go/modules/commons/interfaces"
|
2017-12-05 10:02:58 +00:00
|
|
|
)
|
|
|
|
|
2017-12-08 12:01:38 +00:00
|
|
|
func init() {
|
2018-03-15 13:52:23 +00:00
|
|
|
cdr.RegisterType(reflect.TypeOf((*SensorService)(nil)))
|
2017-12-08 12:01:38 +00:00
|
|
|
}
|
|
|
|
|
2017-12-02 03:13:08 +00:00
|
|
|
type SensorService struct {
|
2018-03-15 13:52:23 +00:00
|
|
|
cda.TypeAnnotation `annotation:"@overFlow:Service()"`
|
2018-03-26 06:55:38 +00:00
|
|
|
oocmci.Service
|
2018-03-26 15:14:19 +00:00
|
|
|
|
|
|
|
SensorConfigService *SensorConfigService `annotation:"@Inject()"`
|
2017-12-02 03:13:08 +00:00
|
|
|
}
|
2017-12-04 11:59:51 +00:00
|
|
|
|
2018-03-26 06:55:38 +00:00
|
|
|
func (ss *SensorService) Start() error {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ss *SensorService) Stop(ctx context.Context) error {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ss *SensorService) StartSensor(id int64) error {
|
2017-12-05 10:02:58 +00:00
|
|
|
return nil
|
2017-12-04 11:59:51 +00:00
|
|
|
}
|
|
|
|
|
2018-03-26 06:55:38 +00:00
|
|
|
func (ss *SensorService) StopSensor(id int64) error {
|
2017-12-05 10:02:58 +00:00
|
|
|
return nil
|
2017-12-04 11:59:51 +00:00
|
|
|
}
|
|
|
|
|
2018-03-26 15:14:19 +00:00
|
|
|
func (ss *SensorService) AddSensor(sensorConfigBase64 string) error {
|
|
|
|
// ss.SensorConfigService.AddConfig()
|
|
|
|
|
2017-12-05 10:02:58 +00:00
|
|
|
return nil
|
2017-12-04 11:59:51 +00:00
|
|
|
}
|
|
|
|
|
2018-03-26 15:14:19 +00:00
|
|
|
func (ss *SensorService) RemoveSensor(sensorConfigID string) error {
|
2017-12-05 10:02:58 +00:00
|
|
|
return nil
|
2017-12-04 11:59:51 +00:00
|
|
|
}
|
|
|
|
|
2018-03-26 06:55:38 +00:00
|
|
|
func (ss *SensorService) UpdateSensor(id int64) error {
|
2017-12-05 10:02:58 +00:00
|
|
|
return nil
|
2017-12-04 11:59:51 +00:00
|
|
|
}
|