|
@@ -3,17 +3,20 @@ import type { NamespaceTable } from "./NameSpaceTable";
|
|
import { UABaseNode, type UABaseNodeOptions } from "./UABaseNode";
|
|
import { UABaseNode, type UABaseNodeOptions } from "./UABaseNode";
|
|
|
|
|
|
export class UAReferenceType extends UABaseNode{
|
|
export class UAReferenceType extends UABaseNode{
|
|
|
|
+ public isAbstract: boolean;
|
|
|
|
|
|
constructor(options: UAReferenceTypeOptions) {
|
|
constructor(options: UAReferenceTypeOptions) {
|
|
super(options)
|
|
super(options)
|
|
|
|
+ this.isAbstract=options.isAbstract||false;
|
|
}
|
|
}
|
|
|
|
|
|
- static fromXML(uaMethod: any): UAReferenceType{
|
|
|
|
- const bn=super.fromXML(uaMethod)
|
|
|
|
|
|
+ static fromXML(xmlRefType: any): UAReferenceType{
|
|
|
|
+ const bn=super.fromXML(xmlRefType)
|
|
return new UAReferenceType({nodeId: bn.nodeId,
|
|
return new UAReferenceType({nodeId: bn.nodeId,
|
|
browseName: bn.browseName,
|
|
browseName: bn.browseName,
|
|
displayName: bn.displayName,
|
|
displayName: bn.displayName,
|
|
- references: bn.references});
|
|
|
|
|
|
+ references: bn.references,
|
|
|
|
+ isAbstract: xmlRefType['@_IsAbstract']==='true'});
|
|
}
|
|
}
|
|
|
|
|
|
toXML(lnst:NamespaceTable, gnst:NamespaceTable): XMLElem {
|
|
toXML(lnst:NamespaceTable, gnst:NamespaceTable): XMLElem {
|
|
@@ -21,6 +24,7 @@ export class UAReferenceType extends UABaseNode{
|
|
const elem =new XMLElem('UAReferenceType');
|
|
const elem =new XMLElem('UAReferenceType');
|
|
elem.attr('NodeId', nid.toString())
|
|
elem.attr('NodeId', nid.toString())
|
|
.attr('BrowseName', this.browseName)
|
|
.attr('BrowseName', this.browseName)
|
|
|
|
+ .attr('IsAbstract', this.isAbstract)
|
|
.elem('DisplayName', this.displayName);
|
|
.elem('DisplayName', this.displayName);
|
|
const refs=elem.add(new XMLElem('References'))
|
|
const refs=elem.add(new XMLElem('References'))
|
|
for(const ref of this.references) {
|
|
for(const ref of this.references) {
|
|
@@ -32,5 +36,5 @@ export class UAReferenceType extends UABaseNode{
|
|
}
|
|
}
|
|
|
|
|
|
export interface UAReferenceTypeOptions extends UABaseNodeOptions{
|
|
export interface UAReferenceTypeOptions extends UABaseNodeOptions{
|
|
-
|
|
|
|
|
|
+ isAbstract?: boolean
|
|
}
|
|
}
|