C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
OpcUa::FileTypeBase Class Referenceabstract

Generated base class for a FileType. More...

#include <opcua_filetypebase.h>

Inherits OpcUa::BaseObjectType.

Inherited by OpcUa::FileType.

Public Member Functions

 FileTypeBase (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an FileType object using an instance declaration node as base.
 
 FileTypeBase (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an FileType object.
 
 FileTypeBase (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an instance of the class FileTypeBase with all components. More...
 
virtual UaNodeId typeDefinitionId () const
 Returns the type definition NodeId for the FileType.
 
virtual UaStatus beginCall (MethodManagerCallback *pCallback, const ServiceContext &serviceContext, OpcUa_UInt32 callbackHandle, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments)
 Call method of an UA object. More...
 
virtual UaStatus call (const ServiceContext &serviceContext, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments, UaVariantArray &outputArguments, UaStatusCodeArray &inputArgumentResults, UaDiagnosticInfos &inputArgumentDiag)
 Synchronous version of the MethodManager method call executed in a worker thread.
 
virtual UaStatus Close (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle)=0
 Closes a file represented by a FileType. More...
 
virtual UaStatus GetPosition (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle, OpcUa_UInt64 &Position)=0
 Provides the current position of the FileHandle. More...
 
virtual UaStatus Open (const ServiceContext &serviceContext, OpcUa_Byte Mode, OpcUa_UInt32 &FileHandle)=0
 Opens a file represented by an object of FileType. More...
 
virtual UaStatus Read (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle, OpcUa_Int32 Length, UaByteString &Data)=0
 Reads a part of the file starting from the current file position. More...
 
virtual UaStatus SetPosition (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle, OpcUa_UInt64 Position)=0
 Sets the current position of the FileHandle. More...
 
virtual UaStatus Write (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle, UaByteString &Data)=0
 Writes a part of the file starting from the current file position. More...
 
virtual void setMimeType (const UaString &MimeType)
 Sets the MimeType value. More...
 
virtual UaString getMimeType () const
 Returns the value of MimeType. More...
 
virtual void setOpenCount (OpcUa_UInt16 OpenCount)
 Sets the OpenCount value. More...
 
virtual OpcUa_UInt16 getOpenCount () const
 Returns the value of OpenCount. More...
 
virtual void setSize (OpcUa_UInt64 Size)
 Sets the Size value. More...
 
virtual OpcUa_UInt64 getSize () const
 Returns the value of Size. More...
 
virtual void setUserWritable (OpcUa_Boolean UserWritable)
 Sets the UserWritable value. More...
 
virtual OpcUa_Boolean getUserWritable () const
 Returns the value of UserWritable. More...
 
virtual void setWritable (OpcUa_Boolean Writable)
 Sets the Writable value. More...
 
virtual OpcUa_Boolean getWritable () const
 Returns the value of Writable. More...
 
virtual OpcUa::PropertyTypegetMimeTypeNode ()
 Returns the MimeType node. More...
 
virtual const OpcUa::PropertyTypegetMimeTypeNode () const
 Returns the MimeType node. More...
 
virtual OpcUa::PropertyTypegetOpenCountNode ()
 Returns the OpenCount node. More...
 
virtual const OpcUa::PropertyTypegetOpenCountNode () const
 Returns the OpenCount node. More...
 
virtual OpcUa::PropertyTypegetSizeNode ()
 Returns the Size node. More...
 
virtual const OpcUa::PropertyTypegetSizeNode () const
 Returns the Size node. More...
 
virtual OpcUa::PropertyTypegetUserWritableNode ()
 Returns the UserWritable node. More...
 
virtual const OpcUa::PropertyTypegetUserWritableNode () const
 Returns the UserWritable node. More...
 
virtual OpcUa::PropertyTypegetWritableNode ()
 Returns the Writable node. More...
 
virtual const OpcUa::PropertyTypegetWritableNode () const
 Returns the Writable node. More...
 
virtual OpcUa::BaseMethodgetClose ()
 Returns the Close node.
 
virtual const OpcUa::BaseMethodgetClose () const
 Returns the Close node.
 
virtual OpcUa::BaseMethodgetGetPosition ()
 Returns the GetPosition node.
 
virtual const OpcUa::BaseMethodgetGetPosition () const
 Returns the GetPosition node.
 
virtual OpcUa::BaseMethodgetOpen ()
 Returns the Open node.
 
virtual const OpcUa::BaseMethodgetOpen () const
 Returns the Open node.
 
virtual OpcUa::BaseMethodgetRead ()
 Returns the Read node.
 
virtual const OpcUa::BaseMethodgetRead () const
 Returns the Read node.
 
virtual OpcUa::BaseMethodgetSetPosition ()
 Returns the SetPosition node.
 
virtual const OpcUa::BaseMethodgetSetPosition () const
 Returns the SetPosition node.
 
virtual OpcUa::BaseMethodgetWrite ()
 Returns the Write node.
 
virtual const OpcUa::BaseMethodgetWrite () const
 Returns the Write node.
 
virtual void useAccessInfoFromType ()
 Applys the NodeAccessInfo set at the FileTypeBase and its children. More...
 
void useAccessInfoFromInstance (FileTypeBase *pInstance)
 Uses the NodeAccessInfo of pOther and its children. More...
 
- Public Member Functions inherited from OpcUa::BaseObjectType
 BaseObjectType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Construction of the class BaseObjectType. More...
 
 BaseObjectType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Construction of the class BaseObjectType. More...
 
UaReferenceListsgetUaReferenceLists () const
 Get the UaReferenceLists interface for the node. More...
 
virtual UaStatus browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)
 Discover the references of a specified node of a view. More...
 
UaNodeId nodeId () const
 Get the NodeId of the current Node. More...
 
virtual UaQualifiedName browseName () const
 Get the browseName of the current Node. More...
 
virtual UaLocalizedText displayName (Session *pSession) const
 Get the displayName as LocalizedText of the current Node. More...
 
virtual OpcUa_Boolean isDescriptionSupported () const
 Check if Node is DescriptionSupported. More...
 
virtual UaLocalizedText description (Session *pSession) const
 Get the description as LocalizedText of the current Node. More...
 
virtual OpcUa_Boolean isWriteMaskSupported () const
 Check if Node is WriteMaskSupported. More...
 
virtual OpcUa_UInt32 writeMask () const
 Get the writeMask of the current Node. More...
 
virtual OpcUa_Boolean isUserWriteMaskSupported () const
 Check if Node is UserWriteMaskSupported. More...
 
virtual OpcUa_UInt32 userWriteMask (Session *pSession) const
 Check if Node has a userWriteMask. More...
 
UaNodegetUaNode () const
 Get the UaNode interface pointer of this node. More...
 
virtual OpcUa_Byte eventNotifier () const
 Returns the EventNotifier for the BaseObjectType. More...
 
virtual MethodManagergetMethodManager (UaMethod *pMethod) const
 Returns the method manager interface for the BaseObjectType instance. More...
 
virtual void setUserData (UserDataBase *pUserData)
 Method to set user data stored in this class. More...
 
virtual UserDataBasegetUserData () const
 Method to get the user data stored in this class. More...
 
virtual void setBrowseName (const UaQualifiedName &browseName)
 Sets the browse name attribute value. More...
 
virtual void setDisplayName (const UaLocalizedText &displayName)
 Sets the display name attribute value. More...
 
virtual void setDescription (const UaLocalizedText &description)
 Sets the description attribute value. More...
 
virtual void setWriteMask (OpcUa_UInt32 writeMask)
 Sets the write mask attribute value. More...
 
virtual void setEventNotifier (OpcUa_Byte eventNotifier)
 Sets the eventNotifier attribute value. More...
 
virtual void setModellingRuleId (const UaNodeId &modellingRuleId)
 Set NodeId of the modeling rule for this node. More...
 
virtual UaNodeId modellingRuleId () const
 Get NodeId of the modeling rule for this node. More...
 
void setMethodManager (MethodManager *pMethodManager)
 Allows a class aggregating the object to implement the MethodManager for this object. More...
 
virtual UaStatus setAttributeValue (Session *pSession, OpcUa_Int32 attributeId, const UaDataValue &dataValue, NodeAccessInfo *pDefaultPermissions, OpcUa_Boolean checkWriteMask)
 Sets the value of an attribute of the Node. More...
 
- Public Member Functions inherited from MethodManager
 MethodManager ()
 construction
 
virtual ~MethodManager ()
 destruction
 
- Public Member Functions inherited from UaObject
 UaObject (UaMutexRefCounted *pSharedMutex=NULL)
 Construction of the UaObject. More...
 
OpcUa_NodeClass nodeClass () const
 Get the node class of the Node. More...
 
virtual void getAttributeValue (Session *pSession, OpcUa_Int32 attributeId, NodeAccessInfo *pDefaultPermissions, UaDataValue &uaDataValue)
 Gets the value of an attribute of the Node. More...
 
- Public Member Functions inherited from UaNode
 UaNode (UaMutexRefCounted *pSharedMutex=NULL)
 Construction of the UaNode. More...
 
virtual UaNodeId getKey () const
 Get the key of the node used for the hash table. More...
 
virtual NodeAccessInfogetAccessInfo () const
 Returns the access info for this node. More...
 
virtual bool hasAccessInfo () const
 Check if this UaNode has a NodeAccessInfo assigned. More...
 
virtual void useAccessInfoFrom (const UaNode *pOther)
 Set the NodeAccessInfo from another node to this node. More...
 
virtual void setAccessInfo (NodeAccessInfo *pAccessInfo)
 Set the NodeAccessInfo for this node. More...
 
virtual void attachAccessInfo (NodeAccessInfo *pAccessInfo)
 Set the NodeAccessInfo for this node. More...
 
- Public Member Functions inherited from ChainEntry
 ChainEntry ()
 construction
 
ChainEntryfind (const UaNodeId &key, ChainEntry **ppPrevious)
 finds the right entry in the chain. More...
 
void add (ChainEntry *pNewEntry)
 adds a new entry to the list. More...
 
void prepend (ChainEntry *pNewEntry)
 prepends a new entry to the list. More...
 
ChainEntryremove (const UaNodeId &key, ChainEntry **ppNext)
 removes an entry from the list. More...
 
ChainEntrygetNext () const
 Check if there is a chain. More...
 
virtual void setInvalid ()
 Set the entry to invalid. More...
 
void clearChain ()
 Clear the chain when the hashtable is cleared.
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter ()
 construction
 
virtual ~ReferenceCounter ()
 destruction
 
- Public Member Functions inherited from UaReferenceLists
 UaReferenceLists ()
 Constructs the reference lists object.
 
virtual ~UaReferenceLists ()
 Destroys the reference lists object.
 
virtual UaStatus browseReferences (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)
 Discover the references of a specified node of a view. More...
 
virtual UaStatus translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets)
 Find a node based on an element of an relative path. More...
 
virtual const UaReferencepTargetNodes () const
 Returns the list of references to target nodes. More...
 
virtual const UaReferencepSourceNodes () const
 Returns the list of references to source nodes. More...
 
virtual UaNodegetTargetNodeByBrowseName (const UaQualifiedName &browseName) const
 Searches a target node with the passed browse name and returns the UaNode interface if found. More...
 
virtual void addTargetNode (UaReference *pReference)
 Add a reference to a target node where this node is the source node. More...
 
virtual void addSourceNode (UaReference *pReference)
 Adds a reference to a source node where this node is the target node. More...
 
virtual UaStatus removeSourceNode (UaReference *pReferenceToRemove)
 Remove a reference to a source node where this node is the target node. More...
 
virtual bool removeSourceReference (UaReference *pReferenceToRemove)
 Remove the passed reference to a source node. More...
 
virtual UaStatus removeTargetNode (UaNode *pTargetNode, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional)
 Remove a reference to a target node where this node is the source node. More...
 
virtual UaStatus removeTargetNode (const UaNodeId &targetNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional)
 Remove a reference to a target node where this node is the source node. More...
 
virtual bool removeTargetReference (UaReference *pReferenceToRemove)
 Remove the passed reference to a target node. More...
 
virtual UaStatus removeCrossNodeManagerRef (NodeManager *pNodeManager)
 Remove references to another NodeManager. More...
 
virtual UaStatus invalidateSourceReferences (OpcUa_Boolean deleteSourceReferences)
 Set all references from SourceNodes to this Node invalid. More...
 
virtual UaStatus invalidateTargetReferences (OpcUa_Boolean deleteTargetReferences)
 Set all references to TargetNode of this node invalid. More...
 
virtual UaStatus deleteAllChildren (NodeManagerConfig *pNodeManagerConfig)
 Deletes all child nodes. More...
 

Static Public Member Functions

static void createTypes ()
 Create the related type nodes.
 
static void clearStaticMembers ()
 Clear the static members of the class.
 
- Static Public Member Functions inherited from OpcUa::BaseObjectType
static void clearStaticMembers ()
 Clear the static members of the class.
 

Protected Member Functions

virtual ~FileTypeBase ()
 Destruction.
 
- Protected Member Functions inherited from OpcUa::BaseObjectType
virtual ~BaseObjectType ()
 Destruction of the BaseObjectType. More...
 
- Protected Member Functions inherited from UaObject
virtual ~UaObject ()
 Destruction of the UaObject. More...
 
- Protected Member Functions inherited from UaNode
virtual ~UaNode ()
 Destruction of the UaNode. More...
 
- Protected Member Functions inherited from ChainEntry
virtual ~ChainEntry ()
 destruction
 
- Protected Member Functions inherited from UaReferenceLists
virtual UaStatus collectAllChildrenRecursive (NodeManagerConfig *pNodeManagerConfig, NodesToDeleteCollection &nodesToDeleteCollection, int recursionCounter=0)
 Collect a list of all child nodes. More...
 

Additional Inherited Members

- Protected Attributes inherited from UaReferenceLists
UaReferencem_pTargetNodes
 List of references to target nodes where this node is the source node. More...
 
UaReferencem_pLastTargetNode
 Last references in the list of references to the target nodes. More...
 
UaReferencem_pSourceNodes
 List of references to source nodes where this node is the target node. More...
 

Detailed Description

Generated base class for a FileType.

This class contains the generated base code for the object type FileType representing an OPC UA ObjectType. This class is used to create the object type and to create and represent instances of the object type in the server address space.

Variable members of the FileType:

Browse Name DataType TypeDefinition Modelling Rule See Also
MimeType String PropertyType Optional getMimeType, setMimeType
OpenCount UInt16 PropertyType Mandatory getOpenCount, setOpenCount
Size UInt64 PropertyType Mandatory getSize, setSize
UserWritable Boolean PropertyType Mandatory getUserWritable, setUserWritable
Writable Boolean PropertyType Mandatory getWritable, setWritable

This ObjectType defines a type for files.

Note that all methods on a file require a FileHandle, which is returned in the Open method.

See also FileType for a documentation of the complete Information Model.

Constructor & Destructor Documentation

OpcUa::FileTypeBase::FileTypeBase ( UaBase::Object pBaseNode,
XmlUaNodeFactoryManager pFactory,
NodeManagerConfig pNodeConfig,
UaMutexRefCounted pSharedMutex = NULL 
)

Constructs an instance of the class FileTypeBase with all components.

Parameters
[in]pBaseNodeThe "tree" of nodes that specifies the attributes of the instance and its children
[in]pFactoryThe factory to create the children
[in]pNodeConfigInterface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space
[in]pSharedMutexShared mutex object used to synchronize access to the variable. Can be NULL if no shared mutex is provided

Member Function Documentation

UaStatus OpcUa::FileTypeBase::beginCall ( MethodManagerCallback pCallback,
const ServiceContext serviceContext,
OpcUa_UInt32  callbackHandle,
MethodHandle pMethodHandle,
const UaVariantArray inputArguments 
)
virtual

Call method of an UA object.

Implementation of the MethodManager interface method beginCall.

Reimplemented from OpcUa::BaseObjectType.

Reimplemented in OpcUa::TrustListTypeBase, and OpcUa::AddressSpaceFileType.

virtual UaStatus OpcUa::FileTypeBase::Close ( const ServiceContext serviceContext,
OpcUa_UInt32  FileHandle 
)
pure virtual

Closes a file represented by a FileType.

When a client closes a file, the handle becomes invalid.

Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]FileHandleA handle returned by the Open method, indicating the access request and thus indirectly the position inside the file.

Implemented in OpcUa::TrustListType, and OpcUa::FileType.

UaString OpcUa::FileTypeBase::getMimeType ( ) const
virtual

Returns the value of MimeType.

If the optional MimeType node has not been created, the value of the InstanceDeclaration node of the ObjectType is returned.

Contains the media type of the file based on RFC 2046.

OpcUa::PropertyType * OpcUa::FileTypeBase::getMimeTypeNode ( )
virtual

Returns the MimeType node.

If the Variable has not been created yet, this method returns NULL.

Contains the media type of the file based on RFC 2046.

const OpcUa::PropertyType * OpcUa::FileTypeBase::getMimeTypeNode ( ) const
virtual

Returns the MimeType node.

If the Variable has not been created yet, this method returns NULL.

Contains the media type of the file based on RFC 2046.

OpcUa_UInt16 OpcUa::FileTypeBase::getOpenCount ( ) const
virtual

Returns the value of OpenCount.

Indicates the number of currently valid file handles on the file.

OpcUa::PropertyType * OpcUa::FileTypeBase::getOpenCountNode ( )
virtual

Returns the OpenCount node.

Indicates the number of currently valid file handles on the file.

const OpcUa::PropertyType * OpcUa::FileTypeBase::getOpenCountNode ( ) const
virtual

Returns the OpenCount node.

Indicates the number of currently valid file handles on the file.

virtual UaStatus OpcUa::FileTypeBase::GetPosition ( const ServiceContext serviceContext,
OpcUa_UInt32  FileHandle,
OpcUa_UInt64 &  Position 
)
pure virtual

Provides the current position of the FileHandle.

Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]FileHandleA handle returned by the Open method, indicating the access request and thus indirectly the position inside the file.
[out]PositionThe position of the FileHandle in the file.
If Read or Write is called, it starts at that position.

Implemented in OpcUa::FileType.

OpcUa_UInt64 OpcUa::FileTypeBase::getSize ( ) const
virtual

Returns the value of Size.

Defines the size of the file in Bytes.

When a file is opened for writing the size might not be accurate.

OpcUa::PropertyType * OpcUa::FileTypeBase::getSizeNode ( )
virtual

Returns the Size node.

Defines the size of the file in Bytes.

When a file is opened for writing the size might not be accurate.

const OpcUa::PropertyType * OpcUa::FileTypeBase::getSizeNode ( ) const
virtual

Returns the Size node.

Defines the size of the file in Bytes.

When a file is opened for writing the size might not be accurate.

OpcUa_Boolean OpcUa::FileTypeBase::getUserWritable ( ) const
virtual

Returns the value of UserWritable.

Indicates whether the file is writable, taking user access rights into account.

The Property does not take into account whether the file is currently opened for writing by another client and thus currently locked and not writable by others.

OpcUa::PropertyType * OpcUa::FileTypeBase::getUserWritableNode ( )
virtual

Returns the UserWritable node.

Indicates whether the file is writable, taking user access rights into account.

The Property does not take into account whether the file is currently opened for writing by another client and thus currently locked and not writable by others.

const OpcUa::PropertyType * OpcUa::FileTypeBase::getUserWritableNode ( ) const
virtual

Returns the UserWritable node.

Indicates whether the file is writable, taking user access rights into account.

The Property does not take into account whether the file is currently opened for writing by another client and thus currently locked and not writable by others.

OpcUa_Boolean OpcUa::FileTypeBase::getWritable ( ) const
virtual

Returns the value of Writable.

Indicates whether the file is writable.

It does not take any user access rights into account, i.e. although the file is writable this may be restricted to a certain user/user group. The Property does not take into account whether the file is currently opened for writing by another client and thus currently locked and not writable by others.

OpcUa::PropertyType * OpcUa::FileTypeBase::getWritableNode ( )
virtual

Returns the Writable node.

Indicates whether the file is writable.

It does not take any user access rights into account, i.e. although the file is writable this may be restricted to a certain user/user group. The Property does not take into account whether the file is currently opened for writing by another client and thus currently locked and not writable by others.

const OpcUa::PropertyType * OpcUa::FileTypeBase::getWritableNode ( ) const
virtual

Returns the Writable node.

Indicates whether the file is writable.

It does not take any user access rights into account, i.e. although the file is writable this may be restricted to a certain user/user group. The Property does not take into account whether the file is currently opened for writing by another client and thus currently locked and not writable by others.

virtual UaStatus OpcUa::FileTypeBase::Open ( const ServiceContext serviceContext,
OpcUa_Byte  Mode,
OpcUa_UInt32 &  FileHandle 
)
pure virtual

Opens a file represented by an object of FileType.

When a client opens a file, it gets a FileHandle that is valid while the session is open. Clients shall use the Close method to release the handle when they do not need access to the file anymore. Clients can open the same file several times for reading. A request to open for writing shall return Bad_NotWritable when the file is already opened.

Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]ModeIndicates whether the file should be opened only for read operations or for read and write operations and where the initial position is set.
The mode is an 8-bit unsigned integer used as bit mask with the structure defined in the following table:
Field Bit Description
Read 0 The file is opened for reading. If this bit is not set the Read method cannot be executed.
Write 1 The file is opened for writing. If this bit is not set the Write method cannot be executed.
EraseExisting 2 This bit can only be set if the file is opened for writing (Write bit is set). The existing content of the file is erased and an empty file is provided.
Append 3 When the Append bit is set the file is opened at end of the file, otherwise at begin of the file. The SetPosition Method can be used to change the position.
[out]FileHandleA handle for the file used in other method calls indicating not the file (this is done by the object of the method call) but the access request and thus the position in the file.
The FileHandle is generated by the server and is unique for the Session. Clients cannot transfer the FileHandle to another Session but need to get a new FileHandle by calling the Open method.

Implemented in OpcUa::TrustListType, and OpcUa::FileType.

virtual UaStatus OpcUa::FileTypeBase::Read ( const ServiceContext serviceContext,
OpcUa_UInt32  FileHandle,
OpcUa_Int32  Length,
UaByteString Data 
)
pure virtual

Reads a part of the file starting from the current file position.

The file position is advanced by the number of bytes read.

Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]FileHandleA handle returned by the Open method, indicating the access request and thus indirectly the position inside the file.
[in]LengthDefines the length in bytes that should be returned in data, starting from the current position of the file handle.
If the end of file is reached, all data until the end of the file is returned. The Server is allowed to return less data than the specified length. Only positive values are allowed.
[out]DataContains the returned data of the file.
If the ByteString is empty, it indicates that the end of the file is reached.

Implemented in OpcUa::FileType.

void OpcUa::FileTypeBase::setMimeType ( const UaString MimeType)
virtual

Sets the MimeType value.

If the optional MimeType node has not been created, this method adds it to the address space.

Contains the media type of the file based on RFC 2046.

void OpcUa::FileTypeBase::setOpenCount ( OpcUa_UInt16  OpenCount)
virtual

Sets the OpenCount value.

Indicates the number of currently valid file handles on the file.

virtual UaStatus OpcUa::FileTypeBase::SetPosition ( const ServiceContext serviceContext,
OpcUa_UInt32  FileHandle,
OpcUa_UInt64  Position 
)
pure virtual

Sets the current position of the FileHandle.

Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]FileHandleA handle indicating the access request and thus indirectly the position inside the file.
[in]PositionThe position to be set for the FileHandle in the file.
If Read or Write is called, it starts at that position. If the position is higher than the file size, the position is set to the end of the file.

Implemented in OpcUa::FileType.

void OpcUa::FileTypeBase::setSize ( OpcUa_UInt64  Size)
virtual

Sets the Size value.

Defines the size of the file in Bytes.

When a file is opened for writing the size might not be accurate.

void OpcUa::FileTypeBase::setUserWritable ( OpcUa_Boolean  UserWritable)
virtual

Sets the UserWritable value.

Indicates whether the file is writable, taking user access rights into account.

The Property does not take into account whether the file is currently opened for writing by another client and thus currently locked and not writable by others.

void OpcUa::FileTypeBase::setWritable ( OpcUa_Boolean  Writable)
virtual

Sets the Writable value.

Indicates whether the file is writable.

It does not take any user access rights into account, i.e. although the file is writable this may be restricted to a certain user/user group. The Property does not take into account whether the file is currently opened for writing by another client and thus currently locked and not writable by others.

void OpcUa::FileTypeBase::useAccessInfoFromInstance ( FileTypeBase pOther)

Uses the NodeAccessInfo of pOther and its children.

void OpcUa::FileTypeBase::useAccessInfoFromType ( )
virtual

Applys the NodeAccessInfo set at the FileTypeBase and its children.

Reimplemented from OpcUa::BaseObjectType.

Reimplemented in OpcUa::TrustListTypeBase, and OpcUa::AddressSpaceFileType.

virtual UaStatus OpcUa::FileTypeBase::Write ( const ServiceContext serviceContext,
OpcUa_UInt32  FileHandle,
UaByteString Data 
)
pure virtual

Writes a part of the file starting from the current file position.

The file position is advanced by the number of bytes written

Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]FileHandleA handle returned by the Open method, indicating the access request and thus indirectly the position inside the file.
[in]DataContains the data to be written at the position of the file.
It is server-dependent whether the written data are persistently stored if the session is ended without calling the Close method with the FileHandle.
Writing an empty or null ByteString returns a Good result code without any effect on the file.

Implemented in OpcUa::FileType.


The documentation for this class was generated from the following files: