FETPAPI 0.3.0.0
This project provides C++ classes which facilitate the developement of ETP1.2 clients and servers.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ETP_NS::FesapiHdfProxy Class Reference
Inheritance diagram for ETP_NS::FesapiHdfProxy:

Public Member Functions

 FesapiHdfProxy (AbstractSession *session, COMMON_NS::DataObjectRepository *repo, const std::string &guid, const std::string &title, const std::string &packageDirAbsolutePath, const std::string &externalFilePath, COMMON_NS::DataObjectRepository::openingMode hdfPermissionAccess)
 
 FesapiHdfProxy (AbstractSession *session, gsoap_resqml2_0_1::_eml20__EpcExternalPartReference *fromGsoap)
 
 FesapiHdfProxy (AbstractSession *session, const COMMON_NS::DataObjectReference &dor)
 
 ~FesapiHdfProxy ()=default
 
AbstractSessiongetSession ()
 
void open () final
 
bool isOpened () const final
 
void close () final
 
COMMON_NS::AbstractObject::numericalDatatypeEnum getNumericalDatatype (const std::string &groupName) final
 
int getHdfDatatypeClassInDataset (const std::string &datasetName) final
 
void writeItemizedListOfList (const std::string &groupName, const std::string &name, COMMON_NS::AbstractObject::numericalDatatypeEnum cumulativeLengthDatatype, const void *cumulativeLength, uint64_t cumulativeLengthSize, COMMON_NS::AbstractObject::numericalDatatypeEnum elementsDatatype, const void *elements, uint64_t elementsSize) final
 
std::vector< uint32_t > getElementCountPerDimension (const std::string &datasetName) final
 
void setCompressionLevel (unsigned int newCompressionLevel) final
 
void writeArrayNd (const std::string &groupName, const std::string &name, COMMON_NS::AbstractObject::numericalDatatypeEnum datatype, const void *values, const uint64_t *numValuesInEachDimension, unsigned int numDimensions) final
 
void createArrayNd (const std::string &groupName, const std::string &name, COMMON_NS::AbstractObject::numericalDatatypeEnum datatype, const uint64_t *numValuesInEachDimension, unsigned int numDimensions) final
 
void writeArrayNdSlab (const std::string &groupName, const std::string &name, COMMON_NS::AbstractObject::numericalDatatypeEnum datatype, const void *values, const uint64_t *numValuesInEachDimension, const uint64_t *offsetValuesInEachDimension, unsigned int numDimensions) final
 
void writeGroupAttributes (const std::string &, const std::vector< std::string > &, const std::vector< std::string > &) final
 
void writeGroupAttribute (const std::string &, const std::string &, const std::vector< std::string > &) final
 
void writeGroupAttributes (const std::string &, const std::vector< std::string > &, const std::vector< double > &)
 
void writeGroupAttributes (const std::string &, const std::vector< std::string > &, const std::vector< int > &) final
 
void writeDatasetAttributes (const std::string &, const std::vector< std::string > &, const std::vector< std::string > &) final
 
void writeDatasetAttribute (const std::string &, const std::string &, const std::vector< std::string > &) final
 
void writeDatasetAttributes (const std::string &, const std::vector< std::string > &, const std::vector< double > &) final
 
void writeDatasetAttributes (const std::string &, const std::vector< std::string > &, const std::vector< int > &) final
 
std::string readStringAttribute (const std::string &, const std::string &) const final
 
std::vector< std::string > readStringArrayAttribute (const std::string &, const std::string &) const final
 
double readDoubleAttribute (const std::string &, const std::string &) const final
 
int64_t readInt64Attribute (const std::string &, const std::string &) const final
 
void readArrayNdOfDoubleValues (const std::string &datasetName, double *values) final
 
void readArrayNdOfDoubleValues (const std::string &datasetName, double *values, uint64_t const *numValuesInEachDimension, uint64_t const *offsetInEachDimension, unsigned int numDimensions) final
 
void readArrayNdOfDoubleValues (const std::string &datasetName, double *values, uint64_t const *blockCountPerDimension, uint64_t const *offsetInEachDimension, uint64_t const *strideInEachDimension, uint64_t const *blockSizeInEachDimension, unsigned int numDimensions) final
 
void selectArrayNdOfValues (const std::string &datasetName, uint64_t const *blockCountPerDimension, uint64_t const *offsetInEachDimension, uint64_t const *strideInEachDimension, uint64_t const *blockSizeInEachDimension, unsigned int numDimensions, bool newSelection, hdf5_hid_t &dataset, hdf5_hid_t &filespace) final
 
void readArrayNdOfDoubleValues (hdf5_hid_t dataset, hdf5_hid_t filespace, void *values, uint64_t slabSize) final
 
void readArrayNdOfFloatValues (const std::string &datasetName, float *values) final
 
void readArrayNdOfFloatValues (const std::string &datasetName, float *values, uint64_t const *numValuesInEachDimension, uint64_t const *offsetInEachDimension, unsigned int numDimensions) final
 
void readArrayNdOfInt64Values (const std::string &datasetName, int64_t *values) final
 
void readArrayNdOfInt64Values (const std::string &datasetName, int64_t *values, uint64_t const *numValuesInEachDimension, uint64_t const *offsetInEachDimension, unsigned int numDimensions) final
 
void readArrayNdOfUInt64Values (const std::string &datasetName, uint64_t *values) final
 
void readArrayNdOfIntValues (const std::string &datasetName, int *values) final
 
void readArrayNdOfIntValues (const std::string &datasetName, int *values, uint64_t const *numValuesInEachDimension, uint64_t const *offsetInEachDimension, unsigned int numDimensions) final
 
void readArrayNdOfUIntValues (const std::string &datasetName, unsigned int *values) final
 
void readArrayNdOfShortValues (const std::string &datasetName, short *values) final
 
void readArrayNdOfUShortValues (const std::string &datasetName, unsigned short *values) final
 
void readArrayNdOfInt8Values (const std::string &datasetName, int8_t *values) final
 
void readArrayNdOfUInt8Values (const std::string &datasetName, uint8_t *values) final
 
bool exist (const std::string &absolutePathInHdfFile) const final
 
bool isCompressed (const std::string &) final
 
std::vector< uint32_t > getElementCountPerChunkDimension (const std::string &) final
 
std::string getXmlNamespace () const
 

Constructor & Destructor Documentation

◆ FesapiHdfProxy() [1/3]

ETP_NS::FesapiHdfProxy::FesapiHdfProxy ( AbstractSession * session,
COMMON_NS::DataObjectRepository * repo,
const std::string & guid,
const std::string & title,
const std::string & packageDirAbsolutePath,
const std::string & externalFilePath,
COMMON_NS::DataObjectRepository::openingMode hdfPermissionAccess )
inline

Serialization context

◆ FesapiHdfProxy() [2/3]

ETP_NS::FesapiHdfProxy::FesapiHdfProxy ( AbstractSession * session,
gsoap_resqml2_0_1::_eml20__EpcExternalPartReference * fromGsoap )
inline

Deserialization context

◆ FesapiHdfProxy() [3/3]

ETP_NS::FesapiHdfProxy::FesapiHdfProxy ( AbstractSession * session,
const COMMON_NS::DataObjectReference & dor )
inline

Only for partial transfer

◆ ~FesapiHdfProxy()

ETP_NS::FesapiHdfProxy::~FesapiHdfProxy ( )
default

Destructor.

Member Function Documentation

◆ close()

void ETP_NS::FesapiHdfProxy::close ( )
inlinefinal

Does nothing since the ETP session can be used for other purpose.

◆ createArrayNd()

void ETP_NS::FesapiHdfProxy::createArrayNd ( const std::string & groupName,
const std::string & name,
COMMON_NS::AbstractObject::numericalDatatypeEnum datatype,
const uint64_t * numValuesInEachDimension,
unsigned int numDimensions )
final

Create an array (potentially with multi dimensions) of a specific datatype into the HDF file. Values are not yet written to this array.

Parameters
groupNameThe name of the group where to create the array of double values. This name must not contain '/' character and must be directly contained in RESQML group.
nameThe name of the array (potentially with multi dimensions) of a specific datatype hdf dataset. It must not exist.
datatypeThe specific datatype of the values to write.
numValuesInEachDimensionNumber of values in each dimension of the array to write. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to write.

◆ exist()

bool ETP_NS::FesapiHdfProxy::exist ( const std::string & absolutePathInHdfFile) const
final

Check wether an absolute path exists in the hdf file or not.

◆ getElementCountPerChunkDimension()

std::vector< uint32_t > ETP_NS::FesapiHdfProxy::getElementCountPerChunkDimension ( const std::string & )
inlinefinal

Get the number of elements in each chunk dimension of an HDF5 dataset. If the dataset is not compressed, then it returns an empty vector.

Parameters
datasetNameThe absolute name of the dataset which we want to get the number of elements from.

◆ getElementCountPerDimension()

std::vector< uint32_t > ETP_NS::FesapiHdfProxy::getElementCountPerDimension ( const std::string & datasetName)
final

Get the number of elements in each dimension in an HDF dataset of the proxy.

Parameters
datasetNameThe absolute name of the dataset we want to get the number of elements.

◆ getHdfDatatypeClassInDataset()

int ETP_NS::FesapiHdfProxy::getHdfDatatypeClassInDataset ( const std::string & datasetName)
final

Get the used datatype class in a dataset To compare with H5T_INTEGER, H5T_FLOAT , H5T_STRING , etc...

◆ getXmlNamespace()

std::string ETP_NS::FesapiHdfProxy::getXmlNamespace ( ) const
inline

Get the standard XML namespace for serializing this data object.

◆ isCompressed()

bool ETP_NS::FesapiHdfProxy::isCompressed ( const std::string & )
inlinefinal

Check wether a dataset is compressed or not. From an ETP client point of view, the dataset is not compressed even if it may be on server storage or even on the websocket.

◆ isOpened()

bool ETP_NS::FesapiHdfProxy::isOpened ( ) const
inlinefinal

It is opened if the ETP session is opened

◆ open()

void ETP_NS::FesapiHdfProxy::open ( )
inlinefinal

Does nothing since the ETP session must already be opened.

◆ readArrayNdOfDoubleValues() [1/4]

void ETP_NS::FesapiHdfProxy::readArrayNdOfDoubleValues ( const std::string & datasetName,
double * values )
inlinefinal

Read an array Nd of double values stored in a specific dataset

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

◆ readArrayNdOfDoubleValues() [2/4]

void ETP_NS::FesapiHdfProxy::readArrayNdOfDoubleValues ( const std::string & datasetName,
double * values,
uint64_t const * blockCountPerDimension,
uint64_t const * offsetInEachDimension,
uint64_t const * strideInEachDimension,
uint64_t const * blockSizeInEachDimension,
unsigned int numDimensions )
final

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of double values ordered firstly by fastest direction.
blockCountPerDimensionNumber of blocks to select from the dataspace, in each dimension. They are ordered from fastest index to slowest index.
offsetInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
strideInEachDimensionNumber of elements to move from one block to another in each dimension. They are ordered from fastest index to slowest index.
blockSizeInEachDimensionSize of selected blocks in each dimension. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.

◆ readArrayNdOfDoubleValues() [3/4]

void ETP_NS::FesapiHdfProxy::readArrayNdOfDoubleValues ( const std::string & datasetName,
double * values,
uint64_t const * numValuesInEachDimension,
uint64_t const * offsetInEachDimension,
unsigned int numDimensions )
final

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of double values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to read. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.

◆ readArrayNdOfDoubleValues() [4/4]

void ETP_NS::FesapiHdfProxy::readArrayNdOfDoubleValues ( hdf5_hid_t dataset,
hdf5_hid_t filespace,
void * values,
uint64_t slabSize )
final

Considering a given dataset, read the double values corresponding to an existing selected region.

Parameters
datasetID of the dataset to read from.
filespaceID of the selected region.
values1d array output of double values ordered firstly by fastest direction.
slabSizeNumber of values to read.

◆ readArrayNdOfFloatValues() [1/2]

void ETP_NS::FesapiHdfProxy::readArrayNdOfFloatValues ( const std::string & datasetName,
float * values )
inlinefinal

Read an array Nd of float values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

◆ readArrayNdOfFloatValues() [2/2]

void ETP_NS::FesapiHdfProxy::readArrayNdOfFloatValues ( const std::string & datasetName,
float * values,
uint64_t const * numValuesInEachDimension,
uint64_t const * offsetInEachDimension,
unsigned int numDimensions )
final

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of float values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to read. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.

◆ readArrayNdOfInt64Values() [1/2]

void ETP_NS::FesapiHdfProxy::readArrayNdOfInt64Values ( const std::string & datasetName,
int64_t * values )
inlinefinal

Read an array Nd of int 64 bits values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

◆ readArrayNdOfInt64Values() [2/2]

void ETP_NS::FesapiHdfProxy::readArrayNdOfInt64Values ( const std::string & datasetName,
int64_t * values,
uint64_t const * numValuesInEachDimension,
uint64_t const * offsetInEachDimension,
unsigned int numDimensions )
final

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of int 64 bits values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to read. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.

◆ readArrayNdOfInt8Values()

void ETP_NS::FesapiHdfProxy::readArrayNdOfInt8Values ( const std::string & datasetName,
int8_t * values )
inlinefinal

Read an array Nd of int 8 bits values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

◆ readArrayNdOfIntValues() [1/2]

void ETP_NS::FesapiHdfProxy::readArrayNdOfIntValues ( const std::string & datasetName,
int * values )
inlinefinal

Read an array Nd of int values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

◆ readArrayNdOfIntValues() [2/2]

void ETP_NS::FesapiHdfProxy::readArrayNdOfIntValues ( const std::string & datasetName,
int * values,
uint64_t const * numValuesInEachDimension,
uint64_t const * offsetInEachDimension,
unsigned int numDimensions )
final

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of int values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to read. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.

◆ readArrayNdOfShortValues()

void ETP_NS::FesapiHdfProxy::readArrayNdOfShortValues ( const std::string & datasetName,
short * values )
inlinefinal

Read an array Nd of short values stored in a specific dataset Don"t forget to delete the allocated pointer when no more necessary.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

◆ readArrayNdOfUInt64Values()

void ETP_NS::FesapiHdfProxy::readArrayNdOfUInt64Values ( const std::string & datasetName,
uint64_t * values )
inlinefinal

Read an array Nd of unsigned int 64 bits values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

◆ readArrayNdOfUInt8Values()

void ETP_NS::FesapiHdfProxy::readArrayNdOfUInt8Values ( const std::string & datasetName,
uint8_t * values )
inlinefinal

Read an array Nd of int 8 bits values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values

◆ readArrayNdOfUIntValues()

void ETP_NS::FesapiHdfProxy::readArrayNdOfUIntValues ( const std::string & datasetName,
unsigned int * values )
inlinefinal

Read an array Nd of unsigned int values stored in a specific dataset Don"t forget to delete the allocated pointer when no more necessary.

Parameters
datasetNameThe absolute dataset name where to read the values

◆ readArrayNdOfUShortValues()

void ETP_NS::FesapiHdfProxy::readArrayNdOfUShortValues ( const std::string & datasetName,
unsigned short * values )
inlinefinal

Read an array Nd of unsigned short values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

◆ setCompressionLevel()

void ETP_NS::FesapiHdfProxy::setCompressionLevel ( unsigned int newCompressionLevel)
inlinefinal

Set the new compression level which will be used for all data to be written

Parameters
compressionLevelLower compression levels are faster but result in less compression. Range [0..9] is allowed.

◆ writeArrayNd()

void ETP_NS::FesapiHdfProxy::writeArrayNd ( const std::string & groupName,
const std::string & name,
COMMON_NS::AbstractObject::numericalDatatypeEnum datatype,
const void * values,
const uint64_t * numValuesInEachDimension,
unsigned int numDimensions )
final

Write an array (potentially with multi dimensions) of a specific datatype into the HDF file by means of a single dataset.

Parameters
groupNameThe name of the group where to create the array of values. This name must not contain '/' character and must be directly contained in RESQML group.
nameThe name of the array (potentially with multi dimensions) of a specific datatype hdf dataset. It must not already exist.
datatypeThe specific datatype of the values to write.
values1d array of specific datatype ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to write. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to write

◆ writeArrayNdSlab()

void ETP_NS::FesapiHdfProxy::writeArrayNdSlab ( const std::string & groupName,
const std::string & name,
COMMON_NS::AbstractObject::numericalDatatypeEnum datatype,
const void * values,
const uint64_t * numValuesInEachDimension,
const uint64_t * offsetValuesInEachDimension,
unsigned int numDimensions )
final

Find the array associated with groupName and name and write to it.

Parameters
groupNameThe name of the group associated with the array.
nameThe name of the array (potentially with multi dimensions).
datatypeThe specific datatype of the values to write.
values1d array of specific datatype ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to write. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to write. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to write.

◆ writeDatasetAttribute()

void ETP_NS::FesapiHdfProxy::writeDatasetAttribute ( const std::string & ,
const std::string & ,
const std::vector< std::string > &  )
inlinefinal

Write a single attribute which contain an array of strings

◆ writeDatasetAttributes() [1/3]

void ETP_NS::FesapiHdfProxy::writeDatasetAttributes ( const std::string & ,
const std::vector< std::string > & ,
const std::vector< double > &  )
inlinefinal

Write some double attributes into a dataset

◆ writeDatasetAttributes() [2/3]

void ETP_NS::FesapiHdfProxy::writeDatasetAttributes ( const std::string & ,
const std::vector< std::string > & ,
const std::vector< int > &  )
inlinefinal

Write some int attributes into a dataset

◆ writeDatasetAttributes() [3/3]

void ETP_NS::FesapiHdfProxy::writeDatasetAttributes ( const std::string & ,
const std::vector< std::string > & ,
const std::vector< std::string > &  )
inlinefinal

Write some string attributes into a dataset

◆ writeGroupAttribute()

void ETP_NS::FesapiHdfProxy::writeGroupAttribute ( const std::string & ,
const std::string & ,
const std::vector< std::string > &  )
inlinefinal

Write a single attribute which contain an array of strings

◆ writeGroupAttributes() [1/3]

void ETP_NS::FesapiHdfProxy::writeGroupAttributes ( const std::string & ,
const std::vector< std::string > & ,
const std::vector< double > &  )
inline

Write some double attributes into a group

◆ writeGroupAttributes() [2/3]

void ETP_NS::FesapiHdfProxy::writeGroupAttributes ( const std::string & ,
const std::vector< std::string > & ,
const std::vector< int > &  )
inlinefinal

Write some int attributes into a group

◆ writeGroupAttributes() [3/3]

void ETP_NS::FesapiHdfProxy::writeGroupAttributes ( const std::string & ,
const std::vector< std::string > & ,
const std::vector< std::string > &  )
inlinefinal

Write some string attributes into a group

◆ writeItemizedListOfList()

void ETP_NS::FesapiHdfProxy::writeItemizedListOfList ( const std::string & groupName,
const std::string & name,
COMMON_NS::AbstractObject::numericalDatatypeEnum cumulativeLengthDatatype,
const void * cumulativeLength,
uint64_t cumulativeLengthSize,
COMMON_NS::AbstractObject::numericalDatatypeEnum elementsDatatype,
const void * elements,
uint64_t elementsSize )
final

Write an itemized list of list into the HDF file by means of a single group containing 2 datasets.

Parameters
groupNameThe name of the group where to create the itemized list of list. This name must not contain '/' character and must be directly contained in RESQML group.
nameThe name of the itemized list of list hdf group.
cumulativeLengthDatatypeThe datatype of the cumulative length to write.
cumulativeLength1d array of positive integers containing for each list the sum of all the previous list lengths including the current one
cumulativeLengthSizeSize of the cumulativeLength array.
elementsDatatypeThe datatype of the elements to write.
elements1d array of elements containing the aggregation of individual list content.
elementsSizeSize of the elements array.

The documentation for this class was generated from the following file: