scl_xml

package
v0.0.0-...-258576a Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessPoint

type AccessPoint struct {
	Name    string    `xml:"name,attr"`
	LDevice []LDevice `xml:"Server>LDevice"`
}

type BDA

type BDA struct {
	Name string  `xml:"name,attr"`
	Type string  `xml:"type,attr"`
	Val  DAValue `xml:"Val"`
}

func (BDA) Print

func (bda BDA) Print(depth int)

type BOOLEAN

type BOOLEAN bool

type DA

type DA struct {
	Name string  `xml:"name,attr"`
	Type string  `xml:"bType,attr"`
	FC   string  `xml:"fc,attr"`
	Val  DAValue `xml:"Val"`
	DA   []DA    `xml:"DA"`
}

func (DA) Print

func (da DA) Print(depth int)

type DAI

type DAI struct {
	Name string `xml:"name,attr"`
	Val  Val    `xml:"Val"`
	SDI  []SDI  `xml:"SDI"` // 新增
}

func (*DAI) Print

func (dai *DAI) Print(depth int)

type DAType

type DAType struct {
	ID  string `xml:"id,attr"`
	BDA []BDA  `xml:"BDA"`
	DA  []DA   `xml:"DA"`
}

type DAValue

type DAValue interface{}

DAValue interface for all possible data types

type DO

type DO struct {
	Name string `xml:"name,attr"`
	Type string `xml:"type,attr"`
	Desc string `xml:"desc,attr,omitempty"`
	DA   []DA   `xml:"DA"`
}

func (DO) Print

func (do DO) Print(depth int)

type DOI

type DOI struct {
	Desc string `xml:"desc,attr"`
	Name string `xml:"name,attr"`
	DAI  []DAI  `xml:"DAI"`
	SDI  []SDI  `xml:"SDI"`
}

func (*DOI) Print

func (doi *DOI) Print(depth int)

type DOType

type DOType struct {
	ID   string `xml:"id,attr"`
	DA   []DA   `xml:"DA"`
	Desc string `xml:"desc,attr,omitempty"`
	SDO  []SDO  `xml:"SDO"`
}

type DataSet

type DataSet struct {
	Name string      `xml:"name,attr"`
	Desc string      `xml:"desc,attr"`
	FCDA []FCDAEntry `xml:"FCDA"`
}

type DataSetDetail

type DataSetDetail struct {
	DataSet
	IEDName           string
	DOTypes           map[string]DOType
	DataTypeTemplates DataTypeTemplates
}

func (*DataSetDetail) GetDOType

func (ds *DataSetDetail) GetDOType(prefix, lnClass, name string) DOType

type DataTypeTemplates

type DataTypeTemplates struct {
	LNodeType []LNodeType `xml:"LNodeType"`
	DOType    []DOType    `xml:"DOType"`
	DAType    []DAType    `xml:"DAType"`
	EnumType  []EnumType  `xml:"EnumType"`
}

func (DataTypeTemplates) Print

func (dt DataTypeTemplates) Print(depth int)

type EnumType

type EnumType struct {
	ID      string    `xml:"id,attr"`
	EnumVal []EnumVal `xml:"EnumVal"`
}

type EnumVal

type EnumVal struct {
	Ord  int    `xml:"ord,attr"`
	Name string `xml:",chardata"`
}

type FCDAEntry

type FCDAEntry struct {
	LDInst  string `xml:"ldInst,attr,omitempty"`
	Prefix  string `xml:"prefix,attr,omitempty"`
	LNClass string `xml:"lnClass,attr"`
	LNInst  string `xml:"lnInst,attr,omitempty"`
	DOName  string `xml:"doName,attr"`
	DAName  string `xml:"daName,attr,omitempty"`
	FC      string `xml:"fc,attr"`
}

type FLOAT32

type FLOAT32 float32

type IED

type IED struct {
	Name          string        `xml:"name,attr"`
	Type          string        `xml:"type,attr"`
	Desc          string        `xml:"desc,attr"`
	ConfigVersion string        `xml:"configVersion,attr"`
	AccessPoint   []AccessPoint `xml:"AccessPoint"`
}

func (*IED) Print

func (ied *IED) Print(depth int)

type INT16

type INT16 int16

type INT32

type INT32 int32

type INT8

type INT8 int8

type LDevice

type LDevice struct {
	Inst string `xml:"inst,attr"`
	LN   []LN   `xml:"LN"`
	LN0  LN0    `xml:"LN0"`
}

type LN

type LN struct {
	Inst    string `xml:"inst,attr"`
	Prefix  string `xml:"prefix,attr"`
	LnType  string `xml:"lnType,attr"`
	LnClass string `xml:"lnClass,attr"`
	DOI     []DOI  `xml:"DOI"`
}

func (*LN) Print

func (ln *LN) Print(depth int)

type LN0

type LN0 struct {
	Inst     string    `xml:"inst,attr"`
	LnType   string    `xml:"lnType,attr"`
	LnClass  string    `xml:"lnClass,attr"`
	DataSets []DataSet `xml:"DataSet"`
	DOI      []DOI     `xml:"DOI"`
}

type LNodeType

type LNodeType struct {
	ID      string `xml:"id,attr"`
	LNClass string `xml:"lnClass,attr"`
	Desc    string `xml:"desc,attr,omitempty"`
	DO      []DO   `xml:"DO"`
}

type SCL

type SCL struct {
	IED               []IED             `xml:"IED"`
	DataTypeTemplates DataTypeTemplates `xml:"DataTypeTemplates"`
}

func GetSCL

func GetSCL(path string) (SCL, error)

func (*SCL) GetDataSet

func (scl *SCL) GetDataSet(ref string) (*DataSetDetail, error)

func (*SCL) Print

func (scl *SCL) Print()

type SDI

type SDI struct {
	Name string `xml:"name,attr"`
	DAI  []DAI  `xml:"DAI"`
	SDI  []SDI  `xml:"SDI"` // 递归地包含SDI
}

func (*SDI) Print

func (sdi *SDI) Print(depth int)

type SDO

type SDO struct {
	Name string `xml:"name,attr"`
	Type string `xml:"type,attr"`
	DA   []DA   `xml:"DA"`
}

type Unicode255

type Unicode255 string

type Val

type Val struct {
	Value string `xml:",chardata"`
}

func (*Val) Print

func (val *Val) Print(depth int)

type VisString255

type VisString255 string

Jump to

Keyboard shortcuts

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