Documentation
¶
Index ¶
- type AccessPoint
- type Address
- type AddressParameter
- type AttributeType
- type Authentication
- type ClientLN
- type Communication
- type ConfDataSet
- type ConfLNs
- type ConfReportControl
- type ConnectedAP
- type DOINode
- type DataAttribute
- type DataAttributeDefinition
- type DataAttributeType
- type DataModelNode
- type DataModelValue
- type DataObject
- type DataObjectDefinition
- type DataObjectType
- type DataSet
- type DataTypeTemplates
- type EnumerationType
- type EnumerationValue
- type FCDA
- type GSE
- type GSEControl
- type Header
- type IED
- type Log
- type LogControl
- type LogicalDevice
- type LogicalNode
- type LogicalNodeType
- type OptionFields
- type Parser
- type PhyComAddress
- type PrintStream
- type ReportControl
- type ReportSettings
- type RptEnabled
- type SCL
- type SMV
- type SampledValueControl
- type SclType
- type Server
- type Services
- type SettingControl
- type SmpMod
- type SmvOpts
- type StaticModelGenerator
- type SubNetwork
- type TriggerOptions
- type Val
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessPoint ¶
type Address ¶
type Address struct {
AddressParameters []*AddressParameter `xml:"P"`
}
type AddressParameter ¶
type AttributeType ¶
type AttributeType int
const ( Boolean AttributeType = iota Int8 Int16 Int32 Int64 Int128 Int8U Int16U Int24U Int32U Float32 Float64 Enumerated OctetString64 OctetString6 OctetString8 VisibleString32 VisibleString64 VisibleString65 VisibleString129 VisibleString255 UnicodeString255 Timestamp Quality Check CodedEnum GenericBitString Constructed EntryTime PhyComAddr Currency OptFlds TrgOps )
func (AttributeType) ToString ¶
func (that AttributeType) ToString() string
type Authentication ¶
type Authentication struct {
None bool `xml:"none,attr"`
}
type Communication ¶
type Communication struct {
SubNetworks []*SubNetwork `xml:"SubNetwork" validate:"nonzero"`
}
type ConfDataSet ¶
type ConfReportControl ¶
type ConfReportControl struct {
Max int `xml:"max,attr"`
}
type ConnectedAP ¶
type ConnectedAP struct {
IedName string `xml:"iedName,attr"`
APName string `xml:"apName,attr"`
Address *Address `xml:"Address"`
GESNodes []*GSE `xml:"GSE"`
SMVNodes []*SMV `xml:"SMV"`
}
func (*ConnectedAP) LookupGSE ¶
func (that *ConnectedAP) LookupGSE(logicalDeviceName, name string) *GSE
func (*ConnectedAP) LookupSMV ¶
func (that *ConnectedAP) LookupSMV(logicalDeviceName, name string) *SMV
type DataAttribute ¶
type DataAttribute struct {
Name string
FC string
AttributeType AttributeType
IsBasicAttribute bool
Count int
Value *DataModelValue
ShortAddress string
SubDataAttributes []*DataAttribute
SclType SclType
TriggerOptions *TriggerOptions
Definition *DataAttributeDefinition
}
func NewDataAttribute ¶
func NewDataAttribute(daDefinition *DataAttributeDefinition, dataTypeTemplates *DataTypeTemplates, fc string, parent DataModelNode) (*DataAttribute, error)
func (*DataAttribute) GetChildByName ¶
func (d *DataAttribute) GetChildByName(childName string) DataModelNode
func (*DataAttribute) GetName ¶
func (d *DataAttribute) GetName() string
func (*DataAttribute) GetSclType ¶
func (d *DataAttribute) GetSclType() SclType
type DataAttributeDefinition ¶
type DataAttributeDefinition struct {
Name string `xml:"name,attr"`
Fc string `xml:"fc,attr"`
Type string `xml:"type,attr"`
BType string `xml:"bType,attr"`
Count int `xml:"count,attr"`
DchgTrigger bool `xml:"dchg,attr"`
DupdTrigger bool `xml:"dupd,attr"`
QchgTrigger bool `xml:"qchg,attr"`
Val *Val `xml:"Val"`
// custom
AttributeType AttributeType
TriggerOptions *TriggerOptions
Value *DataModelValue
}
type DataAttributeType ¶
type DataAttributeType struct {
SubDataAttributes []*DataAttributeDefinition `xml:"BDA"`
// contains filtered or unexported fields
}
type DataModelNode ¶
type DataModelNode interface {
GetName() string
GetSclType() SclType
GetChildByName(childName string) DataModelNode
}
type DataModelValue ¶
func NewDataModelValue ¶
func NewDataModelValue(attributeType AttributeType, sclType SclType, value string) (*DataModelValue, error)
type DataObject ¶
type DataObject struct {
Name string
Count int
Trans bool
SclType SclType
DataTypeTemplates *DataTypeTemplates
DataAttributes []*DataAttribute
SubDataObjects []*DataObject
}
func NewDataObject ¶
func NewDataObject(do *DataObjectDefinition, dataTypeTemplates *DataTypeTemplates, parent DataModelNode) (*DataObject, error)
func (*DataObject) GetChildByName ¶
func (d *DataObject) GetChildByName(childName string) DataModelNode
func (*DataObject) GetName ¶
func (d *DataObject) GetName() string
func (*DataObject) GetSclType ¶
func (d *DataObject) GetSclType() SclType
type DataObjectDefinition ¶
type DataObjectType ¶
type DataObjectType struct {
Cdc string `xml:"cdc,attr"`
DataAttributes []*DataAttributeDefinition `xml:"DA"`
SubDataObjects []*DataObjectDefinition `xml:"SDO"`
// contains filtered or unexported fields
}
type DataTypeTemplates ¶
type DataTypeTemplates struct {
LogicalNodeTypes []*LogicalNodeType `xml:"LNodeType"`
DataObjectTypes []*DataObjectType `xml:"DOType"`
DataAttributeTypes []*DataAttributeType `xml:"DAType"`
EnumTypes []*EnumerationType `xml:"EnumType"`
TypeDeclarations []SclType // 将LNodeType、DOType、DAType、EnumType合并到一个数组中
}
type EnumerationType ¶
type EnumerationType struct {
EnumValues []*EnumerationValue `xml:"EnumVal"`
// contains filtered or unexported fields
}
type EnumerationValue ¶
type GSEControl ¶
type LogControl ¶
type LogControl struct {
Name string `xml:"name,attr"`
Desc string `xml:"desc,attr"`
DatSet string `xml:"datSet,attr"`
LdInst string `xml:"ldInst,attr"`
Prefix string `xml:"prefix,attr"`
LnClass string `xml:"lnClass,attr"`
LnInst string `xml:"lnInst,attr"`
IntgPd int `xml:"intgPd,attr"`
ReasonCode bool `xml:"reasonCode,attr"`
LogName string `xml:"logName,attr"`
LogEna bool `xml:"logEna,attr"`
TriggerOptions *TriggerOptions `xml:"TrgOps"`
}
type LogicalDevice ¶
type LogicalDevice struct {
Inst string `xml:"inst,attr"`
LdName string `xml:"ldName,attr"`
LN0 *LogicalNode `xml:"LN0" validate:"nonzero"`
LNodes []*LogicalNode `xml:"LN"`
// custom
LogicalNodes []*LogicalNode // 将LN0、LN合并到一个数组中
}
type LogicalNode ¶
type LogicalNode struct {
Prefix string `xml:"prefix,attr"`
Inst string `xml:"inst,attr"`
LnClass string `xml:"lnClass,attr"`
LnType string `xml:"lnType,attr"`
Desc string `xml:"desc,attr"`
DataSets []*DataSet `xml:"DataSet"`
ReportControlBlocks []*ReportControl `xml:"ReportControl"`
GSEControlBlocks []*GSEControl `xml:"GSEControl"`
SMVControlBlocks []*SampledValueControl `xml:"SampledValueControl"`
LogControlBlocks []*LogControl `xml:"LogControl"`
Logs []*Log `xml:"Log"`
SettingGroupControlBlocks []*SettingControl `xml:"SettingControl"`
DOINodes []*DOINode `xml:"DOI"`
// custom
SclType SclType
DataObjects []*DataObject
}
func (*LogicalNode) GetChildByName ¶
func (ln *LogicalNode) GetChildByName(childName string) DataModelNode
func (*LogicalNode) GetName ¶
func (ln *LogicalNode) GetName() string
func (*LogicalNode) GetSclType ¶
func (ln *LogicalNode) GetSclType() SclType
type LogicalNodeType ¶
type LogicalNodeType struct {
LnClass string `xml:"lnClass,attr"`
DataObjectDefinitions []*DataObjectDefinition `xml:"DO"`
// contains filtered or unexported fields
}
type OptionFields ¶
type OptionFields struct {
SeqNum bool `xml:"seqNum,attr"`
TimeStamp bool `xml:"timeStamp,attr"`
DataSet bool `xml:"dataSet,attr"`
ReasonCode bool `xml:"reasonCode,attr"`
DataRef bool `xml:"dataRef,attr"`
EntryID bool `xml:"entryID,attr"`
ConfigRef bool `xml:"configRef,attr"`
BufOvfl bool `xml:"bufOvfl,attr"`
}
type PhyComAddress ¶
type PhyComAddress struct {
AddressParameters []*AddressParameter `xml:"P"`
// custom
VlanId int64
VlanPriority int
AppId int64
MacAddress []int
}
type PrintStream ¶
type PrintStream struct {
// contains filtered or unexported fields
}
type ReportControl ¶
type ReportControl struct {
Name string `xml:"name,attr"`
Desc string `xml:"desc,attr"`
DatSet string `xml:"datSet,attr"`
RptID string `xml:"rptID,attr"`
ConfRev string `xml:"confRev,attr"`
Buffered bool `xml:"buffered,attr"`
BufTime int `xml:"bufTime,attr"`
IntgPd string `xml:"intgPd,attr"`
IndexedStr string `xml:"indexed,attr"`
TriggerOptions *TriggerOptions `xml:"TrgOps"`
OptionFields *OptionFields `xml:"OptFields"`
RptEnabled *RptEnabled `xml:"RptEnabled"`
// custom
Indexed bool
}
type ReportSettings ¶
type ReportSettings struct {
CbName string `xml:"cbName,attr"`
DatSet string `xml:"datSet,attr"`
RptID string `xml:"rptID,attr"`
OptFields string `xml:"optFields,attr"`
BufTime string `xml:"bufTime,attr"`
TrgOps string `xml:"trgOps,attr"`
IntgPd string `xml:"intgPd,attr"`
Owner bool `xml:"owner,attr"`
}
type RptEnabled ¶
type SCL ¶
type SCL struct {
XMLName xml.Name `xml:"SCL"`
Header *Header `xml:"Header"`
Communication *Communication `xml:"Communication"`
IEDs []*IED `xml:"IED" validate:"nonzero"`
DataTypeTemplates *DataTypeTemplates `xml:"DataTypeTemplates" validate:"nonzero"`
// custom
FileFullPath string
}
type SMV ¶
type SMV struct {
LdInst string `xml:"ldInst,attr"`
CbName string `xml:"cbName,attr"`
Address *PhyComAddress `xml:"Address"`
}
type SampledValueControl ¶
type SampledValueControl struct {
Name string `xml:"name,attr"`
Desc string `xml:"desc,attr"`
DatSet string `xml:"datSet,attr"`
SmvID string `xml:"smvID,attr"`
SmpRate int `xml:"smpRate,attr"`
NofASDU int `xml:"nofASDU,attr"`
ConfRev int `xml:"confRev,attr"`
SmpModStr string `xml:"smpMod,attr"`
Multicast bool `xml:"multicast,attr"`
SmvOpts *SmvOpts `xml:"SmvOpts"`
// custom
SmpMod SmpMod
}
type Server ¶
type Server struct {
Authentication *Authentication `xml:"Authentication"`
LogicalDevices []*LogicalDevice `xml:"LDevice" validate:"nonzero"`
}
type Services ¶
type Services struct {
ConfDataSet *ConfDataSet `xml:"ConfDataSet"`
ConfReportControl *ConfReportControl `xml:"ConfReportControl"`
ReportSettings *ReportSettings `xml:"ReportSettings"`
ConfLNs *ConfLNs `xml:"ConfLNs"`
}
type SettingControl ¶
type SmvOpts ¶
type SmvOpts struct {
RefreshTime bool `xml:"refreshTime,attr"`
SampleSynchronized bool `xml:"sampleSynchronized,attr"`
Security bool `xml:"security,attr"`
DataSet bool `xml:"dataSet,attr"`
SampleRate bool `xml:"sampleRate,attr"`
}
func (*SmvOpts) GetIntValue ¶
type StaticModelGenerator ¶
type StaticModelGenerator struct {
// contains filtered or unexported fields
}
func NewStaticModelGenerator ¶
func NewStaticModelGenerator(scl *SCL, iedName, ap, outDir, outFileName, modelPrefix string, initializeOnce bool) *StaticModelGenerator
func (*StaticModelGenerator) Generate ¶
func (s *StaticModelGenerator) Generate() error
type SubNetwork ¶
type SubNetwork struct {
Name string `xml:"name,attr"`
Type string `xml:"type,attr"`
ConnectedAP []*ConnectedAP `xml:"ConnectedAP"`
}
type TriggerOptions ¶
type TriggerOptions struct {
Dchg bool `xml:"dchg,attr"`
Qchg bool `xml:"qchg,attr"`
Dupd bool `xml:"dupd,attr"`
Period bool `xml:"period,attr"`
Gi bool `xml:"gi,attr"`
}
func (*TriggerOptions) GetIntValue ¶
func (that *TriggerOptions) GetIntValue() int
Click to show internal directories.
Click to hide internal directories.