Intermec 1555 Reference Guide

Page of 178
Sabre 1555 RFID & Bar Code Reader Programmer’s Reference Manual
4-24
Typical Host Frame Communication Algorithms
To reduce collisions to a minimum (more efficient), it is necessary to check before 
transmission if a frame is being received. In this case, wait until the complete frame is 
received, acknowledged, and processed before continuing with the new transmission. 
If there is a break in the character flow, the frame will be silently discarded (the time 
between characters must not exceed the transmission duration of the character).
void Host_main ()
  byte Tx_buffer [Tx_MAX]
  byte Rx_buffer [Rx_MAX]
  byte MaxRetry = 3
  byte Retry_counter = 0
  RestartFlag set to one
  External_Synchronization attempt () /* try to connect to the product */
  DO
       IF (There_is_data_to_send) THEN
          IF (Host_Txframe (Tx_buffer, Retry_counter)) THEN
             There_is_data_to_send is cleared
               TX_FrameNumber is incremented
                Retry_counter is cleared
             ELSE
                    IF (Retry_counter = MaxRetry)
                        RestartFlag set to one /* bit of Frame_MANAGEMENT byte */
                        Retry_counter is cleared
                        External_Synchronization attempt () /* use ESA command */
                    END IF
          END IF
       IF (frame_received) THEN
          IF (Host_Rxframe ())
              frame_received bit is cleared
 WHILE (TRUE)