29 #define DASFRM_NAME_SZ 64
30 #define DASFRM_DNAM_SZ 32
31 #define DASFRM_TYPE_SZ 32
32 #define DASFRM_MAX_DIRS 4
34 #define DASFRM_TYPE_MASK 0x0000000F
35 #define DASFRM_UNKNOWN 0x00000000
36 #define DASFRM_CARTESIAN 0x00000001
37 #define DASFRM_POLAR 0x00000003
38 #define DASFRM_SPHERE_SURFACE 0x00000002
39 #define DASFRM_CYLINDRICAL 0x00000004
40 #define DASFRM_SPHERICAL 0x00000005
42 #define DASFRM_INERTIAL 0x00000010
57 typedef struct frame_descriptor{
64 char name[DASFRM_NAME_SZ];
65 char type[DASFRM_TYPE_SZ];
68 char dirs[DASFRM_MAX_DIRS][DASFRM_DNAM_SZ];
80 DasDesc* pParent, ubyte
id,
const char* sName,
const char* sType
96 #define DasFrame_id(p) ((p)->id)
99 DAS_API
void DasFrame_inertial(
DasFrame* pThis,
bool bInertial);
101 #define DasFrame_isInertial(P) (P->flags & DASFRM_INERTIAL)
106 #define DasFrame_getName(P) (P->name)
int DasErrCode
return code type 0 indicates success, negative integer indicates failure
Definition: defs.h:164
Base structure for Stream Header Items.
Definition: descriptor.h:74
Stores the definitions for a directional coordinate frame.
Definition: frame.h:57
DAS_API DasErrCode DasFrame_setName(DasFrame *pThis, const char *sName)
Change the frame name.
DAS_API char * DasFrame_info(const DasFrame *pThis, char *sBuf, int nLen)
Print a 1-line summary of a frame and then it's properties.
DAS_API ubyte DasFrame_getType(const DasFrame *pThis)
Get the type of the frame as a string This is almost always the constant string "cartesian".
DAS_API int8_t DasFrame_idxByDir(const DasFrame *pThis, const char *sDir)
Givin the name of a frame direction, return it's index.
DAS_API void del_DasFrame(DasFrame *pThis)
Free a frame definition that was allocated on the heap.
DAS_API DasFrame * new_DasFrame(DasDesc *pParent, ubyte id, const char *sName, const char *sType)
Create a new empty frame definition.
DAS_API DasErrCode DasFrame_setType(DasFrame *pThis, const char *sType)
Set the type of the frame as a string This is almost always the constant string "cartesian".
DasDesc base
The base class.
Definition: frame.h:60
DAS_API DasErrCode DasFrame_addDir(DasFrame *pThis, const char *sDir)
Add a direction to a frame definition.
DAS_API const char * DasFrame_dirByIdx(const DasFrame *pThis, int iIndex)
Given the index of a frame direction, return it's name.