ei_extended.h File Reference

An Extention for Erlang Interface. More...

This graph shows which files directly or indirectly include this file:


Functions

void freeMemory (KerlData *state)
void returnOK (KerlData *state)
void returnErrorMessage (KerlData *state, char *message)
void pushOntoStack (ErlDrvTermData *spec, int *ptr, ErlDrvTermData data)
void pushOntoStack (ErlDrvTermData *spec, int *ptr, ErlDrvTermData dataA, ErlDrvTermData dataB)
void pushDoubleListOntoStack (ErlDrvTermData *spec, int *ptr, double *array, int size)

Detailed Description

An Extention for Erlang Interface.

Author:
Thomas Lorentsen, Sten Gruener
For things that need to be done multiple times in kerl are defined here.

Function Documentation

freeMemory ( KerlData state  ) 

Parameters:
state ei struct
Local function to free allocated memory

Parameters:
state ei struct
Local function to free allocated memory. Any memory allocated must be freed before returning anything back to erlang.

pushDoubleListOntoStack ( ErlDrvTermData *  spec,
int *  ptr,
double *  array,
int  size 
)

Parameters:
spec return stuct
ptr pointer to the position in the spec
array the data to stick into the spec
size the size of the array Pushes a list of doubles into the spec. This also upscales the doubles so they can be returned as a whole number they will need to be down scaled to get the original values back

pushOntoStack ( ErlDrvTermData *  spec,
int *  ptr,
ErlDrvTermData  dataA,
ErlDrvTermData  dataB 
)

Parameters:
spec return struct
ptr integer pointer to the to pof the struct
dataA data to put on the stack
dataB data to put on the stack
spec return struct
ptr integer pointer to the to pof the struct
dataA data to put on the stack
dataB data to put on the stack adds 2 peices of data onto stack. to build lists where pairs of data is required.

pushOntoStack ( ErlDrvTermData *  spec,
int *  ptr,
ErlDrvTermData  data 
)

Parameters:
spec return struct
ptr integer pointer to the to pof the struct
data to put on the stack
spec return struct
ptr integer pointer to the to pof the struct
data data to put on the stack add data to a stack for list building

returnErrorMessage ( KerlData state,
char *  message 
)

Parameters:
state ei struct
message The message tp pass back to erlang. This is converted into an atom. Returns an tuple to notify erlang of an error. Messages must not contain underscores, commas, brackets, etc as this may confuse erlang a bit. Use the function provided in common to convert error values into string representation. This would be in the form of {error, message}
state ei struct
message The message tp pass back to erlang. This is converted into an atom. Returns a tuple to notify erlang of an error. Messages must not contain underscores, commas, brackets, etc as this may confuse erlang a bit. Use the function provided in common to convert error values into string representation. This would be in the form of {error, message}

returnOK ( KerlData state  ) 

Parameters:
state ei struct Returns ok back to erlang as an atom


Generated on Thu Aug 13 23:20:22 2009 for KERL by  doxygen 1.5.8