123456789101112131415161718192021222324252627282930313233343536 |
- import { XMLElem } from "@/util/XmlElem";
- import { UABaseNode, type UABaseNodeOptions } from "./UABaseNode";
- export class UAObject extends UABaseNode {
- constructor(options: UAObjectNodeOptions) {
- super(options);
- }
- static fromXML(uaObject: any): UAObject{
- const bn=super.fromXML(uaObject)
- return new UAObject({nodeId: bn.nodeId,
- browseName: bn.browseName,
- nodeClass: "Object",
- namespace: bn.namespace,
- displayName: bn.displayName,
- references: bn.references});
- }
- toXML(): XMLElem {
- const elem =new XMLElem('UAVariable');
- elem.attr('NodeID', this.nodeId.toString())
- .attr('BrowseName', this.browseName)
- .attr('DisplayName', this.displayName);
- const refs=elem.add(new XMLElem('References'))
- for(const ref of this.references) {
- refs.add(ref.toXML());
- }
- return elem;
- }
- }
- export interface UAObjectNodeOptions extends UABaseNodeOptions{
-
- }
|