Documentation:Tutorial:APIs - MdsWiki
Navigation
Personal tools

From MdsWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 10:52, 4 December 2019 (edit)
Zack-vii (Talk | contribs)

← Previous diff
Revision as of 07:40, 24 October 2022 (edit)
Manduchi (Talk | contribs)

Next diff →
Line 1: Line 1:
In the first lesson we have seen how to create and fill a MDSplus tree. It is worth noting that in the real world most data in the tree will be written by data acquisition or elaboration programs. Only configuration data and set-up parameters will be stored in the tree using TCL or jTraverser. In the first lesson we have seen how to create and fill a MDSplus tree. It is worth noting that in the real world most data in the tree will be written by data acquisition or elaboration programs. Only configuration data and set-up parameters will be stored in the tree using TCL or jTraverser.
- 
-<font face="Arial">In this lesson, we'll learn:</font> 
- 
-# <font face="Arial">How to export your MDSplus trees to the world;</font> 
-# <font face="Arial">How to read/write data into MDSPlus trees using Matlab, IDL, Fortran and C.</font> 
'''IMPORTANT''': please note the this section describes the old data access interface of MDSplus. C++, Java and Python programmers are recommended to use the Object Oriented interface of MDSplus described in the next section. MATLAB programmers may decide to use either the interface described in this chapter or to take advantage of the Java Object Oriented interface since MATLAB allows a direct interface to Java objects (more on this in the next section). There are no plans to port the IDL interface to the new one (IDL does not support a true OO interface), while volunteers are expected to start the porting of the new interface to F90.<br /> '''IMPORTANT''': please note the this section describes the old data access interface of MDSplus. C++, Java and Python programmers are recommended to use the Object Oriented interface of MDSplus described in the next section. MATLAB programmers may decide to use either the interface described in this chapter or to take advantage of the Java Object Oriented interface since MATLAB allows a direct interface to Java objects (more on this in the next section). There are no plans to port the IDL interface to the new one (IDL does not support a true OO interface), while volunteers are expected to start the porting of the new interface to F90.<br />
Line 10: Line 5:
For most users, accessing MDSplus data represents all the required knowledge for using MDSplus. In fact, except for people working in data acquisition, looking at acquired waveforms and developing or running analysis programs are the operations routinely executed by physicists and engineers. For most users, accessing MDSplus data represents all the required knowledge for using MDSplus. In fact, except for people working in data acquisition, looking at acquired waveforms and developing or running analysis programs are the operations routinely executed by physicists and engineers.
- 
----- 
- 
-Exporting MDSplus trees to the world 
- 
-<font face="Arial">One of the key features of MDSplus is the ability of exporting the contents of MDSplus trees (and not only) over the network in a transparent way. So, you can see your data on any computer connected to the network in quite the same way you would do if you were working on the computer hosting the tree.</font> 
- 
-<font face="Arial">Remote data access is achieved via the '''mdsip''' protocol, a TCP/IP based protocol which allows remote expression evaluation. As you already know, in MDSPlus everything is an expression. Therefore, to access data, it suffices to evaluate an expression consisting in the reference to a tree node. You can do more, of course, such as evaluating an arbitrary expression involving more than one tree node.</font> 
- 
-<font face="Arial">Being based on TCP/IP, the mdsip protocol uses one port number. The default port for mdsip is 8000, but is can be changed in the case that port is used for some other service.</font> 
- 
-<font face="Arial">To export data, you need to start a mdsip server on the computer hosting the MDSPlus tree. If you installed MDSplus on a Windows system, all you need is to press ''Start-&gt;Programs-&gt;MDSplus-&gt;DataServer-&gt;Install mdsip service. ''At this point the mdsip server is activated as a Windows service, and you can forget about it.</font> 
- 
-<font face="Arial">You can activate the mdsip server manually, provided your PATH environment variable includes also the directory containing the program mdsip (for Windows usually ''Program Files\MDSplus'', on Unix usually ''/usr/local/mdsplus/bin''), with the command:</font> 
- 
-'''<font face="Arial">mdsip -p 8000 -m -h mdsip.hosts</font>''' 
- 
-<font face="Arial">where flag '''-p''' indicates the port number to which the mdsip server listens to, and flag '''-h''' indicates the protection file. The default mdsip.hosts file, provided with the MDSplus distribution allows access to everybody from everywhere. You can define some restrictions in data access by changing the content of the mdsip.hosts file (the default mdsip.hosts file includes a brief description of the required syntax). For example,</font> 
- 
-* '''<font face="Arial">jas@oak.pfc.mit.edu | MDSPLUS</font>'''<br /><font face="Arial"> indicates that user ''jas'' has access permission from node ''oak.pfc.mit.edu ''and the same local permission of local user MDSPLUS<br /></font> 
-* <font face="Arial">'''''<nowiki>*@</nowiki>''132.169.8.* | nobody '''<br /> indicates that every user from subnet 132.169.8 has access with the same local permission of user nobody.</font> 
- 
-<font face="Arial">In general, the name to the left of '''@''' indicates the remote user, the name to the right of '''@''' and to the left of '''<nowiki>|</nowiki>''' indicates the IP address of the remote node (wildchars can be used for both), and the name to the right of '''<nowiki>|</nowiki>''' indicates the privileges on the server, taken from that of the specified username (this last feature is available only under UNIX).</font> 
- 
-Note that the remote user name is provided by the connecting client and not verified, so you can not use it for authentication. 
- 
-<font face="Arial">To connect to a mdsip server, MDSplus clients need to specify the IP address (and optionally the port) of the mdsip server. We shall see in the rest of this lesson how to access remote or local data through jScope or through a programming language</font> 

Revision as of 07:40, 24 October 2022

In the first lesson we have seen how to create and fill a MDSplus tree. It is worth noting that in the real world most data in the tree will be written by data acquisition or elaboration programs. Only configuration data and set-up parameters will be stored in the tree using TCL or jTraverser.

IMPORTANT: please note the this section describes the old data access interface of MDSplus. C++, Java and Python programmers are recommended to use the Object Oriented interface of MDSplus described in the next section. MATLAB programmers may decide to use either the interface described in this chapter or to take advantage of the Java Object Oriented interface since MATLAB allows a direct interface to Java objects (more on this in the next section). There are no plans to port the IDL interface to the new one (IDL does not support a true OO interface), while volunteers are expected to start the porting of the new interface to F90.


For most users, accessing MDSplus data represents all the required knowledge for using MDSplus. In fact, except for people working in data acquisition, looking at acquired waveforms and developing or running analysis programs are the operations routinely executed by physicists and engineers.