Products Downloads


French version


 

Directions assigned to method parameters:

(I)

Input

(O)

Output

(I/O)

Input and Output

List of the return codes for the various methods:

_DTX_ERR_OK

Method run successfully.

_DTX_ERR_TYPE

One or more of the method's variables is the wrong Adelia type.

_DTX_ERR_NON_CONNECTION

Object not connected.

_DTX_ERR_EXEC

Anomaly during execution (this should never happen).

_DTX_ERR_PARAM 

One or more invalid parameters.

_DTX_ERR_VAR_NOT_AVAIL

The data objects to be read do not contain data of the specified Adelia type.

_DTX_ERR_STRING_LEN

The data objects to be read contain a character string longer than the Adelia variable.

_DTX_ERR_TIMEOUT

When the VALIDATE method was being used in synchronous mode, a data exchange object exceeded the allowed response time.

_DTX_ERR_REENTRANCY

A call to the VALIDATE method has been made in synchronous mode whereas a previous call in synchronous mode was running.

This method clears the data being built: any data added by the WRITE method since the last time the VALIDATE method was called will be ignored when the VALIDATE method is next called.

Syntax

CALL_METHOD NameDataExchangeObject CANCEL ReturnCode

Parameters

ReturnCode (O)

NUM_BIN_4

Return code for the method.

Possible values:

_DTX_ERR_OK

_DTX_ERR_EXEC

Conditions for use

None

 

 

Connects the object to all objects on the machine that manage the same data name. If the DataReception parameter is set to *TRUE, the current data item will be available, allowing it to be read by the object. Additionally, the object will then receive an event whenever the data changes, with the reading method supplying the new data.

If the object is already connected, the new value of the DataReception parameter is validated.

Specifically, if the object connects without data reception, where it was previously connected with data reception, the data available at the time of the change can still be read by the object, but are no longer replaced by new data.

Syntax

CALL_METHOD NameDataExchangeObject CONNECT DataReception ReturnCode

Parameters

DataReception (I)

BOOL

Reception or non-reception of new data and occurrence of an event in the object following a data change (when the VALIDATE method is used).

ReturnCode (O)

NUM_BIN_4

Return code for the method.

Possible values:

_DTX_ERR_OK

_DTX_ERR_EXEC

Conditions for use

None

Detaches the object from the set of objects managing a given data name. The object can no longer receive events or read the data.

Syntax

CALL_METHOD NameDataExchangeObject DISCONNECT ReturnCode

Parameters

ReturnCode (O)

NUM_BIN_4

Return code for the method.

Possible values:

_DTX_ERR_OK

_DTX_ERR_EXEC

Conditions for use

None

 

 

This method sets the value of Adelia variables by reading the available data. It must be used in a loop to run through all the data for a given Adelia type. All the data for a given type are read when the number of data items read is less than the number of data items to be read. Note that no distinction is made between packed and extended numeric variables, however long they are and however many decimal places they have. The values of numeric or extended variables may be truncated when they are read. In the case of strings, the operation will fail if the Adelia variable is too small to contain the string being read.

Syntax

CALL_METHOD NameDataExchangeObject READ AdeliaVariable Index DataNumber ReturnCode

Parameters

AdeliaVariable (O)

ALPHA, DATE, TIME, NUM_P, NUM_E, NUM_BIN_2, NUM_BIN_4, BOOL, TIMESTAMP, IMAGE

Variable or array.

Index (I)

NUM_BIN_4

Index of the data to be read for a given type. The first data item takes the index '1'.

DataNumber (I/O)

NUM_BIN_4

Number of data objects to be read. With variables, this parameter must be 1, and with arrays, less than or equal to the number of elements in the array. Once the method has been called, it contains the number of data objects read.

ReturnCode (O)

NUM_BIN_4

Return code for the method.

Possible values:

_DTX_ERR_OK

_DTX_ERR_TYPE

_DTX_ERR_PARAM

_DTX_ERR_EXEC

_DTX_ERR_NON_CONNECTION

_DTX_ERR_STRING_LEN

_DTX_ERR_VAR_NOT_AVAIL

Conditions for use

None

Makes the data being built available to all the objects managing the same data name. These data objects become the current data objects. The connected objects authorized to receive events receive a data change event. The data being built in the object from which the method is called are erased.

If the validation is made in asynchronous mode, the Adelia source code that follows the VALIDATE method call is immediately run after the call. The DataChange events received by the Data exchange objects are triggered later, whether or not the object belong to the same process.

On the contrary, if the validation is made in synchronous mode, the Adelia source code that follows the call to the VALIDATE method is run only when all Data exchange objects have received and managed the DataChange event, whether or not these objects belong to the same event.

In this case, the VALIDATE method can fail because of an exceeded timeout.

Syntax

CALL_METHOD NameDataExchangeObject VALIDATE ReturnCode

Parameters

ReturnCode (O)

NUM_BIN_4

Return code for the method.

Possible values:

_DTX_ERR_OK

_DTX_ERR_EXEC

_DTX_ERR_NON_CONNECTION

_DTX_ERR_TIMEOUT (in synchronous mode)

_DTX_ERR_REENTRANCY (in synchronous mode)

Conditions for use

The object must be connected.

 

 

 

 

Adds data (i.e. the contents of the Adelia variables) to the data being built. These data are not yet available to the other objects managing the same data name. These data are stored in the object until the next validate or cancel operation. Note that no distinction is made between packed and extended numeric variables.

Syntax

CALL_METHOD NameDataExchangeObject WRITE AdeliaVariable DataNumber ReturnCode

Parameters

AdeliaVariable (I)

ALPHA, DATE, TIME, NUM_P, NUM_E, NUM_BIN_2, NUM_BIN_4, BOOL, TIMESTAMP, IMAGE

Variable or array.

DataNumber (I/O)

NUM_BIN_4

Number of data objects to be added. With variables, this parameter must be '1', and with arrays, less than or equal to the number of elements in the array. Once the method has been called, it contains the number of data objects written.

ReturnCode (O)

NUM_BIN_4

Return code for the method.

Possible values:

_DTX_ERR_OK

_DTX_ERR_TYPE

_DTX_ERR_PARAM

_DTX_ERR_EXEC

Conditions for use

None.

 

 

 

 Click here to see an example >>

 

 

 

 

↑ Top of page