mdsplus
mdsplus copied to clipboard
Add DbiTREE_VERSION, add version to `show db`
Add DbiTREE_VERSION, which returns db->info->header->version
Add the tree file format version number to the output of mdstcl show db
Example:
TCL> set tree oldtree
TCL> set tree newtree
TCL> show db
000 NEWTREE shot: -1 [\NEWTREE::TOP] version: 2
001 OLDTREE shot: -1 [\OLDTREE::TOP] version: 1
A test is a good idea. I'm going to add in tdi/python/etc before I merge this. I need to propagate the DBI constant if nothing else. I'd like to add Tree.version
in python too.
@zack-vii This should now include the tdi, python, c++, and java interfaces too I would love some guidance on setting up tests for this, any references or instructions would be welcome
>>> import MDSplus
>>> t = MDSplus.Tree('oldtree')
>>> t.tree_version
1
TDI> TreeOpen('oldtree')
TDI> GetDbi('TREE_VERSION')
1
@GabrieleManduchi I've updated the C++ and Java APIs to have access to this new DBI, but I'm not 100% sure what I'm doing, I would love a code review of those sections.