raweni

package
v0.0.0-...-28d9e09 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 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 Descriptions

type Descriptions struct {
	Groups  []Group  `xml:"Groups>Group"`
	Devices []Device `xml:"Devices>Device"`
}

type Device

type Device struct {
	Type   DeviceType
	Names  []LcIdentifiedName `xml:"Name"`
	Sms    []Sm               `xml:"Sm"`
	Eeprom Eeprom
}

type DeviceType

type DeviceType struct {
	Name           string `xml:",chardata"`
	ProductCodeRaw string `xml:"ProductCode,attr"`
	RevisionNoRaw  string `xml:"RevisionNo,attr"`
}

func (DeviceType) ProductCode

func (d DeviceType) ProductCode() uint32

func (DeviceType) RevisionNo

func (d DeviceType) RevisionNo() uint32

type Eeprom

type Eeprom struct {
	ByteSize      uint
	ConfigDataRaw string `xml:"ConfigData"`
}

type EtherCATInfo

type EtherCATInfo struct {
	Vendor       Vendor
	Descriptions Descriptions
}

func ReadEtherCATInfo

func ReadEtherCATInfo(r io.Reader) (eci EtherCATInfo, err error)

func ReadEtherCATInfoFromFile

func ReadEtherCATInfoFromFile(filename string) (eci EtherCATInfo, err error)

type Group

type Group struct {
	Type  string
	Names []GroupName `xml:"Name"`
}

type GroupName

type GroupName struct {
	LcIdentifiedName
}

type LcIdentifiedName

type LcIdentifiedName struct {
	String string `xml:",chardata"`
	LcId   uint   `xml:",attr"`
}

type Sm

type Sm struct {
	Name                          string `xml:",chardata"`
	MinSize, MaxSize, DefaultSize uint   `xml:",attr"`
	StartAddressRaw               string `xml:"StartAddress,attr"`
	ControlByteRaw                string `xml:"ControlByte,attr"`
}

func (Sm) ControlByte

func (s Sm) ControlByte() uint8

func (Sm) StartAddress

func (s Sm) StartAddress() uint16

type Vendor

type Vendor struct {
	Id   uint32
	Name string
}

Jump to

Keyboard shortcuts

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