DVS::IPlotChunk Class Reference
Last update: 17.04.2023Plot Chunk Interface for DVS Reader API. More...
#include <dvs_plot_chunk_interface.h>
Public Member Functions | |
IPlotChunk ()=default | |
default | |
virtual | ~IPlotChunk ()=default |
default | |
IPlotChunk (IPlotChunk &&)=default | |
default | |
IPlotChunk & | operator= (IPlotChunk &&)=default |
default | |
IPlotChunk (const IPlotChunk &)=default | |
support copying | |
IPlotChunk & | operator= (const IPlotChunk &)=default |
default | |
virtual float | get_time () const =0 |
Get the time for this plot. More... | |
virtual uint32_t | get_rank () const =0 |
Get the rank for the plot. More... | |
virtual const DVS::IObject * | get_object () const =0 |
Get the plot definition this plot chunk is associated with. More... | |
virtual dvs_ret | get_data (uint32_t *num_values, float *x_axis_values, float *y_axis_values)=0 |
Get data for plot chunk. More... | |
Public Member Functions inherited from DVS::IHash | |
IHash ()=default | |
default | |
virtual | ~IHash ()=default |
default | |
IHash (IHash &&)=default | |
default | |
IHash & | operator= (IHash &&)=default |
default | |
IHash (const IHash &)=default | |
support copying | |
IHash & | operator= (const IHash &)=default |
default | |
virtual uint32_t | get_hash_size () const =0 |
Get the size of the hash to use with IHash::get_hash() More... | |
virtual dvs_ret | get_hash (char *hash) const =0 |
Get the hash of the data. More... | |
Detailed Description
Plot Chunk Interface for DVS Reader API.
A Plot Chunk in DVS contains the x/y coordinates for a specific timestep. In general there is only 1 of these across all ranks for a specific time as plots aren't spatially decomposed. Variable information is stored in metadata attached to the referenced plot object. See DVS::IHash for the hash object interface.
Axis title/unit information is stored in metadata on the DVS::IObject interface from IPlotChunk::get_object()
Definition at line 50 of file dvs_plot_chunk_interface.h.
Member Function Documentation
◆ get_data()
|
pure virtual |
Get data for plot chunk.
This method retrieves data for the plot chunk. It should be first called with non nullptr num_values to get the size of the individual x and y axis values arrays. Example usage: DVS::IPlotChunk* plot = //get object instance uint32_t axis_size = 0; if (DVS_NONE == plot->get_data(&axis_size, nullptr, nullptr)) { std::vector<float> x_values(axis_size); std::vector<float> y_values(axis_size); plot->get_data(nullptr, x_values.data(), y_values.data()); }
Error Codes:
- DVS_NONE: No error
- DVS_NO_DATA: Object has no data, should not happen through DVS Reader API
- DVS_PARAM_NULL: All parameters are null. Method will do nothing.
- DVS_INVALID_CACHE: Loading cache failed, possibly invalid cache or invalid permissions
- DVS_DATA_FAILED_LOAD: There was a failure loading data, data is either empty or missing
- DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data
- Parameters
-
[out] num_values if not nullptr returns the number of values for each axis [out] x_axis_values if not nullptr the x axis values, must be of size num_values [out] y_axis_values if not nullptr the y axis values, must be of size num_values
- Returns
- dvs_ret DVS_NONE on no error, see the method description for errors
◆ get_object()
|
pure virtual |
Get the plot definition this plot chunk is associated with.
- Returns
- const DVS::IObject* the object definition
◆ get_rank()
|
pure virtual |
Get the rank for the plot.
Plots are generally sent by 1 rank. Specific plots can be sent from different ranks but across ranks only 1 rank should send plot data for a specific time and plot.
- Returns
- uint32_t the rank this plot is assocaited with (zero based)
◆ get_time()
|
pure virtual |
Get the time for this plot.
- Returns
- float the time this plot is associated with
The documentation for this class was generated from the following file:
- D:/ANSYSDev/NoBackup/branches/EnSight-Second-Coming/ensight/user_defined_src/readers/dvs/include/dvs_plot_chunk_interface.h