das2C
das core C utilities (v3)
Loading...
Searching...
No Matches
Public Member Functions
DasVarComp Struct Reference

The numeric component run: DasVarComp, the <composite> element. More...

#include <das3/variable.h>

Public Member Functions

DAS_API DasVarCompnew_DasVarComp (DasGen *pGen, das_units units, DasForm *pForm, int nIntRank, const ptrdiff_t *pIntShape)
 Create a numeric composite: a vector, a complex pair, a matrix.
 

Detailed Description

The numeric component run: DasVarComp, the <composite> element.

A composite carries semantic in its interpretation role, same as a scalar: integer or real. It is the parse target for utf8 components and redundant with the encoding for binary. The math rides on a flat <ops kind="...">: kind= names it and every other attribute is a parameter of that kind. The element never has children, which is what lets a kind we do not recognize ride through as name/value pairs. See schema/das2c_operations.md.

Complex needs no parameters, so kind= alone carries it. This is the original das3_from_cdf request, landed with no new semantic and no codec change:

<composite semantic="int" intern="2" index="*"> <ops kind="complex"> <packet numItems="2" itemBytes="1" encoding="byte"> </composite>

A geometric vector names a frame and its component order. Child order reads purpose to bytes: properties, ops, generator. An <ops> writer is talkative and states system= and sysorder= even at their defaults, since the schema cannot carry a default behind an anyAttribute:

<composite semantic="real" units="m" intern="3" index="*"> <properties>

B_x;B_y;B_z

</properties> <ops kind="vector" frame="TS2_TSCS" system="cartesian" sysorder="0;1;2"> <packet numItems="3" itemBytes="4" encoding="LEreal"> </composite>

A rotation names two frames. Layout is 3;3, pure shape; the formalism, not the shape, says "rotation":

<composite semantic="real" intern="3;3" index="*"> <ops kind="rotation" from="TSCS" to="GEI2000"> <packet numItems="9" itemBytes="8" encoding="LEreal"> </composite>

The word "formalism" survives in the C even though the wire says <ops>: it is deliberately broader than "algebra", since a point spread function or a sampling response is a rule a capable client needs but is not an algebra.

Member Function Documentation

◆ new_DasVarComp()

DAS_API DasVarComp * new_DasVarComp ( DasGen *  pGen,
das_units  units,
DasForm *  pForm,
int  nIntRank,
const ptrdiff_t *  pIntShape 
)

Create a numeric composite: a vector, a complex pair, a matrix.

Parameters
pGenthe value source; this call adds a reference
unitsthe variable's units
pFormthe formalism; this call adds a reference. Never NULL. See new_DasVar() for the reference rule the whole layer shares.
nIntRankinternal rank (1 for a vector, 2 for a "3;3" matrix)
pIntShapeinternal extents, VARIDX_RAGGED for a ragged level
Returns
a new variable, or NULL on a loud error.

The documentation for this struct was generated from the following file: