SWAPI Skeleton structures


Data Structures

struct  utils_itf
struct  utils_param
struct  utils_stat

Typedefs

typedef unsigned char bitstream_t

Enumerations

enum  stat_update { OFF, READ, WRITE }

Functions

int InitCustom ()
int RunCustom ()
int SendItf (int idx, int len)
void ConfigInterfaces (void)

Variables

int utils_itf::sample_sz
int utils_itf::max_buffer_len
void * utils_itf::buffer
int(* utils_itf::get_block_sz )()
int(* utils_itf::process_fnc )(int)
int utils_param::type
int utils_param::size
void * utils_param::value
int utils_stat::type
int utils_stat::size
int * utils_stat::id
void * utils_stat::value
enum stat_update utils_stat::update_mode

Detailed Description

These structures, when compiled with the default SWAPI example skeleton are useful to easily initialize and deal with interfaces and stats/params.

To use them, you have to initialize them to any constant values and terminate the last entry with a NULL at the name field.


Typedef Documentation

typedef unsigned char bitstream_t

Default interface data type for bitstream


Enumeration Type Documentation

Enumerator:
OFF 
READ 
WRITE 


Function Documentation

void ConfigInterfaces ( void   ) 

Config interfaces

This function is called during the initialization phase, just after initializing parameters and before creating interfaces. It can be used to dynamically create different interfaces as a function of parameters

This function is called after initializing parameters and before creating interfaces. It is useful when the number of interfaces or buffers is a function of an initialization parameter.

int InitCustom (  ) 

Custom Initialization function It will be called during the initialization phase, after all interfaces/params/stats have been initialized.

Returns:
1 OK

0 error

This function is called after all interfaces have been initialized. You can place other custom initialization code here.

int RunCustom (  ) 

Custom Run function It will be called on every timeslot after all jobs/data have been dispatched

Returns:
1 OK

0 error

This function is called after all interface processing functions have been called. You can place other state-update code here.

int SendItf ( int  idx,
int  len 
)

Send data through interface

Send data through the configured interface with index idx. The data will be read from the buffer provided on the configuration structure.

Parameters:
idx Index of the interface in the structure logic_itf
len Number of samples to send, of the size configured in the structure logic_itf
Returns:
>=0 Samples sended

<0 error


Variable Documentation

void* utils_itf::buffer [inherited]

< Buffer where to store data

int(* utils_itf::get_block_sz)() [inherited]

< Returns number of samples to read/generate. Returning <0 interrupts execution

int* utils_stat::id [inherited]

Pointer to store the id for the stat

int utils_itf::max_buffer_len [inherited]

< Max buffer length in samples

int(* utils_itf::process_fnc)(int) [inherited]

< Function to process/generate data. Returning 0 interrupts execution

int utils_itf::sample_sz [inherited]

< Size of the sample, in bytes

int utils_stat::size [inherited]

Size of the variable, in elements (of type)

int utils_param::size [inherited]

Size of the parameter value

int utils_stat::type [inherited]

Type of the variable

int utils_param::type [inherited]

Type of the parameter

Mode for automatically updating

void* utils_stat::value [inherited]

Initial value for stat

void* utils_param::value [inherited]

Pointer to the value to obtain. Make sure the buffer is big enough (len)


Generated on Thu Jul 29 19:37:21 2010 for ALOESoftwareAPI(SWAPI) by  doxygen 1.5.5