proto

package
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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FLAG_MSG_APP        = 0
	FLAG_MSG_CTRL       = 1
	FLAG_SEGMENT_FIRST  = 0x08
	FLAG_SEGMENT_LAST   = 0x10
	FLAG_SEGMENT_MIDDLE = 0x18
	FLAG_FROM_CLIENT    = 0x00
	FLAG_FROM_SERVER    = 0x40
	FLAG_BO_LE          = 0x00
	FLAG_BO_BE          = 0x80
)
View Source
const (
	APP_BEACON                = 0x00
	APP_CONNECTION_VALIDATION = 0x01
	APP_ECHO                  = 0x02
	APP_SEARCH_REQUEST        = 0x03
	APP_SEARCH_RESPONSE       = 0x04
	APP_CHANNEL_CREATE        = 0x07
	APP_CHANNEL_DESTROY       = 0x08
	APP_CONNECTION_VALIDATED  = 0x09
	APP_CHANNEL_GET           = 0x0A
	APP_CHANNEL_PUT           = 0x0B
	APP_CHANNEL_PUT_GET       = 0x0C
	APP_CHANNEL_MONITOR       = 0x0D
	APP_CHANNEL_ARRAY         = 0x0E
	APP_REQUEST_DESTROY       = 0x0F
	APP_CHANNEL_PROCESS       = 0x10
	APP_CHANNEL_INTROSPECTION = 0x11
	APP_MESSAGE               = 0x12
	APP_CHANNEL_RPC           = 0x14
	APP_REQUEST_CANCEL        = 0x15
	APP_ORIGIN_TAG            = 0x16
	// Control messages do not have a body, but instead use the payload size as data.
	CTRL_MARK_TOTAL_BYTE_SENT = 0x00
	CTRL_ACK_TOTAL_BYTE_SENT  = 0x01
	CTRL_SET_BYTE_ORDER       = 0x02
	CTRL_ECHO_REQUEST         = 0x03
	CTRL_ECHO_RESPONSE        = 0x04
)
View Source
const (
	SEARCH_REPLY_REQUIRED = 0x80
	SEARCH_UNICAST        = 0x01
)
View Source
const (
	CHANNEL_GET_INIT    = 0x08
	CHANNEL_GET_DESTROY = 0x10
)
View Source
const (
	CHANNEL_PUT_INIT    = 0x08
	CHANNEL_PUT_FINAL   = 0x00
	CHANNEL_PUT_GET_PUT = 0x40
	CHANNEL_PUT_DESTROY = 0x10
)
View Source
const (
	CHANNEL_RPC_INIT = 0x08
	// Destroy is a flag on top of another subcommand
	CHANNEL_RPC_DESTROY = 0x10
)

Subcommands for ChannelRPCRequest

View Source
const (
	CHANNEL_MONITOR_INIT             = 0x08
	CHANNEL_MONITOR_PIPELINE_SUPPORT = 0x80
	CHANNEL_MONITOR_SUBSCRIPTION     = 0x04
	CHANNEL_MONITOR_SUBSCRIPTION_RUN = 0x40
	CHANNEL_MONITOR_TERMINATE        = 0x10
)

Channel Monitor subcommand flags

View Source
const ALIGNMENT = 8
View Source
const MAGIC = 0xCA

Variables

This section is empty.

Functions

This section is empty.

Types

type AligningWriter

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

func NewAligningWriter

func NewAligningWriter(out io.Writer) *AligningWriter

func (*AligningWriter) Align

func (w *AligningWriter) Align() (int, error)

func (*AligningWriter) Write

func (w *AligningWriter) Write(p []byte) (n int, err error)

type BeaconMessage

type BeaconMessage struct {
	GUID             [12]byte
	Flags            byte
	BeaconSequenceID byte
	ChangeCount      int16
	ServerAddress    [16]byte
	ServerPort       uint16
	Protocol         string
	ServerStatus     pvdata.PVAny
}

type CancelDestroyRequest

type CancelDestroyRequest struct {
	ServerChannelID pvdata.PVInt
	RequestID       pvdata.PVInt
}

Cancel Request and Destroy Request

type ChannelGetPutResponse

type ChannelGetPutResponse struct {
	RequestID  pvdata.PVInt
	Subcommand pvdata.PVByte
	Status     pvdata.PVStatus `pvaccess:",breakonerror"`
	Value      pvdata.PVStructureDiff
}

type ChannelGetRequest

type ChannelGetRequest struct {
	ServerChannelID pvdata.PVInt
	RequestID       pvdata.PVInt
	Subcommand      pvdata.PVByte
	// PVRequest is the requested fields, only present if Subcommand is CHANNEL_GET_INIT.
	PVRequest pvdata.PVAny
}

func (*ChannelGetRequest) PVDecode

func (r *ChannelGetRequest) PVDecode(s *pvdata.DecoderState) error

func (ChannelGetRequest) PVEncode

func (r ChannelGetRequest) PVEncode(s *pvdata.EncoderState) error

type ChannelGetResponse

type ChannelGetResponse struct {
	RequestID  pvdata.PVInt
	Subcommand pvdata.PVByte
	Status     pvdata.PVStatus `pvaccess:",breakonerror"`
	// Value is the partial structure in the response.
	// On decode, Value.Value needs to be prepopulated with the struct to decode into.
	Value pvdata.PVStructureDiff
}

type ChannelGetResponseInit

type ChannelGetResponseInit struct {
	RequestID     pvdata.PVInt
	Subcommand    pvdata.PVByte
	Status        pvdata.PVStatus `pvaccess:",breakonerror"`
	PVStructureIF pvdata.FieldDesc
}

type ChannelMonitorRequest

type ChannelMonitorRequest struct {
	ServerChannelID pvdata.PVInt
	RequestID       pvdata.PVInt
	Subcommand      pvdata.PVUByte
	// PVRequest is only present if CHANNEL_MONITOR_INIT
	PVRequest pvdata.PVAny
	// NFree is only present if CHANNEL_MONITOR_PIPELINE_SUPPORT
	NFree pvdata.PVInt
	// QueueSize is only present if CHANNEL_MONITOR_PIPELINE_SUPPORT
	QueueSize pvdata.PVInt
}

func (*ChannelMonitorRequest) PVDecode

func (ChannelMonitorRequest) PVEncode

type ChannelMonitorResponse

type ChannelMonitorResponse struct {
	RequestID  pvdata.PVInt
	Subcommand pvdata.PVByte
	// Value is the partial structure in the response.
	// On decode, Value.Value needs to be prepopulated with the struct to decode into.
	Value         pvdata.PVStructureDiff
	OverrunBitSet pvdata.PVBitSet
}

type ChannelMonitorResponseInit

type ChannelMonitorResponseInit struct {
	RequestID     pvdata.PVInt
	Subcommand    pvdata.PVByte
	Status        pvdata.PVStatus `pvaccess:",breakonerror"`
	PVStructureIF pvdata.FieldDesc
}

type ChannelPutRequest

type ChannelPutRequest struct {
	ServerChannelID pvdata.PVInt
	RequestID       pvdata.PVInt
	Subcommand      pvdata.PVByte
	// For put_init: THIS IS A HACK AND ONLY WORKS WITH SIMPLE DATA - This assumes, only 0xFF, 0xFE, or 0xFD for TypeFlag
	// TypeFlag  pvdata.PVUByte
	// TypeID    pvdata.PVUShort
	FieldDesc pvdata.FieldDesc
	// For put:
	ToPutBitSet        pvdata.PVBitSet // PvBitSet
	PVPutStructureData pvdata.PVAny    // PVField
}

func (*ChannelPutRequest) PVDecode

func (r *ChannelPutRequest) PVDecode(s *pvdata.DecoderState) error

func (ChannelPutRequest) PVEncode

func (r ChannelPutRequest) PVEncode(s *pvdata.EncoderState) error

type ChannelPutRequestPut

type ChannelPutRequestPut struct {
	ServerChannelID    pvdata.PVInt
	RequestID          pvdata.PVInt
	Subcommand         pvdata.PVByte
	ToPutBitSet        pvdata.PVShort //pvdata.PVBitSet // PvBitSet
	PVPutStructureData pvdata.PVLong  // PVField
}

func (*ChannelPutRequestPut) PVDecode

func (ChannelPutRequestPut) PVEncode

type ChannelPutResponse

type ChannelPutResponse struct {
	RequestID  pvdata.PVInt
	Subcommand pvdata.PVByte
	Status     pvdata.PVStatus `pvaccess:",breakonerror"`
}

type ChannelPutResponseInit

type ChannelPutResponseInit struct {
	RequestID  pvdata.PVInt
	Subcommand pvdata.PVByte
	Status     pvdata.PVStatus `pvaccess:",breakonerror"`
	// [if status.type == OK | WARNING]
	PVPutStructureIF pvdata.FieldDesc
}

type ChannelRPCRequest

type ChannelRPCRequest struct {
	ServerChannelID pvdata.PVInt
	RequestID       pvdata.PVInt
	Subcommand      pvdata.PVByte
	PVRequest       pvdata.PVAny
}

type ChannelRPCResponse

type ChannelRPCResponse struct {
	RequestID      pvdata.PVInt
	Subcommand     pvdata.PVByte
	Status         pvdata.PVStatus `pvaccess:",breakonerror"`
	PVResponseData pvdata.PVAny
}

type ChannelRPCResponseInit

type ChannelRPCResponseInit struct {
	RequestID  pvdata.PVInt
	Subcommand pvdata.PVByte `pvaccess:",always=0x08"`
	Status     pvdata.PVStatus
}

type ChannelResponseError

type ChannelResponseError struct {
	RequestID  pvdata.PVInt
	Subcommand pvdata.PVByte
	Status     pvdata.PVStatus
}

ChannelResponseError is the common struct used by all channel operations to report an error.

type ConnectionValidated

type ConnectionValidated struct {
	Status pvdata.PVStatus
}

type ConnectionValidationRequest

type ConnectionValidationRequest struct {
	ServerReceiveBufferSize            pvdata.PVInt
	ServerIntrospectionRegistryMaxSize pvdata.PVShort
	// AuthNZ is the list of supported authNZ methods.
	AuthNZ []string
}

type ConnectionValidationResponse

type ConnectionValidationResponse struct {
	ClientReceiveBufferSize            pvdata.PVInt
	ClientIntrospectionRegistryMaxSize pvdata.PVShort
	ConnectionQos                      pvdata.PVShort
	// AuthNZ is the selected authNZ method.
	AuthNZ pvdata.PVString
	// PVAny is optional, content depends on authNZ
	Data pvdata.PVAny
}

type CreateChannelRequest

type CreateChannelRequest struct {
	Channels []CreateChannelRequest_Channel `pvaccess:",short"`
}

func (*CreateChannelRequest) PVDecode

func (CreateChannelRequest) PVEncode

type CreateChannelRequest_Channel

type CreateChannelRequest_Channel struct {
	ClientChannelID pvdata.PVInt
	ChannelName     string `pvaccess:",bound=500"`
}

type CreateChannelResponse

type CreateChannelResponse struct {
	ClientChannelID pvdata.PVInt
	ServerChannelID pvdata.PVInt
	Status          pvdata.PVStatus `pvaccess:",breakonerror"`
	AccessRights    pvdata.PVShort
}

type DestroyChannel

type DestroyChannel struct {
	ServerChannelID, ClientChannelID pvdata.PVInt
}

Destroy Channel

type OriginTag

type OriginTag struct {
	ForwarderAddress [16]byte
}

Origin Tag

type PVAccessHeader

type PVAccessHeader struct {
	Version        pvdata.PVByte
	Flags          pvdata.PVUByte
	MessageCommand pvdata.PVByte
	PayloadSize    pvdata.PVInt
	ForceByteOrder bool
}

func (*PVAccessHeader) PVDecode

func (v *PVAccessHeader) PVDecode(s *pvdata.DecoderState) error

func (*PVAccessHeader) PVEncode

func (v *PVAccessHeader) PVEncode(s *pvdata.EncoderState) error

type SearchRequest

type SearchRequest struct {
	SearchSequenceID pvdata.PVUInt
	Flags            pvdata.PVUByte // 0-bit for replyRequired, 7-th bit for "sent as unicast" (1)/"sent as broadcast/multicast" (0)

	Reserved [3]byte

	// if not provided (or zero), the same transport is used for responses
	// needs to be set when local broadcast (multicast on loop interface) is done
	ResponseAddress [16]byte        // e.g. IPv6 address in case of IP based transport, UDP
	ResponsePort    pvdata.PVUShort // e.g. socket port in case of IP based transport

	Protocols []pvdata.PVString

	Channels []SearchRequest_Channel `pvaccess:",short"`
}

type SearchRequest_Channel

type SearchRequest_Channel struct {
	SearchInstanceID pvdata.PVUInt
	ChannelName      string `pvaccess:",bound=500"`
}

type SearchResponse

type SearchResponse struct {
	GUID              [12]byte
	SearchSequenceID  pvdata.PVUInt
	ServerAddress     [16]byte        // e.g. IPv6 address in case of IP based transport
	ServerPort        pvdata.PVUShort // e.g. socket port in case of IP based transport
	Protocol          pvdata.PVString
	Found             pvdata.PVBoolean
	SearchInstanceIDs []pvdata.PVUInt `pvaccess:",short"`
}

Jump to

Keyboard shortcuts

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