20 lines
338 B
Go
20 lines
338 B
Go
package dbm
|
|
|
|
import (
|
|
json_dataModels "github.com/tecamino/tecamino-json_data/models"
|
|
)
|
|
|
|
func (d *DBMHandler) Set(sets []json_dataModels.Set) {
|
|
if sets == nil {
|
|
return
|
|
}
|
|
d.RLock()
|
|
defer d.RUnlock()
|
|
|
|
for _, set := range sets {
|
|
for _, dp := range d.DB.QueryDatapoints(1, set.Path) {
|
|
dp.UpdateValue(d.Conns, set.Value)
|
|
}
|
|
}
|
|
}
|