1234567891011121314151617181920212223242526272829303132333435 |
- import { XMLElem } from "@/util/XmlElem";
- import { UABaseNode, type UABaseNodeOptions } from "./UABaseNode";
- export class UAMethod extends UABaseNode {
- constructor(options: UAMethodNodeOptions) {
- super(options);
- }
- static fromXML(uaMethod: any): UAMethod{
- const bn=super.fromXML(uaMethod)
- return new UAMethod({nodeId: bn.nodeId,
- browseName: bn.browseName,
- nodeClass: "Method",
- namespace: bn.namespace,
- displayName: bn.displayName,
- references: bn.references});
- }
- toXML(): XMLElem {
- const elem =new XMLElem('UAMethod');
- 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 UAMethodNodeOptions extends UABaseNodeOptions{
-
- }
|