UAMethod.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { XMLElem } from "@/util/XmlElem";
  2. import { UABaseNode, type UABaseNodeOptions } from "./UABaseNode";
  3. import type { NamespaceTable } from "./NameSpaceTable";
  4. import type { IAddressSpace } from "./IAddressSpace";
  5. export class UAMethod extends UABaseNode {
  6. constructor(options: UAMethodNodeOptions) {
  7. super(options);
  8. this.nodeClass="Method";
  9. }
  10. static fromXML(uaMethod: any, addressSpace: IAddressSpace): UAMethod{
  11. const bn=super.fromXML(uaMethod, addressSpace)
  12. return new UAMethod(bn as UABaseNodeOptions);
  13. }
  14. toXML(lnst:NamespaceTable, gnst:NamespaceTable): XMLElem {
  15. const elem =super.toXML(lnst, gnst);
  16. return elem;
  17. }
  18. getModellingRule(){
  19. let res:any = "";
  20. this.references.forEach((ref)=>{
  21. if(ref.referenceType == "HasModellingRule"){
  22. res = ref.toNode.browseName;
  23. }
  24. })
  25. return res;
  26. }
  27. }
  28. export interface UAMethodNodeOptions extends UABaseNodeOptions{
  29. }