companion

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnumNamesMappingResult = map[MappingResult]string{
	MappingResultGood:                  "Good",
	MappingResultInvalidSource:         "InvalidSource",
	MappingResultInvalidTarget:         "InvalidTarget",
	MappingResultTargetAlreadyUsed:     "TargetAlreadyUsed",
	MappingResultTargetTypeUnsupported: "TargetTypeUnsupported",
	MappingResultTypeMismatch:          "TypeMismatch",
}
View Source
var EnumValuesMappingResult = map[string]MappingResult{
	"Good":                  MappingResultGood,
	"InvalidSource":         MappingResultInvalidSource,
	"InvalidTarget":         MappingResultInvalidTarget,
	"TargetAlreadyUsed":     MappingResultTargetAlreadyUsed,
	"TargetTypeUnsupported": MappingResultTargetTypeUnsupported,
	"TypeMismatch":          MappingResultTypeMismatch,
}

Functions

func MappingAddMappingTable

func MappingAddMappingTable(builder *flatbuffers.Builder, mappingTable flatbuffers.UOffsetT)

func MappingAddName

func MappingAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT)

func MappingAddTypeSafety

func MappingAddTypeSafety(builder *flatbuffers.Builder, typeSafety bool)

func MappingEnd

func MappingEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func MappingStart

func MappingStart(builder *flatbuffers.Builder)

/ Mapping of the OPC UA NodeIds

func MappingStartMappingTableVector

func MappingStartMappingTableVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func NodeIdMappingAddMappingResult

func NodeIdMappingAddMappingResult(builder *flatbuffers.Builder, mappingResult flatbuffers.UOffsetT)

func NodeIdMappingAddSourceUaNodeId

func NodeIdMappingAddSourceUaNodeId(builder *flatbuffers.Builder, sourceUaNodeId flatbuffers.UOffsetT)

func NodeIdMappingAddTargetUaNodeId

func NodeIdMappingAddTargetUaNodeId(builder *flatbuffers.Builder, targetUaNodeId flatbuffers.UOffsetT)

func NodeIdMappingEnd

func NodeIdMappingEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func NodeIdMappingStart

func NodeIdMappingStart(builder *flatbuffers.Builder)

func NodeIdMappingStartMappingResultVector

func NodeIdMappingStartMappingResultVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

Types

type Mapping

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

func GetRootAsMapping

func GetRootAsMapping(buf []byte, offset flatbuffers.UOffsetT) *Mapping

func GetSizePrefixedRootAsMapping

func GetSizePrefixedRootAsMapping(buf []byte, offset flatbuffers.UOffsetT) *Mapping

func (*Mapping) Init

func (rcv *Mapping) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Mapping) MappingTable

func (rcv *Mapping) MappingTable(obj *NodeIdMapping, j int) bool

/ Mapping of the OPC UA NodeIds

func (*Mapping) MappingTableLength

func (rcv *Mapping) MappingTableLength() int

func (*Mapping) MutateTypeSafety

func (rcv *Mapping) MutateTypeSafety(n bool) bool

/ Check if sourceUaNodeId and targetUaNodeId have same datatype

func (*Mapping) Name

func (rcv *Mapping) Name() []byte

/ Name of the mapping

func (*Mapping) Table

func (rcv *Mapping) Table() flatbuffers.Table

func (*Mapping) TypeSafety

func (rcv *Mapping) TypeSafety() bool

/ Name of the mapping / Check if sourceUaNodeId and targetUaNodeId have same datatype

func (*Mapping) UnPack

func (rcv *Mapping) UnPack() *MappingT

func (*Mapping) UnPackTo

func (rcv *Mapping) UnPackTo(t *MappingT)

type MappingResult

type MappingResult int8
const (
	/// Mapping is good
	MappingResultGood MappingResult = 0
	/// sourceUaNodeId from datalayer is not valid
	MappingResultInvalidSource MappingResult = 1
	/// targetUaNodeId is not present in the loaded companion models
	MappingResultInvalidTarget MappingResult = 2
	/// targetUaNodeId is used multiple times in the mapping tables
	MappingResultTargetAlreadyUsed MappingResult = 3
	/// Could not load the type definition of the targetUaNodeId from companion model
	MappingResultTargetTypeUnsupported MappingResult = 4
	/// sourceUaNodeId and targetUaNodeId have different datatypes, only checked if 'typeSafety' is true
	MappingResultTypeMismatch MappingResult = 5
)

func (MappingResult) String

func (v MappingResult) String() string

type MappingT

type MappingT struct {
	Name         string            `json:"name"`
	TypeSafety   bool              `json:"typeSafety"`
	MappingTable []*NodeIdMappingT `json:"mappingTable"`
}

/ Companion model mapping description

func (*MappingT) Pack

func (t *MappingT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT

type NodeIdMapping

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

func GetRootAsNodeIdMapping

func GetRootAsNodeIdMapping(buf []byte, offset flatbuffers.UOffsetT) *NodeIdMapping

func GetSizePrefixedRootAsNodeIdMapping

func GetSizePrefixedRootAsNodeIdMapping(buf []byte, offset flatbuffers.UOffsetT) *NodeIdMapping

func (*NodeIdMapping) Init

func (rcv *NodeIdMapping) Init(buf []byte, i flatbuffers.UOffsetT)

func (*NodeIdMapping) MappingResult

func (rcv *NodeIdMapping) MappingResult(j int) MappingResult

/ The target OPC UA NodeId in the companion model, e.g. ns=20;s=myModel.myPlcNode / Verification of the mapping, used as output parameter

func (*NodeIdMapping) MappingResultLength

func (rcv *NodeIdMapping) MappingResultLength() int

func (*NodeIdMapping) MutateMappingResult

func (rcv *NodeIdMapping) MutateMappingResult(j int, n MappingResult) bool

/ Verification of the mapping, used as output parameter

func (*NodeIdMapping) SourceUaNodeId

func (rcv *NodeIdMapping) SourceUaNodeId() []byte

/ The original OPC UA NodeId which will be mapped into the OPC UA companion model, e.g. ns=2;s=plc/app/Appl/...

func (*NodeIdMapping) Table

func (rcv *NodeIdMapping) Table() flatbuffers.Table

func (*NodeIdMapping) TargetUaNodeId

func (rcv *NodeIdMapping) TargetUaNodeId() []byte

/ The original OPC UA NodeId which will be mapped into the OPC UA companion model, e.g. ns=2;s=plc/app/Appl/... / The target OPC UA NodeId in the companion model, e.g. ns=20;s=myModel.myPlcNode

func (*NodeIdMapping) UnPack

func (rcv *NodeIdMapping) UnPack() *NodeIdMappingT

func (*NodeIdMapping) UnPackTo

func (rcv *NodeIdMapping) UnPackTo(t *NodeIdMappingT)

type NodeIdMappingT

type NodeIdMappingT struct {
	SourceUaNodeId string          `json:"sourceUaNodeId"`
	TargetUaNodeId string          `json:"targetUaNodeId"`
	MappingResult  []MappingResult `json:"mappingResult"`
}

/ Mapping of one sourceUaNodeId to targetUaNodeId

func (*NodeIdMappingT) Pack

Jump to

Keyboard shortcuts

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