Errata exists for this version of the document.
This ObjectType defines a type for the representation of temporary file transfers. It is formally defined in Table C.13. The Methods GenerateFileForRead or GenerateFileForWrite generate a temporary FileType Object that is not browsable in the AddressSpace and can only be accessed with the NodeId and FileHandle returned by the Methods in the same Session. This Object is used to transfer the temporary file between OPC UA Client and Server.
Table C.13 – TemporaryFileTransferType
Attribute |
Value |
|||||
BrowseName |
TemporaryFileTransferType |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Modelling Rule |
|
Subtype of the BaseObjectType defined in 6.2. |
||||||
HasProperty |
Variable |
ClientProcessingTimeout |
Duration |
PropertyType |
Mandatory |
|
HasComponent |
Method |
GenerateFileForRead |
Defined in C.4.3 |
Mandatory |
||
HasComponent |
Method |
GenerateFileForWrite |
Defined in C.4.4 |
Mandatory |
||
HasComponent |
Method |
CloseAndCommit |
Defined in C.4.5 |
Mandatory |
||
HasComponent |
Object |
<TransferState> |
|
FileTransferStateMachineType |
OptionalPlaceholder |
The Property ClientProcessingTimeout defines the maximum time in milliseconds the Server accepts between Method calls necessary to complete a file read transfer or a file write transfer transaction. This includes the Method calls to read or write the file content from the virtual temporary FileType Object. If the Client exceeds the timeout between Method calls, the Server may close the file and cancel the corresponding transfer transaction. Any open temporary transfer file shall be deleted if the Session used to create the file is no longer valid.
The TransferState Objects are used to expose the state of a transfer transaction in the case that the preparation of a file for reading or the processing of the file after writing completes asynchronous after the corresponding Method execution. If the transactions are completed when the Method is returned, the optional TransferState Objects are not available. A Server may allow more than one parallel read transfer. A Server may not allow more than one write transfer or a parallel read and writer transfer.
The sequence of Method calls necessary to execute a read file transfer transaction is illustrated in Figure C.2.
Figure C.2 – Read File Transfer Example Sequence
The read file transfer transaction is started with the Method GenerateFileForRead defined by the TemporaryFileTransferType. After a successful call of this Method, the Client reads the file content by calling the Method Read defined by the FileType until the whole file is transferred from the Server to the Client. The transaction is completed by calling the Method Close defined by the FileType.
The sequence of Method calls necessary to execute a write file transfer transaction is illustrated in Figure C.3.
Figure C.3 – Write File Transfer Example Sequence
The write file transfer transaction is started with the Method StartWriteTransfer defined by the TemporaryFileTransferType. After a successful call of this Method, the Client writes the file content by calling the Method Write defined by the FileType until the whole file is transferred from the Client to the Server. The transaction is completed by calling the Method CloseAndCommit defined by the TemporaryFileTransferType. If the Client wants to abort the operation it uses the Close Method of the temporary FileType Object.
GenerateFileForRead is used to start the read file transaction. A successful call of this Method creates a temporary FileType Object with the file content and returns the NodeId of this Object and the file handle to access the Object.
Signature
GenerateFileForRead(
[in] BaseDataType generateOptions
[out] NodeId fileNodeId
[out] UInt32 fileHandle
[out] NodeId completionStateMachine
);
Argument |
Description |
generateOptions |
The optional parameter can be used to specify server specific file generation options. To allow such options, the Server shall specify a concrete DataType in the Argument Structure for this argument in the instance of the Method. If the DataType is BaseDataType, the Client shall pass Null for this argument. Examples for concrete DataTypes are OptionsSetUsed to provide a bit mask for file content selection String Can be used to provide a string filter or a regular expression StructureCan be used to provide a structure with create settings e.g. to create a report EnumerationCan be used to provide a list of options |
fileNodeId |
NodeId of the temporary file. |
fileHandle |
The fileHandle of the opened TransferFile. The fileHandle can be used to access the TransferFile Methods Read and Close. |
completionStateMachine |
If the creation of the file is completed asynchronous, the parameter returns the NodeId of the corresponding FileTransferStateMachineType Object. If the creation of the file is already completed, the parameter is null. If a FileTransferStateMachineType Object NodeId is returned, the Read Method of the file fails until the TransferState changed to ReadTransfer. |
Method Result Codes (defined in Call Service)
Result Code |
Description |
Bad_UserAccessDenied |
See OPC 10000-4 for a general description. |
Table C.14 specifies the AddressSpace representation for the GenerateFileForRead Method.
Table C.14 – GenerateFileForRead Method AddressSpace Definition
Attribute |
Value |
||||
BrowseName |
GenerateFileForRead |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
HasProperty |
Variable |
InputArguments |
Argument[] |
PropertyType |
Mandatory |
HasProperty |
Variable |
OutputArguments |
Argument[] |
PropertyType |
Mandatory |
GenerateFileForWrite is used to start the write file transaction. A successful call of this Method creates a temporary FileType Object and returns the NodeId of this Object and the file handle to access the Object.
Signature
GenerateFileForWrite(
[in] BaseDataTypegenerateOptions
[out] NodeId fileNodeId
[out] UInt32 fileHandle
);
Argument |
Description |
generateOptions |
The optional parameter can be used to specify server specific file generation options. To allow such options, the Server shall specify a concrete DataType in the Argument Structure for this argument in the instance of the Method. If the DataType is BaseDataType, the Client shall pass Null for this argument. Examples for concrete DataTypes are OptionsSetUsed to provide a bit mask for file use selection StructureCan be used to provide a structure with create settings e.g. firmware update settings EnumerationCan be used to provide a list of options like file handling options |
fileNodeId |
NodeId of the temporary file. |
fileHandle |
The fileHandle of the opened TransferFile. The fileHandle can be used to access the TransferFile Methods Write and Close. |
Method Result Codes (defined in Call Service)
Result Code |
Description |
Bad_UserAccessDenied |
See OPC 10000-4 for a general description. |
Table C.15 specifies the AddressSpace representation for the GenerateFileForWrite Method.
Table C.15 – GenerateFileForWrite Method AddressSpace Definition
Attribute |
Value |
||||
BrowseName |
GenerateFileForWrite |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
HasProperty |
Variable |
InputArguments |
Argument[] |
PropertyType |
Mandatory |
HasProperty |
Variable |
OutputArguments |
Argument[] |
PropertyType |
Mandatory |
CloseAndCommit is used to apply the content of the written file and to delete the temporary file after the completion of the transaction.
Signature
CloseAndCommit(
[in] UInt32 fileHandle
[out] NodeId completionStateMachine
);
Argument |
Description |
fileHandle |
The fileHandle used to write the file. |
completionStateMachine |
If the processing of the file is completed asynchronous, the parameter returns the NodeId of the corresponding FileTransferStateMachineType Object. If the processing of the file is already completed, the parameter is null. If a FileTransferStateMachineType Object NodeId is returned, the processing is in progress until the TransferState changed to Idle. |
Method Result Codes (defined in Call Service)
Result Code |
Description |
Bad_UserAccessDenied |
See OPC 10000-4 for a general description. |
Table C.16 specifies the AddressSpace representation for the CloseAndCommit Method.
Table C.16 – CloseAndCommit Method AddressSpace Definition
Attribute |
Value |
||||
BrowseName |
CloseAndCommit |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
HasProperty |
Variable |
InputArguments |
Argument[] |
PropertyType |
Mandatory |
HasProperty |
Variable |
OutputArguments |
Argument[] |
PropertyType |
Mandatory |
The states of the file transfer state machine are shown in Figure C.4.
Figure C.4 – File Transfer States
The FileTransferStateMachineType and the related type are illustrated in Figure C.5.
Figure C.5 – FileTransferStateMachineType
This ObjectType defines the StateMachine for asynchronous processing of temporary file transfers. It is formally defined in Table C.17.
Table C.17 – FileTransferStateMachineType
Attribute |
Value |
|||||
BrowseName |
FileTransferStateMachineType |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Modelling Rule |
|
Subtype of the FiniteStateMachineType defined in B.4.5. |
||||||
HasComponent |
Object |
Idle |
|
InitialStateType |
|
|
HasComponent |
Object |
ReadPrepare |
|
StateType |
|
|
HasComponent |
Object |
ReadTransfer |
|
StateType |
|
|
HasComponent |
Object |
ApplyWrite |
|
StateType |
|
|
HasComponent |
Object |
Error |
|
StateType |
|
|
HasComponent |
Object |
IdleToReadPrepare |
|
TransitionType |
|
|
HasComponent |
Object |
ReadPrepareToReadTransfer |
|
TransitionType |
|
|
HasComponent |
Object |
ReadTransferToIdle |
|
TransitionType |
|
|
HasComponent |
Object |
IdleToApplyWrite |
|
TransitionType |
|
|
HasComponent |
Object |
ApplyWriteToIdle |
|
TransitionType |
|
|
HasComponent |
Object |
ReadPrepareToError |
|
TransitionType |
|
|
HasComponent |
Object |
ReadTransferToError |
|
TransitionType |
|
|
HasComponent |
Object |
ApplyWriteToError |
|
TransitionType |
|
|
HasComponent |
Object |
ErrorToIdle |
|
TransitionType |
|
|
HasComponent |
Method |
Reset |
Defined in C 4.7 |
|
Table C.18 – FileTransferStateMachineType transitions
BrowseName |
References |
BrowseName |
TypeDefinition |
|
|||
Transitions |
|||
IdleToReadPrepare |
FromState |
Idle |
StateType |
|
ToState |
ReadPrepare |
StateType |
|
HasEffect |
TransitionEventType |
|
ReadPrepareToReadTransfer |
FromState |
ReadPrepare |
StateType |
|
ToState |
ReadTransfer |
StateType |
|
HasEffect |
TransitionEventType |
|
ReadTransferToIdle |
FromState |
ReadTransfer |
StateType |
|
ToState |
Idle |
StateType |
|
HasEffect |
TransitionEventType |
|
IdleToApplyWrite |
FromState |
Idle |
StateType |
|
ToState |
ApplyWrite |
StateType |
|
HasEffect |
TransitionEventType |
|
ApplyWriteToIdle |
FromState |
ApplyWrite |
StateType |
|
ToState |
Idle |
StateType |
|
HasEffect |
TransitionEventType |
|
ReadPrepareToError |
FromState |
ReadPrepare |
StateType |
|
ToState |
Error |
StateType |
|
HasEffect |
TransitionEventType |
|
ReadTransferToError |
FromState |
ReadTransfer |
StateType |
|
ToState |
Error |
StateType |
|
HasEffect |
TransitionEventType |
|
ApplyWriteToError |
FromState |
ApplyWrite |
StateType |
|
ToState |
Error |
StateType |
|
HasEffect |
TransitionEventType |
|
ErrorToIdle |
FromState |
Error |
StateType |
|
ToState |
Idle |
StateType |
|
HasEffect |
TransitionEventType |
|
Reset is used to reset the Error state of a FileTransferStateMachineType Object.
Signature
Reset();