RAVE
rave_iocache.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2024 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of RAVE.
5
6RAVE is free software: you can redistribute it and/or modify
7it under the terms of the GNU Lesser General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11RAVE is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU Lesser General Public License for more details.
15
16You should have received a copy of the GNU Lesser General Public License
17along with RAVE. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
26#ifndef RAVE_IO_CACHE_H
27#define RAVE_IO_CACHE_H
28
29#include "rave_object.h"
30#include "rave_field.h"
31
36
41
49RaveField_t* RaveIOCache_loadField(RaveIOCache_t* iocache, const char* filename, const char* fieldname);
50
58int RaveIOCache_saveField(RaveIOCache_t* iocache, RaveField_t* obj, const char* filename);
59
66
73
79void RaveIOCache_setUserBlock(RaveIOCache_t* iocache, unsigned long long userblock);
80
86unsigned long long RaveIOCache_getUserBlock(RaveIOCache_t* iocache);
87
94void RaveIOCache_setSizes(RaveIOCache_t* iocache, size_t sz, size_t addr);
95
102void RaveIOCache_getSizes(RaveIOCache_t* iocache, size_t* sz, size_t* addr);
103
110void RaveIOCache_setSymk(RaveIOCache_t* iocache, int ik, int lk);
111
118void RaveIOCache_getSymk(RaveIOCache_t* iocache, int* ik, int* lk);
119
125void RaveIOCache_setIStoreK(RaveIOCache_t* iocache, long k);
126
133
139void RaveIOCache_setMetaBlockSize(RaveIOCache_t* iocache, long sz);
140
147
154const char* RaveIOCache_getErrorMessage(RaveIOCache_t* iocache);
155
156
157#endif
Generic field that only provides a 2-dim data field and a number of dynamic attributes.
void RaveIOCache_setUserBlock(RaveIOCache_t *iocache, unsigned long long userblock)
Sets the user block.
Definition rave_iocache.c:321
void RaveIOCache_getSymk(RaveIOCache_t *iocache, int *ik, int *lk)
Returns the symk.
Definition rave_iocache.c:358
void RaveIOCache_setMetaBlockSize(RaveIOCache_t *iocache, long sz)
Sets the meta block size.
Definition rave_iocache.c:381
int RaveIOCache_getCompressionLevel(RaveIOCache_t *iocache)
Returns the compression level.
Definition rave_iocache.c:315
void RaveIOCache_setIStoreK(RaveIOCache_t *iocache, long k)
Sets the istore_k value.
Definition rave_iocache.c:369
RaveField_t * RaveIOCache_loadField(RaveIOCache_t *iocache, const char *filename, const char *fieldname)
Opens a supported HDF5 file and loads it into the RaveIOCache instance.
Definition rave_iocache.c:232
void RaveIOCache_setSizes(RaveIOCache_t *iocache, size_t sz, size_t addr)
Sets the sizes.
Definition rave_iocache.c:333
long RaveIOCache_getIStoreK(RaveIOCache_t *iocache)
Returns the istore_k value.
Definition rave_iocache.c:375
const char * RaveIOCache_getErrorMessage(RaveIOCache_t *iocache)
If an error occurs during writing, you might get an indication for why by checking the error message.
Definition rave_iocache.c:393
long RaveIOCache_getMetaBlockSize(RaveIOCache_t *iocache)
Returns the meta block size.
Definition rave_iocache.c:387
int RaveIOCache_saveField(RaveIOCache_t *iocache, RaveField_t *obj, const char *filename)
Saves a rave object as specified.
Definition rave_iocache.c:274
void RaveIOCache_setCompressionLevel(RaveIOCache_t *iocache, int lvl)
Sets the compression level.
Definition rave_iocache.c:307
void RaveIOCache_getSizes(RaveIOCache_t *iocache, size_t *sz, size_t *addr)
Returns the sizes.
Definition rave_iocache.c:340
void RaveIOCache_setSymk(RaveIOCache_t *iocache, int ik, int lk)
Sets the symk.
Definition rave_iocache.c:351
RaveCoreObjectType RaveIOCache_TYPE
Type definition to use when creating a rave object.
Definition rave_iocache.c:401
unsigned long long RaveIOCache_getUserBlock(RaveIOCache_t *iocache)
Returns the user block.
Definition rave_iocache.c:327
Generic implementation of an object that is used within rave.
Represents the cartesian volume.
Definition rave_field.c:36
Defines the structure for the RaveIOCache.
Definition rave_iocache.c:48
The rave object type definition.
Definition rave_object.h:52