libdas2
das2 core C utilities
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Enumerations
descriptor.h File Reference
#include <stdbool.h>
#include <das2/units.h>
#include <das2/util.h>
#include <das2/buffer.h>

Go to the source code of this file.

Data Structures

struct  DasDesc
 Base structure for Stream Header Items. More...
 

Enumerations

enum  desc_type_t
 enumeration of Descriptor types, used internally for type checking. More...
 

Descriptor Functions

These work for any type of Descriptor, including PlaneDesc , PktDesc, StreamDesc, DasDs and DasVar.

To make your compiler happy you will need to cast Plane, Packet and Stream Descriptor pointers to just the generic type of Descriptor pointer when using these functions. For example:

* PktDesc* pPktDesc;
* hasProperty((Descriptor*)pPktDesc, "SomePropName");
*

DasDesc

void DasDesc_init (DasDesc *pThis, desc_type_t type)
 
DasDescnew_Descriptor (void)
 
void DasDesc_freeProps (DasDesc *pThis)
 
const char * DasDesc_get (const DasDesc *pThis, const char *propertyName)
 
DasErrCode DasDesc_setBool (DasDesc *pThis, const char *sPropName, bool bVal)
 Set a boolean property Encodes the value as either the string "true" or the string "false". More...
 

Enumeration Type Documentation

enumeration of Descriptor types, used internally for type checking.

May have one of the following values:

  1. PLANE
  2. PACKET
  3. STREAM
  4. FUNCTION
  5. FUNC_SET

Function Documentation

DasErrCode DasDesc_setBool ( DasDesc pThis,
const char *  sPropName,
bool  bVal 
)

Set a boolean property Encodes the value as either the string "true" or the string "false".

Parameters
pThisThe descriptor to receive the property
sPropNamethe name of the property
bValeither true or false.