apc

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APC

type APC struct {
	XMLName xml.Name `xml:"APC_DDF"`
	Devices []Device `xml:"device"`
}

func ParseApcMib

func ParseApcMib(file string, log logger.ContextL) (*APC, error)

type AlarmFlag

type AlarmFlag struct {
	RuleId   string   `xml:"ruleid,attr"`
	ValueMap ValueMap `xml:"value>mapValue"`
}

type Device

type Device struct {
	Id              string      `xml:"deviceid,attr"`
	OidMustExist    []Oid       `xml:"oidMustExist"`
	OidMustMatch    []Oid       `xml:"oidMustMatch"`
	SuppressRule    Rule        `xml:"suppressRule"`
	SetProductData  []SetData   `xml:"setProductData"`
	SetLocationData []SetData   `xml:"setLocationData"`
	StateSensors    []Sensor    `xml:"stateSensor"`
	NumSensors      []Sensor    `xml:"numSensor"`
	ValueMaps       []ValueMap  `xml:"valueMap"`
	EnumMaps        []EnumMap   `xml:"enumMap"`
	AlarmFlags      []AlarmFlag `xml:"alarmFlags"`
}

type EnumMap

type EnumMap struct {
	RuleId string   `xml:"ruleid,attr"`
	Labels []string `xml:"label"`
}

type Oid

type Oid struct {
	Oid    string   `xml:"oid,attr"`
	IsTree string   `xml:"istree,attr"`
	RuleId string   `xml:"ruleid,attr"`
	Values []string `xml:"valueList>value"`
}

type Op

type Op struct {
	Value
}

type Rule

type Rule struct {
	RuleId     string `xml:"ruleid,attr"`
	SuppressId string `xml:"suppressid,attr"`
}

type Sensor

type Sensor struct {
	RuleId    string `xml:"ruleid,attr"`
	Type      string `xml:"type"`
	Value     Value  `xml:"value"`
	SensorId  string `xml:"sensorId"`
	Label     string `xml:"label"`
	Enum      string `xml:"enum"`
	SensorSet string `xml:"sensorSet"`
}

type SetData

type SetData struct {
	RuleId string `xml:"ruleid,attr"`
	Field  string `xml:"field,attr"`
	ReOps  []Op   `xml:"regex>op"`
	Value
}

type Val

type Val struct {
	Oid string `xml:"getOid"`
}

type Value

type Value struct {
	Val
	Id       string `xml:"mapid,attr"`
	IsBinary string `xml:"is-binary"`
	Mults    []Val  `xml:"mult>op"`
}

type ValueMap

type ValueMap struct {
	Value
	RuleId    string   `xml:"ruleid,attr"`
	ValuesIn  []string `xml:"valueIn"`
	ValuesOut []string `xml:"valueOut"`
}

Jump to

Keyboard shortcuts

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