#ifndef H_ED_MF_20021224105412
#define H_ED_MF_20021224105412

#ifdef __cplusplus
extern "C"
{
#endif

/* ---------------------------------------------------------------------
   (c) ED 2002
   Project      : G.704 simulator
   Function     : Multiframe manager
   Module       : MF
   File         : MF.H
   Created      : 24-12-2002
   Modified     : 24-12-2002
   --------------------------------------------------------------------- */

/* ---------------------------------------------------------------------
   Log

   0.0 24-12-2002 Creation

   --------------------------------------------------------------------- */

#include <stddef.h>
#include "ed/inc/types.h"

/* public data ========================================================= */
/* macros ============================================================== */

/* constants =========================================================== */

   typedef enum
   {
      MF_STS_CHASE,
      MF_STS_LOCKED,
      MF_STS_NB
   }
   mf_sts_e;

/* types =============================================================== */
/* structures ========================================================== */

   typedef struct
   {
      mf_sts_e sts;
      int rmai;
      int count_zero;
      int was_zero;
      int count_err;
      int frame;
      uchar sig[16];
      size_t write;
      size_t read;
      size_t imfsw;
   }
   mf_s;

/* internal public data ================================================ */
/* internal public functions =========================================== */
/* entry points ======================================================== */

   void mf_init (mf_s * const this);
   void mf_in (mf_s * const this, uchar const data);
   uchar mf_out (mf_s * this, int const out_sync);
   int mf_mfai (mf_s const *const this);
   int mf_rmai (mf_s const *const this);

#ifdef __cplusplus
}
#endif

#endif                          /* H_ED_MF_20021224105412 */
/* GUARD (c) ED 2000-2002 Dec 16 2002 Ver. 1.4 */
