model

package
v0.0.0-...-0ff7356 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SimulatedDataTypeSizesValues []SimulatedDataTypeSizes

Functions

func DataItemParse

func DataItemParse(ctx context.Context, theBytes []byte, dataType string, numberOfValues uint16) (api.PlcValue, error)

func DataItemParseWithBuffer

func DataItemParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, dataType string, numberOfValues uint16) (api.PlcValue, error)

func DataItemSerialize

func DataItemSerialize(value api.PlcValue, dataType string, numberOfValues uint16) ([]byte, error)

func DataItemSerializeWithWriteBuffer

func DataItemSerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer, value api.PlcValue, dataType string, numberOfValues uint16) error

func DummyParseWithBufferProducer

func DummyParseWithBufferProducer() func(ctx context.Context, readBuffer utils.ReadBuffer) (Dummy, error)

func NewDummy

func NewDummy(dummy uint16) *_Dummy

NewDummy factory function for _Dummy

func SimulatedDataTypeSizesKnows

func SimulatedDataTypeSizesKnows(value uint8) bool

Types

type Dummy

type Dummy interface {
	fmt.Stringer
	utils.LengthAware
	utils.Serializable
	utils.Copyable
	// GetDummy returns Dummy (property field)
	GetDummy() uint16
	// IsDummy is a marker method to prevent unintentional type checks (interfaces of same signature)
	IsDummy()
	// CreateBuilder creates a DummyBuilder
	CreateDummyBuilder() DummyBuilder
}

Dummy is the corresponding interface of Dummy

func CastDummy deprecated

func CastDummy(structType any) Dummy

Deprecated: use the interface for direct cast

func DummyParse

func DummyParse(ctx context.Context, theBytes []byte) (Dummy, error)

func DummyParseWithBuffer

func DummyParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (Dummy, error)

type DummyBuilder

type DummyBuilder interface {
	utils.Copyable
	// WithMandatoryFields adds all mandatory fields (convenience for using multiple builder calls)
	WithMandatoryFields(dummy uint16) DummyBuilder
	// WithDummy adds Dummy (property field)
	WithDummy(uint16) DummyBuilder
	// Build builds the Dummy or returns an error if something is wrong
	Build() (Dummy, error)
	// MustBuild does the same as Build but panics on error
	MustBuild() Dummy
}

DummyBuilder is a builder for Dummy

func NewDummyBuilder

func NewDummyBuilder() DummyBuilder

NewDummyBuilder() creates a DummyBuilder

type ISimulatedDataTypeSizes

type ISimulatedDataTypeSizes interface {
	fmt.Stringer
	utils.LengthAware
	utils.Serializable
	DataTypeSize() uint8
}

type SimulatedDataTypeSizes

type SimulatedDataTypeSizes uint8

SimulatedDataTypeSizes is an enum

const (
	SimulatedDataTypeSizes_BOOL           SimulatedDataTypeSizes = 1
	SimulatedDataTypeSizes_BYTE           SimulatedDataTypeSizes = 2
	SimulatedDataTypeSizes_WORD           SimulatedDataTypeSizes = 3
	SimulatedDataTypeSizes_DWORD          SimulatedDataTypeSizes = 4
	SimulatedDataTypeSizes_LWORD          SimulatedDataTypeSizes = 5
	SimulatedDataTypeSizes_SINT           SimulatedDataTypeSizes = 6
	SimulatedDataTypeSizes_INT            SimulatedDataTypeSizes = 7
	SimulatedDataTypeSizes_DINT           SimulatedDataTypeSizes = 8
	SimulatedDataTypeSizes_LINT           SimulatedDataTypeSizes = 9
	SimulatedDataTypeSizes_USINT          SimulatedDataTypeSizes = 10
	SimulatedDataTypeSizes_UINT           SimulatedDataTypeSizes = 11
	SimulatedDataTypeSizes_UDINT          SimulatedDataTypeSizes = 12
	SimulatedDataTypeSizes_ULINT          SimulatedDataTypeSizes = 13
	SimulatedDataTypeSizes_REAL           SimulatedDataTypeSizes = 14
	SimulatedDataTypeSizes_LREAL          SimulatedDataTypeSizes = 15
	SimulatedDataTypeSizes_TIME           SimulatedDataTypeSizes = 16
	SimulatedDataTypeSizes_LTIME          SimulatedDataTypeSizes = 17
	SimulatedDataTypeSizes_DATE           SimulatedDataTypeSizes = 18
	SimulatedDataTypeSizes_LDATE          SimulatedDataTypeSizes = 19
	SimulatedDataTypeSizes_TIME_OF_DAY    SimulatedDataTypeSizes = 20
	SimulatedDataTypeSizes_LTIME_OF_DAY   SimulatedDataTypeSizes = 21
	SimulatedDataTypeSizes_DATE_AND_TIME  SimulatedDataTypeSizes = 22
	SimulatedDataTypeSizes_LDATE_AND_TIME SimulatedDataTypeSizes = 23
	SimulatedDataTypeSizes_CHAR           SimulatedDataTypeSizes = 24
	SimulatedDataTypeSizes_WCHAR          SimulatedDataTypeSizes = 25
	SimulatedDataTypeSizes_STRING         SimulatedDataTypeSizes = 26
	SimulatedDataTypeSizes_WSTRING        SimulatedDataTypeSizes = 27
)

func CastSimulatedDataTypeSizes

func CastSimulatedDataTypeSizes(structType any) SimulatedDataTypeSizes

func SimulatedDataTypeSizesByName

func SimulatedDataTypeSizesByName(value string) (enum SimulatedDataTypeSizes, ok bool)

func SimulatedDataTypeSizesByValue

func SimulatedDataTypeSizesByValue(value uint8) (enum SimulatedDataTypeSizes, ok bool)

func SimulatedDataTypeSizesFirstEnumForFieldDataTypeSize

func SimulatedDataTypeSizesFirstEnumForFieldDataTypeSize(value uint8) (enum SimulatedDataTypeSizes, ok bool)

func SimulatedDataTypeSizesParse

func SimulatedDataTypeSizesParse(ctx context.Context, theBytes []byte) (SimulatedDataTypeSizes, error)

func SimulatedDataTypeSizesParseWithBuffer

func SimulatedDataTypeSizesParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (SimulatedDataTypeSizes, error)

func (SimulatedDataTypeSizes) DataTypeSize

func (e SimulatedDataTypeSizes) DataTypeSize() uint8

func (SimulatedDataTypeSizes) GetDataTypeSize

func (e SimulatedDataTypeSizes) GetDataTypeSize() uint8

func (SimulatedDataTypeSizes) GetLengthInBits

func (m SimulatedDataTypeSizes) GetLengthInBits(ctx context.Context) uint16

func (SimulatedDataTypeSizes) GetLengthInBytes

func (m SimulatedDataTypeSizes) GetLengthInBytes(ctx context.Context) uint16

func (SimulatedDataTypeSizes) GetValue

func (e SimulatedDataTypeSizes) GetValue() uint8

func (SimulatedDataTypeSizes) PLC4XEnumName

func (e SimulatedDataTypeSizes) PLC4XEnumName() string

PLC4XEnumName returns the name that is used in code to identify this enum

func (SimulatedDataTypeSizes) Serialize

func (e SimulatedDataTypeSizes) Serialize() ([]byte, error)

func (SimulatedDataTypeSizes) SerializeWithWriteBuffer

func (e SimulatedDataTypeSizes) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error

func (SimulatedDataTypeSizes) String

func (e SimulatedDataTypeSizes) String() string

Jump to

Keyboard shortcuts

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