processor

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigCrcChecking

type ConfigCrcChecking struct {
	Enabled   bool
	Type      CrcType // X25, CCITT, MODBUS, CRC16, XMODEM, XMODEM2, CRC32, IEEE, Castagnoli, CRC32C, Koopman, CRC64ISO, CRC64ECMA
	BigEndian bool
}

type ConfigDataLength

type ConfigDataLength struct {
	ByteIndex int
	BytesNum  int
	BigEndian bool
}

type ConfigField

type ConfigField struct {
	Name       string
	Attributes ConfigFieldAttributes
	Properties ConfigFieldProperties
}

type ConfigFieldAttributes

type ConfigFieldAttributes struct {
	StartingAddress int
	RawType         RawType //  "Int8", "Int16", "Int32", "Float32", "Float64"
	BigEndian       bool
}

type ConfigFieldProperties

type ConfigFieldProperties struct {
	SIUnit  string
	Mapping *bloblang.Executor
}

type CrcType

type CrcType string
const (
	X25        CrcType = "X25"
	CCITT      CrcType = "CCITT"
	CRC16      CrcType = "CRC16"
	MODBUS     CrcType = "MODBUS"
	XMODEM     CrcType = "XMODEM"
	XMODEM2    CrcType = "XMODEM2"
	CRC32      CrcType = "CRC32"
	IEEE       CrcType = "IEEE"
	Castagnoli CrcType = "Castagnoli"
	CRC32C     CrcType = "CRC32C"
	Koopman    CrcType = "Koopman"
	CRC64ISO   CrcType = "CRC64ISO"
	CRC64ECMA  CrcType = "CRC64ECMA"
)

type FieldValue

type FieldValue struct {
	Value  interface{}
	SIUnit string
}

type ModbusProcessor

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

func (*ModbusProcessor) Close

func (r *ModbusProcessor) Close(ctx context.Context) error

func (*ModbusProcessor) Process

type ModbusProcessorConfig

type ModbusProcessorConfig struct {
	BytesPerAddress int
	DataLength      ConfigDataLength
	CrcChecking     ConfigCrcChecking
	Fields          []ConfigField
}

type RawType

type RawType string
const (
	Int8    RawType = "Int8"
	Int16   RawType = "Int16"
	Int32   RawType = "Int32"
	Int64   RawType = "Int64"
	UInt8   RawType = "UInt8"
	UInt16  RawType = "UInt16"
	UInt32  RawType = "UInt32"
	UInt64  RawType = "UInt64"
	Float32 RawType = "Float32"
	Float64 RawType = "Float64"
)

Jump to

Keyboard shortcuts

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