cta_obsdescr.h File Reference

Interface description of the COSTA default observation descriptor component. For user implementation see cta_usr_obs_descr.h. More...

#include "cta_system.h"
#include "cta_handles.h"
#include "cta_datatypes.h"
#include "cta_functions.h"
#include "cta_string.h"
#include "cta_vector.h"
#include "cta_matrix.h"
#include "cta_reltable.h"
#include "cta_sobs.h"

Go to the source code of this file.

Defines

#define I_CTA_OBSDESCR_CREATE_SIZE   ( 1)
#define I_CTA_OBSDESCR_CREATE_INIT   ( 2)
#define I_CTA_OBSDESCR_FREE   ( 3)
#define I_CTA_OBSDESCR_GET_PROPERTIES   ( 4)
#define I_CTA_OBSDESCR_GET_KEYS   ( 5)
#define I_CTA_OBSDESCR_COUNT_OBSERVATIONS   ( 6)
#define I_CTA_OBSDESCR_COUNT_PROPERTIES   ( 7)
#define I_CTA_OBSDESCR_EXPORT   ( 8)
#define I_CTA_OBSDESCR_SELECTION   ( 9)
#define I_CTA_OBSDESCR_NUMFUNC   (10)

Typedefs

typedef CTA_Handle CTA_ObsDescr
typedef CTA_Handle CTA_ObsDescrClass

Functions

CTAEXPORT int CTA_ObsDescr_DefineClass (const char *name, const CTA_Func h_func[I_CTA_OBSDESCR_NUMFUNC], CTA_ObsDescrClass *hobsdscrcl)
 Create a new class (=implementation) of a COSTA observation description component.
CTAEXPORT int CTA_ObsDescr_Create (CTA_ObsDescrClass hsobscl, CTA_Handle usrdat, CTA_ObsDescr *hobsdscr)
 Create a new observation description instance.
CTAEXPORT int CTA_ObsDescr_CreateSel (CTA_StochObs hobsdescr, CTA_String selection, CTA_RelTable reltab, CTA_StochObs *hobsdescrout)
 Create a new observation description that is subset of existing observation description.
CTAEXPORT int CTA_ObsDescr_CreateTimSel (CTA_ObsDescr hobsdescr, CTA_Time timespan, CTA_RelTable reltab, CTA_ObsDescr *hobsdescrout)
 Create a new observation description that is subset of existing observation description. All observations in the interval (t1,t2] (note t1 is not part of the interval!) of the time span are selected.
CTAEXPORT int CTA_ObsDescr_Get_ValueProperties (CTA_ObsDescr hobsdscr, const char *Key, CTA_Vector Properties, CTA_Datatype datatype)
 Get properties/values that correspond to a given key.
CTAEXPORT int CTA_ObsDescr_Get_PropertyKeys (CTA_ObsDescr hobsdscr, CTA_Vector Keys)
 Get all keys names.
CTAEXPORT int CTA_ObsDescr_Property_Count (CTA_ObsDescr hobsdscr, int *nkeys)
 Get number of properties/keys.
CTAEXPORT int CTA_ObsDescr_Observation_Count (CTA_ObsDescr hobsdscr, int *nobs)
 Get number of observations.
CTAEXPORT int CTA_ObsDescr_Export (CTA_ObsDescr hdescr, CTA_Handle usrdat)
 Export observation description.
CTAEXPORT int CTA_ObsDescr_Free (CTA_ObsDescr *hobsdscr)
 Free observation description object.

Detailed Description

Interface description of the COSTA default observation descriptor component. For user implementation see cta_usr_obs_descr.h.

CTA_ObsDescr is used for describing observations.

Definition in file cta_obsdescr.h.


Define Documentation

#define I_CTA_OBSDESCR_COUNT_OBSERVATIONS   ( 6)

Definition at line 50 of file cta_obsdescr.h.

#define I_CTA_OBSDESCR_COUNT_PROPERTIES   ( 7)

Definition at line 51 of file cta_obsdescr.h.

#define I_CTA_OBSDESCR_CREATE_INIT   ( 2)

Definition at line 46 of file cta_obsdescr.h.

#define I_CTA_OBSDESCR_CREATE_SIZE   ( 1)

Definition at line 45 of file cta_obsdescr.h.

#define I_CTA_OBSDESCR_EXPORT   ( 8)

Definition at line 52 of file cta_obsdescr.h.

#define I_CTA_OBSDESCR_FREE   ( 3)

Definition at line 47 of file cta_obsdescr.h.

#define I_CTA_OBSDESCR_GET_KEYS   ( 5)

Definition at line 49 of file cta_obsdescr.h.

#define I_CTA_OBSDESCR_GET_PROPERTIES   ( 4)

Definition at line 48 of file cta_obsdescr.h.

#define I_CTA_OBSDESCR_NUMFUNC   (10)

Definition at line 54 of file cta_obsdescr.h.

#define I_CTA_OBSDESCR_SELECTION   ( 9)

Definition at line 53 of file cta_obsdescr.h.


Typedef Documentation

Definition at line 39 of file cta_obsdescr.h.

Definition at line 40 of file cta_obsdescr.h.


Function Documentation

CTAEXPORT int CTA_ObsDescr_Create ( CTA_ObsDescrClass  hsobscl,
CTA_Handle  usrdat,
CTA_ObsDescr hobsdscr 
)

Create a new observation description instance.

Parameters:
hsobscl I class of new observation description
usrdat IO data of the stochastic observer for which a descriptor is to be created
hobsdscr O receives handle of created observation description object
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_ObsDescr_CreateSel ( CTA_StochObs  hobsdescr,
CTA_String  selection,
CTA_RelTable  reltab,
CTA_StochObs hobsdescrout 
)

Create a new observation description that is subset of existing observation description.

Parameters:
hobsdescr I the observation description to create a subset from
selection I selection criterion (subset of SQL)
reltab O Relation table specifying the relation between the original and new observation description component. Note no relation table is created when reltab==CTA_NULL on entry
hobsdescrout O the new COSTA-stochastic observer, empty before calling, caller responsible for freeing after use
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_ObsDescr_CreateTimSel ( CTA_ObsDescr  hobsdescr,
CTA_Time  timespan,
CTA_RelTable  reltab,
CTA_ObsDescr hobsdescrout 
)

Create a new observation description that is subset of existing observation description. All observations in the interval (t1,t2] (note t1 is not part of the interval!) of the time span are selected.

Parameters:
hobsdescr I the observation description to create a subset from
timespan I time span over which selection has to be made
reltab O Relation table specifying the relation between the original and new observation description component. Note no relation table is created when reltab==CTA_NULL on enty
hobsdescrout O the new COSTA-stochastic observer, empty before calling, caller responsible for freeing after use
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_ObsDescr_DefineClass ( const char *  name,
const CTA_Func  h_func[I_CTA_OBSDESCR_NUMFUNC],
CTA_ObsDescrClass hobsdscrcl 
)

Create a new class (=implementation) of a COSTA observation description component.

Parameters:
name I name of the new observation description class
h_func I COSTA function handles for functions that implement class, missing functions must have value CTA_NULL
hobsdscrcl O receives handle of new observation description class
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_ObsDescr_Export ( CTA_ObsDescr  hdescr,
CTA_Handle  usrdat 
)

Export observation description.

The default observation description CTA_DEFAULT_OBSDESC supports exporting to:
TODO

Parameters:
hdescr I handle of observation description
usrdat IO export configuration/medium
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_ObsDescr_Free ( CTA_ObsDescr hobsdscr  ) 

Free observation description object.

Parameters:
hobsdscr IO handle of observation description, replaced by CTA_NULL on return.
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_ObsDescr_Get_PropertyKeys ( CTA_ObsDescr  hobsdscr,
CTA_Vector  Keys 
)

Get all keys names.

Parameters:
hobsdscr I handle of observation description
Keys O receives all keys (COSTA-string vector); must exist before calling and be large enough
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_ObsDescr_Get_ValueProperties ( CTA_ObsDescr  hobsdscr,
const char *  Key,
CTA_Vector  Properties,
CTA_Datatype  datatype 
)

Get properties/values that correspond to a given key.

Parameters:
hobsdscr I handle of observation description
Key I key for which the value is asked
Properties IO COSTA-vector that is to receive the values
datatype I data type of elements in properties vector, must be the same as of queried properties
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_ObsDescr_Observation_Count ( CTA_ObsDescr  hobsdscr,
int *  nobs 
)

Get number of observations.

Parameters:
hobsdscr I handle of observation description
nobs O receives the number of observations
Returns:
error status: CTA_OK if successful
CTAEXPORT int CTA_ObsDescr_Property_Count ( CTA_ObsDescr  hobsdscr,
int *  nkeys 
)

Get number of properties/keys.

Parameters:
hobsdscr I handle of observation description
nkeys O receives number of properties/keys
Returns:
error status: CTA_OK if successful

Generated on 4 Mar 2014 for OpenDA by  doxygen 1.6.1