1198 lines
55 KiB
C
Executable File
1198 lines
55 KiB
C
Executable File
/*********************************************************************
|
|
* LEGAL DISCLAIMER
|
|
*
|
|
* (Header of MediaTek Software/Firmware Release or Documentation)
|
|
*
|
|
* BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY
|
|
* ACKNOWLEDGES AND AGREES THAT THE SOFTWARE/FIRMWARE AND ITS
|
|
* DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED FROM MEDIATEK AND/OR
|
|
* ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS ONLY.
|
|
* MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
|
|
* NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY
|
|
* WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH
|
|
* MAY BE USED BY, INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK
|
|
* SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY
|
|
* WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO NOT BE
|
|
* RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
|
|
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
|
|
*
|
|
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
|
|
* CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED
|
|
* HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
|
|
* MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR
|
|
* SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE
|
|
* AT ISSUE.
|
|
*
|
|
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN
|
|
* ACCORDANCE WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING
|
|
* ITS CONFLICT OF LAWS PRINCIPLES.
|
|
**********************************************************************
|
|
*/
|
|
|
|
/**
|
|
* \file eva_struct.h
|
|
* \brief This file is the header file of Enhance VoIP Architecture (EVA) generic data structure definitions that will be exported for others to use.
|
|
* \author Guanhu Zou
|
|
* \date 2020-09-15
|
|
* \version A001
|
|
* \copyright EcoNet Inc
|
|
*/
|
|
|
|
#ifndef _EVA_STRUCT_H_
|
|
#define _EVA_STRUCT_H_
|
|
|
|
#include "eva_constant.h"
|
|
|
|
/* ========================================
|
|
* Generic data context section
|
|
* ======================================== */
|
|
/**
|
|
* \breif Define MAX_CID_CHAR_LEN as 32.
|
|
*/
|
|
#define MAX_CID_CHAR_LEN (32)
|
|
|
|
/**
|
|
* \breif This struct describes a net address information.
|
|
*/
|
|
typedef struct {
|
|
uint32 addrV4; /*!<Ipv4 address.*/
|
|
uint8 addrV6[16]; /*!<Ipv6 address.*/
|
|
ipVer_e ver; /*!<Network address type.*/
|
|
uint16 port; /*!<Rtp port,value should be <0,65535>.*/
|
|
uint16 rtcpPort; /*!<Rtcp port,value should be <0,65535>.*/
|
|
}netAddr_t;
|
|
|
|
/**
|
|
* \breif This struct describes caller ID information such as number,user name and date-time.
|
|
*/
|
|
typedef struct {
|
|
cidFormat_e format; /*!<Caller ID transmission.*/
|
|
unsigned char number[MAX_CID_CHAR_LEN]; /*!<Caller ID display number.*/
|
|
unsigned char name[MAX_CID_CHAR_LEN]; /*!<Caller ID display name.*/
|
|
char dateTime[MAX_CID_CHAR_LEN]; /*!<Caller ID display date and time.*/
|
|
char blockInfo[MAX_CID_CHAR_LEN]; /*!<Reason for absence of Caller ID.*/
|
|
MWIValue_e mwi; /*!<Related to mailbox value.*/
|
|
int fskPower; /*!<Fsk call id power.*/
|
|
int dtmfPower; /*!<DTMF call id power.*/
|
|
uint16 makeTime; /*!<DTMF call id make timer.*/
|
|
uint16 breakTime; /*!<DTMF call id break timer.*/
|
|
uint32 dtmfT3; /*!<Timer between DTMF cid and the first ring.*/
|
|
struct{
|
|
uint32 T9; /*!<The time to restore the speech path after the end of T14.*/
|
|
uint32 T10; /*!<The time between speech path blocking and beginning of TAS sending.*/
|
|
uint32 T11; /*!<The time for the LE to recognize the TE-ACK.*/
|
|
uint32 T12; /*!<The time between TE-ACK recognition and the start of FSK modulation transmission.*/
|
|
uint32 T13; /*!<The time to restore the speech path after the end of FSK modulation transmission.*/
|
|
uint32 T14; /*!<The maximum time allowed within which a valid TE-ACK shall be correctly detected.*/
|
|
uint32 Tls;
|
|
}cid2timing;
|
|
struct{
|
|
uint32 T2; /*!<DTMF cid timing.*/
|
|
uint32 T3; /*!<RPAS timing.*/
|
|
uint32 T4; /*!<DTAS timing.*/
|
|
}cid1timing;
|
|
struct{
|
|
uint32 T0; /*!<LR-DTAS timing.*/
|
|
uint32 T1; /*!<LR-DTAS timing.*/
|
|
uint32 T7; /*!<LR-DTAS timing.*/
|
|
uint32 Ta; /*!<Timer A.*/
|
|
uint32 T5; /*!<Timer B.*/
|
|
uint32 T6; /*!<Timer C.*/
|
|
}cid1timing_extra;
|
|
struct{
|
|
uint32 W; /*!<unit:10ms.*/
|
|
uint32 X; /*!<unit:10ms.*/
|
|
uint32 X1; /*!<unit:10ms.*/
|
|
uint32 Y; /*!<unit:10ms.*/
|
|
uint32 t1; /*!<unit:10ms.*/
|
|
}cid2timing_extra;/*for TELCORDIA Type II OFF_HOOK*/
|
|
struct{
|
|
uint32 T15; /*!<dtmf during ringing.*/
|
|
uint32 T16; /*!<dtmf during ringing.*/
|
|
uint32 T17; /*!<dtmf prior to ringing with LR.*/
|
|
uint32 T18; /*!<dtmf prior to ringing.*/
|
|
uint32 dtmfT0; /*!<dtmf LR_DTAS timing.*/
|
|
uint32 dtmfT1; /*!<dtmf LR_DTAS timing.*/
|
|
uint32 dtmfT7; /*!<dtmf LR_DTAS timing.*/
|
|
uint32 dtmfT4; /*!<dtmf DTAS timing.*/
|
|
uint32 dT3; /*!<dtmf RPAS timing.*/
|
|
}dtmftiming;/*for dtmf Type CID*/
|
|
ackType_e ackTone[8]; /*!<type2 CID terminal ACK tone.*/
|
|
uint32 CLI; /*!<Calling Line Identity parameter.*/
|
|
uint32 CPN; /*!<Calling Party Name.*/
|
|
}cid_t;
|
|
|
|
/**
|
|
* \breif This union describes the detail information/data for particular events.
|
|
*/
|
|
typedef union {
|
|
struct{
|
|
lineState_e status; /*!<Interface line state.*/
|
|
int ringCount; /*!<Ring times counter for RING event.*/
|
|
}line; /* EVENT_CODE_LINE */
|
|
|
|
struct{
|
|
hookState_e status; /*!<Interface hook state.*/
|
|
int pulseCount; /*!<Pulse time counter for PULSE event. ** Not used now.*/
|
|
}hook; /*EVENT_CODE_HOOK*/
|
|
|
|
struct{ /*!<Not used now.*/
|
|
uint32 dspExecTimes; /*!<Not used now.*/
|
|
uint32 averageMhz; /*!<Not used now.*/
|
|
}performanceIdx; /*EVENT_CODE_PERFORMANCE*/
|
|
|
|
struct{
|
|
int8 number[MAX_CID_CHAR_LEN]; /*!<CID display number information.*/
|
|
int8 name[MAX_CID_CHAR_LEN]; /*!<CID display name information.*/
|
|
int8 dateTime[MAX_CID_CHAR_LEN]; /*!<CID date-time information.*/
|
|
}cidData;/*EVENT_CODE_CID for dsp rx(fxo case)*/
|
|
|
|
struct{
|
|
toneCode_e code; /*!<Tone code information.*/
|
|
toneDir_e dir; /*!<Tone direction information.*/
|
|
|
|
/* For jiffies,volume report. */
|
|
unsigned long jiff; /*!<Tone jiffies.*/
|
|
double volume; /*!<Tone volume.*/
|
|
int dur; /*!<Tone duration, for sipinfo.*/
|
|
|
|
}tone; /*EVENT_CODE_TONE_DETECTED*/
|
|
|
|
struct{
|
|
uint8 streamId; /*!<Stream ID information.*/
|
|
t38State_e status; /*!<T38 transmission status.*/
|
|
}t38; /*EVENT_CODE_T38*/
|
|
|
|
struct{
|
|
uint8 streamId; /*!<Stream ID information.*/
|
|
uint64 total; /*!<Number of total packets.*/
|
|
uint64 drop; /*!<Number of dropped packets.*/
|
|
uint32 plc; /*!<Number of compensated packets.*/
|
|
uint32 jbSize; /*!<Current jitter buffer size.*/
|
|
uint32 avgJitter; /*!<Average jitter.*/
|
|
}jb; /*EVENT_CODE_JB_UPDATE*/
|
|
|
|
struct{
|
|
netAddr_t srcAddr; /*!<Not used now.*/
|
|
netAddr_t dstAddr; /*!<Not used now.*/
|
|
uint8 payload[MAX_PACKET_SZ]; /*!<Not used now.*/
|
|
}packet; /*EVENT_CODE_NON_RTP_RECVD*/
|
|
struct{
|
|
int cid; /*!<Voice jitter change cid.*/
|
|
int sid; /*!<Voice jitter change sid.*/
|
|
int notifyFlag; /*!<Voice jitter change notify flag.*/
|
|
}voiceJb;/*EVENT_CODE_JB_CHANGE*/
|
|
struct{
|
|
int type; /*!<Callerid send type, typeI or typeII.*/
|
|
int cidSendStatus; /*!<Callerid send status.*/
|
|
}cid_type;/*EVENT_CODE_CALLERID_SEND for callid send end*/
|
|
struct{
|
|
int pt; /*!<Stream payload type.*/
|
|
}streamInfor;
|
|
struct{
|
|
int fault; /*!<Slic fault status.*/
|
|
}slicFault;
|
|
}eventContext_u;
|
|
|
|
/**
|
|
* \breif This struct describes event category, event time, interface/channel ID, and event context information.
|
|
*/
|
|
typedef struct {
|
|
eventEdge_e edge; /*!<Edge information of an event report.*/
|
|
eventCode_e evtCode; /*!<Event message categorization information.*/
|
|
uint32 dspTick; /*!<DSP (or CPU) tick to indicate the time information of an event.*/
|
|
infcId_e infcId; /*!<Interface ID, presented when an event is interface related.*/
|
|
chanId_e chanId; /*!<Channel ID, presented when an event is channel related.*/
|
|
strmId_e strmId; /*!<Stream ID, presented when an event is stream related.*/
|
|
eventContext_u context; /*!<Event context contains detail information of the event if applicable.*/
|
|
void (*eventNotify)(void *argv); /*!<Call back function point for register. If user hook function on it, it need not polling event periodically. If there is an event coming, this registered function will be called.*/
|
|
} event_t;
|
|
|
|
/**
|
|
* \breif This struct describes the time information of a signal on-off duration.
|
|
*/
|
|
typedef struct {
|
|
uint16 onTime; /*!<Time of signal on.*/
|
|
uint16 offTime; /*!<Time of signal off.*/
|
|
} cadence_t;
|
|
|
|
/* ========================================
|
|
* Interface Section
|
|
* ======================================== */
|
|
/**
|
|
* \breif This struct describes the configuration of a ring.
|
|
*/
|
|
typedef struct {
|
|
cadence_t cad[MAX_CADENCE]; /*!<Ring cadences.*/
|
|
uint32 dur; /*!<Ring duration.*/
|
|
cid_t cid; /*!<Caller ID information.*/
|
|
uint8 cidAt; /*!<N-th ring-breaks for CID transmission.*/
|
|
uint32 cidWaitTime; /*!<Waiting time to send CID after ring break.*/
|
|
cadence_t cad1st[MAX_CADENCE]; /*!<First ring cadences.*/
|
|
} ringProfile_t;
|
|
|
|
/**
|
|
* \breif This struct describes time information for pulse generation and detection.
|
|
*/
|
|
typedef struct {
|
|
uint32 genSeize; /*!<Hook seize time for pulse generation.*/
|
|
uint32 genRelease; /*!<Hook release time for pulse generation.*/
|
|
uint32 detSeizeMin; /*!<Minimum hook seize time for pulse event detection.*/
|
|
uint32 detSeizeMax; /*!<Maximum hook seize time for pulse event detection.*/
|
|
uint32 detReleaseMin; /*!<Minimum hook release time for pulse event detection.*/
|
|
uint32 detReleaseMax; /*!<Maximum hook release time for pulse event detection.*/
|
|
} pulseTime_t;
|
|
|
|
/**
|
|
* \breif This struct describes flash and release threshold information.
|
|
*/
|
|
typedef struct {
|
|
uint32 flashMin; /*!<Minimum hook release time for hook-flash state..*/
|
|
uint32 flashMax; /*!<Maximum hook release time for hook-flash state.*/
|
|
uint32 releaseMin; /*!<Minimum hook release time for hook-release state.*/
|
|
uint32 autoFlashDur; /*!<Maximum hook release time for pulse event detection.*/
|
|
pulseTime_t pulseTime; /*!<Pulse detect and generate parameter.*/
|
|
uint8 pulseEnable; /*!<Enable or disable pulse detection.*/
|
|
uint32 seizeMin; /*!<Minimum hook seize time for hook-seize state.*/
|
|
} hookThreshold_t;
|
|
|
|
/**
|
|
* \breif This struct describes interface ring params.
|
|
*/
|
|
typedef struct {
|
|
infcRingType_e type; /*!<Ring wave form.*/
|
|
int32 frequence; /*!<Ring frequence.*/
|
|
int32 amplitude; /*!<Ring amplitude.*/
|
|
int32 dcBias; /*!<Ring dcBias.*/
|
|
int32 ringTripThreshold; /*!<Ring Trip Threshold.*/
|
|
int32 amplitudeSlab; /*!<Ring amplitude for silicon slic.*/
|
|
}infcRingParams_t;
|
|
|
|
/**
|
|
* \breif This struct describes interface Dc feed params.
|
|
*/
|
|
typedef struct {
|
|
int32 ila; /*!<Loop current.*/
|
|
int32 ilaSlab; /*!<Siliconlab loop current.*/
|
|
}infcDcFeedParams_t;
|
|
|
|
/**
|
|
* \breif This struct describes the line, hook, and/or ring configuration information of an interface.
|
|
*/
|
|
typedef struct {
|
|
infcType_e type; /*!<Read-only, device type of the interface.*/
|
|
lineState_e lineState; /*!<Interface line state. Read-Writable for FXS interface and Read-only for FXO interface.*/
|
|
hookState_e hookState; /*!<Interface hook state. Read-Writable for FXO interface and Read-only for FXS interface.*/
|
|
polDir_e pol; /*!<Line power feed polarity direction.*/
|
|
ringProfile_t ring; /*!<Ring configuration per interface. Only for FXS.*/
|
|
hookThreshold_t hookTs; /*!<Hook threshold configuration for hook states.*/
|
|
hwProf_e hwProfId; /*!<Country code.*/
|
|
infcRingParams_t ringParams; /*!<Interface ring parameter.*/
|
|
infcDcFeedParams_t dcFeedParams; /*!<DC feed parameter.*/
|
|
}infcConfig_t;
|
|
|
|
/**
|
|
* \breif This struct describes the interface id ,line testid and return line test data for line test.
|
|
*/
|
|
typedef struct {
|
|
infcId_e infc; /*!<Interface ID.*/
|
|
uint8 lineTestId; /*!<Line test ID.*/
|
|
char lineTestData[5000]; /*!<Return line test data.*/
|
|
}infcLineTest_t;
|
|
|
|
/**
|
|
* \breif This struct describes slic params information.
|
|
*/
|
|
typedef struct {
|
|
uint8 fxsNum; /*!<Fxs number of slic.*/
|
|
uint8 fxoNum; /*!<Fxo number of slic.*/
|
|
char slicType[15]; /*!<Slic type.*/
|
|
}slicParams_t;
|
|
|
|
/**
|
|
* \breif This enum describes line test id type for siliconlab slic.
|
|
*/
|
|
typedef enum {
|
|
EVA_LT_TID_RSVD1, /*!<Reserved tid.*/
|
|
EVA_LT_TID_LINE_V, /*!<Line voltage test.*/
|
|
EVA_LT_TID_ROH, /*!<Receiver off-Hook indication.*/
|
|
EVA_LT_TID_RINGERS, /*!<Ringers test per FCC part 68 REN def.*/
|
|
EVA_LT_TID_RES_FLT, /*!<Resistive fault.*/
|
|
EVA_LT_TID_MSOCKET, /*!<Master socket detection.*/
|
|
EVA_LT_TID_XCONNECT, /*!<Cross connect detection.*/
|
|
EVA_LT_TID_CAP, /*!<Capacitance measurement test.*/
|
|
EVA_LT_TID_ALL_GR_909, /*!<All GR-909 fault tests in predefined order.*/
|
|
EVA_LT_TID_LOOPBACK, /*!<Loopback test.*/
|
|
EVA_LT_TID_DC_FEED_ST, /*!<DC feed self test.*/
|
|
EVA_LT_TID_RD_LOOP_COND, /*!<Read loop condition.*/
|
|
EVA_LT_TID_DC_VOLTAGE, /*!<DC voltage test.*/
|
|
EVA_LT_TID_RINGING_ST, /*!<Ringing self test.*/
|
|
EVA_LT_TID_ON_OFF_HOOK_ST, /*!<On/Off hook self test.*/
|
|
EVA_LT_TID_RD_BAT_COND, /*!<Read battery conditions.*/
|
|
EVA_LT_TID_PRE_LINE_V, /*!<Pre line voltage test.*/
|
|
EVA_LT_TID_FLT_DSCRM, /*!<Fault discrimination test.*/
|
|
EVA_LT_NUM_TID_CODES /*!<Max number test id.*/
|
|
} EVA_LtTestIdType;
|
|
|
|
/**
|
|
* \breif This enum describes line test id type for siliconlab slic.
|
|
*/
|
|
typedef enum {
|
|
EVA_LT_TID_RSVD1_SLAB, /*!<Reserved tid.*/
|
|
EVA_LT_TID_HAZARDOUS_V, /*!<Hazardous voltages test.*/
|
|
EVA_LT_TID_FOREIGN_V, /*!<Foreign voltages test.*/
|
|
EVA_LT_TID_RESISTIVE_FAULTS, /*!<Resistive faults test.*/
|
|
EVA_LT_TID_RES_OFFHOOK, /*!<Receiver offhook test.*/
|
|
EVA_LT_TID_REN, /*!<REN test.*/
|
|
EVA_LT_TID_CAP_FAULTS, /*!<Capacitive faults test.*/
|
|
EVA_LT_TID_REN_CAP, /*!<REN capacitive test.*/
|
|
EVA_ProSLIC_LineMonitor, /*!<Inline monitor.*/
|
|
EVA_LT_NUM_TID_CODES_SLAB /*!<Max number test id.*/
|
|
} EVA_LtTestIdTypeSLAB;
|
|
|
|
/**
|
|
* \breif This enum describes line test id type for intel slic.
|
|
*/
|
|
typedef enum {
|
|
EVA_LT_TID_GR909, /*!< Reserved tid.*/
|
|
EVA_LT_TID_CAPACITANCE /*!< Hazardous voltages test.*/
|
|
} EVA_LtTestIdTypeIntel;
|
|
|
|
|
|
/***************line test struct******************/
|
|
/*zarlink*/
|
|
/**
|
|
* \breif Define EVA_INT_MAX as 0x7fffffff.
|
|
*/
|
|
#define EVA_INT_MAX 0x7fffffff
|
|
|
|
/**
|
|
* \breif Define EVA_FORCE_STANDARD_C_ENUM_SIZE as EVA_INT_MAX.
|
|
*/
|
|
#define EVA_FORCE_STANDARD_C_ENUM_SIZE (EVA_INT_MAX)
|
|
|
|
/**
|
|
* \breif This enum describes REN measurement test type.
|
|
*/
|
|
typedef enum {
|
|
EVA_LT_RINGER_REGULAR_PHNE_TEST, /*!<Perform REN test on regular phone.*/
|
|
EVA_LT_RINGER_ELECTRONIC_PHNE_TEST, /*!<Perform REN test on electronic phone.*/
|
|
EVA_LT_RINGER_REGULAR_PHNE_TEST_3_ELE, /*!<Perform 3 ELE REN test on regular phone.*/
|
|
EVA_LT_RINGER_ELECTRONIC_PHNE_TEST_3_ELE, /*!<Perform 3 ELE REN test on electronic phone.*/
|
|
EVA_LT_RINGER_TEST_NUM_TYPES, /*!<Max number type.*/
|
|
EVA_LT_RINGER_BIT_ENUM_SIZE = EVA_FORCE_STANDARD_C_ENUM_SIZE /*!<Portability Req.*/
|
|
} EVA_LtRingerTestType;
|
|
|
|
/**
|
|
* \breif This struct describes line voltage test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
int32 vAcTip; /*!<Foreign AC voltage on the tip lead.*/
|
|
int32 vAcRing; /*!<Foreign AC voltage on the ring lead.*/
|
|
int32 vAcDiff; /*!<Foreign AC differential voltage between tip and ring leads.*/
|
|
int32 vDcTip; /*!<Foreign DC voltage on the tip lead.*/
|
|
int32 vDcRing; /*!<Foreign DC voltage on the ring lead.*/
|
|
int32 vDcDiff; /*!<Foreign DC differential voltage between tip and ring leads.*/
|
|
} EVA_LtLineVResultType;
|
|
|
|
/**
|
|
* \breif This struct describes receiver Off-Hook test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
int32 rLoop1; /*!<Loop resistances during the test.*/
|
|
int32 rLoop2; /*!<Loop resistances during the test.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
} EVA_LtRohResultType;
|
|
|
|
/**
|
|
* \breif This struct describes ringers test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
int32 ren; /*!<REN from the Tip to Ring.*/
|
|
int32 rentg; /*!<REN from the Tip lead to ground.*/
|
|
int32 renrg; /*!<REN from the Ring lead to ground.*/
|
|
EVA_LtRingerTestType ringerTestType; /*!<Indicate ringger testType.*/
|
|
} EVA_LtRingersResultType;
|
|
|
|
/**
|
|
* \breif This struct describes resistive fault test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
int32 rtg; /*!<Registance from the Tip lead to ground.*/
|
|
int32 rrg; /*!<Registance from the Ring lead to ground.*/
|
|
int32 rtr; /*!<Registance between Tip and Ring leads.*/
|
|
int32 rGnd; /*!<Resistance betweent the tip/ring lead to ground.This resistance is measured only a fault exists between the tip and ring leads.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
} EVA_LtResFltResultType;
|
|
|
|
/**
|
|
* \breif This struct describes capacitance measurement test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
int32 ctg; /*!<Capacitance from the Tip lead to ground.*/
|
|
int32 crg; /*!<Capacitance from the Ring lead to ground.*/
|
|
int32 ctr; /*!<Capacitance between Tip and Ring leads.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
} EVA_LtCapResultType;
|
|
|
|
/**
|
|
* \breif This struct describes DC feed self test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
int32 rTestLoad; /*!<Measured the value of the external test load resistor if present.*/
|
|
int32 vTestLoad; /*!<Measured the measured voltage across the test load resistor.*/
|
|
int32 iTestLoad; /*!<Measured the measured current through the test load resistor.*/
|
|
|
|
} EVA_LtDcFeedSTResultType;
|
|
|
|
/**
|
|
* \breif This struct describes read Loop condition test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
int32 rloop; /*!<Measured loop resistance.*/
|
|
int32 imt; /*!<Sensed metalic current.*/
|
|
int32 ilg; /*!<Sensed longitudinal current.*/
|
|
int32 vab; /*!<Sensed voltage on AB(tip/ring) leads.*/
|
|
int32 vag; /*!<Sensed voltage on AG(ring/ground) leads.*/
|
|
int32 vbg; /*!<Sensed voltage on BG(tip/ground) leads.*/
|
|
int32 vbat1; /*!<Battery 1 measured voltage.*/
|
|
int32 vbat2; /*!<Battery 2 measured voltage.*/
|
|
int32 vbat3; /*!<Battery 3 measured voltage.*/
|
|
} EVA_LtRdLoopCondResultType;
|
|
|
|
/**
|
|
* \breif This struct describes DC voltage test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
int32 measuredVoltage1; /*!<Measured voltage across the tip and ring leads when +testVoltage is applied.*/
|
|
int32 measuredVoltage2; /*!<Measured voltage across the tip and ring leads when -testVoltage is applied.*/
|
|
|
|
} EVA_LtDcVoltageResultType;
|
|
|
|
/**
|
|
* \breif This struct describes ringing self test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
int32 openCktRingVol; /*!<Measured open circuit ringing voltage.*/
|
|
int32 freq; /*!<Measured ringing frequency.*/
|
|
int32 acRload; /*!<Indicates the computed AC test load resistance that was applied during the test.*/
|
|
int32 iRload; /*!<Meausred current through the rLoad .*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
} EVA_LtRingingSTResultType;
|
|
|
|
/**
|
|
* \breif This struct describes on/off hook self test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
} EVA_LtOnOffHookSTResultType;
|
|
|
|
/**
|
|
* \breif This struct describes read battery conditions test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
int32 bat1; /*!<Measured battery 1 voltage.*/
|
|
int32 bat2; /*!<Measured battery 2 voltage.*/
|
|
int32 bat3; /*!<Measured battery 3 voltage.*/
|
|
|
|
} EVA_LtReadBatCondResultType;
|
|
|
|
/**
|
|
* \breif This struct describes pre line voltage test result.
|
|
*/
|
|
typedef struct {
|
|
uint16 fltMask; /*!<Indicates faults that may have occurred during the test.*/
|
|
uint16 measStatus; /*!<Indicate measurement status.*/
|
|
} EVA_LtPreLineVResultType;
|
|
|
|
|
|
|
|
/*SLICONLAB*/
|
|
|
|
/**
|
|
* \breif Define EVA_MLT_MAX_IV_SAMPLES as 6.
|
|
*/
|
|
#define EVA_MLT_MAX_IV_SAMPLES 6
|
|
|
|
/**
|
|
* \breif Define EVA_MLT_MAX_PRESERVE_RAM as 128.
|
|
*/
|
|
#define EVA_MLT_MAX_PRESERVE_RAM 128
|
|
|
|
/**
|
|
* \breif Define EVA_MLT_MAX_PRESERVE_REG as 32.
|
|
*/
|
|
#define EVA_MLT_MAX_PRESERVE_REG 32
|
|
|
|
/**
|
|
* \breif This struct describes structure to store I/V measurements.
|
|
*/
|
|
typedef struct {
|
|
int32 vtip[EVA_MLT_MAX_IV_SAMPLES];
|
|
int32 vring[EVA_MLT_MAX_IV_SAMPLES];
|
|
int32 itip[EVA_MLT_MAX_IV_SAMPLES];
|
|
int32 iring[EVA_MLT_MAX_IV_SAMPLES];
|
|
int32 vloop[EVA_MLT_MAX_IV_SAMPLES];
|
|
int32 iloop[EVA_MLT_MAX_IV_SAMPLES];
|
|
int32 vlong[EVA_MLT_MAX_IV_SAMPLES];
|
|
int32 ilong[EVA_MLT_MAX_IV_SAMPLES];
|
|
} EVA_ProSLIC_iv_t;
|
|
|
|
|
|
/**
|
|
* \breif This struct describes general terminal measurement.
|
|
*/
|
|
typedef struct {
|
|
int32 measTR; /*!<Tip to Ring measument.*/
|
|
int32 measTG; /*!<Tip to GND measument.*/
|
|
int32 measRG; /*!<Ring to GND measument.*/
|
|
int32 measAUX;
|
|
int32 measTR2;
|
|
int32 measTG2;
|
|
int32 measRG2;
|
|
int trFlag;
|
|
int tgFlag;
|
|
int rgFlag;
|
|
int auxFlag;
|
|
uint16 time1;
|
|
uint16 time2;
|
|
uint16 time3;
|
|
uint8 resultsValid;
|
|
uint8 ahsFlag;
|
|
EVA_ProSLIC_iv_t term;
|
|
uint8 flags[16];
|
|
int32 slopeErr;
|
|
} EVA_ProSLIC_term_meas_t;
|
|
|
|
/**
|
|
* \breif This struct describes ROH measument.
|
|
*/
|
|
typedef struct {
|
|
int rohTrue;
|
|
int resultsValid;
|
|
} EVA_ProSLIC_roh_meas_t;
|
|
|
|
/**
|
|
* \breif This struct describes REN test calibration coefficients to be stored.
|
|
*/
|
|
typedef struct {
|
|
int32 highRenSlope;
|
|
int32 lowRenSlope ;
|
|
int32 highRenOffs ;
|
|
int32 lowRenOffs ;
|
|
int32 renTrans ;
|
|
int32 extraLowRenSlope;
|
|
int32 extraLowRenOffset;
|
|
} EVA_ProSLIC_rencal_t;
|
|
|
|
/**
|
|
* \breif This struct describes REN measument.
|
|
*/
|
|
typedef struct {
|
|
EVA_ProSLIC_rencal_t calData;
|
|
int32 renValue;
|
|
int renFlag;
|
|
int renCalFlag;
|
|
int resultsValid;
|
|
} EVA_ProSLIC_ren_meas_t;
|
|
|
|
/**
|
|
* \breif This struct describes RAM init information.
|
|
*/
|
|
typedef struct {
|
|
uint16 address;
|
|
uint32 initValue;
|
|
} EVA_ProslicRAMInit;
|
|
|
|
/**
|
|
* \breif This struct describes reg init information.
|
|
*/
|
|
typedef struct {
|
|
uint8 address;
|
|
uint8 initValue;
|
|
} EVA_ProslicRegInit;
|
|
|
|
#ifdef WIN32
|
|
/**
|
|
* \breif This struct describes time profile.
|
|
*/
|
|
typedef struct {
|
|
_int64 time;
|
|
} EVA_timeProfile;
|
|
#endif
|
|
|
|
/**
|
|
* \breif This struct describes optional runtime/per channel MLT configuration.
|
|
*/
|
|
typedef struct {
|
|
uint16 mlt_poll_rate_offs;
|
|
uint16 mlt_poll_rate;
|
|
int32 mlt_prot_res;
|
|
int32 mlt_line_cap;
|
|
int32 mlt_emi_cap;
|
|
int32 mlt_femf_samples;
|
|
uint8 mlt_ext_v_flag;
|
|
}EVA_ProSLIC_mlt_config_t;
|
|
|
|
/**
|
|
* \breif This struct describes main MLT channel structure.
|
|
*/
|
|
typedef struct{
|
|
int * pProslic; /*!<Linkage to ProSLIC API channel structure.*/
|
|
EVA_ProSLIC_term_meas_t resFaults; /*!<Stores results of resistive faults test.*/
|
|
EVA_ProSLIC_term_meas_t resFaultsRaw;
|
|
EVA_ProSLIC_term_meas_t hazVAC; /*!<Stores AC results of foreign/hazardous voltage test.*/
|
|
EVA_ProSLIC_term_meas_t hazVDC; /*!<Stores DC results of foreign/hazardous voltage test.*/
|
|
EVA_ProSLIC_term_meas_t capFaults; /*!<Stores results of capacitance test.*/
|
|
EVA_ProSLIC_term_meas_t capFaultsRaw;
|
|
EVA_ProSLIC_term_meas_t hazIDC;
|
|
EVA_ProSLIC_term_meas_t hazIAC;
|
|
EVA_ProSLIC_roh_meas_t roh; /*!<Stores results of receiver offhook test.*/
|
|
EVA_ProSLIC_ren_meas_t ren; /*!<Stores results of REN test.*/
|
|
EVA_ProslicRAMInit preserveRAM[EVA_MLT_MAX_PRESERVE_RAM]; /*!<Storage for resotoring entry conditions.*/
|
|
EVA_ProslicRegInit preserveReg[EVA_MLT_MAX_PRESERVE_REG]; /*!<Storage for resotoring entry conditions.*/
|
|
EVA_ProslicRAMInit preserveAuxRAM[EVA_MLT_MAX_PRESERVE_RAM]; /*!<Auxillary storage for revision specific locations.*/
|
|
EVA_ProslicRegInit preserveAuxReg[EVA_MLT_MAX_PRESERVE_REG]; /*!<Auxillary storage for revision specific locations.*/
|
|
#ifdef WIN32
|
|
EVA_timeProfile startTime;
|
|
EVA_timeProfile timeDelay;
|
|
int exec_time;
|
|
#endif
|
|
#ifdef MLT_DLL
|
|
EVA_timeProfile runTime;
|
|
#endif
|
|
EVA_ProSLIC_mlt_config_t mlt_config; /*!<optional runtime/per channel MLT configuration.*/
|
|
int pm_bom_flag;
|
|
}EVA_ProSLICMLTType;
|
|
|
|
/** GR909 device type */
|
|
/**
|
|
* \breif This struct describes GR909 device.
|
|
*/
|
|
typedef enum
|
|
{
|
|
IFX_TAPI_GR909_DEV_VMMC, /*!<Product using the voice engine, such as XWAY ARX188, XWAY GRX188.*/
|
|
IFX_TAPI_GR909_DEV_VINCPE, /*!<Product of the XWAY VINETIC-CPE, XWAY VINETIC-ATA family.*/
|
|
IFX_TAPI_GR909_DEV_DXT, /*!<Product of the XWAY DUSLIC-xT family.*/
|
|
IFX_TAPI_GR909_DEV_DXS /*!<Product of the XWAY DUSLIC-xS family.*/
|
|
} EVA_IFX_TAPI_GR909_DEV_t;
|
|
|
|
/**
|
|
* \breif This struct describes a type for handling boolean issues.
|
|
*/
|
|
typedef enum {
|
|
IFX_FALSE = 0, /*!<False.*/
|
|
IFX_TRUE = 1 /*!<True.*/
|
|
} EVA_IFX_boolean_t;
|
|
|
|
|
|
/**
|
|
* \breif This struct describes reading the NLT capacitance measurement results.
|
|
*/
|
|
typedef struct
|
|
{
|
|
uint16 dev; /*!<Device number (in).*/
|
|
uint16 ch; /*!<Channel number (in).*/
|
|
EVA_IFX_boolean_t bValidTip2Ring; /*!<Validity of measurement result tip to ring (out).*/
|
|
uint32 nCapTip2Ring; /*!<Measured capacitance tip to ring [nF] (out).*/
|
|
EVA_IFX_boolean_t bValidLine2Gnd; /*!<Validity of measurement results tip to ground and ring to ground (out).*/
|
|
uint32 nCapTip2Gnd; /*!<Measured capacitance tip to ground [nF] (out).*/
|
|
uint32 nCapRing2Gnd; /*!<Measured capacitance ring to ground [nF] (out).*/
|
|
float fOlCapTip2Ring; /*!<Stored open loop capacitance tip to ring [nF] (out).*/
|
|
float fOlCapTip2Gnd; /*!<Stored open loop capacitance tip to ground [nF] (out).*/
|
|
float fOlCapRing2Gnd; /*!<Stored open loop capacitance ring to ground [nF] (out).*/
|
|
} EVA_IFX_TAPI_NLT_CAPACITANCE_RESULT_t;
|
|
|
|
/**
|
|
* \breif This struct describes GR909 results.
|
|
*/
|
|
typedef struct
|
|
{
|
|
uint16 dev; /*!<Device number (in).*/
|
|
uint16 ch; /*!<Channel number (in).*/
|
|
EVA_IFX_TAPI_GR909_DEV_t dev_type; /*!<Device type, see \ref IFX_TAPI_GR909_DEV_t.*/
|
|
uint32 valid; /*!<Valid results flag, see \ref IFX_TAPI_GR909_VALID_.*/
|
|
uint32 passed; /*!<Passed flag according to valid flag, see \ref IFX_TAPI_GR909_TEST_t.*/
|
|
uint32 HPT_AC_R2G; /*!<HPT AC RING wire to GND result.*/
|
|
uint32 HPT_AC_T2G; /*!<HPT AC TIP wire to GND result.*/
|
|
uint32 HPT_AC_T2R; /*!<HPT AC TIP wire to RING wire result.*/
|
|
int32 HPT_DC_R2G; /*!<HPT DC RING wire to GND result.*/
|
|
int32 HPT_DC_T2G; /*!<HPT DC TIP wire to GND result.*/
|
|
int32 HPT_DC_T2R; /*!<HPT DC TIP wire to RING wire result.*/
|
|
uint32 FEMF_AC_R2G; /*!<FEMF AC RING wire to GND result.*/
|
|
uint32 FEMF_AC_T2G; /*!<FEMF AC TIP wire to GND result.*/
|
|
uint32 FEMF_AC_T2R; /*!<FEMF AC TIP wire to RING wire result.*/
|
|
int32 FEMF_DC_R2G; /*!<FEMF DC RING wire to GND result.*/
|
|
int32 FEMF_DC_T2G; /*!<FEMF DC TIP wire to GND result.*/
|
|
int32 FEMF_DC_T2R; /*!<FEMF DC TIP wire to RING wire result.*/
|
|
uint32 RFT_R2G; /*!<RFT RING wire to GND result.*/
|
|
uint32 RFT_T2G; /*!<RFT TIP wire to GND result.*/
|
|
uint32 RFT_T2R; /*!<RFT TIP wire to RING wire result.*/
|
|
uint32 ROH_T2R_L; /*!<ROH TIP wire to RING wire result for low voltage.*/
|
|
uint32 ROH_T2R_H; /*!<ROH TIP wire to RING wire result for high voltage.*/
|
|
uint32 RIT_RES; /*!<RIT result.*/
|
|
float OLR_T2R; /*!<Stored open loop resistance tip to ring [Ohm] (out).*/
|
|
float OLR_T2G; /*!<Stored open loop resistance tip to ground [Ohm] (out).*/
|
|
float OLR_R2G; /*!<Stored open loop resistance ring to ground [Ohm] (out).*/
|
|
} EVA_IFX_TAPI_GR909_RESULT_t;
|
|
|
|
/**
|
|
* \breif This struct describes Intel line test results.
|
|
*/
|
|
typedef struct {
|
|
EVA_IFX_TAPI_GR909_RESULT_t GR909Results; /*!<Test results for the test LT_TID_ALL_GR_909.*/
|
|
EVA_IFX_TAPI_NLT_CAPACITANCE_RESULT_t CapResult; /*!<Test results for the test LT_TID_CAP.*/
|
|
} EVA_LtIntelTestResultType;
|
|
|
|
/***************line test struct******************/
|
|
|
|
/* China Unicom inside and outside line test */
|
|
|
|
/**
|
|
* \breif This struct describes outline status.
|
|
*/
|
|
typedef enum {
|
|
OutLine_Normal, /*!<Normal.*/
|
|
OutLine_PhoneDisconnet, /*!<PhoneDisconnet.*/
|
|
OutLine_PhoneoffHook, /*!<PhoneoffHook.*/
|
|
OutLine_PowerLineContacted, /*!<PowerLineContacted: AGACVoltage or BGACVoltage is >50Vrms.*/
|
|
OutLine_BothLineContacted, /*!<BothLineContacted: ALineMixOther && BLineMixOther.*/
|
|
OutLine_ALineMixOther , /*!<ALineMixOther: AGDCVoltage >40V.*/
|
|
OutLine_BLineMixOther, /*!<BLineMixOther: BGDCVoltage >40V.*/
|
|
OutLine_BothLineGrounding, /*!<BothLineGrounding:ALineGrounding && BLineGrounding.*/
|
|
OutLine_ALineGrounding, /*!<ALineGrounding:AGInsuluationResistance <20 000 ohm.*/
|
|
OutLine_BLineGrounding, /*!<BLineGrounding: BGInsuluationResistance <20 000 ohm.*/
|
|
OutLine_ABLinePoorInsulation, /*!<ABLinePoorInsulation: ABInsuluationResistance is between 2 000 ohm to 20 000 ohm.*/
|
|
OutLine_ShortCircuit, /*!<ShortCircuit: ABInsuluationResistance is <500 ohm.*/
|
|
OutLine_BothLineLeakageToGround, /*!<BothLineLeakageToGround: ALineLeakageToGround && BLineLeakageToGround.*/
|
|
OutLine_ALineLeakageToGround, /*!<ALineLeakageToGround:AGCapacitance>0.7 uF.*/
|
|
OutLine_BLineLeakageToGround /*!<BLineLeakageToGround:AGCapacitance>0.7 uF.*/
|
|
} Outline_Status;
|
|
|
|
/**
|
|
* \breif This struct describes outline param.
|
|
*/
|
|
typedef struct{
|
|
int32 AGACVoltage; /*!<Tip to Ground AC voltage: mVrms.*/
|
|
int32 BGACVoltage; /*!<Ring to Ground AC voltage: mVrms.*/
|
|
int32 ABACVoltage; /*!<Tip to Ring AC voltage: mVrms.*/
|
|
int32 AGDCVoltage; /*!<Tip to Ground DC voltage: mV.*/
|
|
int32 BGDCVoltage; /*!<Ring to Ground DC voltage: mV.*/
|
|
int32 ABDCVoltage; /*!<Tip to Ring DC voltage: mV.*/
|
|
int32 AGInsuluationResistance; /*!<Tip to Ground resistance: ohm.*/
|
|
int32 BGInsuluationResistance; /*!<Ring to Ground resistance: ohm.*/
|
|
int32 ABInsuluationResistance; /*!<Tip to Ring resistance: ohm.*/
|
|
int32 AGCapacitance; /*!<Tip to Ground Capacitance: pF.*/
|
|
int32 BGCapacitance; /*!<Tip to Ground Capacitance: pF.*/
|
|
int32 ABCapacitance; /*!<Tip to Ground Capacitance: pF.*/
|
|
} Outline_Param;
|
|
|
|
/**
|
|
* \breif This struct describes inline status.
|
|
*/
|
|
typedef enum {
|
|
Inline_Test_Item_Normal, /*!<Normal.*/
|
|
Inline_Test_Item_UNNormal /*!<Unnormal.*/
|
|
} Inline_Status;
|
|
|
|
/**
|
|
* \breif This struct describes inline param.
|
|
*/
|
|
typedef struct {
|
|
signed long DCFeed_Voltage; /*!<Tip To Ring Voltage:V,the default vaule is set by interface.*/
|
|
signed long Ringing_Voltage; /*!<Tip To Ring Voltage when ring:Vrms,the default value is set by interface.*/
|
|
signed long Loop_Current; /*!<Tip to Ring Current:mA.*/
|
|
} Inline_Param;
|
|
|
|
/**
|
|
* \breif This struct describes Zarlink Phone Status.
|
|
*/
|
|
typedef enum {
|
|
ZarlinkOnHook, /*!<Onhook.*/
|
|
ZarlinkPhoneDisconnet, /*!<Phone Disconnect.*/
|
|
ZarlinkOffHook /*!<Offhook.*/
|
|
} ZarlinkPhoneStatus;
|
|
|
|
/**
|
|
* \breif This struct describes Unicom line test.
|
|
*/
|
|
typedef struct {
|
|
Outline_Param Outline; /*!<Outline param.*/
|
|
Inline_Param Inline; /*!<Inline param.*/
|
|
Outline_Status OutlineStatus; /*!<Outline status.*/
|
|
Inline_Status InlineDCVStatus; /*!<Inline DC feed voltage status.*/
|
|
Inline_Status InlineRingVStatus; /*!<Inline ringing voltage status.*/
|
|
Inline_Status InlineCurrentStatus; /*!<Inline current status.*/
|
|
} infcUnicomLineTest_t;
|
|
|
|
/**
|
|
* \breif This struct describes monitor type.
|
|
*/
|
|
typedef struct
|
|
{
|
|
int32 vtr; /*!<Voltage, tip-ring in mV.*/
|
|
int32 vtip; /*!<Voltage, tip-ground in mV.*/
|
|
int32 vring; /*!<Voltage, ring-ground in mV.*/
|
|
int32 vbat; /*!<Voltage, battery in mV.*/
|
|
int32 vdc; /*!<Voltage, Vdc in mV.*/
|
|
int32 vlong; /*!<Voltage, longitudinal in mV.*/
|
|
int32 itr; /*!<Loop current, in uA tip-ring.*/
|
|
int32 itip; /*!<Loop current, in uA tip.*/
|
|
int32 iring; /*!<Loop current, in uA ring.*/
|
|
int32 ilong; /*!<Loop current, in uA longitudinal.*/
|
|
int32 p_hvic; /*!<On-chip Power Calculation in mw.*/
|
|
} EVA_proslicMonitorType;
|
|
|
|
/* China Unicom inside and outside line test */
|
|
|
|
|
|
/* ========================================
|
|
* Stream Section
|
|
* ======================================== */
|
|
/**
|
|
* \breif This struct describes stream session information.
|
|
*/
|
|
typedef struct {
|
|
ipVer_e ver; /*!<IP version of the session.*/
|
|
netAddr_t srcAddr; /*!<Source address of the session.*/
|
|
netAddr_t dstAddr; /*!<Destination address of the session.*/
|
|
uint8 encrypt; /*!<Not used now.*/
|
|
uint32 dur; /*!<Not used now.*/
|
|
int rtpTosVal; /*!<Tos value in RTP packet header.*/
|
|
int rtcpTosVal; /*!<Tos value in RTCP packet header.*/
|
|
int rtp8021pVal; /*!<802.1p value in RTP packet header.*/
|
|
int rtcp8021pVal; /*!<802.1p value in RTCP packet header.*/
|
|
int vlan_prio; /*!<Vlan priority .*/
|
|
int queue_num; /*!<Queue number.*/
|
|
int rtpCheckThreshold; /*!<Rtp check threshold, time unit ms.*/
|
|
int plc_enable; /*!<PLC switch.*/
|
|
int rtcp_report_interval; /*!<Rtcp report interval set.*/
|
|
uint8 dev[16]; /*!<Specific interface for RTP/RTCP/T38 device bind.*/
|
|
int rtcp_xr_conf; /*!<bit0~bit6: xr block1~block7 switch, rtcp_xr disable(0).*/
|
|
}session_t;
|
|
|
|
/**
|
|
* \breif This enum describes cipher type.
|
|
*/
|
|
typedef enum {
|
|
EVA_NULL_CIPHER = 0, /*!<Null cipher.*/
|
|
EVA_AES_CM_128, /*!<AES_CM_128.*/
|
|
EVA_F8_128, /*!<F8_128.*/
|
|
} EVA_cipher_type_e;
|
|
|
|
/**
|
|
* \breif This enum describes authentication type.
|
|
*/
|
|
typedef enum {
|
|
EVA_NULL_AUTH = 0, /*!<Null authentication.*/
|
|
EVA_HMAC_SHA1_32, /*!<HMAC_SHA1_32.*/
|
|
EVA_HMAC_SHA1_80, /*!<HMAC_SHA1_80.*/
|
|
} EVA_auth_type_e;
|
|
|
|
/**
|
|
* \breif This struct describes srtp information.
|
|
*/
|
|
typedef struct {
|
|
EVA_cipher_type_e cipher_type; /*!<Cipher type.*/
|
|
EVA_auth_type_e auth_type; /*!<Authentication type.*/
|
|
unsigned char key[100]; /*!<Key.*/
|
|
}EVA_srtp_info_t;
|
|
|
|
/**
|
|
* \breif This struct describes stream attribution.
|
|
*/
|
|
typedef struct {
|
|
codec_e payloadSelect; /*!<Codec used for streaming.*/
|
|
uint8 ulPayloadSelect; /*!<Codec used for uplink streaming.*/
|
|
enableControl_e rtpRedundant; /*!<Enable/disable rtp redundant.*/
|
|
redMode_e rtpRedundantMode; /*!<Rtp redundant mode.*/
|
|
uint8 rtpRedundantPt; /*!<Rtp redundant payload type.*/
|
|
enableControl_e rfc2833Redundant; /*!<Enable/disable RFC2833 redundant.*/
|
|
redMode_e rfc2833RedundantMode; /*!<RFC2833 redundant mode.*/
|
|
pTime_e ulPtime; /*!<Uplink Stream P-time (P-rate) configuration.*/
|
|
pTime_e dlPtime; /*!<Downlink Stream P-time (P-rate) configuration*/
|
|
evaBitrate_e ulBitrate; /*!<Uplink bit rate.*/
|
|
enableControl_e dtmfRelay; /*!<Enable/disable DTMF relay (RFC2833/4733).*/
|
|
enableControl_e dtmfRemove; /*!<Remove DTMF in inband mode.*/
|
|
enableControl_e faxRemoveRelay; /*!<Enable or disable fax remove relay.*/
|
|
enableControl_e VAD; /*!<Enable or disable VAD.*/
|
|
enableControl_e CNG; /*!<Enable or disable CNG.*/
|
|
enableControl_e silenceComp; /*!<Enable/disable silence compression.*/
|
|
strmDir_e direction; /*!<Stream transmission direction.*/
|
|
uint32 jbUpdateTime; /*!<Not used now.*/
|
|
uint8 rfc2833DtmfVolume; /*!<RFC2833 dtmf volume value.*/
|
|
uint8 tevCtlFlag; /*!<0x01:piggyback events enable;0x02:tone events enable;0x04:CAS tone events enable.*/
|
|
enableControl_e vbdEnable; /*!<Enable or disable vbd for V152.*/
|
|
uint8 vbdCodec; /*!<Vbd codec for V152.*/
|
|
uint8 vbdPt; /*!<Vbd payload type for V152.*/
|
|
vbdfaxmodemflag vbdModemFaxFlag; /*!<Vbd modem fax flag for V152.*/
|
|
codec_e payloadSelectSave; /*!<Save codec for V152.*/
|
|
uint8 faxStage; /*!<Fax stage for V152.*/
|
|
evaBool_e isV152; /*!<Is in V152 stage.*/
|
|
EVA_srtp_info_t policy; /*!<Srtp policy.*/
|
|
}strmAttr_t;
|
|
|
|
/**
|
|
* \breif This struct describes jitter buffer configuration.
|
|
*/
|
|
typedef struct {
|
|
jbMode_e mode; /*!<Jitter buffer mode.*/
|
|
uint32 szJbMax; /*!<Maximum size of the jitter buffer.*/
|
|
uint32 szJbInit; /*!<Initial size of the jitter buffer.*/
|
|
int type; /*!<Jitter buffer type.*/
|
|
}jbConfig_t;
|
|
|
|
|
|
/**
|
|
* \breif This struct describes t38 control configuration.
|
|
*/
|
|
typedef struct {
|
|
int32 version; /*!<T38 version.*/
|
|
int32 maxRate; /*!<Maximum fax transmission rate.*/
|
|
int32 eccType; /*!<T38 error correct type.*/
|
|
int32 rateMgnt; /*!<T38 Fax rate management type.*/
|
|
int32 opMode; /*!<Faxer type. If user configure unknown, DSP will auto detect faxer type.*/
|
|
int32 connection_type; /*!<Connection type.*/
|
|
int32 max_jitter; /*!<Max jitter.*/
|
|
int32 ecc_signal; /*!<Ecc signal.*/
|
|
int32 ecc_num; /*!<Ecc number.*/
|
|
int32 ecm_enable; /*!<Enable or disable ecm.*/
|
|
int32 nsf_enable; /*!<Permit NSF to pass unchanged.*/
|
|
int32 imagePktSize; /*!<Image packet size.*/
|
|
int32 maxRemoteUDPTL; /*!<Max remote UDPTL.*/
|
|
}t38Ctrl_t;
|
|
|
|
/**
|
|
* \breif This struct describes stream config result.
|
|
*/
|
|
typedef enum {
|
|
CONFIG_SUCCESS = 0, /*!<Config success.*/
|
|
CONFIG_FAIL = 1, /*!<Config fail.*/
|
|
} strmConfig_result;
|
|
|
|
/**
|
|
* \breif This struct describes stream config information.
|
|
*/
|
|
typedef struct {
|
|
session_t session; /*!<Stream session information.*/
|
|
strmAttr_t strmAttr; /*!<Stream attribute configuration.*/
|
|
uint8 payloadType[MAX_CODEC_NUM]; /*!<Payload type number for each codec.*/
|
|
jbConfig_t jbConf; /*!<Stream jitter buffer configuration.*/
|
|
t38Ctrl_t t38Ctrl; /*!<T38 configuration.*/
|
|
strmConfig_result preConfigResult; /*!<Stream config result.*/
|
|
}strmConfig_t;
|
|
|
|
/**
|
|
* \breif This struct describes currently media information for user query.
|
|
*/
|
|
typedef struct {
|
|
uint64 rtpError; /*!<Received error packet number, including invalid size, wrong SSRC number and wrong RTP version.*/
|
|
uint64 packetRecv; /*!<Received packet number.*/
|
|
uint64 packetLoss; /*!<Received packet loss number.*/
|
|
uint64 packetLossRate; /*!<Received packet loss rate.*/
|
|
uint64 packetOutoftime; /*!<Number of packets that were received too late.*/
|
|
uint64 packetDiscarded; /*!<Incoming packets discarded because the queue exceeds its max size.*/
|
|
uint64 maxJitter; /*!<Maximum packet jitter time in (ms).*/
|
|
uint64 maxRTCPInterval; /*!<Maximum received RTCP packet interval in (ms).*/
|
|
uint64 bufUnderflow; /*!<The number of DSP buffer underflow.*/
|
|
uint64 bufOverflow; /*!<The number of DSP buffer overflow.*/
|
|
uint64 packetSent; /*!<Sent packet number.*/
|
|
uint64 bytesSent; /*!<Sent bytes number.*/
|
|
uint64 bytesRecv; /*!<Received bytes number.*/
|
|
uint64 farEndpacketLossRate; /*!<Packet loss rate on far end.*/
|
|
uint64 avgJitter; /*!<Average jitter value.*/
|
|
uint64 farEndJitter; /*!<Jitter value on far end.*/
|
|
uint64 avgFarEndJitter; /*!<Average jitter value on far end.*/
|
|
uint64 avgRTCPInterval; /*!<Average RTCP interval time.*/
|
|
uint64 revInternalJitter; /*!<The jitter of receive packet.*/
|
|
uint64 avgRevInternalJitter; /*!<The average jitter value of receive packet.*/
|
|
uint64 roundTripDelay; /*!<Round trip delay.*/
|
|
uint64 avgRoundTripDelay; /*!<Average round trip delay.*/
|
|
uint64 maxRoundTripDelay; /*!<Max value of round trip delay.*/
|
|
uint64 rtcpPacketRecv; /*!<Number of ingress rtcp packets.*/
|
|
uint64 rtcpPacketSend; /*!<Number of egress rtcp packets.*/
|
|
uint64 rtcpXrPacketRecv; /*!<Number of ingress rtcp XR packets.*/
|
|
uint64 rtcpXrPacketSend; /*!<Number of egress rtcp XR packets.*/
|
|
float MOSLQ; /*!<MOS_Listening quality.*/
|
|
float MOSCQ; /*!<MOS_Conversational quality.*/
|
|
uint32 Rfactor; /*!<Voice quality metric.*/
|
|
}mediaInfo_t;
|
|
|
|
|
|
/* ========================================
|
|
* Channel Section
|
|
* ======================================== */
|
|
/**
|
|
* \breif This struct describes the configuration information of channel.
|
|
*/
|
|
typedef struct {
|
|
uint16 detectMask; /*!<Bit mask configuration to enable/disable DSP detectors.*/
|
|
int8 ampTx; /*!<Adjust Tx (output raw PCM) gain to the interface within -20 to 6db range, step by 0.5db.*/
|
|
int8 ampRx; /*!<Adjust Rx (input raw PCM) gain from the interface within -20 to 6db range, step by 0.5db.*/
|
|
int8 digitTx; /*!<speak gain,db, step by 0.5db.*/
|
|
int8 digitRx; /*!<listen gain,db, step by 0.5db.*/
|
|
|
|
struct {
|
|
int32 power; /*!<Dtmf detect power.*/
|
|
uint32 duration; /*!<Dtmf detect duration, Unit:5ms.*/
|
|
Dtmf_Deviation devAcc; /*!<Accept deviation.*/
|
|
Dtmf_Deviation devRej; /*!<Reject deviation.*/
|
|
}dtmfdet;
|
|
|
|
enableControl_e ecEnable; /*!<Enable or disable echo cancellation.*/
|
|
enableControl_e ecNlpEnable; /*!<Enable or disable ec nlp.*/
|
|
lecTailMode_e ecTailMode; /*!<Ec tail mode set.*/
|
|
enableControl_e ecAesEnable; /*!<Enable or disable ec aes.*/
|
|
enableControl_e ecBypass; /*!<Enable or disable ec bypass.*/
|
|
|
|
}chanConfig_t;
|
|
|
|
/* ========================================
|
|
* DSP Section
|
|
* ======================================== */
|
|
/**
|
|
* \breif This struct describes regular tone generation.
|
|
*/
|
|
typedef struct tone_regular_s
|
|
{
|
|
uint16 toneFreq[MAX_TONE_FREQ]; /*!<Up to 4 tones frequency can be configured for generation.*/
|
|
int16 tonePwr[MAX_TONE_FREQ]; /*!<Tone power for each tone frequency.*/
|
|
}tone_regular_t;
|
|
|
|
/**
|
|
* \breif This struct describes modulate tone generation.
|
|
*/
|
|
typedef struct tone_modulate_s
|
|
{
|
|
int16 baseFreq; /*!<Base frequency for amplitude modulation.*/
|
|
int16 modFreq; /*!<Amplitude modulation frequency.*/
|
|
union{
|
|
struct{
|
|
int16 maxPwr; /*!<Type I max modulation power.*/
|
|
int16 minPwr; /*!<Type I min modulation depth.*/
|
|
}typeI;
|
|
struct{
|
|
int16 modPwr; /*!<Type II modulation power.*/
|
|
int16 modDepth; /*!<Type II modulation depth.*/
|
|
}typeII;
|
|
}mod_type;
|
|
|
|
}tone_modulate_t;
|
|
|
|
/**
|
|
* \breif This struct describes tone generation.
|
|
*/
|
|
typedef struct {
|
|
toneType_e toneType; /*!<Type of Tone.*/
|
|
|
|
#if defined(FIVE_CADENCE_SUPPORT) || defined(CJ_DSP_SUPPORT)
|
|
tone_regular_t regular[MAX_CADENCE]; /*!<Regular tone struct.*/
|
|
tone_modulate_t modulate[MAX_CADENCE]; /*!<Modulate tone struct.*/
|
|
#else
|
|
tone_regular_t regular; /*!<Regular tone struct.*/
|
|
tone_modulate_t modulate; /*!<Modulate tone struct.*/
|
|
#endif
|
|
|
|
uint16 makeTime[MAX_CADENCE]; /*!<Time of signal on for each cadence.*/
|
|
uint16 breakTime[MAX_CADENCE]; /*!<Time of signal off for each cadence.*/
|
|
uint16 repeat[MAX_CADENCE]; /*!<Time of repeat for each cadence.*/
|
|
}tone_t;
|
|
|
|
/**
|
|
* \breif This struct describes attribution of a series of tone to be generated.
|
|
*/
|
|
typedef struct {
|
|
uint8 *toneIdSeq; /*!<Array of Tone ID to be played in sequence.*/
|
|
uint8 numOfTone; /*!<Number of Tone in the array.*/
|
|
}toneSeq_t;
|
|
|
|
/**
|
|
* \breif This struct describes configuration of call progress tone.
|
|
*/
|
|
typedef struct {
|
|
toneCode_e type; /*!<Type of call progress tone.*/
|
|
|
|
union {
|
|
struct {
|
|
int16 toneFreq[DUAL_TONE_FREQ]; /*!<Tone frequency(s) to be detected.*/
|
|
int16 toneDev[DUAL_TONE_FREQ]; /*!<Tolerated frequency deviation for each tone frequency detection.*/
|
|
int16 minMake[MAX_CADENCE]; /*!<Minimum make (signal-on) time of a cadence.*/
|
|
int16 maxMake[MAX_CADENCE]; /*!<Maximum make (signal-on) time of a cadence.*/
|
|
int16 minBreak[MAX_CADENCE]; /*!<Minimum break (signal-off) time of a cadence.*/
|
|
int16 maxBreak[MAX_CADENCE]; /*!<Maximum break (signal-off) time of a cadence.*/
|
|
int16 power; /*!<Tone power threshold for detection.*/
|
|
} dual;
|
|
struct {
|
|
int16 toneFreq[SIT_TONE_FREQ]; /*!<Tone frequency(s) to be detected.*/
|
|
int16 toneDev[SIT_TONE_FREQ]; /*!<Tolerated frequency deviation for each tone frequency detection.*/
|
|
int16 minShortDur; /*!<Minimum make (signal-on) time of the short tone cadence.*/
|
|
int16 maxShortDur; /*!<Maximum make (signal-on) time of the short tone cadence.*/
|
|
int16 minLongDur; /*!<Minimum make (signal-on) time of the long tone cadence.*/
|
|
int16 maxLongDur; /*!<Maximum make (signal-on) time of the long tone cadence.*/
|
|
int16 power; /*!<Tone power threshold for detection.*/
|
|
} sit;
|
|
};
|
|
}cpt_t;
|
|
|
|
/**
|
|
* \breif This struct describes DSP capability information.
|
|
*/
|
|
typedef struct {
|
|
uint16 dspId; /*!<Provide DSP ID information.*/
|
|
uint8 numOfChan; /*!<Number of channel supports on the DSP.*/
|
|
uint8 strmsPerChan; /*!<Number of streams supports on each channel.*/
|
|
uint32 codecSupport; /*!<Codecs supports on the DSP. Use MASK_CODEC_X to check.*/
|
|
uint32 ptimeSupport; /*!<Ptime supports on the DSP.*/
|
|
uint8 rtpRedundancy; /*!<Check if DSP supports RTP redundancy (RFC2198)..*/
|
|
uint8 maxEcTailLength; /*!<Maximum echo cancellation tail length that DSP supports.*/
|
|
}dspFeature_t;
|
|
|
|
/**
|
|
* \breif This struct describes dtmf detection information.
|
|
*/
|
|
typedef struct {
|
|
Dtmf_Deviation devAcc; /*!<Accept deviation.*/
|
|
Dtmf_Deviation devRej; /*!<Reject deviation.*/
|
|
}dtmfdet_t;
|
|
|
|
/**
|
|
* \breif This struct describes DSP direction.
|
|
*/
|
|
typedef enum {
|
|
DSP_RX, /*!<RX direction.*/
|
|
DSP_TX, /*!<TX direction.*/
|
|
DSP_INVALID /*!<Invalid.*/
|
|
}dsp_dir;
|
|
|
|
/**
|
|
* \breif This struct describes DSP replace data information.
|
|
*/
|
|
typedef struct {
|
|
int enable; /*!<Function enable/disable.*/
|
|
dsp_dir dir; /*!<Direction,rx/tx.*/
|
|
int stage; /*!<DSP stage.*/
|
|
char filePath[128]; /*!<Replace file path.*/
|
|
}replaceData_t;
|
|
|
|
#endif /* End of _EVA_STRUCT_H_ */
|
|
|