//*** lifo.h  prototypes for LIFO buffers
//*** Jan 2009 : jts 
//************************************************************************


short alloc_lifo       ( struct lifo_param *l ); // allocate memory
void  reset_lifo       ( struct lifo_param *l ); // reset all entries in lifo
void  clear_lifo_stat  ( struct lifo_param *l ); // reset all status=0

short check_lifo       ( struct lifo_param *l ); // #packets still to send
short oldest_lifo      ( struct lifo_param *l ); // returns oldest packet locale
short youngest_lifo    ( struct lifo_param *l ); // returns youngest

short queue_lifo       ( struct lifo_param *l ); // take youngest & queue into bdat
void  retransmit_lifo  ( short nprof  );

short assign_lifo      ( struct lifo_param *l, short dive_no, short pid );
void  append_lifo      ( short nb, uchar *dat );
void  new_msg_lifo     ( short nb, uchar *dat );
short put_lifo         ( short nb, short d, short pid, uchar *dat       );

//---creates specific packets ------------------------------------------
void  lifo_gps         ( short iver, short taken);
void  lifo_surf_drift  ( short valid );
void  lifo_dive_mark   ( void );  
void  lifo_route       ( void );  
void  lifo_waypts      ( void );
void  lifo_eng         ( void );  
void  lifo_drift       ( void );
void  lifo_surface     ( void );
void  lifo_abort       ( void );
void  lifo_pwr         ( void );
void  lifo_echo        ( void ); 
void  lifo_zooCam      ( void );

//--- other ------------------------------------------------------------
void  display_lifo     ( struct lifo_param *l );
void  parse_lifo       ( struct lifo_param *l, short i );
void  parse_lifo_benthos(struct lifo_param *l, short i );

