22 lines
393 B
Go
22 lines
393 B
Go
package dbm
|
|
|
|
import (
|
|
json_dataModels "github.com/tecamino/tecamino-json_data/models"
|
|
)
|
|
|
|
func (d *DBMHandler) Set(req *json_dataModels.Request) {
|
|
if req == nil {
|
|
return
|
|
} else if len(req.Set) == 0 {
|
|
return
|
|
}
|
|
d.RLock()
|
|
defer d.RUnlock()
|
|
|
|
for _, set := range req.Set {
|
|
for _, dp := range d.DBM.QueryDatapoints(1, set.Uuid, set.Path) {
|
|
dp.UpdateValue(d.Conns, set.Value)
|
|
}
|
|
}
|
|
}
|