X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=ss5.h;h=d1ad96224e1c94eefc0c2dbb67925db811acf088;hp=238501fb5ec76404f0217299ae06d9d1a669de53;hb=7d414983c9ddfa9cf8300d5d9aee7a86876b7ea7;hpb=8994874d7bcb1eff9ee833fb22e4910cc365f456 diff --git a/ss5.h b/ss5.h index 238501f..d1ad962 100644 --- a/ss5.h +++ b/ss5.h @@ -16,16 +16,14 @@ #define SS5_FEATURE_BELL 0x00000010 #define SS5_FEATURE_PULSEDIALING 0x00000020 #define SS5_FEATURE_DELAY 0x00000040 -#define SS5_FEATURE_STAR_RELEASE 0x00000080 #define SS5_FEATURE_SUPPRESS 0x00000100 /* SS5 port classes */ class Pss5 : public PmISDN { public: - Pss5(int type, struct mISDNport *mISDNport, char *portname, struct port_settings *settings, int channel, int exclusive, int mode); + Pss5(int type, struct mISDNport *mISDNport, char *portname, struct port_settings *settings, struct interface *interface, int channel, int exclusive, int mode); ~Pss5(); - int handler(void); int message_epoint(unsigned int epoint_id, int message, union parameter *param); void set_tone(const char *dir, const char *name); @@ -34,7 +32,8 @@ class Pss5 : public PmISDN char p_m_s_dial[64]; /* current dialing register */ int p_m_s_digit_i; /* current digit of register counter */ int p_m_s_pulsecount; /* counts pule dialing half cycles */ - char p_m_s_last_digit; /* stores last digit to fill short signal losses */ + char p_m_s_last_digit; /* stores last digit that was detected, to fill short signal losses */ + char p_m_s_last_digit_used; /* stores last digit that was used, to ignore short changes of signal due to noise */ int p_m_s_signal_loss; /* sample counter for loss of signal check */ int p_m_s_decoder_count; /* samples currently decoded */ unsigned char p_m_s_decoder_buffer[SS5_DECODER_NPOINTS]; /* buffer for storing one goertzel window */ @@ -42,8 +41,7 @@ class Pss5 : public PmISDN unsigned char p_m_s_delay_mute[400/SS5_DECODER_NPOINTS]; /* 40 ms delay on mute, so a 'chirp' can be heared */ int p_m_s_sample_nr; /* decoder's sample number, counter */ int p_m_s_recog; /* sample counter to wait for signal recognition time */ - double p_m_s_timer; - void (Pss5::*p_m_s_timer_fn)(void); + struct lcr_work p_m_s_queue; int p_m_s_answer; /* queued signal */ int p_m_s_busy_flash; /* queued signal */ int p_m_s_clear_back; /* queued signal */ @@ -76,6 +74,8 @@ class Pss5 : public PmISDN void message_disconnect(unsigned int epoint_id, int message_id, union parameter *param); void message_release(unsigned int epoint_id, int message_id, union parameter *param); + void register_timeout(void); + }; #define new_ss5_state(a) _new_ss5_state(a, __FUNCTION__, __LINE__)