module import { BinaryStream , OutputBinaryStream } from "node-opcua-binary-stream" ; import { Enum } from "node-opcua-enum" ; import { registerEnumeration } from "node-opcua-factory" ; export enum BrowseDirection { Forward = 0 , Inverse = 1 , Both = 2 , Invalid = 3 } export const schemaBrowseDirection = { name : "BrowseDirection" , enumValues : BrowseDirection } ; export function encodeBrowseDirection ( value , stream ) { stream . writeUInt32 ( value ) ; } export function decodeBrowseDirection ( stream , _value ? ) { let value = stream . readUInt32 ( ) ; if ( value < 0 || value > 3 || Number . isNaN ( value ) ) { value = BrowseDirection . Invalid ; } return value as BrowseDirection ; } export const _enumerationBrowseDirection = registerEnumeration ( schemaBrowseDirection ) ;