Initial working fully go release

This commit is contained in:
Martino Ferrari
2026-04-30 23:01:01 +02:00
parent 6e51ffc5e1
commit 90669c5fd6
22 changed files with 2950 additions and 196 deletions
+6 -10
View File
@@ -169,19 +169,15 @@ func (e *EPICS) Subscribe(ctx context.Context, signal string, ch chan<- datasour
func (e *EPICS) timeValueToDS(signal string, tv proto.TimeValue) datasource.Value {
var data any
if tv.Doubles != nil {
data = tv.Doubles
if len(tv.Doubles) == 1 {
data = tv.Doubles[0]
} else {
data = tv.Doubles
}
} else if tv.Str != "" {
data = tv.Str
} else {
// Use cached metadata type for correct int64 / float64 distinction.
e.mu.RLock()
meta, hasMeta := e.metadata[signal]
e.mu.RUnlock()
if hasMeta && (meta.Type == datasource.TypeInt64 || meta.Type == datasource.TypeEnum) {
data = int64(tv.Long)
} else {
data = tv.Double
}
data = tv.Double
}
quality := datasource.QualityGood