Working on audit
This commit is contained in:
+15
-11
@@ -48,11 +48,13 @@ type outMsg struct {
|
||||
Type string `json:"type"`
|
||||
|
||||
// update
|
||||
DS string `json:"ds,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
TS string `json:"ts,omitempty"`
|
||||
Value any `json:"value,omitempty"`
|
||||
Quality string `json:"quality,omitempty"`
|
||||
DS string `json:"ds,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
TS string `json:"ts,omitempty"`
|
||||
Value any `json:"value,omitempty"`
|
||||
Quality string `json:"quality,omitempty"`
|
||||
Severity int `json:"severity,omitempty"` // raw EPICS alarm severity (0=NO_ALARM)
|
||||
Status int `json:"status,omitempty"` // raw EPICS alarm status
|
||||
|
||||
// meta
|
||||
Meta *metaPayload `json:"meta,omitempty"`
|
||||
@@ -190,12 +192,14 @@ func (c *wsClient) dispatchLoop(ctx context.Context) {
|
||||
continue
|
||||
}
|
||||
msg := outMsg{
|
||||
Type: "update",
|
||||
DS: u.Ref.DS,
|
||||
Name: u.Ref.Name,
|
||||
TS: u.Value.Timestamp.UTC().Format(time.RFC3339Nano),
|
||||
Value: u.Value.Data,
|
||||
Quality: u.Value.Quality.String(),
|
||||
Type: "update",
|
||||
DS: u.Ref.DS,
|
||||
Name: u.Ref.Name,
|
||||
TS: u.Value.Timestamp.UTC().Format(time.RFC3339Nano),
|
||||
Value: u.Value.Data,
|
||||
Quality: u.Value.Quality.String(),
|
||||
Severity: u.Value.Severity,
|
||||
Status: u.Value.Status,
|
||||
}
|
||||
b, err := json.Marshal(msg)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user