timescaledb

package
v0.0.0-...-d04d4d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package timescaledb supports adding history services to an OPC UA server using Postgres with TimeScaleDb addin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Historian

type Historian struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Historian represents the connection to historian service.

func Open

func Open(ctx context.Context, connectionURI string, databaseName string) (*Historian, error)

Open connects to a historian service.

func (*Historian) Close

func (h *Historian) Close(ctx context.Context) error

Close disconnects from a historian service.

func (*Historian) ReadAtTime

func (h *Historian) ReadAtTime(ctx context.Context, nodesToRead []ua.HistoryReadValueID, details ua.ReadAtTimeDetails, timestampsToReturn ua.TimestampsToReturn, releaseContinuationPoints bool) ([]ua.HistoryReadResult, ua.StatusCode)

ReadAtTime reads the associated values from storage

func (*Historian) ReadEvent

func (h *Historian) ReadEvent(ctx context.Context, nodesToRead []ua.HistoryReadValueID, details ua.ReadEventDetails, timestampsToReturn ua.TimestampsToReturn, releaseContinuationPoints bool) ([]ua.HistoryReadResult, ua.StatusCode)

ReadEvent reads the events from storage

func (*Historian) ReadProcessed

func (h *Historian) ReadProcessed(ctx context.Context, nodesToRead []ua.HistoryReadValueID, details ua.ReadProcessedDetails, timestampsToReturn ua.TimestampsToReturn, releaseContinuationPoints bool) ([]ua.HistoryReadResult, ua.StatusCode)

ReadProcessed reads the aggregated values from storage

func (*Historian) ReadRawModified

func (h *Historian) ReadRawModified(ctx context.Context, nodesToRead []ua.HistoryReadValueID, details ua.ReadRawModifiedDetails, timestampsToReturn ua.TimestampsToReturn, releaseContinuationPoints bool) ([]ua.HistoryReadResult, ua.StatusCode)

ReadRawModified reads the raw or modified values from storage

func (*Historian) WriteEvent

func (h *Historian) WriteEvent(ctx context.Context, nodeID ua.NodeID, eventFields []ua.Variant) error

WriteEvent writes the event to storage.

func (*Historian) WriteValue

func (h *Historian) WriteValue(ctx context.Context, nodeID ua.NodeID, value ua.DataValue) error

WriteValue writes the value to storage.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL