NewMadeleine

Documentation

Internal data representation

nmad internal data representation is an iterator, ie the user essentially has to write a nm_data_traversal_t function which applies a function to every contiguous chunk of the data type. More...

Collaboration diagram for Internal data representation:

Modules

 Data descriptors
 Core types to define data descriptors.
 
 Built-in data types
 A collection of pre-defined data iterators for common data types such as:
 
 Data helper functions
 A collection of helper function to help manipulating nm_data.
 
 Data slicing primitives.
 Data slicer is a collection of primitives to get a series of blocks with bounds controled by the caller from a given nm_data iterator.
 

Detailed Description

nmad internal data representation is an iterator, ie the user essentially has to write a nm_data_traversal_t function which applies a function to every contiguous chunk of the data type.

The iterator may use an internal state of size up to _NM_DATA_CONTENT_SIZE. The types must then be declared using macro NM_DATA_TYPE which associate the iterator function with the type for its internal state, the given name, and generates some typed accessor functions.

The main patterns to access data are:

For a user-defined data type descriptor, user must define a traversal function nm_data_traversal_t, and optionnaly an optimized generator with nm_data_generator_init_t, nm_data_generator_next_t, nm_data_generator_destroy_t.

There is a collection of Built-in data types for common cases. Manipulation of such data representation is usually done through Data helper functions in higher layers, and Data slicing primitives. in drivers.