59 typedef enum plane_type {Invalid=-1, X=2001, Y=2003, Z=2004, YScan=2012
63 typedef enum ytag_spec {ytags_none=0, ytags_list=1, ytags_series=2} ytag_spec_t;
120 typedef struct plane_descriptor{
158 ytag_spec_t ytag_spec;
171 bool bPlaneDataValid;
269 double yTagInter,
double yTagMin,
double yTagMax,
das_units yUnits
449 PlaneDesc* pThis,
const char* sTime,
size_t idx
510 #define PlaneDesc_isFill(P, V) \
511 ((P->rFill == 0.0 && V == 0.0) || (fabs((P->rFill - V)/P->rFill)<0.00001))
629 const PlaneDesc* pThis,
double* pInterval,
double* pMin,
double* pMax
643 PlaneDesc* pThis,
double rInterval,
double rMin,
double rMax
Utility to assist with encode and decode operations.
Defines storage and access methods for values in a das stream.
int DasErrCode
return code type 0 indicates success, negative integer indicates failure
Definition: defs.h:164
const char * das_units
Handle SI and other units, with accommodations for Epoch systems, from units.h.
Definition: units.h:139
DAS_API 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.
DAS_API void PlaneDesc_setYTags(PlaneDesc *pThis, const double *pYTags)
Provide a new set of yTag values to a yScan plane.
DAS_API void PlaneDesc_setYTagSeries(PlaneDesc *pThis, double rInterval, double rMin, double rMax)
Set a YScan to use series definition for yTags.
DAS_API ytag_spec_t PlaneDesc_getYTagSpec(const PlaneDesc *pThis)
Get the storage method for yTag values.
DAS_API void PlaneDesc_setYTagUnits(PlaneDesc *pThis, das_units units)
Set the YTag units for a YScan plane.
DAS_API void PlaneDesc_setNItems(PlaneDesc *pThis, size_t nItems)
Set the number of items in a plane.
DAS_API const char * PlaneType_toStr(plane_type_t type)
Returns the string for the enumeration.
plane_type_t
An enumeration of packet data plane types.
Definition: plane.h:59
plane_type_t str2PlaneType(const char *type)
Returns the enumeration for the data type string.
Buffer class to handle accumulating byte streams.
Definition: buffer.h:47
Base structure for Stream Header Items.
Definition: descriptor.h:74
Reading and writing values to buffers.
Definition: encoding.h:108
Describes a data plane within a packet type.
Definition: plane.h:120
DAS_API bool PlaneDesc_equivalent(const PlaneDesc *pThis, const PlaneDesc *pOther)
Check to see if two plane descriptors describe the same output.
DAS_API das_units PlaneDesc_getYTagUnits(PlaneDesc *pThis)
Get Y axis units for a 2-D plane.
DAS_API PlaneDesc * new_PlaneDesc(plane_type_t pt, const char *sGroup, DasEncoding *pType, das_units units)
Creates a new X,Y or Z plane descriptor.
DAS_API 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 ...
DAS_API double PlaneDesc_getValue(const PlaneDesc *pThis, size_t uIdx)
Get the a value from a plane.
DAS_API 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.
DAS_API DasErrCode PlaneDesc_decodeData(const PlaneDesc *pThis, DasBuf *pBuf)
Read in a plane's current data.
DAS_API DasErrCode PlaneDesc_encode(PlaneDesc *pThis, DasBuf *pBuf, const char *sIndent)
Serialize a Plane Descriptor as XML data.
DAS_API 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...
DAS_API 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.
DAS_API const double * PlaneDesc_getValues(const PlaneDesc *pThis)
Get a pointer to the current set of values in a plane.
DAS_API DasEncoding * PlaneDesc_getValEncoder(PlaneDesc *pThis)
Get the data value encoder/decoder object for a plane The encoder returned via this pointer can be mu...
DAS_API DasErrCode PlaneDesc_setValue(PlaneDesc *pThis, size_t uIdx, double value)
Set a current value in a plane.
DAS_API const double * PlaneDesc_getYTags(const PlaneDesc *pThis)
Get Y axis coordinates for a 2-D plane of data.
DAS_API DasErrCode PlaneDesc_setTimeValue(PlaneDesc *pThis, const char *sTime, size_t idx)
Set a single time value in a plane.
DAS_API DasErrCode PlaneDesc_encodeData(PlaneDesc *pThis, DasBuf *pBuf, bool bLast)
Serialize a plane's current data.
DAS_API void PlaneDesc_setFill(PlaneDesc *pThis, double value)
Identify the double fill value for the plane.
DAS_API void PlaneDesc_setUnits(PlaneDesc *pThis, das_units units)
Set the unit type for the plane data.
DAS_API void del_PlaneDesc(PlaneDesc *pThis)
Free a plane object allocated on the heap.
DAS_API PlaneDesc * new_PlaneDesc_empty(void)
Creates a Plane Descriptor with mostly empty settings.
DAS_API PlaneDesc * PlaneDesc_copy(const PlaneDesc *pThis)
Copy constructor for planes Deep copy one a plane except for the parent id.
DAS_API void PlaneDesc_setName(PlaneDesc *pThis, const char *sName)
Set the data group of a plane.
DAS_API double PlaneDesc_getFill(const PlaneDesc *pThis)
Returns the fill value identified for the plane.
DAS_API void PlaneDesc_setValues(PlaneDesc *pThis, const double *pData)
Set all the current values for a plane.
DAS_API const char * PlaneDesc_getName(const PlaneDesc *pThis)
Get the data group of a plane.
DAS_API const das_datum * PlaneDesc_getDatum(const PlaneDesc *pThis, size_t uIdx, das_datum *pD)
Get a datum from a plane.
DAS_API plane_type_t PlaneDesc_getType(const PlaneDesc *pThis)
Get a plane's type.
DAS_API 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_API das_units PlaneDesc_getUnits(const PlaneDesc *pThis)
Get the units of measure for a plane's packet data.
An atomic data processing unit, and it's units.
Definition: datum.h:67
Defines units used for items in the stream, most notably time units that reference an epoch and a ste...