ing
This commit is contained in:
parent
bd3b3f578e
commit
7f395b6520
|
@ -7,7 +7,7 @@ import (
|
||||||
cda "git.loafle.net/commons/di-go/annotation"
|
cda "git.loafle.net/commons/di-go/annotation"
|
||||||
cdr "git.loafle.net/commons/di-go/registry"
|
cdr "git.loafle.net/commons/di-go/registry"
|
||||||
"git.loafle.net/commons/logging-go"
|
"git.loafle.net/commons/logging-go"
|
||||||
ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
|
ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
|
||||||
|
|
||||||
// For annotation
|
// For annotation
|
||||||
_ "git.loafle.net/overflow/commons-go/core/annotation"
|
_ "git.loafle.net/overflow/commons-go/core/annotation"
|
||||||
|
@ -22,11 +22,11 @@ func init() {
|
||||||
type SensorConfigService struct {
|
type SensorConfigService struct {
|
||||||
cda.TypeAnnotation `annotation:"@overflow:RPCService()"`
|
cda.TypeAnnotation `annotation:"@overflow:RPCService()"`
|
||||||
|
|
||||||
sensorConfigs map[string]*ocsm.SensorConfig
|
sensorConfigs map[string]*ocmsc.SensorConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SensorConfigService) InitService() error {
|
func (s *SensorConfigService) InitService() error {
|
||||||
s.sensorConfigs = make(map[string]*ocsm.SensorConfig, 0)
|
s.sensorConfigs = make(map[string]*ocmsc.SensorConfig, 0)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ func (s *SensorConfigService) DestroyService() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SensorConfigService) InitConfig(sensorConfigs []*ocsm.SensorConfig) error {
|
func (s *SensorConfigService) InitConfig(sensorConfigs []*ocmsc.SensorConfig) error {
|
||||||
if nil == sensorConfigs || 0 == len(sensorConfigs) {
|
if nil == sensorConfigs || 0 == len(sensorConfigs) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ func (s *SensorConfigService) InitConfig(sensorConfigs []*ocsm.SensorConfig) err
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SensorConfigService) AddConfig(sensorConfig *ocsm.SensorConfig) error {
|
func (s *SensorConfigService) AddConfig(sensorConfig *ocmsc.SensorConfig) error {
|
||||||
if nil == sensorConfig {
|
if nil == sensorConfig {
|
||||||
return fmt.Errorf("Sensor config is not valid")
|
return fmt.Errorf("Sensor config is not valid")
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ func (s *SensorConfigService) AddConfig(sensorConfig *ocsm.SensorConfig) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SensorConfigService) UpdateConfig(sensorConfig *ocsm.SensorConfig) error {
|
func (s *SensorConfigService) UpdateConfig(sensorConfig *ocmsc.SensorConfig) error {
|
||||||
if nil == sensorConfig {
|
if nil == sensorConfig {
|
||||||
return fmt.Errorf("Sensor config is not valid")
|
return fmt.Errorf("Sensor config is not valid")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user