home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_03 / 9n03038a < prev    next >
Text File  |  1991-01-22  |  935b  |  44 lines

  1. /******************************************************
  2.  * NAME: message_in
  3.  *
  4.  * DESCRIPTION: Text ........
  5.  ******************************************************/
  6.  
  7. #include "que.h"
  8.  
  9. extern struct g_queue in_que;
  10.  
  11. void message_in()
  12. {
  13.    unsigned char new_msg,temp;
  14.    int      i, state;
  15.  
  16.    while (true)
  17.    {
  18.       new_msg = true;
  19.       i = 1;
  20.       state = 0;
  21.       /*  now look at each character if the character is a DLE then the
  22.           the next character is ingored  */
  23.       while (new_msg)
  24.       {
  25.          temp = remove_one(&in_que);
  26.          /*
  27.           *  implement a state machine to
  28.           *  format the incoming message
  29.           *  to a form suitable for your application
  30.           */
  31.       }
  32.       /*
  33.        *  calculate the crc
  34.        */
  35.  
  36.       /*  determine the address */
  37.  
  38.       /*
  39.        *  determine the type of message
  40.        *  and send a reply
  41.        */
  42.    }
  43. }
  44.