Methods, Addtarget, Cleartargets – Echelon OpenLNS User Manual

Page 352

Advertising
background image

OpenLNS Programmer's Reference

315

TxTimeOut

Methods

The

FileTransfer object

contains the following methods

:

AddTarget

ClearTargets

ReadFile

WriteFile

AddTarget

Summary

Adds a target application device to the file transfer target

list

.

Currently, you can perform file transfer implicitly without

the use of a previously defined connection by the OpenLNS

Server with only one device at a time. Once you have added

an app device to the FileTransfer object’s target list with this

method, you can write files to the app device with the

WriteFile method, or you can read from the files on the app

device with the ReadFile method.
You can also access information concerning the files stored on

the device such as the number of files on the device, the size

of each file on the device, and the type of each file on the

device, by referencing the index number assigned to the app

device in the target list and reading properties of the

FileTransfer object such as the FileCount, FileSize, and

FileType properties. The target devices are assigned index

numbers in sequential order as they are added to the target

list with this method, starting with index value 1.
You can write to multiple files at a time, but doing so

requires adding network variables to the OpenLNS Server’s

NSD, and connecting them to the target files. For more

information on this, see the online help for the WriteFile

method.

Availability

Local, full, and lightweight clients.

Syntax

ftObject.AddTarget appDeviceObject

Element

Description

ftObject

The

FileTransfer

object.

appDeviceObject

The

AppDevice

object to add as a

target.

Added to API

Prior to LNS Release 3.0.

ClearTargets

Summary

Clears the file transfer target list

.

After clearing all of the targets, the ReadFile and WriteFile

methods will not function until at least one target is added.

Advertising