.. highlightlang:: us .. index:: Import von TCP5-Dateien .. index:: TCP5-Dateien .. index:: y^import-of-tpc5-files .. _import-of-tpc5-files: Import von TPC5/TPS5-Dateien ============================ Das Addin konvertiert Daten aus dem TPC5- oder TPS5-Format in das UniPlot-Datendateiformat NC2. .. note:: Dieses Addin ist eine Beta-Version. ... .. _installation-tpc5: Installation ------------ * Wählen Sie :ref:`tools-add-in-manager`. * Markieren Sie das Add-In :guilabel:`TPC5-Import`. .. _usage-tpc5: Benutzung --------- * Starten Sie UniPlot. * Wählen Sie :ref:`dateidaten-importieren`. * Wählen Sie den Typ ``TPC5/TPS5-Datei (*.tpc5; *.tps5)`` aus. * Wählen Sie eine oder mehrere TPC5- oder TPS5-Dateien aus. Programmierung -------------- Der Importfilter basiert auf der Dokumentation "TPC5 und TPS5 Datei Spezifikation (TransAS 3) 1.5" der Elsys AG (http://www.elsys.ch) vom 08.10.2012. :: bool = IsFileTPC5(ssName) ret = TPC5_to_netCDF(ssName, ssNetCDFName, hStatus, options) :: file = tpc5_open(ssFile) tpc5_close(file) oMeasurementList = tpc5_get_measurement_list(file) oMeasurement = tpc5_get_measurement(oMeasurementList, idx) oChannelList = tpc5_get_channel_list(oMeasurement) oChannel = tpc5_get_channel(oChannelList, idx) tpc5_get_block_attribs(oChannel, iBlock) rvSize = tpc5_get_block_count(oChannel) data = tpc5_get_block(oChannel, idx) .. _hdf5: HDF5 ^^^^ Das Basis-Dateiformat ist HDF5 (http://www.hdfgroup.org/HDF5/). Die Lizenz für HDF5 finden Sie hier: :ref:`HFD5 Lizenz `. Das UniPlot-Interface enthält aktuell nur Lesefunktionen. **Library Interface**:: rvMajMinRel = h5_get_libversion() **File Interface**:: file_id = h5f_open(name, flags, fapl_id) flags: H5F_ACC_RDONLY fapl_id: H5P_DEFAULT h5f_close(file_id) **Attribute Interface**:: att_id = h5a_open(obj_id, attr_name) err = h5a_close(attr_id) buf = h5a_read(attr_id) n = h5a_get_num_attrs(loc_id) name = h5a_get_name_by_idx(loc_id, idx) **Group Interface**:: id = h5g_open1(loc_id, name) err = h5g_close(group_id) name = h5g_get_objname_by_idx(loc_id, idx) n = h5g_get_num_objs(loc_id) **Object Interface**:: obj_id = h5o_open(loc_id, name) err = h5o_close(obj_id) obj_type = h5o_get_info(object_id) **Dataset Interface**:: dataset_id = h5d_open1(loc_id, name) err = h5d_close(dataset_id) data = h5d_read(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id) H5S_ALL xfer_plist_id: H5P_DEFAULT dataspace = h5d_get_space(dataset_id) **Dataspace Interface**:: dims[1] = 7; dims[2] = 7; space_id = h5s_create_simple(dims) dims = h5s_get_simple_extent_dims(space_id) err = h5s_close(space_id) start[0] = 3; start[1] = 0; count[0] = 3; count[1] = 4; ret = h5s_select_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL) H5S_seloper_t: H5S_SELECT_SET .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Beschreibung * - R2013 - Neu. :sub:`id-1884303`