model

package
v0.0.0-...-13edf00 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const NONE = int32(-1)

Variables

This section is empty.

Functions

func NeedsResolving

func NeedsResolving(plcTag apiModel.PlcTag) bool

func NewAdsSymbolicPlcTag

func NewAdsSymbolicPlcTag(symbolicAddress string, arrayInfo []apiModel.ArrayInfo) (apiModel.PlcTag, error)

func NewDirectAdsPlcTag

func NewDirectAdsPlcTag(indexGroup uint32, indexOffset uint32, valueType apiValues.PlcValueType, stringLength int32, arrayInfo []apiModel.ArrayInfo) (apiModel.PlcTag, error)

Types

type AdsSubscriptionHandle

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

func NewAdsSubscriptionHandle

func NewAdsSubscriptionHandle(subscriber spi.PlcSubscriber, tagName string, directTag DirectPlcTag, _options ...options.WithOption) *AdsSubscriptionHandle

func (*AdsSubscriptionHandle) GetDirectTag

func (t *AdsSubscriptionHandle) GetDirectTag() DirectPlcTag

func (*AdsSubscriptionHandle) GetNumConsumers

func (t *AdsSubscriptionHandle) GetNumConsumers() int

func (*AdsSubscriptionHandle) PublishPlcValue

func (t *AdsSubscriptionHandle) PublishPlcValue(value apiValues.PlcValue)

func (*AdsSubscriptionHandle) Register

func (*AdsSubscriptionHandle) Serialize

func (d *AdsSubscriptionHandle) Serialize() ([]byte, error)

func (*AdsSubscriptionHandle) SerializeWithWriteBuffer

func (d *AdsSubscriptionHandle) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error

func (*AdsSubscriptionHandle) String

func (d *AdsSubscriptionHandle) String() string

type Configuration

type Configuration struct {
	SourceAmsNetId readWriteModel.AmsNetId
	SourceAmsPort  uint16
	TargetAmsNetId readWriteModel.AmsNetId
	TargetAmsPort  uint16
}

func ParseFromOptions

func ParseFromOptions(localLogger zerolog.Logger, options map[string][]string) (Configuration, error)

type DirectPlcTag

type DirectPlcTag struct {
	PlcTag

	IndexGroup   uint32
	IndexOffset  uint32
	ValueType    apiValues.PlcValueType
	StringLength int32
	DataType     readWriteModel.AdsDataTypeTableEntry
}

func CastToDirectAdsTagFromPlcTag

func CastToDirectAdsTagFromPlcTag(plcTag apiModel.PlcTag) (DirectPlcTag, error)

func (DirectPlcTag) GetAddressString

func (m DirectPlcTag) GetAddressString() string

func (DirectPlcTag) GetArrayInfo

func (m DirectPlcTag) GetArrayInfo() []apiModel.ArrayInfo

func (DirectPlcTag) GetValueType

func (m DirectPlcTag) GetValueType() apiValues.PlcValueType

func (DirectPlcTag) MarshalXMLAttr

func (m DirectPlcTag) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

func (DirectPlcTag) Serialize

func (m DirectPlcTag) Serialize() ([]byte, error)

func (DirectPlcTag) SerializeWithWriteBuffer

func (m DirectPlcTag) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error

func (DirectPlcTag) String

func (m DirectPlcTag) String() string

type PlcTag

type PlcTag struct {
	apiModel.PlcSubscriptionTag

	ArrayInfo []apiModel.ArrayInfo
}

type SubscriptionEvent

type SubscriptionEvent struct {
	*spiModel.DefaultPlcSubscriptionEvent
}

func NewSubscriptionEvent

func NewSubscriptionEvent(
	tags map[string]apiModel.PlcTag,
	types map[string]apiModel.PlcSubscriptionType,
	intervals map[string]time.Duration,
	responseCodes map[string]apiModel.PlcResponseCode,
	values map[string]values.PlcValue,
	_options ...options.WithOption,
) SubscriptionEvent

type SymbolicPlcTag

type SymbolicPlcTag struct {
	PlcTag

	SymbolicAddress string
}

func CastToSymbolicPlcTagFromPlcTag

func CastToSymbolicPlcTagFromPlcTag(plcTag apiModel.PlcTag) (SymbolicPlcTag, error)

func (SymbolicPlcTag) GetAddressString

func (m SymbolicPlcTag) GetAddressString() string

func (SymbolicPlcTag) GetArrayInfo

func (m SymbolicPlcTag) GetArrayInfo() []apiModel.ArrayInfo

func (SymbolicPlcTag) GetValueType

func (m SymbolicPlcTag) GetValueType() apiValues.PlcValueType

func (SymbolicPlcTag) Serialize

func (m SymbolicPlcTag) Serialize() ([]byte, error)

func (SymbolicPlcTag) SerializeWithWriteBuffer

func (m SymbolicPlcTag) SerializeWithWriteBuffer(writeBuffer utils.WriteBuffer) error

Jump to

Keyboard shortcuts

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