summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMagnus Lundborg <magnus.lundborg@scilifelab.se>2012-12-06 15:42:03 (GMT)
committerMagnus Lundborg <magnus.lundborg@scilifelab.se>2012-12-06 15:42:03 (GMT)
commit8fe357f71f6e82e55004871a2f33547e6646af4b (patch)
tree61dfa52400e5a2d7fa25c7f80164da6f62f9fd4f /src
parentc5303b7b61cf6e5aa4d8936f428a64e5f14787ed (diff)
Added a few more functions to the API
Diffstat (limited to 'src')
-rw-r--r--src/lib/tng_io.c39
-rw-r--r--src/lib/tng_io.h62
2 files changed, 100 insertions, 1 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c
index c99cd18..e82f1bb 100644
--- a/src/lib/tng_io.c
+++ b/src/lib/tng_io.c
@@ -6867,6 +6867,7 @@ tng_function_status tng_traj_block_write(tng_trajectory_t tng_data,
tng_function_status tng_frame_set_read_nr(tng_trajectory_t tng_data,
int64_t frame_set_nr)
{
+ /* STUB */
return(TNG_SUCCESS);
}
@@ -6887,6 +6888,44 @@ tng_function_status tng_frame_write_interval(tng_trajectory_t tng_data,
}
+tng_function_status tng_data_get(tng_trajectory_t tng_data,
+ int64_t block_id,
+ union data_values ***values)
+{
+ /* STUB */
+ return(TNG_SUCCESS);
+}
+
+tng_function_status tng_data_interval_get(tng_trajectory_t tng_data,
+ int64_t block_id,
+ int64_t start_frame_nr,
+ int64_t end_frame_nr,
+ union data_values ***values)
+{
+ /* STUB */
+ return(TNG_SUCCESS);
+}
+
+tng_function_status tng_particle_data_get(tng_trajectory_t tng_data,
+ int64_t block_id,
+ union data_values ****values)
+{
+ /* STUB */
+ return(TNG_SUCCESS);
+}
+
+tng_function_status tng_particle_data_interval_get(tng_trajectory_t tng_data,
+ int64_t block_id,
+ int64_t start_frame_nr,
+ int64_t end_frame_nr,
+ int64_t first_particle_number,
+ int64_t last_particle_number,
+ union data_values ****values)
+{
+ /* STUB */
+ return(TNG_SUCCESS);
+}
+
tng_function_status tng_time_get_str(tng_trajectory_t tng_data,
char *time)
{
diff --git a/src/lib/tng_io.h b/src/lib/tng_io.h
index 785f636..2fde9ac 100644
--- a/src/lib/tng_io.h
+++ b/src/lib/tng_io.h
@@ -684,7 +684,7 @@ tng_function_status tng_frame_read_interval(tng_trajectory_t tng_data,
/* Write a number of consecutive trajectory frames to the output_file of tng_data.
tng_data is a trajectory data container. tng_data->output_file_path specifies which
- file to write to. If the file (input_file) is not open it will be opened.
+ file to write to. If the file (output_file) is not open it will be opened.
start_frame_nr is the index number of the first frame to write.
end_frame_nr is the index number of the last frame to write.
Returns TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
@@ -693,6 +693,66 @@ tng_function_status tng_frame_write_interval(tng_trajectory_t tng_data,
int64_t start_frame_nr,
int64_t end_frame_nr);
+/* Read and retrieve non-particle data from the last read frame set.
+ tng_data is a trajectory data container. tng_data->input_file_path specifies which
+ file to read from. If the file (input_file) is not open it will be opened.
+ block_id is the id number of the data block to read.
+ ***values is a pointer to a 2-dimensional array (memory unallocated), which will
+ be filled with data. The array will be sized (n_frames * n_values_per_frame).
+ Returns TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
+ has occurred or TNG_CRITICAL (2) if a major error has occured. */
+tng_function_status tng_data_get(tng_trajectory_t tng_data,
+ int64_t block_id,
+ union data_values ***values);
+
+/* Read and retrieve non-particle data, in a specific interval, from the trajectory.
+ tng_data is a trajectory data container. tng_data->input_file_path specifies which
+ file to read from. If the file (input_file) is not open it will be opened.
+ block_id is the id number of the data block to read.
+ start_frame_nr is the index number of the first frame to read.
+ end_frame_nr is the index number of the last frame to read.
+ ***values is a pointer to a 2-dimensional array (memory unallocated), which will
+ be filled with data. The array will be sized (n_frames * n_values_per_frame).
+ Returns TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
+ has occurred or TNG_CRITICAL (2) if a major error has occured. */
+tng_function_status tng_data_interval_get(tng_trajectory_t tng_data,
+ int64_t block_id,
+ int64_t start_frame_nr,
+ int64_t end_frame_nr,
+ union data_values ***values);
+
+/* Read and retrieve particle data, in a specific interval, from the last read frame set.
+ tng_data is a trajectory data container. tng_data->input_file_path specifies which
+ file to read from. If the file (input_file) is not open it will be opened.
+ block_id is the id number of the particle data block to read.
+ ****values is a pointer to a 3-dimensional array (memory unallocated), which will
+ be filled with data. The array will be sized (n_frames * n_particles * n_values_per_frame).
+ Returns TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
+ has occurred or TNG_CRITICAL (2) if a major error has occured. */
+tng_function_status tng_particle_data_get(tng_trajectory_t tng_data,
+ int64_t block_id,
+ union data_values ****values);
+
+/* Read and retrieve particle data, in a specific interval, from the trajectory.
+ tng_data is a trajectory data container. tng_data->input_file_path specifies which
+ file to read from. If the file (input_file) is not open it will be opened.
+ block_id is the id number of the particle data block to read.
+ start_frame_nr is the index number of the first frame to read.
+ end_frame_nr is the index number of the last frame to read.
+ first_particle_number is the number of the first particle, for which to retrive data.
+ last_particle_number is the number of the last particle, for which to retrieve data.
+ ****values is a pointer to a 3-dimensional array (memory unallocated), which will
+ be filled with data. The array will be sized (n_frames * n_particles * n_values_per_frame).
+ Returns TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
+ has occurred or TNG_CRITICAL (2) if a major error has occured. */
+tng_function_status tng_particle_data_interval_get(tng_trajectory_t tng_data,
+ int64_t block_id,
+ int64_t start_frame_nr,
+ int64_t end_frame_nr,
+ int64_t first_particle_number,
+ int64_t last_particle_number,
+ union data_values ****values);
+
/* Get the date and time of initial file creation in ISO format (string).
tng_data is a trajectory data container.
*time is a pointer to the string in which the date will be stored. Memory
contact: Jan Huwald // Impressum