📄 structures.h
字号:
|
| Return : TBX_RESULT_OK
| TBX_RESULT_FAIL
| or others
|
*------------------------------------------------------------------------------------------------------------------------------*/
TBX_RESULT
GetMaxAllowedTrunks (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TBX_BOOL in_fE1);
/*-------------------------------------------------------------------------------------------------------------------------------
|
| BuildAllocatedTrunkList : Retrieve the list of trunks that are already configured on this adapter.
|
| in_hLib : Handle to the TBX library returned by TBXOpenLib()
| in_hAdapter : Handle to an adapter that was previously selected and attached to by SelectAdapter()
| in_fVerbose : Verbose display or not
|
| Note : Allocated trunks must be in 'active' state for the application to work properly.
|
| Return : TBX_RESULT_OK
| TBX_RESULT_FAIL
| or others
|
*------------------------------------------------------------------------------------------------------------------------------*/
TBX_RESULT
BuildAllocatedTrunkList (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TBX_BOOL in_fVerbose);
/*-------------------------------------------------------------------------------------------------------------------------------
|
| RetrieveTrunkConfiguration: Retrieve the configuration of a trunk
|
| in_hLib : Handle to the TBX library returned by TBXOpenLib()
| in_hAdapter : Handle to an adapter that was previously selected and attached to by SelectAdapter()
| in_hTrunk : Trunk to retrieve its configuration
| in_fVerbose : Verbose
| out_pun32TrunkNo; Trunk number that corresponds to this handle
|
| Note : Allocated trunks must be in 'active' state for the application to work properly.
|
| Return : TBX_RESULT_OK
| TBX_RESULT_FAIL
| or others
|
*------------------------------------------------------------------------------------------------------------------------------*/
TBX_RESULT
RetrieveTrunkConfiguration (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TB640_TRUNK_HANDLE in_hTrunk,
IN TBX_BOOL in_fVerbose,
OUT PTBX_UINT32 out_pun32TrunkNo );
/*-------------------------------------------------------------------------------------------------------------------------------
|
| RetrieveTrunkState: Retrieve the state of a trunk
|
| in_hLib : Handle to the TBX library returned by TBXOpenLib()
| in_hAdapter : Handle to an adapter that was previously selected and attached to by SelectAdapter()
| in_un32TrunkNb : Trunk to retrieve its state
| in_fVerbose : Verbose
|
| Note : Allocated trunks must be in 'active' state for the application to work properly.
|
| Return : TBX_RESULT_OK
| TBX_RESULT_FAIL
| or others
|
*------------------------------------------------------------------------------------------------------------------------------*/
TBX_RESULT
RetrieveTrunkState (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TBX_UINT32 in_un32TrunkNb,
IN TBX_BOOL in_fVerbose );
/*-------------------------------------------------------------------------------------------------------------------------------
|
| ConfigureAdapterTrunk : This function configures a E1 trunk with default parameters.
| If the trunk was already configured, it is not re-configured.
|
| in_hLib : Handle to the TBX library returned by TBXOpenLib()
| in_hAdapter : Handle to an adapter that was previously selected and attached to by SelectAdapter()
| in_un32TrunkNb : Trunk number. The number of the trunk to configure (0-63)
| out_pfTrunkAllocated : Returns TBX_TRUE if the trunk has been allocated, TBX_FALSE if it was already
| configured.
|
| Note : The adapter must support E1 configuration if the user chooses default config.
|
| Return : TBX_RESULT_OK
| TBX_RESULT_FAIL
| or others
|
*------------------------------------------------------------------------------------------------------------------------------*/
TBX_RESULT
ConfigureAdapterTrunk (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TBX_UINT32 in_un32TrunkNb,
OUT PTBX_BOOL out_pfTrunkAllocated);
/*-------------------------------------------------------------------------------------------------------------------------------
|
| FreeAdapterTrunk : This function frees previously allocated trunk.
|
| in_hLib : Handle to the TBX library returned by TBXOpenLib()
| in_hAdapter : Handle to an adapter that was previously selected and attached to by SelectAdapter()
| in_un32TrunkNb : Trunk number. The number of the trunk to free (0-63)
| out_pfTrunkFreed : Returns if trunk was freed or not
|
| Note : The trunk list is stored in global variables set by the ConfigureAdapterTrunks() function.
| This function uses async method to send requestx by sending all messages related to a trunk
| sequentially (they will execute in the same order). This method can be useful when command
| are not inter-related (or if you are sure of their success).
|
| Return : TBX_RESULT_OK
| TBX_RESULT_FAIL
| or others
|
*------------------------------------------------------------------------------------------------------------------------------*/
TBX_RESULT
FreeAdapterTrunk (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TBX_UINT32 in_un32TrunkToFree,
OUT PTBX_BOOL out_pfTrunkFreed);
/*-------------------------------------------------------------------------------------------------------------------------------
|
| SetDefaultTrunkConfiguration: Configure all trunks as E1s regardless of their actual configuration.
|
| in_hLib : Handle to the TBX library returned by TBXOpenLib()
| in_hAdapter : Handle to an adapter that was previously selected and attached to by SelectAdapter()
| in_un32TrunkNb : Trunk number to configure
| in_fE1 : E1 or T1 ?
|
| Note : The adapter must support E1 configuration.
|
| Return : TBX_RESULT_OK
| TBX_RESULT_FAIL
| or others
|
*------------------------------------------------------------------------------------------------------------------------------*/
TBX_RESULT
SetDefaultTrunkConfiguration (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TBX_UINT32 in_un32TrunkNb,
IN TBX_BOOL in_fE1);
TBX_RESULT ToneEventsThread ( PTBX_VOID in_pContext);
TBX_RESULT ToneDialNumber (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TBX_CHAR* in_pszPhoneNumber,
IN TBX_UINT32 in_un32TimeSlot );
TBX_RESULT ToneTrunkResAllocate (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TB640_TRUNK_HANDLE in_hTrunk,
IN TBX_UINT32 in_un32TimeSlot,
OUT PTB640_RESOURCE_HANDLE out_phRes );
TBX_RESULT ToneVpGrpFree (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TB640_RESOURCE_HANDLE in_hVpGrp );
TBX_RESULT ToneTrunkResFree (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TB640_RESOURCE_HANDLE in_hRes );
TBX_RESULT ToneResAllocateAndConnect (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TB640_VP_TONE_DETECT_TYPE in_ToneType,
IN TB640_TRUNK_HANDLE in_hTrunk,
IN TBX_UINT32 in_un32TimeSlot );
TBX_RESULT ToneResPlayTone (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TB640_VP_DIGIT_TYPE in_Digit,
IN TBX_UINT32 in_un32OnTimeMs,
IN TBX_UINT32 in_un32OffTimeMs,
IN TBX_UINT32 in_un32TimeSlot );
TBX_RESULT ToneDisconnect(
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TB640_CONNECTION_HANDLE in_hSrc );
TBX_RESULT ToneResDaisyChain (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TBX_UINT32 in_un32Count );
TBX_RESULT ToneResBurstTest (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TBX_UINT32 in_un32Duration,
IN TBX_UINT32 in_un32Count );
TBX_RESULT ToneFreeAllResAndConnection (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter );
TBX_RESULT ToneResPlayMsTone (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN PTB640_REQ_VP_TONE_PLAY in_pMsToneReq,
IN TBX_UINT32 in_un32TimeSlot );
TBX_RESULT StrmResFree (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TB640_RESOURCE_HANDLE in_hRes );
TBX_RESULT ToneCollectAllocate (
IN TBX_LIB_HANDLE in_hLib,
IN TB640_VP_DIGIT_TYPE in_TerminatingDigit,
IN TBX_UINT32 in_un32MsFirstDigitTimeout,
IN TBX_UINT32 in_un32MsInterDigitTimeout,
IN TBX_UINT32 in_un32NbToneMax,
IN TBX_UINT32 in_un32TimeSlot );
TBX_RESULT ToneResStopTone (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter,
IN TBX_UINT32 in_un32TimeSlot );
TBX_RESULT ToneResShortDtmfTest (
IN TBX_LIB_HANDLE in_hLib,
IN TBX_ADAPTER_HANDLE in_hAdapter );
TBX_RESULT
ToneTimerThread (
IN PTBX_VOID in_pContext );
TBX_RESULT
CollectorThread (
IN PTBX_VOID in_pContext );
/*--------------------------------------------------------------------------------------------------------------------------------
| C++ support
*------------------------------------------------------------------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __TONE_STRUCTURES_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -