4 File Transfer Model ToC Previous

4.2 FileType ToC Previous Next

4.2.1 General ToC Previous Next index

This ObjectType defines a type for files. It is formally defined in Table 1.

Table 1 – FileType

Attribute Value
BrowseName FileType
IsAbstract False

Subtype of the BaseObjectType defined in OPC 10000-5

References NodeClass BrowseName DataType TypeDefinition Modelling Rule
HasProperty Variable Size UInt64 PropertyType Mandatory
HasProperty Variable Writable Boolean PropertyType Mandatory
HasProperty Variable UserWritable Boolean PropertyType Mandatory
HasProperty Variable OpenCount UInt16 PropertyType Mandatory
HasProperty Variable MimeType String PropertyType Optional
HasComponent Method Open Defined in 4.2.2 Mandatory  
HasComponent Method Close Defined in 4.2.3 Mandatory  
HasComponent Method Read Defined in 4.2.4 Mandatory  
HasComponent Method Write Defined in 4.2.5 Mandatory  
HasComponent Method GetPosition Defined in 4.2.6 Mandatory  
HasComponent Method SetPosition Defined in 4.2.7 Mandatory  
HasProperty Variable MaxByteStringLength UInt32 PropertyType Optional
HasProperty Variable LastModifiedTime DateTime PropertyType Optional
Conformance Units          
Base Info FileType Base          

Size defines the size of the file in Bytes. When a file is opened for write the size might not be accurate. If the Server can not accurately determine the size of the file, the Size Property shall be returned to a Client with a StatusCode of Bad_NotSupported.

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 consider whether the file is currently opened for writing by another client and thus currently locked and not writable by others.

UserWritable indicates whether the file is writable taking user access rights into account. The Property does not consider whether the file is currently opened for writing by another client and thus currently locked and not writable by others.

OpenCount indicates the number of currently valid file handles on the file.

The optional Property MimeType contains the media type of the file based on RFC 2046.

Note that all Methods on a file require a fileHandle, which is returned in the Open Method.

The optional MaxByteStringLength Property indicates the maximum number of bytes of the read and write buffers. If this Property is not present then the maximum size is defined by the MaxByteStringLength Property of the ServerCapabilitiesType defined in OPC 10000-5.

The optional LastModifiedTime Property indicates the time the file was last modified. The Property shall be updated whenever the Server detects that the file has changed.

Previous Next