com.prosysopc.ua.typedictionary
Class TypeDictionary

java.lang.Object
  extended by com.prosysopc.ua.typedictionary.TypeDictionary

public class TypeDictionary
extends Object


Constructor Summary
TypeDictionary(UaClient client)
           
 
Method Summary
 org.opcfoundation.ua.builtintypes.ExtensionObject binaryEncode(DynamicStructure structure)
          Encode a Structure that has been decoded previously with decode(ExtensionObject).
 void clearCaches()
          Clears all caches.
 DynamicStructure decode(org.opcfoundation.ua.builtintypes.ExtensionObject extensionObject)
          Try to decode a Structure, whose serializer is unknown.
 void setTreatOpcStringAsOpcCharArray(boolean treatOpcStringAsOpcCharArray)
          This setting handles a workaround for servers erroneously describing DataType Strings in the dictionaries as opc:String instead of opc:CharArray and still encoding the data as opc:CharArray.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeDictionary

public TypeDictionary(UaClient client)
Method Detail

binaryEncode

public org.opcfoundation.ua.builtintypes.ExtensionObject binaryEncode(DynamicStructure structure)
                                                               throws org.opcfoundation.ua.encoding.EncodingException
Encode a Structure that has been decoded previously with decode(ExtensionObject).

Parameters:
structure - a structure
Returns:
binaryencoded version of the structure
Throws:
org.opcfoundation.ua.encoding.EncodingException - if encoding cannot be done

clearCaches

public void clearCaches()
Clears all caches.


decode

public DynamicStructure decode(org.opcfoundation.ua.builtintypes.ExtensionObject extensionObject)
                        throws org.opcfoundation.ua.encoding.DecodingException
Try to decode a Structure, whose serializer is unknown. Note that this operation makes multiple requests to the server and can take a while. Subsequent calls are faster as the data is cached. Cache can be cleared with clearCaches().

Parameters:
extensionObject - the encoded Structure
Returns:
decoded structure
Throws:
org.opcfoundation.ua.encoding.DecodingException - if decoding cannot be done
UaException - if typedictionary cannot be read from the server

setTreatOpcStringAsOpcCharArray

public void setTreatOpcStringAsOpcCharArray(boolean treatOpcStringAsOpcCharArray)
This setting handles a workaround for servers erroneously describing DataType Strings in the dictionaries as opc:String instead of opc:CharArray and still encoding the data as opc:CharArray. If this setting is true, then all opc:String TypeNames are treated as opc:CharArray TypeNames. This is by default false.



Copyright © 2018. All rights reserved.