pvaccess

package module
v0.0.0-...-379887d Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

README

go-pvaccess

Documentation Go Report Card

go-pvaccess provides a native Golang client and server for the pvAccess protocol used by the EPICS distributed control system.

It is currently pre-alpha and does not have a stable API. A limited subset of channel operations is supported, in server mode only.

Documentation

Index

Constants

View Source
const (
	INIT = iota
	READY
	REQUEST_IN_PROGRESS
	CANCELLED
	DESTROYED
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel = types.Channel

type ChannelFinder

type ChannelFinder = types.ChannelFinder

type ChannelGetCreator

type ChannelGetCreator = types.ChannelGetCreator

type ChannelGeter

type ChannelGeter = types.ChannelGeter

type ChannelLister

type ChannelLister = types.ChannelLister

type ChannelMonitorCreator

type ChannelMonitorCreator = types.ChannelMonitorCreator

type ChannelProvider

type ChannelProvider = types.ChannelProvider

type ChannelPutCreator

type ChannelPutCreator = types.ChannelPutCreator

type ChannelPuter

type ChannelPuter = types.ChannelPuter

type ChannelRPCCreator

type ChannelRPCCreator = types.ChannelRPCCreator

type ChannelRPCer

type ChannelRPCer = types.ChannelRPCer

type Nexter

type Nexter = types.Nexter

type Server

type Server struct {
	DisableSearch bool
	// contains filtered or unexported fields
}

func NewServer

func NewServer() (*Server, error)

func (*Server) AddChannelProvider

func (s *Server) AddChannelProvider(provider ChannelProvider)

func (*Server) ChannelProviders

func (s *Server) ChannelProviders() []ChannelProvider

func (*Server) ListenAndServe

func (srv *Server) ListenAndServe(ctx context.Context) error

ListenAndServe listens on a random port and then calls Serve.

func (*Server) Serve

func (srv *Server) Serve(ctx context.Context, l net.Listener) error

Serve runs a PVAccess server on l until the context is cancelled.

type SimpleChannel

type SimpleChannel struct {
	// contains filtered or unexported fields
}

func NewSimpleChannel

func NewSimpleChannel(name string) *SimpleChannel

func (*SimpleChannel) ChannelGet

func (c *SimpleChannel) ChannelGet(ctx context.Context) (interface{}, error)

func (*SimpleChannel) ChannelList

func (c *SimpleChannel) ChannelList(ctx context.Context) ([]string, error)

func (*SimpleChannel) ChannelPut

func (c *SimpleChannel) ChannelPut(value interface{}, ctx context.Context) (interface{}, error)

func (*SimpleChannel) CreateChannel

func (c *SimpleChannel) CreateChannel(ctx context.Context, name string) (Channel, error)

func (*SimpleChannel) CreateChannelMonitor

func (c *SimpleChannel) CreateChannelMonitor(ctx context.Context, req pvdata.PVStructure) (types.Nexter, error)

func (*SimpleChannel) FieldDesc

func (c *SimpleChannel) FieldDesc() (pvdata.FieldDesc, error)

func (*SimpleChannel) Get

func (c *SimpleChannel) Get() interface{}

Get returns the current value in c.

func (*SimpleChannel) LookupTypeCode

func (c *SimpleChannel) LookupTypeCode(code pvdata.PVUShort) (pvdata.FieldDesc, error)

func (*SimpleChannel) Name

func (c *SimpleChannel) Name() string

func (*SimpleChannel) Set

func (c *SimpleChannel) Set(value interface{})

Set changes the value in c and notifies any clients that are monitoring the channel. It is not recommended to change the type of the value between calls to Set.

func (*SimpleChannel) StoreTypeCode

func (c *SimpleChannel) StoreTypeCode(code pvdata.PVUShort, desc pvdata.FieldDesc)

Directories

Path Synopsis
cmd
internal
ctxlog
ctxlog provides context-aware logging.
ctxlog provides context-aware logging.
search
search handles beacons, search requests and responses
search handles beacons, search requests and responses
udpconn
udpconn implements Accept()-like semantics for a UDP listener
udpconn implements Accept()-like semantics for a UDP listener

Jump to

Keyboard shortcuts

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