opc: github.com/konimarti/opc Index | Files | Directories

package opc

import "github.com/konimarti/opc"

Index

Package Files

connection.go datamodel.go monitoring.go utils.go

func Debug Uses

func Debug()

Debug will print out more information about the package.

func StartMonitoring Uses

func StartMonitoring(port string)

StartMonitoring exposes /metrics to Prometheus

type Collector Uses

type Collector interface {
    Get(string) (interface{}, bool)
    Sync(Connection, time.Duration) io.Closer
}

Collector interface

func NewDataModel Uses

func NewDataModel() Collector

NewDataModel returns an OPC Data struct.

type Connection Uses

type Connection interface {
    Add(...string) error
    Remove(string)
    Read() map[string]interface{}
    ReadItem(string) Item
    Write(string, interface{}) error
    Close()
}

Connection represents the interface for the connection to the OPC server.

type Item Uses

type Item struct {
    Value     interface{}
    Quality   int16
    Timestamp time.Time
}

Item stores the result of an OPC item from the OPC server.

Directories

PathSynopsis
api
example

Package opc imports 9 packages (graph) and is imported by 2 packages. Updated 2019-01-22. Refresh now. Tools for package owners.