Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
ErrElementNotFound error when element is not found.
Functions ¶
func GetRequestByType ¶
func GetRequestByType(et ElementType, path string) ([]byte, error)
GetRequestByType returns S101 packet with an encoded request for element with the provided type and path.
Types ¶
type Element ¶
type Element struct { Path string ElementType ElementType Identifier string Description string Children []*Element IsOnline bool IsRoot bool Maximum any Minimum any Value any Access int Format string Enumeration string Factor int Default any ValueType int }
Element contains all the values a glow element might contain.
type ElementCollection ¶
type ElementCollection map[ElementKey]*Element
ElementCollection contains one level of elements and their Ids as key.
func NewElementConnection ¶
func NewElementConnection() ElementCollection
NewElementConnection creates a empty element collection.
func (ElementCollection) GetElementByID ¶
func (ec ElementCollection) GetElementByID(id string) (*Element, string, error)
GetElementByID returns element from collection with the provided identifier.
func (ElementCollection) GetElementByPath ¶
func (ec ElementCollection) GetElementByPath(currentPath string) (*Element, error)
GetElementByPath returns element from collection with the provided path OID.
func (ElementCollection) MarshalJSON ¶
func (ec ElementCollection) MarshalJSON() ([]byte, error)
MarshalJSON returns the collection with path(string) in key value instead of a structure for json marshaling.
func (ElementCollection) Populate ¶
func (ec ElementCollection) Populate(data *asn1.Decoder) error
Populate fills in collection with data from the decoder.
type ElementKey ¶
ElementKey used for element identification based on either element id or path.