MISR Toolkit  1.5.1
MisrCache.h
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = MisrCache =
4 = =
5 =============================================================================
6 
7  Jet Propulsion Laboratory
8  MISR
9  MISR Toolkit
10 
11  Copyright 2005, California Institute of Technology.
12  ALL RIGHTS RESERVED.
13  U.S. Government Sponsorship acknowledged.
14 
15 ============================================================================*/
16 
17 #ifndef MISRCACHE_H
18 #define MISRCACHE_H
19 
20 #include "MisrReadData.h"
21 #include "MisrError.h"
22 #include "MisrProjParam.h"
23 #include "MisrUtil.h"
24 
25 #define BLOCK_CACHE_MAX 2
26 
28 typedef struct {
31 } MTKt_Block;
32 
33 #define MTKT_BLOCK_INIT { MTK_FALSE, MTKT_DATABUFFER_INIT }
34 
36 typedef struct {
37  int32 fid;
38  int ncid;
39  char *gridname;
40  char *fieldname;
41  int block_cnt;
43  MTKt_Block block[NBLOCK+1];
44 } MTKt_Cache;
45 
46 #define MTKT_CACHE_INIT { FAIL, 0, NULL, NULL, 0, MTKT_DATABUFFER_INIT, {MTKT_BLOCK_INIT} }
47 
48 MTKt_status MtkCacheInitFid( int32 fid,
49  const char *gridname,
50  const char *fieldname,
51  MTKt_Cache *cache );
52 
54  const char *gridname,
55  const char *fieldname,
56  MTKt_Cache *cache );
57 
59  int block,
60  float line,
61  float sample,
62  void *pixel );
63 
65  int block );
66 
67 void MtkCacheFree( MTKt_Cache *cache );
68 
69 #endif /* MISRCACHE_H */
MTKt_DataBuffer fill
Definition: MisrCache.h:42
MTKt_boolean
Definition: MisrError.h:6
2-dimensional Data Buffer
Definition: MisrUtil.h:98
MTKt_status MtkCacheInitNcid(int ncid, const char *gridname, const char *fieldname, MTKt_Cache *cache)
Definition: MtkCache.c:79
MTKt_status MtkCachePixelGet(MTKt_Cache *cache, int block, float line, float sample, void *pixel)
Get pixel from cache.
Definition: MtkCache.c:134
char * fieldname
Definition: MisrCache.h:40
#define NBLOCK
Definition: MisrProjParam.h:51
void MtkCacheFree(MTKt_Cache *cache)
Free Cache.
Definition: MtkCache.c:229
MTKt_DataBuffer buf
Definition: MisrCache.h:30
int ncid
Definition: MisrCache.h:38
MTKt_boolean valid
Definition: MisrCache.h:29
MTKt_status MtkCacheLoad(MTKt_Cache *cache, int block)
Load Cache.
Definition: MtkCache.c:184
int32 fid
Definition: MisrCache.h:37
Cache (Low Level)
Definition: MisrCache.h:36
MTKt_status MtkCacheInitFid(int32 fid, const char *gridname, const char *fieldname, MTKt_Cache *cache)
Initialize Cache.
Definition: MtkCache.c:33
char * gridname
Definition: MisrCache.h:39
MTKt_status
Definition: MisrError.h:11
Block (Low Level)
Definition: MisrCache.h:28
int block_cnt
Definition: MisrCache.h:41

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:51