modem_monitor.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * SpanDSP - a series of DSP components for telephony
  3. *
  4. * constel.h - Display QAM constellations, using the FLTK toolkit.
  5. *
  6. * Written by Steve Underwood <steveu@coppice.org>
  7. *
  8. * Copyright (C) 2004 Steve Underwood
  9. *
  10. * All rights reserved.
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License version 2, as
  14. * published by the Free Software Foundation.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24. */
  25. /*! \page constel_page Modem performance monitoring
  26. \section constel_page_sec_1 What does it do?
  27. This code controls a GUI window, which provides monitoring of the internal status
  28. of a modem. It shows, graphically:
  29. - the constellation, for PSK, QAM and other similar modulations.
  30. - the equalizer status, for modems with adaptive equalizers.
  31. - the carrier frequency.
  32. - the symbol timing correction.
  33. \section constel_page_sec_2 How does it work?
  34. This code uses the FLTK cross platform GUI toolkit. It works on X11 and Windows platforms.
  35. In addition to the basic FLTK toolkit, fltk_cartesian is also required.
  36. */
  37. #if !defined(_MODEM_MONITOR_H_)
  38. #define _MODEM_MONITOR_H_
  39. struct qam_monitor_s;
  40. typedef struct qam_monitor_s qam_monitor_t;
  41. #if defined(__cplusplus)
  42. extern "C"
  43. {
  44. #endif
  45. qam_monitor_t *qam_monitor_init(float constel_width, float constel_scaling, const char *tag);
  46. int qam_monitor_clear_constel(qam_monitor_t *s);
  47. int qam_monitor_update_constel(qam_monitor_t *s, const complexf_t *pt);
  48. int qam_monitor_update_equalizer(qam_monitor_t *s, const complexf_t *coeffs, int len);
  49. int qam_monitor_update_int_equalizer(qam_monitor_t *s, const complexi16_t *coeffs, int len);
  50. int qam_monitor_update_symbol_tracking(qam_monitor_t *s, float total_correction);
  51. int qam_monitor_update_carrier_tracking(qam_monitor_t *s, float carrier);
  52. int qam_monitor_update_audio_level(qam_monitor_t *s, const int16_t amp[], int len);
  53. void qam_wait_to_end(qam_monitor_t *s);
  54. #if defined(__cplusplus)
  55. }
  56. #endif
  57. #endif
  58. /*- End of file ------------------------------------------------------------*/