Client Example: dump

This example is the simpliest way to understand the communication between GTXserver and a client.

The program scrolls through the Isatis File System to get information on all files and variables.

This example read all numerical Isatis Variable and a compute simple statistics on minimum, mean and maximum.

To launch the dump application, just typ in a shell:

The /home/user/Isatis pathname can be any Isatis File System that the GTXserver have read access.

You can try to run the client to see what happens. If you examine the source code, you will found the main calls used to write a client application.

To connect to the server, the application create a GTXClient object and send it the message to connect: GTXClient.Connect(). The server must already be running and waiting for connection.

As we are connected we can get the list of studies using: GTXClient.GetStudyList(). This function returns the list of studies in the file system.

We then set the name of the current study using: GTXClient.SetStudy(). For each study we can obtain the list of directories with: GTXClient.GetDirectoryList(). and we set the current directory using GTXClient.SetDirectory() for each directory of the list.

We do the same for files and we try to obtain file information using: GTXClient.GetFileInfo() wich returns a GTXFileInfo object containing all information about the file.

We then go to variables and get information by sending the GetVariableInfo() to the current GTXClient session.

If the current variable is a macro variable (available with Isatis v3.2 and up), we get macro indices using GTXClient.GetMacroIndices() and dump them.

Just before exiting, we must disconnect from the server: GTXClient.Disconnect(). The GTXserver application then exits.

$Id: dump.html 395 2000-05-17 10:13:49Z robinot $