ESDM
Middleware for Earth System Data
Macros | Functions
dummy.c File Reference

A data backend to provide a DUMMY interface that doesn't perform any operation. More...

#include <dirent.h>
#include <errno.h>
#include <esdm-debug.h>
#include <esdm.h>
#include <fcntl.h>
#include <jansson.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "dummy.h"
Include dependency graph for dummy.c:

Macros

#define _GNU_SOURCE   /* See feature_test_macros(7) */
 
#define DEBUG_ENTER   ESDM_DEBUG_COM_FMT("DUMMY", "", "")
 
#define DEBUG(fmt, ...)   ESDM_DEBUG_COM_FMT("DUMMY", fmt, __VA_ARGS__)
 
#define WARN_ENTER   ESDM_WARN_COM_FMT("DUMMY", "", "")
 
#define WARN(fmt, ...)   ESDM_WARN_COM_FMT("DUMMY", fmt, __VA_ARGS__)
 
#define WARNS(fmt)   ESDM_WARN_COM_FMT("DUMMY", "%s", fmt)
 

Functions

int dummy_finalize (esdm_backend_t *backend)
 
esdm_backend_tdummy_backend_init (esdm_config_backend_t *config)
 

Detailed Description

A data backend to provide a DUMMY interface that doesn't perform any operation.

Function Documentation

◆ dummy_backend_init()

esdm_backend_t* dummy_backend_init ( esdm_config_backend_t config)

Initializes the DUMMY plugin. In particular this involves:

  • Load configuration of this backend
  • Load and potentially calibrate performance model
  • Connect with support services e.g. for technical metadata
  • Setup directory structures used by this DUMMY specific backend
  • Populate esdm_backend_t struct and callbacks required for registration
Returns
pointer to backend struct

◆ dummy_finalize()

int dummy_finalize ( esdm_backend_t backend)

Finalize callback implementation called on ESDM shutdown.

This is the last chance for a backend to make outstanding changes persistent. This routine is also expected to clean up memory that is used by the backend.