//*** sbd.h contains function prototypes for the Iridium Modem
//  CF2 Spray2008 controller version
//*****************************************************************************
#define SBD_WAIT_FOR_SAT  60 // time to wait before trying again when no satellite

short    sbd_on          ( void  );
short    sbd_off         ( void  );

short    sbd_ack         ( TUPort *tup  );
void     sbd_init        ( TUPort *tup  );
void     sbd_init0       ( TUPort *tup  );
short    sbd_start       ( void  );
short    sbd_power_on    ( void  );

short    sbd_status      ( void  );
short    sbd_cmd_rqst    ( TUPort *tup, char *s   );
short    sbd_clear_momsn ( void  );
void     get_IMEI        ( TUPort *tup );
short    sat_signal      ( TUPort *tup );
void     sbd_clear_buf   ( TUPort *tup, short n   );
short    sbd_load_buf    ( void  );

void     sbd_setup       ( void  );


//message formatting/parsing prototypes
void     add_crc         ( uchar a[], short length   );
short    sbd_chk_crc     ( uchar a[], short n        );
void     format_out      ( uchar *b, uchar c, short n);
short    sbd_sbdi        ( void  );
void     sbd_receive     ( void  );
short    parse_X_reply   ( short n, uchar *s         );
void     echo_store      ( uchar *b, short n, char e );
// sbd main menu to test commands
void     test_sbd        ( void  );
void 	 Transparent_ISU ( void );


short    try_gps_sbd     ( short phase );
void     try_cycle       ( void  );
short    sbd_surface     ( short wing_control );
short    sbd_send        ( void  );
void     check_more_shore( void  );

//*** end *********************************************************************