58 typedef enum plane_type {Invalid=-1, X=2001, Y=2003, Z=2004, YScan=2012
62 typedef enum ytag_spec {ytags_none=0, ytags_list=1, ytags_series=2} ytag_spec_t;
119 typedef struct plane_descriptor{
157 ytag_spec_t ytag_spec;
170 bool bPlaneDataValid;
268 double yTagInter,
double yTagMin,
double yTagMax,
das_units yUnits
426 PlaneDesc* pThis,
const char* sTime,
size_t idx
487 #define PlaneDesc_isFill(P, V) \
488 ((P->rFill == 0.0 && V == 0.0) || (fabs((P->rFill - V)/P->rFill)<0.00001))
606 const PlaneDesc* pThis,
double* pInterval,
double* pMin,
double* pMax
620 PlaneDesc* pThis,
double rInterval,
double rMin,
double rMax
Describes a data plane within a packet type.
Definition: plane.h:119
int DasErrCode
return code type 0 indicates success, negative integer indicates failure
Definition: util.h:117
DasEncoding * PlaneDesc_getValEncoder(PlaneDesc *pThis)
Get the data value encoder/decoder object for a plane The encoder returned via this pointer can be mu...
void PlaneDesc_setValEncoder(PlaneDesc *pThis, DasEncoding *pEnc)
Set the data value encoder/decoder object for a plane The previous encoder's memory is returned the h...
das_units PlaneDesc_getYTagUnits(PlaneDesc *pThis)
Get Y axis units for a 2-D plane.
PlaneDesc * PlaneDesc_copy(const PlaneDesc *pThis)
Copy constructor for planes Deep copy one a plane except for the parent id.
double PlaneDesc_getFill(const PlaneDesc *pThis)
Returns the fill value identified for the plane.
DasErrCode PlaneDesc_setValue(PlaneDesc *pThis, size_t uIdx, double value)
Set a current value in a plane.
const double * PlaneDesc_getOrMakeYTags(PlaneDesc *pThis)
Get Y tags as an array regardless of the storage type If a yTags array is constructed via this method...
size_t PlaneDesc_getNItems(const PlaneDesc *pThis)
Get the number of items in a plane YScan planes have a variable number of items, for all other types ...
Little buffer class to handle accumulating string data.
Definition: buffer.h:49
plane_type_t str2PlaneType(const char *type)
Returns the enumeration for the data type string.
bool PlaneDesc_equivalent(const PlaneDesc *pThis, const PlaneDesc *pOther)
Check to see if two plane descriptors describe the same output.
const double * PlaneDesc_getYTags(const PlaneDesc *pThis)
Get Y axis coordinates for a 2-D plane of data.
PlaneDesc * new_PlaneDesc_yscan(const char *sGroup, DasEncoding *pZType, das_units zUnits, size_t uItems, DasEncoding *pYType, const double *pYTags, das_units yUnits)
Creates a new <yscan> plane descriptor.
Base structure for Stream Header Items.
Definition: descriptor.h:80
void PlaneDesc_getYTagSeries(const PlaneDesc *pThis, double *pInterval, double *pMin, double *pMax)
Get the Y axis coordinate series for a 2-D plane of data.
Reading and writing values on das2 streams.
Definition: encoding.h:108
const double * PlaneDesc_getValues(const PlaneDesc *pThis)
Get a pointer to the current set of values in a plane.
DasErrCode PlaneDesc_encode(PlaneDesc *pThis, DasBuf *pBuf, const char *sIndent)
Serialize a Plane Descriptor as XML data.
void PlaneDesc_setNItems(PlaneDesc *pThis, size_t nItems)
Set the number of items in a plane.
Defines storage and access methods for values in a Das2 Stream.
void PlaneDesc_setYTagSeries(PlaneDesc *pThis, double rInterval, double rMin, double rMax)
Set a YScan to use series definition for yTags.
double PlaneDesc_getValue(const PlaneDesc *pThis, size_t uIdx)
Get the first value from a plane.
void PlaneDesc_setYTagUnits(PlaneDesc *pThis, das_units units)
Set the YTag units for a YScan plane.
DasErrCode PlaneDesc_decodeData(const PlaneDesc *pThis, DasBuf *pBuf)
Read in a plane's current data.
ytag_spec_t PlaneDesc_getYTagSpec(const PlaneDesc *pThis)
Get the storage method for yTag values.
void del_PlaneDesc(PlaneDesc *pThis)
Free a plane object allocated on the heap.
const char * PlaneDesc_getName(const PlaneDesc *pThis)
Get the data group of a plane.
Defines units used for items in the stream, most notably time units that reference an epoch and a ste...
DasErrCode PlaneDesc_setTimeValue(PlaneDesc *pThis, const char *sTime, size_t idx)
Set a single time value in a plane.
void PlaneDesc_setYTags(PlaneDesc *pThis, const double *pYTags)
Provide a new set of yTag values to a yScan plane.
plane_type_t
An enumeration of packet data plane types.
Definition: plane.h:58
Utility to assist with encode and decode operations.
const char * PlaneType_toStr(plane_type_t type)
Returns the string for the enumeration.
void PlaneDesc_setUnits(PlaneDesc *pThis, das_units units)
Set the unit type for the plane data.
DasErrCode PlaneDesc_encodeData(PlaneDesc *pThis, DasBuf *pBuf, bool bLast)
Serialize a plane's current data.
void PlaneDesc_setName(PlaneDesc *pThis, const char *sName)
Set the data group of a plane.
plane_type_t PlaneDesc_getType(const PlaneDesc *pThis)
Get a plane's type.
void PlaneDesc_setValues(PlaneDesc *pThis, const double *pData)
Set all the current values for a plane.
const char * das_units
Enumeration of unit types, that correspond to physical unit types.
Definition: units.h:135
PlaneDesc * new_PlaneDesc_empty(void)
Creates a Plane Descriptor with mostly empty settings.
das_units PlaneDesc_getUnits(const PlaneDesc *pThis)
Get the units of measure for a plane's packet data.
void PlaneDesc_setFill(PlaneDesc *pThis, double value)
Identify the double fill value for the plane.
PlaneDesc * new_PlaneDesc_yscan_series(const char *sGroup, DasEncoding *pZType, das_units zUnits, size_t uItems, double yTagInter, double yTagMin, double yTagMax, das_units yUnits)
Creates a new <yscan> plane descriptor using a yTag series.
PlaneDesc * new_PlaneDesc(plane_type_t pt, const char *sGroup, DasEncoding *pType, das_units units)
Creates a new X,Y or Z plane descriptor.