📄 fsk_event_vcdlg.h
字号:
// FSK_Event_VCDlg.h : header file
//
#if !defined(AFX_FSK_EVENT_VCDLG_H__095022AA_4D8A_44A6_B840_7162888D1F87__INCLUDED_)
#define AFX_FSK_EVENT_VCDLG_H__095022AA_4D8A_44A6_B840_7162888D1F87__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "../../../../api/vc6.0/inc/shpa3api.h"
/////////////////////////////////////////////////////////////////////////////
// CFSK_Event_VCDlg dialog
#define MAX_CH 1000 //Maximum number of the channels
//User-defined channel state
enum CH_STATE
{
TRK_IDLE, //Trunk channel is idle
TRK_CHECK_DIAL, //Dialing…
TRK_TALKING, //Talking…
TRK_CHECK_RCV, //Receiving…
TRK_CHECK_SEND, //Sending…
TRK_PICKUP, //Pickup
TRK_CHK_SEND, //Sending…
TRK_USER_RCV_END, //Sending completed, waiting to hang up
USER_IDLE, //Station channel is idle
USER_CHK_RCV, //Receiving…
USER_WAIT_HANGUP, //Receiving completed, waiting to hang up
TRK_CONNECT //Connecting…
};
//User-defined message
enum
{
E_MSG_AUTODIAL = 0x0040, //Triggers event while dialing out: press "Dial" to start
E_MSG_START, //Triggers event in a digital trunk channel self-loop test: press "Test" to start
E_MSG_HANGUP, //Data-receiving end sends event in a digital trunk channel self-loop test to
// request initiating party to hang up when data reception has completed.
E_MSG_RCV, //Data-receiving end sends event in digital trunk channel self-loop test to
// inform initiating party data transmission can begin.
E_MSG_TRK_START, //Triggers event in analog channel and station channel self-loop test: press "Test" to start
E_MSG_PICKUP_RCV, //Data-receiving end sends event in analog channel and station channel self-loop test to
// inform initiating party data transmission can begin.
E_MSG_RCV_END, //To trigger event in analog channel and station channel self-loop test: press "Test" to start
E_MSG_CONNECT //Data-sending end sends event in digital trunk channel self-loop test to inform receiving party that
// connection is established and data reception can begin.
};
enum
{
RcvFSK_I, //Call SsmStartSendFSK() for data transmission
RcvFSK_II //Call SsmStartSendFSK_II() for data transmission
};
//Channel information
typedef struct tagCH_INFO
{
int nChState; //Channel state
int nChType; //Channel type
int nLinkToCh; //Connected channels in self-loop test
int nSelfFlag; //Self-loop test flags: 1-Self-loop test 0-Not self-loop test
int nIndex; //Used to denote which number is the DTMF received on the channel
char szDTMF[100]; //DTMF received on the channel
char szPhoNum[20]; //Phone number for dialing out
}CH_INFO;
class CFSK_Event_VCDlg : public CDialog
{
// Construction
public:
CFSK_Event_VCDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CFSK_Event_VCDlg)
enum { IDD = IDD_FSK_EVENT_VC_DIALOG };
CListCtrl m_ChList;
int m_nRcvFSKMode;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFSK_Event_VCDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CFSK_Event_VCDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnButtonAutoDial();
afx_msg void OnButtonTest();
afx_msg void OnRadioI();
afx_msg void OnRadioIi();
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
CH_INFO ChInfo[MAX_CH]; //Channel information
int nMaxCh; //Maximum number of the channels
BOOL InitCtiBoard(); //Initialize board
void InitChListCtrl(); //Initialize list
void UpdateChListCtrl(); //pdate list
void ClearUp(int nCh); //Zero-Stripping: Hanging up and stripping zeros from variables
void SendFSK(int nSendMode, int nCh); //Send FSK
void ReceiveFSK(int nRcvMode, int nCh); //Receive FSK
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FSK_EVENT_VCDLG_H__095022AA_4D8A_44A6_B840_7162888D1F87__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -