📄 tc08a32.pas
字号:
unit tc08a32;
interface
uses Windows;
const
MAX_CARD_NO = 16;
const
MAX_CHANNEL_NO = 8 * MAX_CARD_NO;
const
LEN_FILEPATH = 70;
// the value of every card-type
const
CARD_TYPE_T5_64 = 1;
const
CARD_TYPE_T5_128 = 2;
const
CARD_TYPE_T5_REC = 3;
const
CARD_TYPE_T5_128_NT = 10;
const
CARD_TYPE_T5_REC_NT = 11;
const
CARD_TYPE_T5_ID_NT = 12;
const
CHTYPE_USER = 0;
const
CHTYPE_TRUNK = 1;
const
CHTYPE_EMPTY = 2;
const
NODTMF = -1;
const
DTMF_CODE_0 = 10;
const
DTMF_CODE_1 = 1;
const
DTMF_CODE_2 = 2;
const
DTMF_CODE_3 = 3;
const
DTMF_CODE_4 = 4;
const
DTMF_CODE_5 = 5;
const
DTMF_CODE_6 = 6;
const
DTMF_CODE_7 = 7;
const
DTMF_CODE_8 = 8;
const
DTMF_CODE_9 = 9;
const
DTMF_CODE_STAR = 11;
const
DTMF_CODE_SHARP = 12;
const
DTMF_CODE_A = 13;
const
DTMF_CODE_B = 14;
const
DTMF_CODE_C = 15;
const
DTMF_CODE_D = 16;
const
RECORD_CHECK = 01;
const
PLAY_CHECK = 02;
const
SEND_CHECK = 03;
const
SEND_READY_CHECK = 04;
const
R_BUSY = $21;
const
R_OTHER = $20;
const
S_NORESULT = $10;
const
S_BUSY = $11;
const
S_NOBODY = $13;
const
S_CONNECT = $14;
const
S_NOSIGNAL = $15;
const
S_DIALSIG = $30;
const
PACK_64KBPS = 0;
const
PACK_32KBPS = 1;
const
PACK_16KBPS = 2;
const
PACK_8KBPS = 3;
// NEW ADD for Feed and Signal
const
SIG_STOP = 0;
const
SIG_DIALTONE = 1;
const
SIG_BUSY1 = 2;
const
SIG_BUSY2 = 3;
const
SIG_RINGBACK = 4;
const
HANG_UP_FLAG_FALSE = 0;
const
HANG_UP_FLAG_TRUE = 1;
const
HANG_UP_FLAG_START = 2;
const
HANG_UP_FLAG_PRESS_R = 3;
// caller-ID
const
ID_STEP_NONE = 0;
const
ID_STEP_HEAD = 1;
const
ID_STEP_ID = 2;
const
ID_STEP_OK = 3;
const
ID_STEP_FAIL = 4;
const
ID_STEP_LEN = 5;
// end of caller-ID
type
TPD_RPB = record
PlayFlag: word;
RecordFlag: word;
PlayCount: word;
RecordCount: word;
DtmfCount: word;
DialFlag: word;
SigCount: word;
SigStartPoint: word;
SigBuf: PChar;
end;
type
TPD_WPB = record
Busy1Count1Low: byte;
Busy1Count1High: byte;
Busy1Count0Low: byte;
Busy1Count0High: byte;
BusySigCount: word;
BusySigLen: word;
SendReadyLen: word;
SendBusy1Count1Low: byte;
SendBusy1Count1High: byte;
SendBusy1Count0Low: byte;
SendBusy1Count0High: byte;
SendSigCount1Low: byte;
SendSigCount1High: byte;
SendSigCount0Low: byte;
SendSigCount0High: byte;
SendNoSignalLen: word;
MaxRingTimes: byte;
end;
//use play index file
type
TPD_PIF = record
FileName: array[0..99] of char;
gHandle: array[0..99] of HFILE;
FileCount: DWORD;
end;
//*******************************************
// define struct & type
//********************************************/
type
TC_INI_TYPE = record
// get from "TC08A-V.INI"
wCardNo: word;
wCardType: word;
wConnect: word;
wIRQ: word;
cbDir: array[0..LEN_FILEPATH - 1] of char;
wAddress: array[0..MAX_CARD_NO] of word;
// get from driver
wMajorVer: word;
wMinorVer: word;
wChType: array[0..MAX_CHANNEL_NO] of word;
end;
//
function DConf_EnableConfCard(): integer; stdcall; far external 'Tc08a32.dll';
//
function LoadDRV(): longint; stdcall; far external 'Tc08a32.dll';
procedure FreeDRV(); stdcall; far external 'Tc08a32.dll';
procedure GetSysInfo(TmpIni: pointer); stdcall; far external 'Tc08a32.dll';
function CheckValidCh(): word; stdcall; far external 'Tc08a32.dll';
function CheckChType(wChnlNo: word): word; stdcall; far external 'Tc08a32.dll';
function IsSupportCallerID(): boolean; stdcall; far external 'Tc08a32.dll';
function EnableCard(wUsedCh: word; wFileBufLen: word): longint; stdcall;
far external 'Tc08a32.dll';
procedure DisableCard(); stdcall; far external 'Tc08a32.dll';
procedure D_AdjustVocVol(wChnlNo: Word; cMode: SmallInt; cVolAdjust: SmallInt); stdcall; far external 'Tc08a32.dll';
function SetPackRate(pack: integer): integer; stdcall; far external 'Tc08a32.dll';
procedure PUSH_PLAY(); stdcall; far external 'Tc08a32.dll';
function RingDetect(wChnlNo: word): boolean; stdcall; far external 'Tc08a32.dll';
function CheckPolarity(chanelNo: integer): integer; stdcall; far external 'Tc08a32.dll';
function OffHook(chanelNo: integer): integer; stdcall; far external 'Tc08a32.dll';
function HangUp(chanelNo: integer): integer; stdcall; far external 'Tc08a32.dll';
function SetLink(one: integer; another: integer): integer; stdcall;
far external 'Tc08a32.dll';
function ClearLink(one: integer; another: integer): integer; stdcall;
far external 'Tc08a32.dll';
function LinkOneToAnother(wOne: word; wAnother: word): longint; stdcall;
far external 'Tc08a32.dll';
function ClearOneFromAnother(wOne: word; wAnother: word): longint;
stdcall; far external 'Tc08a32.dll';
function LinkThree(wOne: word; wTwo: word; wThree: word): longint;
stdcall; far external 'Tc08a32.dll';
function ClearThree(wOne: word; wTwo: word; wThree: word): longint;
stdcall; far external 'Tc08a32.dll';
procedure InitDtmfBuf(wChnlNo: word); stdcall; far external 'Tc08a32.dll';
function GetDtmfCode(wChnlNo: word): shortint; stdcall; far external 'Tc08a32.dll';
function DtmfHit(wChnlNo: word): boolean; stdcall; far external 'Tc08a32.dll';
function StartSigCheck(chanelNo: integer): integer; stdcall; far external 'Tc08a32.dll';
function StopSigCheck(chanelNo: integer): integer; stdcall; far external 'Tc08a32.dll';
function ReadCheckResult(chanelNo: integer; checkMode: integer): integer;
stdcall; far external 'Tc08a32.dll';
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -