Contents

API Reference Guide for OTX Generic Hardware Driver

Odin TeleSystems Inc.
Doc. No. 1211-1-SDA-1006-1
Doc. Rev. 2.0.1.0
Doc. Date 11/05/04
Copyright \'a9 1999-2004 Odin TeleSystems Inc., All Rights Reserved

Function Reference

Driver and Generic Functions

OTX Driver Level Functions - OtxDrvXXX()
OTX Generic Functions/Macros

Physical Device Functions

OTX Board Level Functions - OtxBrdXXX()
OTX T1/E1 Line Interface Device Functions - OtxT1XXX(), OtxE1XXX()
OTX POTS Line Interface Device Functions - OtxPotsXXX()
OTX ISDN BRI Line Interface Device Functions - OtxBriXXX()
OTX DSP Device Management Functions - OtxDspXXX()

Logical Device Functions

OTX Logical Hdlc Sender/Receiver Functions - OtxHdlcXXX()
OTX Tone Generator/Detector Functions - OtxToneXXX()
OTX Serial Data Manipulation Function Prototypes - OtxDataXXX()

Constant and Type Reference

Driver Level

OTX Driver Level Types
OTX Driver Level Result Codes
OTX Driver Level Constants

Physical Devices

OTX Board Level Constants and Types
OTX DSP Device Management Constants, and Types
OTX T1/E1 Line Interface Constants and Types
OTX POTS Line Interface Device Constants and Types
OTX ISDN BRI Line Interface Device Constants and Types

Logical Devices

OTX Hdlc Device Constants, and Types
OTX Tone Logical Data Filter Device Constants, and Types

Header File Reference

OtxBrd.h
OtxBrdD.h
OtxBri.h
OtxBriD.h
OtxData.h
OtxDrv.h
OtxDsp.h
OtxDspD.h
OtxErr.h
OtxHdlc.h
OtxHdlcD.h
OtxPots.h
OtxPotsD.h
OtxRaw.h
OtxRawD.h
OtxT1E1.h
OtxT1E1D.h
OtxTone.h
OtxToneD.h
OtxType.h
OtxGeneric.h

OTX API Alphabetical References

Functions
Constants
Enum Types and Constants
Struct Types
Other Types

Communication protocol between Host and Dsp (DspIoctl.h)


DSP SDK Host .. DSP Macro, Constant and Type Reference

Example

IO Control Code structure
The IO Control codes used (from Host towards the DSP code) are
16 bit values layed out as follows:


 1 1 1 1 1 1
 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0

|S|C|P|         Code            |
where
S - SDK System IO Codes - reserved

    1 - SDK Reserved System Codes

    0 - User application code

C - Data Complete - reserved

    0 - There is more data pending for this IO Code

    1 - Data is complete for this IO Code.

P - Padded octet for Data

    0 - Even number of octets were transferred. Data length (in words)
	reflects actual number of data octets transferred (2*octets).

    1 - Odd number of octets were transferred. Data length includes one
	padded octet.

Code - is the IO Control code value
Host-To-Dsp IO Control Communication

There is only one pending IO Control packet in the DSP HPI memory 
at any time. The Otx Driver buffers pending IO Control packets. The DSP 
application must act on the IO Control packet with minimum latency.

The DSP application processes the IO Control packets by performing 
these steps:
1. Retrieve (and possibly process) the data passed in the IO packet.
2. Writing return data (if any) to OTXDSP_SDK_IOCTL_DATA_ADDR and data
   length OTXDSP_SDK_IOCTL_DATA_LEN_ADDR.
3. Mark the completion of the packet by writing OTXDSP_SDK_IO_NO_COMMAND
   to the OTXDSP_SDK_IOCTL_CODE_ADDR.
4. Issue an interrupt towards the host.
The data used for the IO Control communication is packed in the following format.
1 1 1 1 1 1
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0

|           IO Code             |  OTXDSP_SDK_IOCTL_CODE_ADDR

|  LogDevType   |  Handle       |  OTXDSP_SDK_IOCTL_HANDLE_ADDR

|           Task Ref            |  OTXDSP_SDK_IOCTL_TASKREF_ADDR

|           Data Length (n)     |  OTXDSP_SDK_IOCTL_DATA_LEN_ADDR

|           Data Word 0         |  OTXDSP_SDK_IOCTL_DATA_ADDR

|           Data Word 1         |

:                               :

|           Data Word (n-1)     |
Dsp-To-Host Asynchronous Event Communication

The DSP code can buffer several Event packets in a circular buffer

The data used for the Event communication from the DSP towards 
the host is packed in the following format.
1 1 1 1 1 1
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0

|           Processing Addr     |       OTXDSP_SDK_EVENT_BUF_PROCESSING_ADDR

|S|C|P|     Event Code          |  >-+  OTXDSP_SDK_EVENT_BUF_ADDR (start of buffer)
|
|  LogDevType   |  Handle       |    |
|
|           TaskRef             |    |
|
|           TimeStamp bit 48-63 |    |
|
|           TimeStamp bit 32-47 |    |
|
|           TimeStamp bit 16-31 |    |
|
|           TimeStamp bit  0-15 |    |
|
|           Data Length (n=0)   |    |
|
|S|C|P|     Event Code          |    |
|
|  LogDevType   |  Handle       |    |
|
|           TaskRef             |    |
|
|           TimeStamp bit 48-63 |    |
|
|           TimeStamp bit 32-47 |    |
|
|           TimeStamp bit 16-31 |    |
|
|           TimeStamp bit  0-15 |    |
|
|           Data Length (n=2)   |    |
|
|           Data Word 0         |    |
|
|           Data Word 1         |    |
|
|  OTXDSP_SDK_EVENT_NO_COMMAND  |    |
|
:                               :    |
|
|                               |  <-+  End of Event buffer


*/ /*

Constants


  • OTX_ANY_PIPE_TIMESLOTS_MAX
  • OTX_DRIVER_DEVICE_HANDLE
  • OTX_H100_CT_BUS_MAX
  • OTX_H100_HIGHWAYS_MAX
  • OTX_H100_PIPE_TIMESLOTS_MAX
  • OTX_INVALID_EVENT_VALUE
  • OTX_INVALID_HANDLE_VALUE
  • OTX_LIB_HANDLE
  • OTX_LOCAL_HIGHWAYS_MAX
  • OTX_LOCAL_PIPE_TIMESLOTS_MAX
  • OTX_PIPE_TIMESLOTS_MAX
  • OTX_TASK_ASYNC
  • OTX_TASK_NONE
  • OTX_TASK_SYNC
  • OTX_TIME_INFINITY
  • OTX_TOTAL_HIGHWAYS_MAX

  • DspIoctl.h




    Enum Types and Constants


  • OTX_BOOL
  • OtxAttribTypeE
  • OtxBoardDeviceAttributesE
  • OtxBrdClockModeE
  • OtxBrdClockSourceE
  • OtxBrdDevSourcedCodesE
  • OtxBrdEventCodesE
  • OtxBrdResultCodesE
  • OtxBriLayer1StatusE
  • OtxBriLiModeE
  • OtxBurstDeviceAttributesE
  • OtxBurstEventCodesE
  • OtxCommonDeviceAttributesE
  • OtxCommonResultCodesE
  • OtxConstValGeneratorEventCodesE
  • OtxConstValGeneratorResultCodesE
  • OtxCtBusDataRateE
  • OtxCtBusDeviceAttributesE
  • OtxDataConverterEventCodesE
  • OtxDataFormatE
  • OtxDeviceEventCodesE
  • OtxDeviceInterfaceE
  • OtxDeviceStateE
  • OtxDriverDeviceAttributesE
  • OtxDspDeviceAttributesE
  • OtxDspEventCodesE
  • OtxDspResultCodesE
  • OtxDspSpmE
  • OtxDtmfDetectorAttributesE
  • OtxDtmfDetectorEventCodesE
  • OtxDtmfDetectorResultCodesE
  • OtxDtmfDialerEventCodesE
  • OtxDtmfDialerResultCodesE
  • OtxDualToneDetectorAttributesE
  • OtxDualToneDetectorEventCodesE
  • OtxDualToneDetectorResultCodesE
  • OtxE1AisDetectModeE
  • OtxE1FrameFormatE
  • OtxE1LineCodeE
  • OtxE1SaBitE
  • OtxEffectsGeneratorEventCodesE
  • OtxEffectsGeneratorResultCodesE
  • OtxEventQueueDeviceAttributesE
  • OtxFskDetectorEventCodesE
  • OtxFskDetectorResultCodesE
  • OtxHdlcCrcModeE
  • OtxHdlcFrameEndCodeE
  • OtxHdlcFrameFillTypeE
  • OtxHdlcReceiverAttributesE
  • OtxHdlcReceiverEventCodesE
  • OtxHdlcReceiverResultCodesE
  • OtxHdlcSenderAttributesE
  • OtxHdlcSenderEventCodesE
  • OtxHdlcSenderResultCodesE
  • OtxHdlcTxRateE
  • OtxJtagAttributesE
  • OtxJtagControlCmdE
  • OtxJtagEventCodesE
  • OtxJtagResultCodesE
  • OtxLibraryAttributesE
  • OtxLogicalDeviceTypeE
  • OtxMfDetectorAttributesE
  • OtxMfDetectorEventCodesE
  • OtxMfDetectorResultCodesE
  • OtxMfDialerAttributesE
  • OtxMfDialerEventCodesE
  • OtxMfDialerResultCodesE
  • OtxMfToneE
  • OtxPhysicalDeviceTypeE
  • OtxPipeDeviceAttributesE
  • OtxPipeEndE
  • OtxPotsCfgSetE
  • OtxPotsDeviceAttributesE
  • OtxPotsEventCodeE
  • OtxPotsLiModeE
  • OtxPotsRegsE
  • OtxPrbsModeE
  • OtxPrbsPatternE
  • OtxRawDataReceiverAttributesE
  • OtxRawDataReceiverEventCodesE
  • OtxRawDataReceiverResultCodesE
  • OtxRawDataSenderAttributesE
  • OtxRawDataSenderEventCodesE
  • OtxRawDataSenderResultCodesE
  • OtxSilenceDetectorEventCodesE
  • OtxSilenceDetectorResultCodesE
  • OtxSineWaveGeneratorEventCodesE
  • OtxSineWaveGeneratorResultCodesE
  • OtxSingleToneDetectorAttributesE
  • OtxSingleToneDetectorEventCodesE
  • OtxSingleToneDetectorResultCodesE
  • OtxT1E1AlarmTypeE
  • OtxT1E1AttributesE
  • OtxT1E1ClkModeE
  • OtxT1E1DefectE
  • OtxT1E1EventCodesE
  • OtxT1E1Layer1StatusE
  • OtxT1E1LiModeE
  • OtxT1E1LoopE
  • OtxT1E1ResultCodesE
  • OtxT1E1TermModeE
  • OtxT1FrameFormatE
  • OtxT1LfaSensitivityE
  • OtxT1LineCodeE
  • OtxT1RemoteAlarmFormatE
  • OtxT1SignallingModeE
  • OtxToneEffectE
  • OtxToneGainE
  • OtxTssDeviceAttributesE
  • OtxTssEventCodesE
  • OtxUserApplicationEventCodesE
  • OtxUserApplicationResultCodesE
  • OtxValSamplerEventCodesE
  • OtxValSamplerResultCodesE

  • Functions


  • OsaBeep
  • OsaConsoleExit
  • OsaConsoleGetCh
  • OsaConsoleGetStr
  • OsaConsoleInit
  • OsaConsoleInput
  • OsaConsolePrintF
  • OsaConsolePutStr
  • OsaFileClose
  • OsaFileOpen
  • OsaFileRead
  • OsaFileSeek
  • OsaMutexDestroy
  • OsaMutexInit
  • OsaMutexLock
  • OsaMutexUnlock
  • OsaStdLocalTime
  • OsaStrCmp
  • OsaStrCmpI
  • OsaStrCpy
  • OsaStrLen
  • OsaStrNCpy
  • OsaStrnSet
  • OsaStrRChr
  • OsaStrToI
  • OsaStrUpr
  • OsaThreadSleep
  • OsaThreadStart
  • OsaThreadStartEx
  • OsaToLower
  • OsaToUpper
  • OsaWinCeConsoleMain
  • OTX_CALL_HANDLE
  • OTX_GET_HANDLE_VAL
  • OTX_LOGICAL_DEVICE_HANDLE
  • OTX_PHYSICAL_DEVICE_HANDLE
  • OTX_PIPE_HANDLE
  • OTX_QUEUE_HANDLE
  • OTX_SERVICE_HANDLE
  • OTX_STRUCT_ADD_BYTE_OFFSET
  • OTX_VALID_HANDLE
  • OtxBrdCodecSetLaw
  • OtxBrdSetClocks
  • OtxBrdTssConstByte
  • OtxBriActivateLink
  • OtxBriConfigureMonitor
  • OtxBriDeactivateLink
  • OtxBriGetLineStatus
  • OtxBriSetLiMode
  • OtxBriTermLi
  • OtxBurstReadData
  • OtxBurstReadDataEx
  • OtxBurstSendData
  • OtxDataConverterInit
  • OtxDataMixerInit
  • OtxDrvCancelTask
  • OtxDrvClose
  • OtxDrvCloseEvent
  • OtxDrvConnectBoard
  • OtxDrvConnectLib
  • OtxDrvConnectLogicalDevice
  • OtxDrvConnectPipe
  • OtxDrvCreateEvent
  • OtxDrvCreateEventQueue
  • OtxDrvCreateLogicalDevice
  • OtxDrvCreatePipe
  • OtxDrvDeviceControl
  • OtxDrvDisable
  • OtxDrvDisconnectLogicalDevice
  • OtxDrvDisconnectPipe
  • OtxDrvEnable
  • OtxDrvEnumDevice
  • OtxDrvEnumDeviceType
  • OtxDrvEventCode2String
  • OtxDrvGetAttributeType
  • OtxDrvGetAttributeValue
  • OtxDrvGetAttributeValueBool
  • OtxDrvGetAttributeValueSz
  • OtxDrvGetAttributeValueUint32
  • OtxDrvGetCurrentTime
  • OtxDrvGetDeviceHandle
  • OtxDrvGetEventData
  • OtxDrvGetEventDataEx
  • OtxDrvGetState
  • OtxDrvIsIteratorEnd
  • OtxDrvIteratorBegin
  • OtxDrvOpenPhysicalDevice
  • OtxDrvOpenPhysicalDeviceEx
  • OtxDrvPollEvents
  • OtxDrvReadReg16
  • OtxDrvReadReg32
  • OtxDrvReadReg8
  • OtxDrvReleaseLib
  • OtxDrvReset
  • OtxDrvResultCode2String
  • OtxDrvSetAttributeValue
  • OtxDrvSetAttributeValueBool
  • OtxDrvSetAttributeValueSz
  • OtxDrvSetAttributeValueUint32
  • OtxDrvSetEventData
  • OtxDrvSetEventDataEx
  • OtxDrvSignalEvent
  • OtxDrvWaitForMultipleEvents
  • OtxDrvWaitForSingleEvent
  • OtxDrvWriteReg16
  • OtxDrvWriteReg32
  • OtxDrvWriteReg8
  • OtxDspCreateProgramImage
  • OtxDspCreateProgramImageEx
  • OtxDspIoControl
  • OtxDspReadData
  • OtxDspReadHpi
  • OtxDspRestartProgram
  • OtxDspRunImage
  • OtxDspRunProgram
  • OtxDspRunSpm
  • OtxDspWriteHpi
  • OtxE1GetABCDBit
  • OtxE1GetChannelizedABCDBit
  • OtxE1GetConfiguration
  • OtxE1GetSaBit
  • OtxE1GetSiBit
  • OtxE1SetABCDBit
  • OtxE1SetChannelizedABCDBit
  • OtxE1SetConfiguration
  • OtxE1SetSaBit
  • OtxE1SetSiBit
  • OtxFailure
  • OtxHdlcReadData
  • OtxHdlcReadDataEx
  • OtxHdlcReceiverInit
  • OtxHdlcSendData
  • OtxHdlcSenderFlush
  • OtxHdlcSenderInit
  • OtxHdlcSS7GetFilter
  • OtxHdlcSS7GetReceiveStatus
  • OtxHdlcSS7SendData
  • OtxHdlcSS7SetFilter
  • OtxHdlcStartRepeatData
  • OtxHdlcStopRepeatData
  • OtxJtagControl
  • OtxJtagScanDr
  • OtxJtagScanIr
  • OtxNetConnectLib
  • OtxPotsGetLiMode
  • OtxPotsHookFlash
  • OtxPotsOffHook
  • OtxPotsOnHook
  • OtxPotsPulseDial
  • OtxPotsSetLiMode
  • OtxRawDataReadData
  • OtxRawDataReceiverInit
  • OtxRawDataSendData
  • OtxRawDataSenderFlush
  • OtxRawDataSenderInit
  • OtxRawDataStartIdlePattern
  • OtxRawDataStopIdlePattern
  • OtxResultCode
  • OtxResultErrorCode
  • OtxResultLineNum
  • OtxResultSeverity
  • OtxResultSourceId
  • OtxSuccess
  • OtxT1E1AlarmOff
  • OtxT1E1AlarmOn
  • OtxT1E1ForceResynch
  • OtxT1E1GetLayer1Status
  • OtxT1E1GetLayer1StatusEx
  • OtxT1E1InsertSingleBitDefect
  • OtxT1E1SetLiMode
  • OtxT1E1SetLineLoop
  • OtxT1E1SetLineTermination
  • OtxT1E1SetMonitorMode
  • OtxT1E1SetPrbsConfig
  • OtxT1E1XmitPinControl
  • OtxT1GetChannelizedRobBitData
  • OtxT1GetConfiguration
  • OtxT1GetRobBitData
  • OtxT1SetChannelizedRobBitData
  • OtxT1SetConfiguration
  • OtxT1SetDlBitData
  • OtxT1SetRobBitData
  • OtxToneConstValGeneratorInit
  • OtxToneDialtoneDetectorInit
  • OtxToneDialtoneDetectorStatus
  • OtxToneDtmfDetectorInit
  • OtxToneDtmfDetectorStatus
  • OtxToneDtmfDial
  • OtxToneDtmfDiallerInit
  • OtxToneDtmfGeneratorInit
  • OtxToneDualDetectorInit
  • OtxToneDualDetectorStatus
  • OtxToneEffectsGeneratorInit
  • OtxToneFskDetectorInit
  • OtxToneMfDetectorInit
  • OtxToneMfDetectorStatus
  • OtxToneMfDial
  • OtxToneMfDiallerInit
  • OtxToneReadVal
  • OtxToneSequenceGeneratorInit
  • OtxToneSequenceSend
  • OtxToneSilenceDetectorInit
  • OtxToneSilenceDetectorStatus
  • OtxToneSineWaveGeneratorInit
  • OtxToneSingleDetectorInit
  • OtxToneSingleDetectorStatus
  • OtxToneValSamplerInit
  • OtxToneValSamplerReadData

  • Generic Console Functions - OsaConsoleXXX()

    A platform generic implementation of some console functions.

    OsaConsoleXXX() Function Reference

  • OsaBeep
  • OsaConsoleExit
  • OsaConsoleGetCh
  • OsaConsoleGetStr
  • OsaConsoleInit
  • OsaConsoleInput
  • OsaConsolePrintF
  • OsaConsolePutStr
  • OsaWinCeConsoleMain

  • Generic stdio.h Functions - OsaStdXXX()

    A platform generic implementation of some of the stdio.h, string.h, and ctype.h, and time.h functions.

    OsaStdXXX() Function Reference

  • OsaFileClose
  • OsaFileOpen
  • OsaFileRead
  • OsaFileSeek
  • OsaStdLocalTime
  • OsaStrCmp
  • OsaStrCmpI
  • OsaStrCpy
  • OsaStrLen
  • OsaStrNCpy
  • OsaStrnSet
  • OsaStrRChr
  • OsaStrToI
  • OsaStrUpr
  • OsaToLower
  • OsaToUpper

  • Generic Thread and Mutex Functions - OsaThreadXXX()/OsaMutexXXX()

    A platform generic implementation of some thread and mutex functions.

    OsaThreadXXX()/OsaMutexXXX() Function Reference

  • OsaMutexDestroy
  • OsaMutexInit
  • OsaMutexLock
  • OsaMutexUnlock
  • OsaThreadSleep
  • OsaThreadStart
  • OsaThreadStartEx

  • Osa Macros

    macros for the platform generic Osa implementation (used by the demo programs).

    To Do

    Macro OSA_ENUM_CAST does not need to be part of the API All enums must be transferred as OTX_INT32 values in the IO control structs. This macro is used to cast them back to enum types on the receiving side. The nacro is also used in some other contexts

    OsaCon.h


  • OsaBeep
  • OsaConsoleExit
  • OsaConsoleGetCh
  • OsaConsoleGetStr
  • OsaConsoleInit
  • OsaConsoleInput
  • OsaConsolePrintF
  • OsaConsolePutStr
  • OsaWinCeConsoleMain

  • OsaDef.h


  • OsaFileClose
  • OsaFileOpen
  • OsaFileRead
  • OsaFileSeek
  • OsaStdLocalTime
  • OsaStrCmp
  • OsaStrCmpI
  • OsaStrCpy
  • OsaStrLen
  • OsaStrNCpy
  • OsaStrnSet
  • OsaStrRChr
  • OsaStrToI
  • OsaStrUpr
  • OsaToLower
  • OsaToUpper

  • OsaStd.h


  • OsaFileClose
  • OsaFileOpen
  • OsaFileRead
  • OsaFileSeek
  • OsaStdLocalTime
  • OsaStrCmp
  • OsaStrCmpI
  • OsaStrCpy
  • OsaStrLen
  • OsaStrNCpy
  • OsaStrnSet
  • OsaStrRChr
  • OsaStrToI
  • OsaStrUpr
  • OsaToLower
  • OsaToUpper

  • OsaThrd.h


  • OsaMutexDestroy
  • OsaMutexInit
  • OsaMutexLock
  • OsaMutexUnlock
  • OsaThreadSleep
  • OsaThreadStart
  • OsaThreadStartEx

  • Other Types


  • OTX_ATTRIB_ID
  • OTX_CHAR
  • OTX_DATETIME
  • OTX_EVENT
  • OTX_FAILURE
  • OTX_FP64
  • OTX_HANDLE
  • OTX_HDLC_SS7_CB_FISU
  • OTX_HDLC_SS7_CB_LONG_LSSU
  • OTX_HDLC_SS7_CB_SHORT_LSSU
  • OTX_HDLC_SS7_FILTER_FISU
  • OTX_HDLC_SS7_FILTER_FISU_ALL
  • OTX_HDLC_SS7_FILTER_LONG_LSSU
  • OTX_HDLC_SS7_FILTER_LONG_LSSU_ALL
  • OTX_HDLC_SS7_FILTER_MSU
  • OTX_HDLC_SS7_FILTER_SHORT_LSSU
  • OTX_HDLC_SS7_FILTER_SHORT_LSSU_ALL
  • OTX_INT16
  • OTX_INT32
  • OTX_INT64
  • OTX_INT8
  • OTX_ITERATOR
  • OTX_LDEVICE_VALUE
  • OTX_NOTIFY_CAUSE
  • OTX_PVOID
  • OTX_RESULT
  • OTX_RESULT_CODE
  • OTX_RESULT_ERRORCODE
  • OTX_RESULT_EX_LINE_NUM
  • OTX_RESULT_EX_SOURCE_ID
  • OTX_RESULT_SEVERITY
  • OTX_SUCCESS
  • OTX_TASK_REF
  • OTX_TIME
  • OTX_UINT16
  • OTX_UINT32
  • OTX_UINT64
  • OTX_UINT8
  • OtxDeviceType
  • OTXDSP_LDEVICE_USER_APPLICATION
  • OTXDSP_SDK_E_ABORT
  • OTXDSP_SDK_E_ACCESSDENIED
  • OTXDSP_SDK_E_ALREADY_EXISTS
  • OTXDSP_SDK_E_BLOCKED
  • OTXDSP_SDK_E_CALL_FAIL
  • OTXDSP_SDK_E_FAIL
  • OTXDSP_SDK_E_HANDLE
  • OTXDSP_SDK_E_IN_USE
  • OTXDSP_SDK_E_IN_USE
  • OTXDSP_SDK_E_INVALIDARG
  • OTXDSP_SDK_E_NO_INTERRUPT
  • OTXDSP_SDK_E_NO_SUCH_OBJECT
  • OTXDSP_SDK_E_NOT_CONNECTED
  • OTXDSP_SDK_E_NOT_INITIALIZED
  • OTXDSP_SDK_E_NOT_SUPPORTED
  • OTXDSP_SDK_E_NOT_WORKING
  • OTXDSP_SDK_E_NOTIMPL
  • OTXDSP_SDK_E_OUT_OF_CONNECTIONS
  • OTXDSP_SDK_E_OUT_OF_RESOURCES
  • OTXDSP_SDK_E_OUTOFMEMORY
  • OTXDSP_SDK_E_POINTER
  • OTXDSP_SDK_E_REG_NO
  • OTXDSP_SDK_E_TIMEOUT
  • OTXDSP_SDK_E_UNEXPECTED
  • OTXDSP_SDK_E_UNSUPPORTED_DEVICE
  • OTXDSP_SDK_E_UNSUPPORTED_IO_CODE
  • OTXDSP_SDK_E_UNSUPPORTED_PIPE_CAPACITY
  • OTXDSP_SDK_E_UNSUPPORTED_VERSION
  • OTXDSP_SDK_E_WRONG_CONTEXT
  • OTXDSP_SDK_EVENT_NO_COMMAND
  • OTXDSP_SDK_FAILURE
  • OTXDSP_SDK_IO_CLOSE
  • OTXDSP_SDK_IO_CONNECT
  • OTXDSP_SDK_IO_CREATE
  • OTXDSP_SDK_IO_DISABLE
  • OTXDSP_SDK_IO_DISCONNECT
  • OTXDSP_SDK_IO_ENABLE
  • OTXDSP_SDK_IO_GET_FRAME_BUFFER_COUNTER
  • OTXDSP_SDK_IO_INIT_BSP
  • OTXDSP_SDK_IO_INIT_TIMER
  • OTXDSP_SDK_IO_NO_COMMAND
  • OTXDSP_SDK_IO_RESET
  • OTXDSP_SDK_IO_START_PROGRAM
  • OTXDSP_SDK_MAX_TIMESLOTS
  • OTXDSP_SDK_RX_DIRECTION
  • OTXDSP_SDK_S_FALSE
  • OTXDSP_SDK_S_OK
  • OTXDSP_SDK_S_PENDING
  • OTXDSP_SDK_S_SIGNALLED
  • OTXDSP_SDK_S_TIMEOUT
  • OTXDSP_SDK_SUCCESS
  • OTXDSP_SDK_TX_DIRECTION
  • POTS_HANDLE

  • OTX Board Level Constants, Macros, and Types


    OtxBrdXXX Macro, Constant, and Type Reference

  • OtxBoardDeviceAttributesE
  • OtxBrdClockModeE
  • OtxBrdClockSourceE
  • OtxBrdDevSourcedCodesE
  • OtxBrdEventCodesE
  • OtxBrdResultCodesE
  • OtxTssDeviceAttributesE
  • OtxTssEventCodesE

  • OTX Board Level Functions - OtxBrdXXX()

    Functions available for Board Level Operations

    OtxBrdXXX() Function Reference

  • OtxBrdCodecSetLaw
  • OtxBrdSetClocks
  • OtxBrdTssConstByte

  • OTX Device Types supported by the API (OtxDev.h)

    OTX Driver Supported Device Types

    OTX Driver Supported Device Types

  • OTX_LDEVICE_VALUE
  • OtxLogicalDeviceTypeE
  • OtxPhysicalDeviceTypeE

  • OTX DMA Burst Device Management Macros, Constants, and Types


    OtxBurstXXX Macro, Constant, and Type Reference

  • OtxBurstDeviceAttributesE
  • OtxBurstEventCodesE
  • OtxBurstFrameRefAndTime

  • OTX Driver Level Constants




    OTX Driver Level Functions - OtxDrvXXX()

    Driver level functions

    OtxDrvXXX() Function Reference

  • OtxDrvCancelTask
  • OtxDrvClose
  • OtxDrvCloseEvent
  • OtxDrvConnectBoard
  • OtxDrvConnectLib
  • OtxDrvConnectLogicalDevice
  • OtxDrvConnectPipe
  • OtxDrvCreateEvent
  • OtxDrvCreateEventQueue
  • OtxDrvCreateLogicalDevice
  • OtxDrvCreatePipe
  • OtxDrvDeviceControl
  • OtxDrvDisable
  • OtxDrvDisconnectLogicalDevice
  • OtxDrvDisconnectPipe
  • OtxDrvEnable
  • OtxDrvEnumDevice
  • OtxDrvEnumDeviceType
  • OtxDrvEventCode2String
  • OtxDrvGetAttributeType
  • OtxDrvGetAttributeValue
  • OtxDrvGetAttributeValueBool
  • OtxDrvGetAttributeValueSz
  • OtxDrvGetAttributeValueUint32
  • OtxDrvGetCurrentTime
  • OtxDrvGetDeviceHandle
  • OtxDrvGetEventData
  • OtxDrvGetEventDataEx
  • OtxDrvGetState
  • OtxDrvIsIteratorEnd
  • OtxDrvIteratorBegin
  • OtxDrvOpenPhysicalDevice
  • OtxDrvOpenPhysicalDeviceEx
  • OtxDrvPollEvents
  • OtxDrvReadReg16
  • OtxDrvReadReg32
  • OtxDrvReadReg8
  • OtxDrvReleaseLib
  • OtxDrvReset
  • OtxDrvResultCode2String
  • OtxDrvSetAttributeValue
  • OtxDrvSetAttributeValueBool
  • OtxDrvSetAttributeValueSz
  • OtxDrvSetAttributeValueUint32
  • OtxDrvSetEventData
  • OtxDrvSetEventDataEx
  • OtxDrvSignalEvent
  • OtxDrvWaitForMultipleEvents
  • OtxDrvWaitForSingleEvent
  • OtxDrvWriteReg16
  • OtxDrvWriteReg32
  • OtxDrvWriteReg8
  • OtxFailure
  • OtxNetConnectLib
  • OtxResultCode
  • OtxResultErrorCode
  • OtxResultLineNum
  • OtxResultSeverity
  • OtxResultSourceId
  • OtxSuccess

  • OTX Driver Level Result Codes


  • OTX_FAILURE
  • OTX_RESULT_CODE
  • OTX_RESULT_ERRORCODE
  • OTX_RESULT_EX_LINE_NUM
  • OTX_RESULT_EX_SOURCE_ID
  • OTX_RESULT_SEVERITY
  • OTX_SUCCESS
  • OtxCommonResultCodesE

  • OTX Driver Level Types


    Enumerated Types

  • OTX_BOOL
  • OtxAttribTypeE
  • OtxCommonDeviceAttributesE
  • OtxCtBusDeviceAttributesE
  • OtxDeviceEventCodesE
  • OtxDeviceInterfaceE
  • OtxDeviceStateE
  • OtxDriverDeviceAttributesE
  • OtxEventQueueDeviceAttributesE
  • OtxLibraryAttributesE
  • OtxPipeDeviceAttributesE
  • OtxPipeEndE
  • Struct Types

  • OtxEventDataS
  • OtxPipeCtBusConnectionS
  • OtxVersionInfo
  • Other Types

  • OTX_ATTRIB_ID
  • OTX_CHAR
  • OTX_DATETIME
  • OTX_EVENT
  • OTX_FP64
  • OTX_HANDLE
  • OTX_INT16
  • OTX_INT32
  • OTX_INT64
  • OTX_INT8
  • OTX_ITERATOR
  • OTX_NOTIFY_CAUSE
  • OTX_PVOID
  • OTX_RESULT
  • OTX_TASK_REF
  • OTX_TIME
  • OTX_UINT16
  • OTX_UINT32
  • OTX_UINT64
  • OTX_UINT8
  • OtxDeviceType

  • OTX Driver Management Macros, Constants, and Types


    OtxDrvXXX Macro, Constant, and Type Reference

  • OtxCtBusDataRateE

  • OTX DSP Device Management Functions - OtxDspXXX()

    The user functions available for the Management of DSP Devices

    OtxDspXXX() Function Reference

  • OtxDspCreateProgramImage
  • OtxDspCreateProgramImageEx
  • OtxDspIoControl
  • OtxDspReadData
  • OtxDspReadHpi
  • OtxDspRestartProgram
  • OtxDspRunImage
  • OtxDspRunProgram
  • OtxDspRunSpm
  • OtxDspWriteHpi

  • OTX DSP Device Management Macros, Constants, and Types


    OtxDspXXX Macro, Constant, and Type Reference

  • OtxDspDeviceAttributesE
  • OtxDspEventCodesE
  • OtxDspResultCodesE
  • OtxDspSpmE
  • OtxUserApplicationEventCodesE
  • OtxUserApplicationResultCodesE

  • OTX Generic Functions/Macros


  • OTX_CALL_HANDLE
  • OTX_GET_HANDLE_VAL
  • OTX_LOGICAL_DEVICE_HANDLE
  • OTX_PHYSICAL_DEVICE_HANDLE
  • OTX_PIPE_HANDLE
  • OTX_QUEUE_HANDLE
  • OTX_SERVICE_HANDLE
  • OTX_STRUCT_ADD_BYTE_OFFSET
  • OTX_VALID_HANDLE

  • OTX Hdlc Device Macros, Constants, and Types


    OtxHdlcXXX Macro, Constant, and Type Reference

  • OTX_HDLC_SS7_CB_FISU
  • OTX_HDLC_SS7_CB_LONG_LSSU
  • OTX_HDLC_SS7_CB_SHORT_LSSU
  • OTX_HDLC_SS7_FILTER_FISU
  • OTX_HDLC_SS7_FILTER_FISU_ALL
  • OTX_HDLC_SS7_FILTER_LONG_LSSU
  • OTX_HDLC_SS7_FILTER_LONG_LSSU_ALL
  • OTX_HDLC_SS7_FILTER_MSU
  • OTX_HDLC_SS7_FILTER_SHORT_LSSU
  • OTX_HDLC_SS7_FILTER_SHORT_LSSU_ALL
  • OtxHdlcCrcModeE
  • OtxHdlcFrameEndCodeE
  • OtxHdlcFrameFillTypeE
  • OtxHdlcFrameInfoS
  • OtxHdlcReceiverAttributesE
  • OtxHdlcReceiverEventCodesE
  • OtxHdlcReceiverResultCodesE
  • OtxHdlcSenderAttributesE
  • OtxHdlcSenderEventCodesE
  • OtxHdlcSenderResultCodesE
  • OtxHdlcSS7FisuS
  • OtxHdlcSS7LongLssuS
  • OtxHdlcSS7ShortLssuS
  • OtxHdlcTxRateE
  • OtxJtagAttributesE
  • OtxJtagControlCmdE
  • OtxJtagEventCodesE
  • OtxJtagResultCodesE

  • OTX Hdlc Device Macros, Constants, and Types


    OtxHdlcXXX Macro, Constant, and Type Reference

  • OTX_HDLC_SS7_CB_FISU
  • OTX_HDLC_SS7_CB_LONG_LSSU
  • OTX_HDLC_SS7_CB_SHORT_LSSU
  • OTX_HDLC_SS7_FILTER_FISU
  • OTX_HDLC_SS7_FILTER_FISU_ALL
  • OTX_HDLC_SS7_FILTER_LONG_LSSU
  • OTX_HDLC_SS7_FILTER_LONG_LSSU_ALL
  • OTX_HDLC_SS7_FILTER_MSU
  • OTX_HDLC_SS7_FILTER_SHORT_LSSU
  • OTX_HDLC_SS7_FILTER_SHORT_LSSU_ALL
  • OtxHdlcCrcModeE
  • OtxHdlcFrameEndCodeE
  • OtxHdlcFrameFillTypeE
  • OtxHdlcFrameInfoS
  • OtxHdlcReceiverAttributesE
  • OtxHdlcReceiverEventCodesE
  • OtxHdlcReceiverResultCodesE
  • OtxHdlcSenderAttributesE
  • OtxHdlcSenderEventCodesE
  • OtxHdlcSenderResultCodesE
  • OtxHdlcSS7FisuS
  • OtxHdlcSS7LongLssuS
  • OtxHdlcSS7ShortLssuS
  • OtxHdlcTxRateE
  • OtxJtagAttributesE
  • OtxJtagControlCmdE
  • OtxJtagEventCodesE
  • OtxJtagResultCodesE

  • OTX ISDN BRI Line Interface Device Constants, Macros, and Types


    OtxBriXXX Macro, Constant, and Type Reference

  • OtxBriLayer1StatusE
  • OtxBriLiModeE

  • OTX ISDN BRI Line Interface Device Functions - OtxBriXXX()

    The user functions available for the Analog Phone Line Interface Decivces following;

    OtxBriXXX() Function Reference

  • OtxBriActivateLink
  • OtxBriConfigureMonitor
  • OtxBriDeactivateLink
  • OtxBriGetLineStatus
  • OtxBriSetLiMode
  • OtxBriTermLi

  • OTX JTAG - OtxJtagXXX()

    The API functions for the JTAG TBC device

    OtxJtagXXX() Function Reference

  • OtxJtagControl
  • OtxJtagScanDr
  • OtxJtagScanIr

  • OTX Logical DMA Burst Sender/Receiver Functions - OtxBurstXXX()

    The API functions for the Logical DMA Burst device

    OtxBurstXXX() Function Reference

  • OtxBurstReadData
  • OtxBurstReadDataEx
  • OtxBurstSendData

  • OTX Logical Hdlc Sender/Receiver Functions - OtxHdlcXXX()

    The API functions for the Logical High-level Data Link Controller (HDLC) device

    OtxHdlcXXX() Function Reference

  • OtxHdlcReadData
  • OtxHdlcReadDataEx
  • OtxHdlcReceiverInit
  • OtxHdlcSendData
  • OtxHdlcSenderFlush
  • OtxHdlcSenderInit
  • OtxHdlcSS7GetFilter
  • OtxHdlcSS7GetReceiveStatus
  • OtxHdlcSS7SendData
  • OtxHdlcSS7SetFilter
  • OtxHdlcStartRepeatData
  • OtxHdlcStopRepeatData

  • OTX Logical RawData Sender/Receiver Functions - OtxRawDataXXX()

    The API functions for the Logical High-level Data Link Controller (HDLC) device

    OtxRawDataXXX() Function Reference

  • OtxRawDataReadData
  • OtxRawDataReceiverInit
  • OtxRawDataSendData
  • OtxRawDataSenderFlush
  • OtxRawDataSenderInit
  • OtxRawDataStartIdlePattern
  • OtxRawDataStopIdlePattern

  • OTX POTS Line Interface Device Constants, Macros, and Types


    OtxPotsXXX Macro, Constant, and Type Reference

  • OtxPotsCfgSetE
  • OtxPotsDeviceAttributesE
  • OtxPotsEventCodeE
  • OtxPotsLiModeE
  • OtxPotsRegsE
  • POTS_HANDLE

  • OTX POTS Line Interface Device Functions - OtxPotsXXX()

    The user functions available for the Analog Phone Line Interface Decivces following;

    OtxPotsXXX() Function Reference

  • OtxPotsGetLiMode
  • OtxPotsHookFlash
  • OtxPotsOffHook
  • OtxPotsOnHook
  • OtxPotsPulseDial
  • OtxPotsSetLiMode

  • OTX Raw Data Device Macros, Constants, and Types


    OtxRawDataXXX Macro, Constant, and Type Reference

  • OtxRawDataReceiverAttributesE
  • OtxRawDataReceiverEventCodesE
  • OtxRawDataReceiverResultCodesE
  • OtxRawDataSenderAttributesE
  • OtxRawDataSenderEventCodesE
  • OtxRawDataSenderResultCodesE

  • OTX Serial Data Manipulation Device Macros, Constants, and Types


    OtxDataXXX Macro, Constant, and Type Reference

  • OtxDataConverterEventCodesE
  • OtxDataFormatE

  • OTX Serial Data Manipulation Function Prototypes - OtxDataXXX()

    Functions available for Data Manipulations

    OtxDataXXX() Function Reference

  • OtxDataConverterInit
  • OtxDataMixerInit

  • OTX T1/E1 Line Interface Constants, Macros, and Types


    OtxT1E1XXX, OtxT1XXX, and OtxE1XXX Macro, Constant, and Type Reference



    OTX T1/E1 Line Interface Device Functions - OtxT1XXX(), OtxE1XXX()

    The user functions available for the T1/E1 Line Interface Transceiver Devices

    OtxT1E1XXX(), OtxT1XXX(), and OtxE1XXX() Function Reference

  • OtxE1GetABCDBit
  • OtxE1GetChannelizedABCDBit
  • OtxE1GetConfiguration
  • OtxE1GetSaBit
  • OtxE1GetSiBit
  • OtxE1SetABCDBit
  • OtxE1SetChannelizedABCDBit
  • OtxE1SetConfiguration
  • OtxE1SetSaBit
  • OtxE1SetSiBit
  • OtxT1E1AlarmOff
  • OtxT1E1AlarmOn
  • OtxT1E1ForceResynch
  • OtxT1E1GetLayer1Status
  • OtxT1E1GetLayer1StatusEx
  • OtxT1E1InsertSingleBitDefect
  • OtxT1E1SetLiMode
  • OtxT1E1SetLineLoop
  • OtxT1E1SetLineTermination
  • OtxT1E1SetMonitorMode
  • OtxT1E1SetPrbsConfig
  • OtxT1E1XmitPinControl
  • OtxT1GetChannelizedRobBitData
  • OtxT1GetConfiguration
  • OtxT1GetRobBitData
  • OtxT1SetChannelizedRobBitData
  • OtxT1SetConfiguration
  • OtxT1SetDlBitData
  • OtxT1SetRobBitData

  • OTX Tone Generator/Detector Functions - OtxToneXXX()

    Functions available for Tone Generators / Detectors

    OtxToneXXX() Function Reference

  • OtxToneConstValGeneratorInit
  • OtxToneDialtoneDetectorInit
  • OtxToneDialtoneDetectorStatus
  • OtxToneDtmfDetectorInit
  • OtxToneDtmfDetectorStatus
  • OtxToneDtmfDial
  • OtxToneDtmfDiallerInit
  • OtxToneDtmfGeneratorInit
  • OtxToneDualDetectorInit
  • OtxToneDualDetectorStatus
  • OtxToneEffectsGeneratorInit
  • OtxToneFskDetectorInit
  • OtxToneMfDetectorInit
  • OtxToneMfDetectorStatus
  • OtxToneMfDial
  • OtxToneMfDiallerInit
  • OtxToneReadVal
  • OtxToneSequenceGeneratorInit
  • OtxToneSequenceSend
  • OtxToneSilenceDetectorInit
  • OtxToneSilenceDetectorStatus
  • OtxToneSineWaveGeneratorInit
  • OtxToneSingleDetectorInit
  • OtxToneSingleDetectorStatus
  • OtxToneValSamplerInit
  • OtxToneValSamplerReadData

  • OTX Tone Logical Data Filter Device Macros, Constants, and Types


    OtxToneXXX Macro, Constant, and Type Reference

  • OtxConstValGeneratorEventCodesE
  • OtxConstValGeneratorResultCodesE
  • OtxDtmfDetectorAttributesE
  • OtxDtmfDetectorEventCodesE
  • OtxDtmfDetectorResultCodesE
  • OtxDtmfDialerEventCodesE
  • OtxDtmfDialerResultCodesE
  • OtxDualToneDetectorAttributesE
  • OtxDualToneDetectorEventCodesE
  • OtxDualToneDetectorResultCodesE
  • OtxEffectsGeneratorEventCodesE
  • OtxEffectsGeneratorResultCodesE
  • OtxFskDetectorEventCodesE
  • OtxFskDetectorResultCodesE
  • OtxMfDetectorAttributesE
  • OtxMfDetectorEventCodesE
  • OtxMfDetectorResultCodesE
  • OtxMfDialerAttributesE
  • OtxMfDialerEventCodesE
  • OtxMfDialerResultCodesE
  • OtxMfToneE
  • OtxSilenceDetectorEventCodesE
  • OtxSilenceDetectorResultCodesE
  • OtxSineWaveGeneratorEventCodesE
  • OtxSineWaveGeneratorResultCodesE
  • OtxSingleToneDetectorAttributesE
  • OtxSingleToneDetectorEventCodesE
  • OtxSingleToneDetectorResultCodesE
  • OtxToneEffectE
  • OtxToneGainE
  • OtxToneSineWaveDataS
  • OtxValSamplerEventCodesE
  • OtxValSamplerResultCodesE

  • OtxBrd.h


  • OtxBrdCodecSetLaw
  • OtxBrdSetClocks
  • OtxBrdTssConstByte

  • OtxBrdD.h


  • OtxBoardDeviceAttributesE
  • OtxBrdClockModeE
  • OtxBrdClockSourceE
  • OtxBrdDevSourcedCodesE
  • OtxBrdEventCodesE
  • OtxBrdResultCodesE
  • OtxTssDeviceAttributesE
  • OtxTssEventCodesE

  • OtxBri.h


  • OtxBriActivateLink
  • OtxBriConfigureMonitor
  • OtxBriDeactivateLink
  • OtxBriGetLineStatus
  • OtxBriSetLiMode
  • OtxBriTermLi

  • OtxBriD.h


  • OtxBriLayer1StatusE
  • OtxBriLiModeE

  • OtxBurst.h


  • OtxBurstReadData
  • OtxBurstReadDataEx
  • OtxBurstSendData

  • OtxBurstD.h


  • OtxBurstDeviceAttributesE
  • OtxBurstEventCodesE
  • OtxBurstFrameRefAndTime

  • OtxData.h


  • OtxDataConverterInit
  • OtxDataMixerInit

  • OtxDataD.h


  • OtxDataConverterEventCodesE
  • OtxDataFormatE

  • OtxDef.h




    OtxDev.h


  • OTX_LDEVICE_VALUE
  • OtxLogicalDeviceTypeE
  • OtxPhysicalDeviceTypeE

  • OtxDrv.h


  • OtxDrvCancelTask
  • OtxDrvClose
  • OtxDrvCloseEvent
  • OtxDrvConnectBoard
  • OtxDrvConnectLib
  • OtxDrvConnectLogicalDevice
  • OtxDrvConnectPipe
  • OtxDrvCreateEvent
  • OtxDrvCreateEventQueue
  • OtxDrvCreateLogicalDevice
  • OtxDrvCreatePipe
  • OtxDrvDeviceControl
  • OtxDrvDisable
  • OtxDrvDisconnectLogicalDevice
  • OtxDrvDisconnectPipe
  • OtxDrvEnable
  • OtxDrvEnumDevice
  • OtxDrvEnumDeviceType
  • OtxDrvEventCode2String
  • OtxDrvGetAttributeType
  • OtxDrvGetAttributeValue
  • OtxDrvGetAttributeValueBool
  • OtxDrvGetAttributeValueSz
  • OtxDrvGetAttributeValueUint32
  • OtxDrvGetCurrentTime
  • OtxDrvGetDeviceHandle
  • OtxDrvGetEventData
  • OtxDrvGetEventDataEx
  • OtxDrvGetState
  • OtxDrvIsIteratorEnd
  • OtxDrvIteratorBegin
  • OtxDrvOpenPhysicalDevice
  • OtxDrvOpenPhysicalDeviceEx
  • OtxDrvPollEvents
  • OtxDrvReadReg16
  • OtxDrvReadReg32
  • OtxDrvReadReg8
  • OtxDrvReleaseLib
  • OtxDrvReset
  • OtxDrvResultCode2String
  • OtxDrvSetAttributeValue
  • OtxDrvSetAttributeValueBool
  • OtxDrvSetAttributeValueSz
  • OtxDrvSetAttributeValueUint32
  • OtxDrvSetEventData
  • OtxDrvSetEventDataEx
  • OtxDrvSignalEvent
  • OtxDrvWaitForMultipleEvents
  • OtxDrvWaitForSingleEvent
  • OtxDrvWriteReg16
  • OtxDrvWriteReg32
  • OtxDrvWriteReg8
  • OtxFailure
  • OtxNetConnectLib
  • OtxResultCode
  • OtxResultErrorCode
  • OtxResultLineNum
  • OtxResultSeverity
  • OtxResultSourceId
  • OtxSuccess

  • OtxDrvD.h


  • OtxCtBusDataRateE

  • OtxDsp.h


  • OtxDspCreateProgramImage
  • OtxDspCreateProgramImageEx
  • OtxDspIoControl
  • OtxDspReadData
  • OtxDspReadHpi
  • OtxDspRestartProgram
  • OtxDspRunImage
  • OtxDspRunProgram
  • OtxDspRunSpm
  • OtxDspWriteHpi

  • OtxDspD.h


  • OtxDspDeviceAttributesE
  • OtxDspEventCodesE
  • OtxDspResultCodesE
  • OtxDspSpmE
  • OtxUserApplicationEventCodesE
  • OtxUserApplicationResultCodesE

  • OtxErr.h


  • OTX_FAILURE
  • OTX_RESULT_CODE
  • OTX_RESULT_ERRORCODE
  • OTX_RESULT_EX_LINE_NUM
  • OTX_RESULT_EX_SOURCE_ID
  • OTX_RESULT_SEVERITY
  • OTX_SUCCESS
  • OtxCommonResultCodesE

  • OtxGeneric.h


  • OTX_CALL_HANDLE
  • OTX_GET_HANDLE_VAL
  • OTX_LOGICAL_DEVICE_HANDLE
  • OTX_PHYSICAL_DEVICE_HANDLE
  • OTX_PIPE_HANDLE
  • OTX_QUEUE_HANDLE
  • OTX_SERVICE_HANDLE
  • OTX_STRUCT_ADD_BYTE_OFFSET
  • OTX_VALID_HANDLE

  • OtxHdlc.h


  • OtxHdlcReadData
  • OtxHdlcReadDataEx
  • OtxHdlcReceiverInit
  • OtxHdlcSendData
  • OtxHdlcSenderFlush
  • OtxHdlcSenderInit
  • OtxHdlcSS7GetFilter
  • OtxHdlcSS7GetReceiveStatus
  • OtxHdlcSS7SendData
  • OtxHdlcSS7SetFilter
  • OtxHdlcStartRepeatData
  • OtxHdlcStopRepeatData

  • OtxHdlcD.h


  • OTX_HDLC_SS7_CB_FISU
  • OTX_HDLC_SS7_CB_LONG_LSSU
  • OTX_HDLC_SS7_CB_SHORT_LSSU
  • OTX_HDLC_SS7_FILTER_FISU
  • OTX_HDLC_SS7_FILTER_FISU_ALL
  • OTX_HDLC_SS7_FILTER_LONG_LSSU
  • OTX_HDLC_SS7_FILTER_LONG_LSSU_ALL
  • OTX_HDLC_SS7_FILTER_MSU
  • OTX_HDLC_SS7_FILTER_SHORT_LSSU
  • OTX_HDLC_SS7_FILTER_SHORT_LSSU_ALL
  • OtxHdlcCrcModeE
  • OtxHdlcFrameEndCodeE
  • OtxHdlcFrameFillTypeE
  • OtxHdlcFrameInfoS
  • OtxHdlcReceiverAttributesE
  • OtxHdlcReceiverEventCodesE
  • OtxHdlcReceiverResultCodesE
  • OtxHdlcSenderAttributesE
  • OtxHdlcSenderEventCodesE
  • OtxHdlcSenderResultCodesE
  • OtxHdlcSS7FisuS
  • OtxHdlcSS7LongLssuS
  • OtxHdlcSS7ShortLssuS
  • OtxHdlcTxRateE
  • OtxJtagAttributesE
  • OtxJtagControlCmdE
  • OtxJtagEventCodesE
  • OtxJtagResultCodesE

  • OtxHdlcD.h


  • OTX_HDLC_SS7_CB_FISU
  • OTX_HDLC_SS7_CB_LONG_LSSU
  • OTX_HDLC_SS7_CB_SHORT_LSSU
  • OTX_HDLC_SS7_FILTER_FISU
  • OTX_HDLC_SS7_FILTER_FISU_ALL
  • OTX_HDLC_SS7_FILTER_LONG_LSSU
  • OTX_HDLC_SS7_FILTER_LONG_LSSU_ALL
  • OTX_HDLC_SS7_FILTER_MSU
  • OTX_HDLC_SS7_FILTER_SHORT_LSSU
  • OTX_HDLC_SS7_FILTER_SHORT_LSSU_ALL
  • OtxHdlcCrcModeE
  • OtxHdlcFrameEndCodeE
  • OtxHdlcFrameFillTypeE
  • OtxHdlcFrameInfoS
  • OtxHdlcReceiverAttributesE
  • OtxHdlcReceiverEventCodesE
  • OtxHdlcReceiverResultCodesE
  • OtxHdlcSenderAttributesE
  • OtxHdlcSenderEventCodesE
  • OtxHdlcSenderResultCodesE
  • OtxHdlcSS7FisuS
  • OtxHdlcSS7LongLssuS
  • OtxHdlcSS7ShortLssuS
  • OtxHdlcTxRateE
  • OtxJtagAttributesE
  • OtxJtagControlCmdE
  • OtxJtagEventCodesE
  • OtxJtagResultCodesE

  • OtxJtag.h


  • OtxJtagControl
  • OtxJtagScanDr
  • OtxJtagScanIr

  • OtxPots.h


  • OtxPotsGetLiMode
  • OtxPotsHookFlash
  • OtxPotsOffHook
  • OtxPotsOnHook
  • OtxPotsPulseDial
  • OtxPotsSetLiMode

  • OtxPotsD.h


  • OtxPotsCfgSetE
  • OtxPotsDeviceAttributesE
  • OtxPotsEventCodeE
  • OtxPotsLiModeE
  • OtxPotsRegsE
  • POTS_HANDLE

  • OtxRaw.h


  • OtxRawDataReadData
  • OtxRawDataReceiverInit
  • OtxRawDataSendData
  • OtxRawDataSenderFlush
  • OtxRawDataSenderInit
  • OtxRawDataStartIdlePattern
  • OtxRawDataStopIdlePattern

  • OtxRawD.h


  • OtxRawDataReceiverAttributesE
  • OtxRawDataReceiverEventCodesE
  • OtxRawDataReceiverResultCodesE
  • OtxRawDataSenderAttributesE
  • OtxRawDataSenderEventCodesE
  • OtxRawDataSenderResultCodesE

  • OtxT1E1.h


  • OtxE1GetABCDBit
  • OtxE1GetChannelizedABCDBit
  • OtxE1GetConfiguration
  • OtxE1GetSaBit
  • OtxE1GetSiBit
  • OtxE1SetABCDBit
  • OtxE1SetChannelizedABCDBit
  • OtxE1SetConfiguration
  • OtxE1SetSaBit
  • OtxE1SetSiBit
  • OtxT1E1AlarmOff
  • OtxT1E1AlarmOn
  • OtxT1E1ForceResynch
  • OtxT1E1GetLayer1Status
  • OtxT1E1GetLayer1StatusEx
  • OtxT1E1InsertSingleBitDefect
  • OtxT1E1SetLiMode
  • OtxT1E1SetLineLoop
  • OtxT1E1SetLineTermination
  • OtxT1E1SetMonitorMode
  • OtxT1E1SetPrbsConfig
  • OtxT1E1XmitPinControl
  • OtxT1GetChannelizedRobBitData
  • OtxT1GetConfiguration
  • OtxT1GetRobBitData
  • OtxT1SetChannelizedRobBitData
  • OtxT1SetConfiguration
  • OtxT1SetDlBitData
  • OtxT1SetRobBitData

  • OtxT1E1D.h


  • OtxE1ABCDBitDataS
  • OtxE1AisDetectModeE
  • OtxE1ConfigOptionsS
  • OtxE1FrameFormatE
  • OtxE1LineCodeE
  • OtxE1SaBitE
  • OtxPrbsModeE
  • OtxPrbsPatternE
  • OtxT1ConfigOptionsS
  • OtxT1E1AlarmTypeE
  • OtxT1E1AttributesE
  • OtxT1E1ClkModeE
  • OtxT1E1DefectE
  • OtxT1E1EventCodesE
  • OtxT1E1Layer1StatusE
  • OtxT1E1Layer1StatusExS
  • OtxT1E1LiModeE
  • OtxT1E1LoopE
  • OtxT1E1ResultCodesE
  • OtxT1E1TermModeE
  • OtxT1FrameFormatE
  • OtxT1LfaSensitivityE
  • OtxT1LineCodeE
  • OtxT1RemoteAlarmFormatE
  • OtxT1RobBitDataS
  • OtxT1SignallingModeE

  • OtxTone.h


  • OtxToneConstValGeneratorInit
  • OtxToneDialtoneDetectorInit
  • OtxToneDialtoneDetectorStatus
  • OtxToneDtmfDetectorInit
  • OtxToneDtmfDetectorStatus
  • OtxToneDtmfDial
  • OtxToneDtmfDiallerInit
  • OtxToneDtmfGeneratorInit
  • OtxToneDualDetectorInit
  • OtxToneDualDetectorStatus
  • OtxToneEffectsGeneratorInit
  • OtxToneFskDetectorInit
  • OtxToneMfDetectorInit
  • OtxToneMfDetectorStatus
  • OtxToneMfDial
  • OtxToneMfDiallerInit
  • OtxToneReadVal
  • OtxToneSequenceGeneratorInit
  • OtxToneSequenceSend
  • OtxToneSilenceDetectorInit
  • OtxToneSilenceDetectorStatus
  • OtxToneSineWaveGeneratorInit
  • OtxToneSingleDetectorInit
  • OtxToneSingleDetectorStatus
  • OtxToneValSamplerInit
  • OtxToneValSamplerReadData

  • OtxToneD.h


  • OtxConstValGeneratorEventCodesE
  • OtxConstValGeneratorResultCodesE
  • OtxDtmfDetectorAttributesE
  • OtxDtmfDetectorEventCodesE
  • OtxDtmfDetectorResultCodesE
  • OtxDtmfDialerEventCodesE
  • OtxDtmfDialerResultCodesE
  • OtxDualToneDetectorAttributesE
  • OtxDualToneDetectorEventCodesE
  • OtxDualToneDetectorResultCodesE
  • OtxEffectsGeneratorEventCodesE
  • OtxEffectsGeneratorResultCodesE
  • OtxFskDetectorEventCodesE
  • OtxFskDetectorResultCodesE
  • OtxMfDetectorAttributesE
  • OtxMfDetectorEventCodesE
  • OtxMfDetectorResultCodesE
  • OtxMfDialerAttributesE
  • OtxMfDialerEventCodesE
  • OtxMfDialerResultCodesE
  • OtxMfToneE
  • OtxSilenceDetectorEventCodesE
  • OtxSilenceDetectorResultCodesE
  • OtxSineWaveGeneratorEventCodesE
  • OtxSineWaveGeneratorResultCodesE
  • OtxSingleToneDetectorAttributesE
  • OtxSingleToneDetectorEventCodesE
  • OtxSingleToneDetectorResultCodesE
  • OtxToneEffectE
  • OtxToneGainE
  • OtxToneSineWaveDataS
  • OtxValSamplerEventCodesE
  • OtxValSamplerResultCodesE

  • OtxType.h


  • OTX_ANY_PIPE_TIMESLOTS_MAX
  • OTX_DRIVER_DEVICE_HANDLE
  • OTX_H100_CT_BUS_MAX
  • OTX_H100_HIGHWAYS_MAX
  • OTX_H100_PIPE_TIMESLOTS_MAX
  • OTX_INVALID_EVENT_VALUE
  • OTX_INVALID_HANDLE_VALUE
  • OTX_LIB_HANDLE
  • OTX_LOCAL_HIGHWAYS_MAX
  • OTX_LOCAL_PIPE_TIMESLOTS_MAX
  • OTX_PIPE_TIMESLOTS_MAX
  • OTX_TASK_ASYNC
  • OTX_TASK_NONE
  • OTX_TASK_SYNC
  • OTX_TIME_INFINITY
  • OTX_TOTAL_HIGHWAYS_MAX
  • OTX_ATTRIB_ID
  • OTX_BOOL
  • OTX_CHAR
  • OTX_DATETIME
  • OTX_EVENT
  • OTX_FP64
  • OTX_HANDLE
  • OTX_INT16
  • OTX_INT32
  • OTX_INT64
  • OTX_INT8
  • OTX_ITERATOR
  • OTX_NOTIFY_CAUSE
  • OTX_PVOID
  • OTX_RESULT
  • OTX_TASK_REF
  • OTX_TIME
  • OTX_UINT16
  • OTX_UINT32
  • OTX_UINT64
  • OTX_UINT8
  • OtxAttribTypeE
  • OtxCommonDeviceAttributesE
  • OtxCtBusDeviceAttributesE
  • OtxDeviceEventCodesE
  • OtxDeviceInterfaceE
  • OtxDeviceStateE
  • OtxDeviceType
  • OtxDriverDeviceAttributesE
  • OtxEventDataS
  • OtxEventQueueDeviceAttributesE
  • OtxLibraryAttributesE
  • OtxPipeCtBusConnectionS
  • OtxPipeDeviceAttributesE
  • OtxPipeEndE
  • OtxVersionInfo

  • Struct Types


  • OtxBurstFrameRefAndTime
  • OtxDspSdkIoInConnectS
  • OtxDspSdkIoInDisconnectS
  • OtxDspSdkIoInStartProgramS
  • OtxDspSdkIoOutResultS
  • OtxE1ABCDBitDataS
  • OtxE1ConfigOptionsS
  • OtxEventDataS
  • OtxHdlcFrameInfoS
  • OtxHdlcSS7FisuS
  • OtxHdlcSS7LongLssuS
  • OtxHdlcSS7ShortLssuS
  • OtxPipeCtBusConnectionS
  • OtxT1ConfigOptionsS
  • OtxT1E1Layer1StatusExS
  • OtxT1RobBitDataS
  • OtxToneSineWaveDataS
  • OtxVersionInfo

  • DspIoctl.h

    Filename: DspIoctl.h

    Description

    Macros and structs for sharing data between the DSP and the host. (for all C5000 DSPs)

    OsaCon

    Filename: OsaCon.h

    Description

    This file contains prototypes for platform the generic implementation of some console functions.

    OsaDef

    Filename: OsaDef.h

    Description

    This file contains macros for the platform generic Osa implementation (used by the demo programs).

    OsaStd

    Filename: OsaStd.h

    Description

    This file contains prototypes for platform the generic implementation of some of the stdio.h, string.h, and ctype.h functions.

    OsaThrd

    Filename: OsaThrd.h

    Description

    This file contains prototypes for platform the generic implementation of some thread and mutex functions.

    OtxBrd

    Filename: OtxBrd.h

    Description

    OTX Board Level Function Prototypes

    OtxBrdD

    Filename: OtxBrdD.h

    Description

    Constants, Macros, and Types for the Board Level Functions

    OtxBri

    Filename: OtxBri.h

    Description

    This file contains prototypes for the ISDN BRI Line Interface Functions

    OtxBriD

    Filename: OtxBriD.h

    Description

    Constants, Macros, and Types for the ISDN BRI Line Interface Functions

    OtxBurst

    Filename: OtxBurst.h

    Description

    Prototypes for the Logical DMA Burst Device (Sender/Receiver) Functions

    OtxBurstD

    Filename: OtxBurstD.h

    Description

    Constants, Macros, and Types for the DMA Burst Device Management Functions

    OtxData

    Filename: OtxData.h

    Description

    OTX Serial Data Manipulation Function Prototypes

    OtxDataD

    Filename: OtxDataD.h

    Description

    Constants, Macros, and Types for the Data Manipulation Functions

    OtxDef

    Filename: OtxDef.h

    Description

    Types used in OTX driver API

    OtxDev

    Filename: OtxDev.h

    Description

    Devices Types suppored by OTX driver API

    OtxDrv

    Filename: OtxDrv.h

    Description

    This file contains prototypes for the Driver Functions

    OtxDrvD

    Filename: OtxDrvD.h

    Description

    Constants, Macros, and Types for the Driver Functions

    OtxDsp

    Filename: OtxDsp.h

    Description

    This file contains prototypes for the DSP Management Functions

    OtxDspD

    Filename: OtxDspD.h

    Description

    Constants, Macros, and Types for the DSP Device Management Functions

    OtxErr

    Filename: OtxErr.h

    Description

    Odin Telecom FrameworX (OTX) standard result structure.

    OTX error definitions and values

    The return value of OTX APIs and methods is an OTX_RESULT. This is not a handle to anything, but is merely a 32-bit value with several fields encoded in the value. The parts of an OTX_RESULT are shown below.

    The structure of OTX_RESULT is based on the Win32 HRESULT layout, but the meanings of values used in the bit fields are completely different.

    Example

    OTX_RESULTs are 32 bit values layed out as follows:
    |3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
    |1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
    |-+---------------+-----------------------------+---------------+
    |S|  source id    |        line number          |      Code     |
    |-+---------------+-----------------------------+---------------+
    
    where
    S - Severity - indicates success/fail
    
        0 - Success
        1 - Fail
    
    source id - source module where error occurred
    
    line number - line number where error occurred
    
    X - extended error flag
    
    Code - is the OTX facility's status code
    

    OtxGeneric

    Filename: OtxGeneric.h

    Description

    Generic functions and macros provided in the OTX driver API

    OtxHdlc

    Filename: OtxHdlc.h

    Description

    Prototypes for the Logical HDLC Device (Sender/Receiver) Functions

    OtxHdlcD

    Filename: OtxJtagD.h

    Description

    Constants, Macros, and Types for the HDLC Functions

    OtxHdlcD

    Filename: OtxHdlcD.h

    Description

    Constants, Macros, and Types for the HDLC Functions

    OtxJtag

    Filename: OtxJtag.h

    Description

    Prototypes for the JTAG Functions

    OtxPots

    Filename: OtxPots.h

    Description

    This file contains prototypes for the Analog Phone Functions

    OtxPotsD

    Filename: OtxPotsD.h

    Description

    Constants, Macros, and Types for the Analog Phone Functions

    OtxRawD

    Filename: OtxRawD.h

    Description

    Constants, Macros, and Types for the Raw Data Functions

    OtxRawData

    Filename: OtxRaw.h

    Description

    Prototypes for the Logical HDLC Device (Sender/Receiver) Functions

    OtxT1E1

    Filename: OtxT1E1.h

    Description

    This file contains function prototypes for the T1/E1 Line Interface devices

    OtxT1E1D

    Filename: OtxT1E1D.h

    Description

    Constants, Macros, and Types for the T1/E1 Line Interface Device Functions

    OtxTone

    Filename: OtxTone.h

    Description

    OTX Tone Generator/Detector Logical Device Function Prototypes

    OtxToneD

    Filename: OtxToneD.h

    Description

    Constants, Macros, and Types for the HDLC Functions

    OtxType

    Filename: OtxType.h

    Description

    Types used in OTX driver API

    OsaBeep

    OTX_EXPORT void OTX_API OsaBeep(unsigned int Freq, unsigned int msDuration)
    Platform generic Osa implementation of a standard beep() function.
    Defined in: OsaCon.h

    Parameters

    Freq
    sound frequency, in hertz
    msDuration
    sound duration, in milliseconds

    Comments

    Osa functions are used by the demo programs.

    Example


    // beep 200 ms in 4000 Hz
    OsaBeep(4000, 200);
    

    OsaConsoleExit

    OTX_EXPORT void OTX_API OsaConsoleExit(void)
    Exit the platform generic functions.
    Defined in: OsaCon.h

    Comments

    This function should be called before exiting the application if OsaConsoleInit was called.

    Osa functions are used by the demo programs.

    see example on OsaConsoleInit

    See Also

    OsaConsoleInit

    OsaConsoleGetCh

    OTX_EXPORT int OTX_API OsaConsoleGetCh(void)
    Platform generic Osa implementation of the standard getch() function.
    Defined in: OsaCon.h

    Comments

    Osa functions are used by the demo programs.

    Example


    OTX_INT32 c;
    
    // get a character from key board
    c = OsaConsoleGetCh();
    

    OsaConsoleGetStr

    OTX_EXPORT char * OTX_API OsaConsoleGetStr(char * buffer)
    Platform generic Osa implementation of the standard gets() function.
    Defined in: OsaCon.h

    Parameters

    buffer
    Placeholder for input string. See gets() in stdio.h

    Comments

    Osa functions are used by the demo programs.

    Example


    char strBuf[12];
    static OTX_UINT32 nAddress = 0;
    
    // get input "nAddress" from key board
    OsaConsoleGetStr(strBuf);
    if (*strBuf) {
      nAddress = strtoul(strBuf, NULL, 0);
    }
    

    OsaConsoleInit

    OTX_EXPORT void OTX_API OsaConsoleInit(void)
    Initialize the platform generic Osa Console functions.
    Defined in: OsaCon.h

    Comments

    This function must be called before any other Osa function can be called. Osa functions are used by the demo programs.

    Example


    // first OTX function call for application if other Osa functions are used
    OsaConsoleInit();
    ...
    
    // this is called before application exits
    OsaConsoleExit();
    

    See Also

    OsaConsoleExit

    OsaConsoleInput

    OTX_EXPORT void OTX_API OsaConsoleInput(void)
    Provides an alternative input stream to the console functions other than from the keyboard buffer. The string passed to this function will be fed to OsaConsoleGetStr and OsaConsoleGetCh.

    To indicate an 'Enter' key in the OsaConsoleGetStr function, use the '^' character in the parameter to this function.
    Defined in: OsaCon.h

    Comments

    Osa functions are used by the demo programs.

    Example


    // it is usually used at the begining of application to get input stream
    // from command line
    if (g_demoEnv.pszInputStr) {
      OsaConsoleInput(g_demoEnv.pszInputStr);
    }
    

    See Also

    OsaConsoleGetStr OsaConsoleGetCh

    OsaConsolePrintF

    OTX_EXPORT int OTX_API OsaConsolePrintF(char * formatStr, va_list argList)
    Platform generic Osa implementation of the standard printf() function.
    Defined in: OsaCon.h

    Parameters

    formatStr
    Format string. See printf() in stdio.h
    argList
    Argument list. See printf() in stdio.h

    Comments

    Osa functions are used by the demo programs.

    Example


    // Usually it is used in function DemoLogf() in demo programs
    static void DemoLogf(char *formatStr, ...)
    {
      va_list argList;
      va_start(argList, formatStr);
    
      OsaConsolePrintF(formatStr, argList);
      if (g_pDemoLogFile)
        vfprintf(g_pDemoLogFile,   formatStr, argList);
    
      va_end(argList);
    }
    

    OsaConsolePutStr

    OTX_EXPORT int OTX_API OsaConsolePutStr(char * buffer)
    Platform generic Osa implementation of the standard puts() function.
    Defined in: OsaCon.h

    Parameters

    buffer
    Placeholder for input string. See puts() in stdio.h

    Comments

    Osa functions are used by the demo programs.

    Example


    // write "Hello Odin!" on the screen
    OsaConsolePutStr( "Hello Odin!");
    

    See Also

    OsaConsoleInit

    OsaFileClose

    OTX_EXPORT void OTX_API OsaFileClose(POsaFileHandle hOsaFile)
    Closes a file Platform generic Osa implementation of the standard fclose() function.
    Defined in: OsaStd.h

    Parameters

    hOsaFile
    Pointer to OSA file structure

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaFileOpen

    OTX_EXPORT POsaFileHandle OTX_API OsaFileOpen(const char * pFileName, const char * mode)
    Open a file. Platform generic Osa implementation of the standard fopen() function.
    Defined in: OsaStd.h

    Parameters

    pFileName
    Filename
    mode
    Type of access permitted

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaFileRead

    OTX_EXPORT OsaInt32 OTX_API OsaFileRead(void * buffer, OsaInt32 size, OsaInt32 count, POsaFileHandle OsaFile)
    Reads data from a file. Platform generic Osa implementation of the standard fread() function.
    Defined in: OsaStd.h

    Parameters

    buffer
    Storage location for data
    size
    Item size in bytes
    count
    Maximum number of items to be read
    OsaFile
    Pointer to OSA file structure

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaFileSeek

    OTX_EXPORT OsaInt32 OTX_API OsaFileSeek(POsaFileHandle OsaFile, OsaInt32 offset, OsaInt32 origin)
    Moves the file pointer to a specified location. Platform generic Osa implementation of the standard fseek() function.
    Defined in: OsaStd.h

    Parameters

    OsaFile
    Pointer to OSA file structure
    offset
    Number of bytes from origin
    origin
    Initial position

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaMutexDestroy

    OTX_EXPORT void OTX_API OsaMutexDestroy(OsaMutexS * pMutex)
    Deletes a Mutex created by OsaMutexInit
    Defined in: OsaThrd.h

    Parameters

    pMutex
    Pointer to the mutex created by a call to OsaMutexInit

    Comments

    Osa functions are used by the demo programs.

    see example on OsaMutexInit

    See Also

    OsaConsoleInit OsaMutexInit

    OsaMutexInit

    OTX_EXPORT void OTX_API OsaMutexInit(OsaMutexS * pMutex)
    Initalize a Mutex that can be used to create a critical section.
    Defined in: OsaThrd.h

    Parameters

    pMutex
    Pointer to the mutex created by this function call

    Comments

    Osa functions are used by the demo programs.

    Example


    static OsaMutexS g_demoLogfCritSec;
    
          OsaConsoleInit();
    
    OsaMutexInit(&g_demoLogfCritSec);
    
    ......
    
    // delete a Mutex
    OsaMutexDestroy(&g_demoLogfCritSec);
    
    OsaConsoleExit();
    

    See Also

    OsaConsoleInit OsaMutexLock OsaMutexUnlock

    OsaMutexLock

    OTX_EXPORT void OTX_API OsaMutexLock(OsaMutexS * pMutex)
    Starts a critical section.
    Defined in: OsaThrd.h

    Parameters

    pMutex
    Pointer to the mutex created by a call to OsaMutexInit

    Comments

    Osa functions are used by the demo programs.

    Example


    OsaMutexS g_demoLogfCritSec;
    
    static void DemoLogf(char *formatStr, ...)
    {
      va_list argList;
    
      OsaMutexLock(&g_demoLogfCritSec);
    
      va_start(argList, formatStr);
    
      OsaConsolePrintF(formatStr, argList);
      if (g_pDemoLogFile) vfprintf(g_pDemoLogFile,   formatStr, argList);
    
      va_end(argList);
    
      OsaMutexUnlock(&g_demoLogfCritSec);
    
    }
    

    See Also

    OsaConsoleInit OsaMutexInit OsaMutexUnlock

    OsaMutexUnlock

    OTX_EXPORT void OTX_API OsaMutexUnlock(OsaMutexS * pMutex)
    Ends a critical section
    Defined in: OsaThrd.h

    Parameters

    pMutex
    Pointer to the mutex created by a call to OsaMutexInit

    Comments

    Osa functions are used by the demo programs.

    see example on OsaMutexLock

    See Also

    OsaConsoleInit OsaMutexLock

    OsaStdLocalTime

    OTX_EXPORT struct Osa_tm * OTX_API OsaStdLocalTime(const Osa_time_t * ptime)
    Platform generic Osa implementation of the standard localtime() function.
    Defined in: OsaStd.h

    Parameters

    ptime
    Pointer to time structure

    Comments

    Osa functions are used by the demo programs.

    See Also

    OsaConsoleInit

    OsaStrCmp

    OTX_EXPORT int OTX_API OsaStrCmp(const char * s, const char * t)
    Compare strings. Platform generic Osa implementation of the standard strcmp() function.
    Defined in: OsaStd.h

    Parameters

    s
    Null-terminated string to compare
    t
    Null-terminated string to compare

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaStrCmpI

    OTX_EXPORT int OTX_API OsaStrCmpI(const char * s, const char * t, const char * s, const char * t)
    Perform a lowercase comparison of strings. Platform generic Osa implementation of the standard stricmp() function.
    Defined in: OsaStd.h

    Parameters

    s
    Null-terminated string to compare
    t
    Null-terminated string to compare
    s
    Null-terminated string to compare
    t
    Null-terminated string to compare

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaStrCpy

    OTX_EXPORT void OTX_API OsaStrCpy(char * s, char * t)
    Copy a string. Platform generic Osa implementation of the standard strcpy() function.
    Defined in: OsaStd.h

    Parameters

    s
    Destination string
    t
    Null-terminated source string

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaStrLen

    OTX_EXPORT int OTX_API OsaStrLen(const char * s)
    Get the length of a string. Platform generic Osa implementation of the standard strlen() function.
    Defined in: OsaStd.h

    Parameters

    s
    Null-terminated string to get length of.

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaStrNCpy

    OTX_EXPORT void OTX_API OsaStrNCpy(char * s, char * t, int i)
    Copy characters of one string to another. Platform generic Osa implementation of the standard strncpy() function.
    Defined in: OsaStd.h

    Parameters

    s
    Destination string
    t
    Source string
    i
    Number of characters to be copied

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaStrnSet

    OTX_EXPORT char * OTX_API OsaStrnSet(char * s, int c, int count)
    Initialize characters of a string to a given format. Platform generic Osa implementation of the standard strnset() function.
    Defined in: OsaStd.h

    Parameters

    s
    String to be altered
    c
    Character setting
    count
    Number of characters to be set

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaStrRChr

    OTX_EXPORT char * OTX_API OsaStrRChr(const char * s, int c)
    Scan a string for the last occurrence of a character Platform generic Osa implementation of the standard strrchr() function.
    Defined in: OsaStd.h

    Parameters

    s
    Null-terminated string to search
    c
    Character to be located

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaStrToI

    OTX_EXPORT int OTX_API OsaStrToI(const char * nptr)
    Convert string to integer. Platform generic Osa implementation of the standard atoi() function.
    Defined in: OsaStd.h

    Parameters

    nptr
    String to be converted

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaStrUpr

    OTX_EXPORT char * OTX_API OsaStrUpr(char * s, char * s)
    Convert a string to uppercase. Platform generic Osa implementation of the standard strupr() function.
    Defined in: OsaStd.h

    Parameters

    s
    String to capitalize
    s
    String to capitalize

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaThreadSleep

    OTX_EXPORT void OTX_API OsaThreadSleep(unsigned long nMilliSecs)
    Platform generic Osa implementation of the Win32 Sleep() function.
    Defined in: OsaThrd.h

    Parameters

    nMilliSecs
    Sleep time in milliseconds

    Comments

    Osa functions are used by the demo programs.

    Example


    // sleep for 500 ms
    OsaThreadSleep(500);
    

    See Also

    OsaConsoleInit

    OsaThreadStart

    OTX_EXPORT void OTX_API OsaThreadStart(OsaThreadFnP pfnThreadFunc)
    Platform generic Osa implementation of the Win32 CreateThread() function.
    Defined in: OsaThrd.h

    Parameters

    pfnThreadFunc
    Thread function to be started

    Comments

    Osa functions are used by the demo programs.

    Example


    void  *DemoIdleFunction(
      void *lpParameter   // thread data
    )
    {
      OTX_RESULT result;
    
      while (1) {
        OtxDrvWaitForSingleEvent(
           g_hNotificationEvent,
           OTX_TIME_INFINITY);
    
        do {
          OtxEventDataS eventData;
          result = OtxDrvGetEventData(
    		  g_hEventQueue,
    		  &eventData);
    
          if (OTX_RESULT_CODE(result) == OTX_S_OK) {
    	// We have a driver event
    	// Printf the event data.
    	// In a real application branch based on the data
    	DemoPrintEvent(&eventData);
          }
        } while (OTX_RESULT_CODE(result) == OTX_S_OK);
      }
    
      return 0;
    }
    
    // start a thread
    OsaThreadStart(DemoIdleFunction);
    

    See Also

    OsaConsoleInit

    OsaThreadStartEx

    OTX_EXPORT void OTX_API OsaThreadStartEx(OsaThreadFnP pfnThreadFunc, void * lpParameter)
    Platform generic Osa implementation of the Win32 CreateThread() function, the difference from OsaThreadStart is that this function can pass a parameter.
    Defined in: OsaThrd.h

    Parameters

    pfnThreadFunc
    Thread function to be started
    lpParameter
    Parameter to be passed to the thread

    Comments

    Osa functions are used by the demo programs.

    see example on OsaThreadStart

    See Also

    OsaConsoleInit

    OsaToLower

    OTX_EXPORT int OTX_API OsaToLower(const int c)
    Convert character to lowercase. Platform generic Osa implementation of the standard tolower() function.
    Defined in: OsaStd.h

    Parameters

    c
    Character to convert

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaToUpper

    OTX_EXPORT int OTX_API OsaToUpper(const int c, const int c)
    Convert character to uppercase. Platform generic Osa implementation of the standard toupper() function.
    Defined in: OsaStd.h

    Parameters

    c
    Character to convert
    c
    Character to convert

    Comments

    Osa functions are used by the demo programs.

    See Also



    OsaWinCeConsoleMain

    OTX_EXPORT int OTX_API OsaWinCeConsoleMain(void)
    Provides an mechanism to have the equivalent of a console application under Windows CE. This routine is called from WinMain, and processes the command line parameters, if any, starts up a thread routine (passed as a function pointer to what would be a main(int argc, char *argv[]) in a normal console application, and provides the requirement of Windows message handling:

    while (GetMessage(&msg, NULL, 0, 0) == TRUE) { TranslateMessage(&msg); DispatchMessage(&msg); }
    Defined in: OsaCon.h

    Comments

    Osa functions are used by the demo programs.

    Example


    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd)
    {
      // default command line parameters
      static char exename[OTX_MAX_PATH] = "";
      static char *cmdParams[] = { exename, "/TM", NULL };
      char *pc;
    
      GetModuleFileName(NULL, (LPTSTR) cmdParams[0], OTX_MAX_PATH);
      strcpy(g_demoEnv.cwd, cmdParams[0]);
      pc = strrchr(g_demoEnv.cwd, '\\\\');
      if (pc != NULL) {
        *++pc = '\\0';
      }
    
      return OsaWinCeConsoleMain(hInstance, hPrevInstance, lpCmdLine, nShowCmd,
    	      cmdParams, sizeof(cmdParams) / sizeof(cmdParams[0]), main);
    }
    

    OTX_CALL_HANDLE

    OTX_BOOL OTX_CALL_HANDLE(OTX_HANDLE hDevice)
    Check if a Handle of type OTX_HANDLE is a Handle to a Call
    Defined in: OtxGeneric.h

    Parameters

    hDevice
    A handle to any type device

    OTX_GET_HANDLE_VAL

    OTX_HANDLE OTX_GET_HANDLE_VAL(OTX_HANDLE hDevice)
    Retrieve the value of a Handle of type OTX_HANDLE
    Defined in: OtxGeneric.h

    Parameters

    hDevice
    A handle to any type device

    OTX_LOGICAL_DEVICE_HANDLE

    OTX_BOOL OTX_LOGICAL_DEVICE_HANDLE(OTX_HANDLE hDevice)
    Check if a Handle of type OTX_HANDLE is a Handle to a Logical Device
    Defined in: OtxGeneric.h

    Parameters

    hDevice
    A handle to any type device

    OTX_PHYSICAL_DEVICE_HANDLE

    OTX_BOOL OTX_PHYSICAL_DEVICE_HANDLE(OTX_HANDLE hDevice)
    Check if a Handle of type OTX_HANDLE is a Handle to a Physical Device
    Defined in: OtxGeneric.h

    Parameters

    hDevice
    A handle to any type device

    OTX_PIPE_HANDLE

    OTX_BOOL OTX_PIPE_HANDLE(OTX_HANDLE hDevice)
    Check if a Handle of type OTX_HANDLE is a Handle to a Pipe
    Defined in: OtxGeneric.h

    Parameters

    hDevice
    A handle to any type device

    OTX_QUEUE_HANDLE

    OTX_BOOL OTX_QUEUE_HANDLE(OTX_HANDLE hDevice)
    Check if a Handle of type OTX_HANDLE is a Handle to a Queue
    Defined in: OtxGeneric.h

    Parameters

    hDevice
    A handle to any type device

    OTX_SERVICE_HANDLE

    OTX_BOOL OTX_SERVICE_HANDLE(OTX_HANDLE hDevice)
    Check if a Handle of type OTX_HANDLE is a Handle to a Service
    Defined in: OtxGeneric.h

    Parameters

    hDevice
    A handle to any type device

    OTX_STRUCT_ADD_BYTE_OFFSET

    StructType * OTX_STRUCT_ADD_BYTE_OFFSET(StructType StructType, OTX_UINT8 * pBase, OTX_UINT8 nByteOffset)
    Macro that takes care of type casting when adding a byte offset to a struct pointer to find a second struct at another location e.g.: OtxHdlcFrameInfoS p1 = buffer; OtxHdlcFrameInfoS p2 = OTX_STRUCT_ADD_BYTE_OFFSET(OtxHdlcFrameInfoS, p1, p1->nOffsetNext);
    Defined in: OtxGeneric.h

    Parameters

    StructType
    The name of the type of the structure whose base address is to be returned
    pBase
    Base Address of the structure pointer
    nByteOffset
    Byte offset from Base Address that the second structure is located

    */ ((StructType *) (((OTX_UINT8 *) pBase) + nByteOffset))


    OTX_VALID_HANDLE

    int OTX_VALID_HANDLE(OTX_HANDLE hDevice)
    Check if a Handle of type OTX_HANDLE is a valid Handle
    Defined in: OtxGeneric.h

    Parameters

    hDevice
    A handle to any type device

    OtxBrdCodecSetLaw

    OTX_EXPORT OTX_RESULT OTX_API OtxBrdCodecSetLaw(IN OTX_HANDLE hCodecDevice, IN OtxDataFormatE eLaw)
    Set the PCM (Pulse Code Modulation) compression mode for the Codec.
    Defined in: OtxBrd.h

    Parameters

    hCodecDevice
    Handle to Codec device
    eLaw
    U-law or A-law

    Comments

    There are two standards (companssion modes), the U-Law standard is used in North America and Japan (T1) while the A-Law standard is used in most other countries, for example European countries (E1).

    Example


    // Get handles and set law for Codec devices #0 - #3
    for (i = 0; i < 4; i++) {
      OtxDrvOpenPhysicalDevice(
        g_hPhysDevs.hBoardController,
        OTX_DEVICE_CODEC,
        i, i,
        g_hEventQueue,
        &g_hPhysDevs.hCodec[i]
      );
    
      // Use G.711 U-law (North American) companded PCM data (8 bit samples)
      // for T1 mode
      OtxBrdCodecSetLaw(
        g_hPhysDevs.hCodec[i],
        OTX_DATA_FORMAT_COMPAND8_U_LAW
      );
    }
    

    See Also

    OtxDataFormatE

    OtxBrdSetClocks

    OTX_EXPORT OTX_RESULT OTX_API OtxBrdSetClocks(IN OTX_HANDLE hBrdDevice, IN OtxBrdClockModeE clkMode, IN OtxBrdClockSourceE clkSource)
    Set the clock mode and the clock source for the OTX Board
    Defined in: OtxBrd.h

    Parameters

    hBrdDevice
    Handle to Board device
    clkMode
    TSS Clock Mode (Master/Slave)
    clkSource
    Clock which the TSS uses to clock the highways

    Comments

    All the highways on the OTX NIC Adapter are clocked with the same 8 kHz master framing clock. The source of the frame clock is set with this function.

    Basically, there are two types of clock modes, non-H.100 bus clocking (H.100 bus is disconnected or H.100 bus is not available on board) and H.100 bus clocking (H.100 bus is connected ). When H.100 bus is used, one board is set as the Clock Master, other board(s) is set to the Clock Slave.

    Example


    non-H.100 bus clocking
      // board is enabled before the clock source can be set
      result = OtxDrvEnable(
    	     g_hPhysDevs.hBoardController,
    	     OTX_TASK_SYNC,
    	     5000L);
    
      // Set Internal Oscillator as the clock source
      result = OtxBrdSetClocks(
    	     g_hPhysDevs.hBoardController,
    	     OTX_CLOCK_MODE_LOCAL,
    	     OTX_CLOCK_SOURCE_INTERNAL);
    

    H.100 bus clocking
      // two boards are enabled before the clock source can be set
      result = OtxDrvEnable(
    	     g_hPhysDevs.hBoardController0,
    	     OTX_TASK_SYNC,
    	     5000L);
      result = OtxDrvEnable(
    	     g_hPhysDevs.hBoardController1,
    	     OTX_TASK_SYNC,
    	     5000L);
    
      // Set Li#0 on board0 as the H.100 Clock Master
      result = OtxBrdSetClocks(
    	     g_hPhysDevs.hBoardController0,
    	     OTX_CLOCK_MODE_H100,
    	     OTX_CLOCK_SOURCE_LOCAL_0);
    
      // Set board1 as the H.100 Clock Slave (synchronize to the H.100 A-Clock
      // sourced by board0)
      result = OtxBrdSetClocks(
    	     g_hPhysDevs.hBoardController1,
    	     OTX_CLOCK_MODE_H100,
    	     OTX_CLOCK_SOURCE_A_CLOCKS);
    

    See Also

    OtxBrdClockModeE
    OtxBrdClockSourceE

    OtxBrdTssConstByte

    OTX_EXPORT OTX_RESULT OTX_API OtxBrdTssConstByte(IN OTX_HANDLE hHwDevice, IN OTX_UINT32 nHighWayOut, IN OTX_UINT32 nTimeSlotOut, IN OTX_UINT8 nConstValue)
    Set a constant value to a timeslot on a highway
    Defined in: OtxBrd.h

    Parameters

    hHwDevice
    Handle to TSS device
    nHighWayOut
    highway number
    nTimeSlotOut
    timeslot number
    nConstValue
    constant value in BYTE

    Example


    // Get a handle to the Time-Space Switch (TSS) on the board
    result = OtxDrvOpenPhysicalDevice(
    	   g_hPhysDevs.hBoardController,
    	   OTX_DEVICE_TSS,
    	   0,
    	   0,
    	   g_hEventQueue,
    	   &g_hPhysDevs.hTss);
    
    // set constant value '10' on timeslot #5 of highway #2
    result = OtxBrdTssConstByte(
    	   g_hPhysDevs.hTss,
    	   2,
    	   5,
    	   10);
    

    OtxBriActivateLink

    OTX_EXPORT OTX_RESULT OTX_API OtxBriActivateLink(IN OTX_HANDLE hBriDev, IN OTX_TIME nWaitMaxMs)
    Issues a Layer 1 Activate Request.
    Defined in: OtxBri.h

    Parameters

    hBriDev
    Handle to the BRI Transceiver Device
    nWaitMaxMs
    Time in milliseconds to wait for the layer 1 to become active

    OtxBriConfigureMonitor

    OTX_EXPORT OTX_RESULT OTX_API OtxBriConfigureMonitor(IN OTX_HANDLE hBriTeDev, IN OTX_HANDLE hBriNtDev)
    Sets up a pair of Line Interfaces to operate in monitor mode. The first Li will listen as a TE. The second Li will listen as an NT.
    Defined in: OtxBri.h

    Parameters

    hBriTeDev
    Handle to the the Li which will listen as a TE
    hBriNtDev
    Handle to the the Li which will listen as a NT

    OtxBriDeactivateLink

    OTX_EXPORT OTX_RESULT OTX_API OtxBriDeactivateLink(IN OTX_HANDLE hBriDev, IN OTX_TIME nWaitMaxMs)
    Issues a Layer 1 Deactivate Request.
    Defined in: OtxBri.h

    Parameters

    hBriDev
    Handle to the BRI Transceiver Device
    nWaitMaxMs
    Time in milliseconds to wait for the layer 1 to become active

    Comments

    Only meaninful if the Li is configured in LT_S (NT) mode.

    OtxBriGetLineStatus

    OTX_EXPORT OTX_RESULT OTX_API OtxBriGetLineStatus(IN OTX_HANDLE hBriDev, OUT OTX_UINT32 * pLineStatus)
    Read the physical line status of the T1/E1 Line Interface.
    Defined in: OtxBri.h

    Parameters

    hBriDev
    Handle to the BRI Transceiver Device
    pLineStatus
    T1/E1 Physical Layer Line Status

    OtxBriSetLiMode

    OTX_EXPORT OTX_RESULT OTX_API OtxBriSetLiMode(IN OTX_HANDLE hBriDev, IN OtxBriLiModeE eLiMode)
    Sets up the BRI Line Interface transceiver in either Terminal (TE) or Network (NT) mode.
    Defined in: OtxBri.h

    Parameters

    hBriDev
    Handle to the BRI Device
    eLiMode
    Mode to be configured to (TE/NT)

    See Also

    OtxBriLiModeE

    OtxBriTermLi

    OTX_EXPORT OTX_RESULT OTX_API OtxBriTermLi(IN OTX_HANDLE hBriDev, IN OTX_BOOL bConnectTermRes)
    Connects or disconnects the BRI S-Interface 100-ohm terminating resistor for a specified Line Interface.
    Defined in: OtxBri.h

    Parameters

    hBriDev
    Handle to the BRI Transceiver Device
    bConnectTermRes
    If OTX_TRUE, connect the terminating resistor

    OtxBurstReadData

    OTX_EXPORT OTX_RESULT OTX_API OtxBurstReadData(IN OTX_HANDLE hBurstDevice, IN OTX_UINT32 nHighwayNo, IN void * psqData, IN OUT OTX_UINT32 * pnDataLen)
    Burst Device direct data read.
    Defined in: OtxBurst.h

    Parameters

    hBurstDevice
    Handle to logical Burst Device
    nHighwayNo
    Highway number (0 - highway count)
    psqData
    buffer to receive - entire frame of 32 TS for all LIs per highway
    pnDataLen
    buffer size (multiple of number of TS on highway) - upon return the amount of data read

    Comments

    Receive a buffer that is filled with data for an entire frame (32 TS) for all LIs hosted by the given highway. This routine will read up to a maximum of nDataLen, and will return the amount read in pnDataLen, which will be from zero up to the amount specified. This call is a non-blocking call and will return immediately with either data or an empty buffer (which denotes the burst device has no data available).

    See Also



    OtxBurstReadDataEx

    OTX_EXPORT OTX_RESULT OTX_API OtxBurstReadDataEx(IN OTX_HANDLE hBurstDevice, IN OTX_UINT32 nHighwayNo, IN void * psqData, IN OUT OTX_UINT32 * pnDataLen, OUT OTX_UINT64 * pnFrameRefId, OUT OsaDateTime * dtFrameRefTime)
    Extended Burst Device direct data read.
    Defined in: OtxBurst.h

    Parameters

    hBurstDevice
    Handle to logical Burst Device
    nHighwayNo
    Highway number (0 - highway count)
    psqData
    buffer to receive - entire frame of 32 TS for all LIs per highway
    pnDataLen
    buffer size (multiple of number of TS on highway) - upon return the amount of data read
    pnFrameRefId
    Optional - upon return, contains the Frame Reference Counter of the first frame contained in the return buffer
    dtFrameRefTime
    Optional - upon return, contains the time that the first frame was received

    Comments

    Receive a buffer that is filled with data for an entire frame (32 TS) for all LIs hosted by the given highway. This routine will read up to a maximum of nDataLen, and will return the amount read in pnDataLen, which will be from zero up to the amount specified. This call is a non-blocking call and will return immediately with either data or an empty buffer (which denotes the burst device has no data available). This routine also returns extended data concerning the data read, such as a frame counter, frame time, etc.

    See Also



    OtxBurstSendData

    OTX_EXPORT OTX_RESULT OTX_API OtxBurstSendData(IN OTX_HANDLE hBurstDevice, IN OTX_UINT32 nHighwayNo, IN void * psqData, IN OTX_UINT32 * nDataLen)
    Burst Device direct data send.
    Defined in: OtxBurst.h

    Parameters

    hBurstDevice
    Handle to logical Burst Device
    nHighwayNo
    Highway number (0 - highway count)
    psqData
    buffer to send - entire frame of 32 TS for all LIs per highway
    nDataLen
    buffer size (multiple of number of TS on highway) - upon return the amount of data buffered

    Comments

    Send a buffer that is filled with data for an entire frame (32 TS) for all LIs hosted by the given highway.

    See Also



    OtxDataConverterInit

    OTX_EXPORT OTX_RESULT OTX_API OtxDataConverterInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormatIn, IN OtxDataFormatE eDataFormatOut)
    Initialize a Data Converter Logical Device. A Data Converter transforms data from one data format to another.
    Defined in: OtxData.h

    Parameters

    hDevice
    Handle to the logical Data Converter Device
    eDataFormatIn
    Data format coming in. See also OtxDataFormat
    eDataFormatOut
    Data format coming out. See also OtxDataFormat

    Comments

    data is transferred into Data Converter through an input pipe, after the data is transformed, it is transmitted to an output pipe.

    Example


    // Create Data Converter (for cross-connection with the DSP)
    result = OtxDrvCreateLogicalDevice(
    	   g_hPhysDevs.hDsp0,
    	   OTX_LDEVICE_DATA_CONVERTER,
    	   g_hEventQueue,
    	   i,
    	   &g_sqDataConverter.hHandle);
    
    // DTMF data (just an example) as the input data to Data Convertor,
    // pipe creation, connection for DTMF needed to be done before this call.
    result = OtxDrvConnectLogicalDevice(
    	   g_sqDtmfDetector.hPipe,
    	   -1,
    	   g_sqDataConverter.hHandle,
    	   -1);
    
    // create a pipe for output data from Data Converter
    ts = 5;
    memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
    sqTimeSlotMask[ts] = 0xFF;
    nCapacity = 64;
    
    result = OtxDrvCreatePipe(
    	   nCapacity,
    	   &g_sqDataConverter.hPipe);
    
    // connect pipe from DSP0 (Data Convertor) to Li0
    result = OtxDrvConnectPipe(
    	   g_sqDataConverter.hPipe,
    	   OTX_PIPE_INPUT,
    	   g_hPhysDevs.hDsp0,
    	   -1,
    	   sqTimeSlotMask,
    	   32);
    
    result = OtxDrvConnectPipe(
    	   g_sqDataConverter.hPipe,
    	   OTX_PIPE_OUTPUT,
    	   g_hPhysDevs.hLi0,
    	   -1,
    	   sqTimeSlotMask,
    	   32);
    
    // connect Data Convertor device to the pipe
    result = OtxDrvConnectLogicalDevice(
    	   g_sqDataConverter.hHandle,
    	   -1,
    	   g_sqDataConverter.hPipe,
    	   -1);
    
    // initialize the Data Converter, convert data from U-law to 8-bit unsigned interger
    result = OtxDataConverterInit(
    	   g_sqDataConverter.hHandle,
    	   OTX_DATA_FORMAT_COMPAND8_U_LAW,
    	   OTX_DATA_FORMAT_UINT8);
    
    // enable the Data Converter
    result = OtxDrvEnable(
    	   g_sqDataConverter.hHandle,
    	   OTX_TASK_SYNC,
    	   5000L);
    

    See Also

    OTX_LDEVICE_DATA_CONVERTER
    OtxDataFormatE

    OtxDataMixerInit

    OTX_EXPORT OTX_RESULT OTX_API OtxDataMixerInit(IN OTX_HANDLE hDevice)
    Initialize a Data Mixer Logical Device.
    Defined in: OtxData.h

    Parameters

    hDevice
    Handle to the logical Data Mixer Device

    Comments

    A Data Mixer multiplexes (mixes) N inputs to 1 output. Allows logical device or pipe inputs to be connected together and mixed into one output.

    See Also

    OTX_LDEVICE_DATA_MIXER

    OtxDrvCancelTask

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvCancelTask(IN OTX_HANDLE hDevice, IN OTX_TASK_REF nTaskRef)
    Cancels a pending task for a particular device.
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device
    nTaskRef
    Callers task reference, as given earlier. See OTX_TASK_REF

    Comments

    If a device has several tasks with the same reference number, the oldest task is cancelled. Only one or zero tasks are removed for each call.

    See Also

    OTX_TASK_REF

    To Do



    OtxDrvClose

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvClose(IN OTX_HANDLE hObject)
    Close a physical or logical device or event queue or pipe.
    Defined in: OtxDrv.h

    Parameters

    hObject
    Object handle to a physical/logical device, pipe or event queue

    Comments

    If the device is being used, it may not be possible to close it. E.g. if devices are connected to an event queue, to close the event queue may not succeed.

    Example


    // close Hdlc Receivers logical devices hosted in the physical Line Interface devices
    for (i = 0; i < 2; i++) {
      if (g_hLogicDevs.hHdlcReceiver[i]) {
        result = OtxDrvClose(g_hLogicDevs.hHdlcReceiver[i]);
      }
    }
    

    See Also

    OtxDrvOpenPhysicalDevice
    OtxDrvCreateLogicalDevice
    OTX_HANDLE

    OtxDrvCloseEvent

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvCloseEvent(IN OTX_EVENT hEvent)
    Close a Notification Event
    Defined in: OtxDrv.h

    Parameters

    hEvent
    Event handle to close. See Also OTX_EVENT

    Comments

    Make sure there are no event queues that use event. Closing an event that is still in use will crash the system eventually.

    see example on OtxDrvSignalEvent

    See Also

    OtxDrvWaitForSingleEvent
    OtxDrvWaitForMultipleEvents
    OtxDrvCreateEventQueue
    OTX_EVENT

    OtxDrvConnectBoard

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvConnectBoard(IN OTX_HANDLE hCtBus, IN OTX_HANDLE hBoard)
    Inform the driver of the physical board connections for a CT Bus. This function should be called once for every board which is connected to this CT Bus.
    Defined in: OtxDrv.h

    Parameters

    hCtBus
    Handle to a CT Bus
    hBoard
    Handle to a board (Nic) device which is connected to this CT bus

    Comments

    A CT Bus device is a physical device representing the CT Bus cable connection between two or more boards.

    When two ore more boards are connected together with the appropriate CT Bus board interconnect cable it is possible to connect two devices with a pipe even if they are located on different board. Before pipes can connect over separate boards the driver must be informed about what types of board interconnects exists, and how the boards are connected. This is done by calling this function.

    The CT Bus device must be opened by calling OtxDrvOpenPhysicalDevice prior to calling this function. The same applies to all the boards which are connected to the CT Bus.

    The CT Bus does not have a direction like a pipe. The direction of each individual timeslot is determined at the time a pipe is connected. A Pipe Device must utilize the CT Bus to reach a different board. The direction of the pipe then determines the direction of that timeslot in the CT Bus.

    The OTX driver supports a CT bus capacity of 2048 kbps which corresponds to 32 timeslots/highway.

    Example


    // connect to the Physical CT Buses
    OTX_INT32 nCtBus;
    
    for (nCtBus = 0; nCtBus < 1; nCtBus++) {
      // open OTX_DEVICE_CT_BUS
      result = OtxDrvOpenPhysicalDevice(
    	      0,
    	      OTX_DEVICE_CT_BUS,
    	      nCtBus,
    	      nCtBus,
    	      g_hEventQueue,
    	      &g_hCtBus[nCtBus]);
    }
    
    for (iBrd = 0; iBrd < 2; iBrd++) {
    
      // Connect (get handles) to the physical devices on two boards
      DemoOpenPhysicalDevices(iBrd);
    }
    
    // inform the driver that our two  boards are connected to one CT Bus
    for (iBrd = 0; iBrd < 2; iBrd++) {
      result = OtxDrvConnectBoard(
    	      g_hCtBus[iBrd/2],
    	      g_hPhysDevs[iBrd].hThorController);
    }
    

    See Also

    OtxDrvOpenPhysicalDevice
    OTX_DEVICE_CT_BUS

    OtxDrvConnectLib

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvConnectLib(void)
    Opens a communication channel to the driver API library.
    Defined in: OtxDrv.h

    Comments

    This is the first function to be called in OTX board application, it sets up a communication channel with the driver.

    Its complement is OtxDrvReleaseLib which closes the communication channel and is the last function to be called.

    Example


    // start of OTX applicaton
    result = OtxDrvConnectLib();
    ......
    ......
    // end of OTX application
    result = OtxDrvReleaseLib();
    

    See Also

    OtxDrvReleaseLib

    OtxDrvConnectLogicalDevice

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvConnectLogicalDevice(IN OTX_HANDLE hFromDevice, IN OTX_INT32 iFromConnectPoint, IN OTX_HANDLE hToDevice, IN OTX_INT32 iToConnectPoint)
    Connect an input of a Logical device to another logical device or to a pipe connected to the physical device implementing the logical device.
    Defined in: OtxDrv.h

    Parameters

    hFromDevice
    Logical Device or Pipe whose output is to be connected
    iFromConnectPoint
    Output connection point to connect, -1 = don't care
    hToDevice
    Logical Device or Pipe whose input is to be connected
    iToConnectPoint
    Connection point on the second device to connect to, -1 = don't care

    Comments

    Two logical devices (which are implemented within one physical device) or a logical device and a pipe connected to the physical device implementing the logical device can be connected in series with this function. If the devices need to be connected in parallel, call this function twice with the same output device but with two different input devices.

    The connection point index is only needed for devices that have more than one inputs of outputs, e.g. a mixer or a conference bridge, and even in that case it can be left as -1 if the connection points are 100% symmetrical, e.g. a symmetrically mixed conference bridge.

    see example on OtxDrvConnectPipe

    Developer Notes

    This function can only be used for logical devices and pipes. Physical devices must be connected using the function OtxDrvConnectPipe

    See Also

    OtxDrvDisconnectLogicalDevice
    OtxDrvConnectPipe
    OtxDrvCreateLogicalDevice
    OTX_HANDLE

    OtxDrvConnectPipe

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvConnectPipe(IN OTX_HANDLE hPipe, IN OtxPipeEndE ePipeEnd, IN OTX_HANDLE hDevice, IN OTX_INT32 nHighway, IN OTX_UINT8 sqConnectMask[], IN OTX_UINT32 coMaskSize)
    Connects one end of a Pipe to a Physical Device.
    Defined in: OtxDrv.h

    Parameters

    hPipe
    Pipe to be connected to a Physical Device.
    ePipeEnd
    End of the pipe (input vs. output) to be connected. See Also OtxPipeEndE
    hDevice
    Physical Device to be connected to
    nHighway
    Physical Highway to be used. -1 = don't care
    sqConnectMask[]
    Connection mask for mapping the Pipe Bits to time-slots and bits on the PCM highway connected to the physical device Can be NULL if don't care and coMaskSize = 0 Each octet in the mask represents a timeslot on the highway A connection mask is needed for pipes connected on OTX PCMCIA card and also for pipes with a capacity < 64 kpbs. Please note that the capacity specified in the connection mask must match the capacity used when the pipe was created with OtxDrvCreatePipe.
    coMaskSize
    Size of connection mask for the highway connection (in octets). 0 = don't care.

    Comments

    A pipe is always used to connect two physical devices and it is always forms a one-to-one data path between two physical devices. I.e. every pipe must have exactly one physical device connected to its input and exactly one physical device connected to its output.

    Multiple logical devices (implemented within a physical device) can be connected within a physical device to use data from a pipe output. To connect logical devices to each other and to a pipe, use function OtxDrvConnectLogicalDevice.

    To specify which timeslot (or timeslots) the pipe will be connected to, a connection mask can be used. Each bit in the connection mask corresponds to 8 kpbs capacity. A 64 kpbs pipe corresponds to 8 bits (1 octet) in the connection mask.

    The connection mask is only needed for devices where an exact mapping of the pipe onto a physical interface (i.e. specific time-slots) is needed, e.g. in the case of a multichannel line interface where a specific timeslot is used for signalling. It is important that the mapping matches the capacity of the pipe exactly. If the time-slots to be used do not matter, or if they cannot be changed by the user, specify coMaskSize = 0 and sqConnectMask = NULL.

    The connection mask is also needed for pipes of a capacity < 64 kpbs. E.g. if a 56kpbs pipe is specified for an HDLC device, the timeslot mask for that pipe must be specified to 0xFE. Please see example below:

    Example

    1 56kpbs pipe connected to TS1
    OTX_UINT8 sqTimeSlotMask[32];
    memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
    sqTimeSlotMask[1] = 0xFE;  // TS1 is a 56kpbs pipe
    
    2 64kpbs pipe connected to TS16
    OTX_UINT8 sqTimeSlotMask[32];
    memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
    sqTimeSlotMask[16] = 0xFF;  // TS16 is a 64kpbs pipe
    
    3 128kpbs pipe connected to TS5 and TS7
    OTX_UINT8 sqTimeSlotMask[32];
    memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
    sqTimeSlotMask[5] = 0xFF;
    sqTimeSlotMask[7] = 0xFF;
    

    //connect the Logical Device in the Line Interface (one for each direction)
    
    for (i = 0; i < 2; i++) {
      ts = 5;
      memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
      sqTimeSlotMask[ts] = 0xFF;
      nCapacity = 64;
    
      // Create an incoming and outgoing Pipe representing the external T1/E1
      result = OtxDrvCreatePipe(
    	     nCapacity,
    	     &g_sqLiHdlcReceiver[i].hPipe);
      result = OtxDrvCreatePipe(
    	     nCapacity,
    	     &g_sqLiHdlcSender[i].hPipe);
    
      // connect external T1/E1 pipes. Only connect ONE end of each pipe.
      // External Interface is LI Highway Number 1
      result = OtxDrvConnectPipe(
    	     g_sqLiHdlcReceiver[i].hPipe,
    	     OTX_PIPE_OUTPUT,
    	     g_hPhysDevs.hLi[i],
    	     1,
    	     sqTimeSlotMask,
    	     32);
      result = OtxDrvConnectPipe(
    	     g_sqLiHdlcSender[i].hPipe,
    	     OTX_PIPE_INPUT,
    	     g_hPhysDevs.hLi[i],
    	     1,
    	     sqTimeSlotMask,
    	     32);
    
      // connect the logical devices within the Li
      result = OtxDrvConnectLogicalDevice(
    	     g_sqLiHdlcSender[i].hHandle,
    	     -1,
    	     g_sqLiHdlcSender[i].hPipe,
    	     -1);
      result = OtxDrvConnectLogicalDevice(
    	     g_sqLiHdlcReceiver[i].hPipe,
    	     -1,
    	     g_sqLiHdlcReceiver[i].hHandle,
    	     -1);
    }
    

    //connect the Logical Device in DSP, connect BOTH ends of each pipe
    
    for (i = 0; i < 2; i++) {
    
      // Receiving direction
      {
        ts = 1;
        memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
        sqTimeSlotMask[ts] = 0xFF;
        nCapacity = 64;
    
        result = OtxDrvCreatePipe(
    	       nCapacity,
    	       &g_sqDspHdlcReceiver[i].hPipe);
    
        result = OtxDrvConnectPipe(
    	       g_sqDspHdlcReceiver[i].hPipe,
    	       OTX_PIPE_OUTPUT,
    	       g_hPhysDevs.hDsp[i],
    	       -1,
    	       sqTimeSlotMask,
    	       32);
        result = OtxDrvConnectPipe(
    	       g_sqDspHdlcReceiver[i].hPipe,
    	       OTX_PIPE_INPUT,
    	       g_hPhysDevs.hLi[i],
    	       -1,
    	       sqTimeSlotMask,
    	       32);
    
        result = OtxDrvConnectLogicalDevice(
    	       g_sqDspHdlcReceiver[i].hPipe,
    	       -1,
    	       g_sqDspHdlcReceiver[i].hHandle,
    	       -1);
      }
    
      // Sending direction
      {
        ts = 1;
        memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
        sqTimeSlotMask[ts] = 0xFF;
        nCapacity = 64;
    
        result = OtxDrvCreatePipe(
    	       nCapacity,
    	       &g_sqDspHdlcSender[i].hPipe);
    
        result = OtxDrvConnectPipe(
    	       g_sqDspHdlcSender[i].hPipe,
    	       OTX_PIPE_INPUT,
    	       g_hPhysDevs.hDsp[i],
    	       -1,
    	       sqTimeSlotMask,
    	       32);
        result = OtxDrvConnectPipe(
    	       g_sqDspHdlcSender[i].hPipe,
    	       OTX_PIPE_OUTPUT,
    	       g_hPhysDevs.hLi[i],
    	       -1,
    	       sqTimeSlotMask,
    	       32);
    
        result = OtxDrvConnectLogicalDevice(
    	       g_sqDspHdlcSender[i].hHandle,
    	       -1,
    	       g_sqDspHdlcSender[i].hPipe,
    	       -1);
      }
    }
    

    Developer Notes

    This function can only used for Physical devices. Logical Devices have to be connected with the OtxDrvConnectLogicalDevice function.

    See Also

    OtxDrvCreatePipe
    OtxDrvClose
    OtxDrvDisconnectPipe
    OtxDrvOpenPhysicalDevice
    OtxDrvConnectLogicalDevice
    OtxPipeEndE
    OTX_HANDLE

    OtxDrvCreateEvent

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvCreateEvent(OUT OTX_EVENT * phEvent)
    Create a Notification Event
    Defined in: OtxDrv.h

    Parameters

    phEvent
    Event handle, ready for use. See Also OTX_EVENT

    Comments

    An Event Handle if registered with an Event Queue can be used by a Win32 app to wait efficiently on events to be added to the event queue. That way unnecessary polling with the OtxDrvGetEventData can be avoided.

    OTX_RESULT result;

    Example


    // create the event queue to be used by the driver to inform the
    // application about events
    
    // create a notification Event
    result = OtxDrvCreateEvent(&g_hNotificationEvent);
    
    // create Event Queue for driver notifications
    result = OtxDrvCreateEventQueue(
    	    2048,
    	    g_hNotificationEvent,
    	    &g_hEventQueue);
    
    // enable Event Queue
    result = OtxDrvEnable(
    	    g_hEventQueue,
    	    OTX_TASK_SYNC,
    	    5000L);
    

    See Also

    OtxDrvWaitForSingleEvent
    OtxDrvWaitForMultipleEvents
    OtxDrvCreateEventQueue
    OtxDrvCloseEvent
    OTX_EVENT

    OtxDrvCreateEventQueue

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvCreateEventQueue(IN OTX_UINT32 nSize, IN OTX_EVENT hEvent, OUT OTX_HANDLE * phEventQueue)
    Create a Notification Event Queue
    Defined in: OtxDrv.h

    Parameters

    nSize
    Size of the queue to be created in # of messages
    hEvent
    Event which a Win32 app can Wait for events to occur, NULL if no notification needed (or if not a Win32 application).
    phEventQueue
    Event Queue handle

    Comments

    An Event Queue is used to serialize asynchronous events detected by the driver. Events can be anything that occur spontaneously or as a result of a user incurred action. It's the users responsibility to pump event messages out of the queue and act on them accordingly. Some messages are complete in the sense that they contain all infomation associated with the event, whereas other actions require the user to read out more info from the object itself (the object handle is always passed in the event message).

    see example on OtxDrvCreateEvent

    See Also

    OtxDrvCreateEvent
    OtxDrvOpenPhysicalDevice
    OtxDrvCreateLogicalDevice
    OTX_EVENT
    OTX_HANDLE

    OtxDrvCreateLogicalDevice

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvCreateLogicalDevice(IN OTX_HANDLE hHostDevice, IN OtxLogicalDeviceTypeE eDevType, IN OTX_HANDLE hEventQueue, IN OTX_INT32 nEventSourceId, OUT OTX_HANDLE * phLogicDevice)
    Create a Device Object to represent a logical device which is implemented with hardware, firmware or software within a physical device.
    Defined in: OtxDrv.h

    Parameters

    hHostDevice
    Parent (typically a physical device) who owns the logical device we are connecting to
    eDevType
    Class of device we are looking for, as known by the module in question. See also OtxLogicalDeviceTypeE
    hEventQueue
    Handle to separate event queue (0 creates device specific event queue)
    nEventSourceId
    User specified ID to be used by this device as the Source ID for the events generated by the device
    phLogicDevice
    Handle to the new logical device (if result code OTX_S_OK)

    Comments

    The logical devices are differenciated from the phyiscal devices by the fact the number of logical devices is not pre-determined. More logical devices can be requested by the user and allocated by the system if needed. Examples of logical devices include HDLC Receiver, HDLC Sender, Tone Detector, Tone Generator, etc.

    The following Logical Devices are supported by the OTX Driver:

    Tone Devices : Logical devices for tone generation and reception (See OtxTone.h) Data Devices : Devices for sending, receiving, and manipulation of Raw data (See OtxData.h) HDLC Devices : Logical devices implementing HDLC Sender and Receiver Devices (See OtxHdlc.h) CAS Devices : Devices implementin Channel Associated Signalling (CAS) functions (See OtxCas1.h) Modem Devices : Devices implementing Modem emulation Fax Devices : Devices implementin Fax emulation Voice Devices : Devices implementing Voice Codecs, echo cancellation, silence supression, etc.

    Example


    // create Hdlc Senders and Receivers logical devices hosted in the physical Line Interface devices
    for (i = 0; i < 2; i++) {
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_HDLC_SENDER,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hHdlcSender[i]);
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_HDLC_RECEIVER,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hHdlcReceiver[i]);
    }
    

    See Also

    OtxDrvClose
    OtxLogicalDeviceTypeE
    OtxPhysicalDeviceTypeE
    OTX_HANDLE

    OtxDrvCreatePipe

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvCreatePipe(IN OTX_INT32 nCapacity, OUT OTX_HANDLE * phPipe)
    Create a logical pipe. (One direction, one end is input, other is output) A pipe is always needed to carry data between two physical devices or between a physical device and a logical device.
    Defined in: OtxDrv.h

    Parameters

    nCapacity
    Capacity in kbps (only 8kbps increments allowed)
    phPipe
    Handle to the new pipe device (if result code OTX_S_OK)

    Comments

    A Pipe is a logical entity representing a connection between two or more devices. A Pipe has a direction, thus two Pipes are needed for a duplex connection. A pipe can connect any two devices regardless of where these two devices are located. The devices can be either physical or logical or both.

    A pipe can be created for a data rate between 8 kbit/s and 2.048Mbit/s (2.048 Mbit/s max is standard. Highways can be operated at up to 8.192Mbits/s). A pipe is a configured entity and it is overlaid on internal highways. A pipe can constitute a single time-slot on a Highway or it can be a superchannel of any number of time slots. The pipe is mapped on the physical highways when it is connected to a device with function OtxDrvConnectPipe

    see example on OtxDrvConnectPipe

    See Also

    OtxDrvConnectPipe
    OtxDrvClose
    OtxDrvDisconnectPipe
    OTX_HANDLE

    OtxDrvDeviceControl

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvDeviceControl(IN OTX_HANDLE hDevice, IN OTX_INT32 nCommandCode, IN OTX_UINT8 * pInBuffer, IN OTX_UINT32 cbInBuffer, OUT OTX_UINT8 * pOutBuffer, IN OTX_UINT32 cbOutBuffer, OUT OTX_UINT32 cbReturned, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Transparent device communication.
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to device
    nCommandCode
    Code indicating requested operation
    pInBuffer
    Input parameters in serial format
    cbInBuffer
    Byte count of input parameters
    pOutBuffer
    Buffer to receive output parameters in serial format
    cbOutBuffer
    Size in bytes of output buffer. Must be large enough for the given command
    cbReturned
    Actual number of bytes returned (may differ from cbOutBuffer).
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Comments

    Mostly used to communicate with firmware modules and firmware devices. Since the capabilities of the firmware are transparent to the driver, this is the only way firmware modules and devices can be controlled by an application using the OtxDrv API.

    See Also

    OTX_HANDLE
    OTX_TASK_REF
    OTX_TIME

    To Do



    OtxDrvDisable

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvDisable(IN OTX_HANDLE hObject, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Disables a driver object. Disabling an object makes the object reject all IO requests. Only certain control commands can be issued to a disabled object (such as configuration and reset commands). A disabled object can not generate events. Events still in the event queue are not removed by this command.
    Defined in: OtxDrv.h

    Parameters

    hObject
    Any OTX_HANDLE
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Example


    // disable board interrupts
    OtxDrvDisable(
       g_hPhysDevs.hBoardController,
       1L,
       OTX_TIME_INFINITY);
    

    See Also

    OtxDrvEnable
    OtxDrvReset
    OtxDrvCancelTask
    OTX_HANDLE

    To Do

    Not all devices maintain a public state yet

    OtxDrvDisconnectLogicalDevice

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvDisconnectLogicalDevice(IN OTX_HANDLE hFromDevice, IN OTX_INT32 iFromConnectPoint, IN OTX_HANDLE hToDevice, IN OTX_INT32 iToConnectPoint)
    Disconnect an input of a Logical device from another logical device or from a pipe connected to the physical device implementing the logical device.
    Defined in: OtxDrv.h

    Parameters

    hFromDevice
    Logical Device or Pipe whose output is to be disconnected
    iFromConnectPoint
    Output connection point to be disconnected, -1 = disconnect all
    hToDevice
    Logical Device or Pipe whose input is to be disconnected
    iToConnectPoint
    Connection point on the second device to be disconnect to, -1 = disconnect all

    Comments

    After disconnection, the Logical device may be re-connected to another logical device or a pipe with function OtxDrvConnectLogicalDevice

    The connection point index must be the same connection point used when OtxDrvConnectLogicalDevice was called.

    Example


    // break Cross-Connect
    
    // disable the logical devices
    result = OtxDrvDisable(
    	    hDataConverter[0],
    	    OTX_TASK_SYNC,
    	    5000L);
    result = OtxDrvDisable(
    	    hDataConverter[1],
    	    OTX_TASK_SYNC,
    	    5000L);
    
    // hDataConverter[0])
    result = OtxDrvDisconnectLogicalDevice(
    	    hLiDspPipe[0],
    	    -1,
    	    hDataConverter[0],
    	    -1);
    result = OtxDrvDisconnectLogicalDevice(
    	    hDataConverter[0],
    	    -1,
    	    hDspLiPipe[1],
    	    -1);
    
    // hDataConverter[1]
    result = OtxDrvDisconnectLogicalDevice(
    	    hLiDspPipe[1],
    	    -1,
    	    hDataConverter[1],
    	    -1);
    result = OtxDrvDisconnectLogicalDevice(
    	    hDataConverter[1],
    	    -1,
    	    hDspLiPipe[0],
    	    -1);
    

    Developer Notes

    This function can only be used for logical devices and pipes. Physical devices must be disconnected using the function OtxDrvDisconnectPipe

    See Also

    OtxDrvConnectLogicalDevice
    OtxDrvConnectPipe
    OtxDrvCreateLogicalDevice
    OTX_HANDLE

    OtxDrvDisconnectPipe

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvDisconnectPipe(IN OTX_HANDLE hPipe, IN OtxPipeEndE ePipeEnd)
    Disconnects one end of a Pipe from a Physical Device.
    Defined in: OtxDrv.h

    Parameters

    hPipe
    Pipe to be disconnected
    ePipeEnd
    End of the pipe to be disconnected. See Also OtxPipeEndE

    Comments

    After disconnection, the pipe can be re-connected to another physical device with function OtxDrvConnectPipe

    Example


    OTX_INT32 ts;
    OTX_UINT8 sqTimeSlotMask[32];
    
    // disonnect pipe
    result = OtxDrvDisconnectPipe(
    	    g_sqDtmfDialer[1].hPipe,
    	    OTX_PIPE_INPUT);
    result = OtxDrvDisconnectPipe(
    	    g_sqDtmfDialer[2].hPipe,
    	    OTX_PIPE_INPUT);
    
    // reconnect pipes, arbitrary timeslot on the DSP highway
    result = OtxDrvConnectPipe(
    	    g_sqDtmfDialer[2].hPipe,
    	    OTX_PIPE_INPUT,
    	    g_hPhysDevs.hDsp[0],
    	    -1,
    	    NULL,
    	    0);
    result = OtxDrvConnectPipe(
    	    g_sqDtmfDialer[1].hPipe,
    	    OTX_PIPE_INPUT,
    	    g_hPhysDevs.hDsp[0],
    	    -1,
    	    NULL,
    	    0);
    
    // reconnect logical devices
    result = OtxDrvConnectLogicalDevice(
    	    g_sqDtmfDialer[1].hHandle,
    	    -1,
    	    g_sqDtmfDialer[1].hPipe,
    	    -1);
    result = OtxDrvConnectLogicalDevice(
    	    g_sqDtmfDialer[2].hHandle,
    	    -1,
    	    g_sqDtmfDialer[2].hPipe,
    	    -1);
    

    See Also

    OtxDrvConnectPipe
    OtxDrvCreatePipe
    OtxDrvClose
    OtxDrvConnectLogicalDevice
    OtxPipeEndE
    OTX_HANDLE

    OtxDrvEnable

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvEnable(IN OTX_HANDLE hObject, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Enables a physical or logical driver device. Enabling a device makes the object to accept I/O requests and enables event notification if so configured.
    Defined in: OtxDrv.h

    Parameters

    hObject
    Any OTX_HANDLE
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Example


    // open mother board and enable it
    result = OtxDrvOpenPhysicalDevice(
    	    0,                      // '0' for mother board
    	    OTX_DEVICE_THOR_PCI,
    	    nboardNo,
    	    nboardNo,
    	    g_hEventQueue,
    	    &g_hPhysDevs.hBoardController);
    
    result = OtxDrvEnable(
    	    g_hPhysDevs.hBoardController,
    	    OTX_TASK_SYNC,
    	    5000L);
    

    See Also

    OtxDrvDisable
    OtxDrvReset
    OtxDrvCancelTask
    OTX_HANDLE

    OtxDrvEnumDevice

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvEnumDevice(IN OTX_HANDLE hDevice, IN OTX_INT32 eDeviceType, IN OUT OTX_ITERATOR * pItr, OUT OTX_HANDLE * phChildDevice)
    Enumerates over all device numbers for a specific type of devices supported by a parent device.
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the physical parent device
    eDeviceType
    Physical or logical device type. See OtxPhysicalDeviceTypeE and OtxLogicalDeviceTypeE
    pItr
    Enumeration start position. See OTX_ITERATOR
    phChildDevice
    Handle to device referenced by iterator. This handle can be always be used to query the device, but the device must have been opened for most other operations to succeed

    Comments

    Retrievs data for item referenced by the iterator

    After the call, the iterator has been incremented to reference the next item in the sequence. It can be used in a subsequent call to the same function to fetch data for the next element in the same sequence. Repeated calls to the same function with the same iterator eventually fetches data for all items in this sequence. Note that it is not possible to increment the iterator in any other way.

    The iterator must already be initialized with a call to OtxDrvIteratorBegin before the first call to this function.

    It is important that the iterator is used on the same sequence of items between each call to OtxDrvIteratorBegin, i.e. the same function must be called with the same handle value (hDevice) and the same iterator (pItr).

    However, it is possible for multiple iterators to be used on the same sequence independently, at the same time, even in separate threads.

    Example


    {
      OTX_UINT32   eDevType;
      OTX_ITERATOR itrChildTypes;
      OTX_ITERATOR itrChildrenOfSameType;
      OTX_HANDLE hParentDevice = 0;
    
      // Initialize the opaque iterator for the hosted types
      OtxDrvIteratorBegin(&itrChildTypes);
    
      while (OTX_SUCCESS(OtxDrvEnumDeviceType(hParentDevice, &itrChildTypes, (OTX_INT32 *)&eDevType))) {   // Note that we must use a zero handle to get the children of the root level
    
        OTX_HANDLE hChildDevice;
        // Initialize the opaque iterator for the devices within the same type
        OtxDrvIteratorBegin(&itrChildrenOfSameType);
    
        while (OTX_SUCCESS(OtxDrvEnumDevice(hParentDevice, eDevType, &itrChildrenOfSameType, &hChildDevice))) {
          if (hChildDevice != OTX_INVALID_HANDLE_VALUE) {
    	OTX_UINT32 eDevType2;
    	OTX_HANDLE hParentDevice2;
    
    				// Here we have a handle for a child device, get the attributes
    	DemoLogf("%s_%d (%s, handle = %#x)\\n",
    	DemoGetDeviceTypeString(hChildDevice),
    	DemoGetDeviceNo(hChildDevice),
    	(eDevType >= 0) ? (eDevType == 0 ? "UnKnown" : "Physical") : "Logical", hChildDevice);
    
    	// Print device specific attributes
    	switch (eDevType) {
    	  case OTX_DEVICE_THOR_PCI:
    	  case OTX_DEVICE_THOR_8_PCI:
    	  {
    		   OTX_RESULT      result;
    
    	    // Read serial number from the board
    	    ReadSerialNum( hParentDevice, hChildDevice, eDevType );
    
    	    if (eDevType) {
    	      DemoLogf("Opening board# %d using OtxDrvOpenPhysicalDeviceEx()\\n", DemoGetDeviceNo(hChildDevice));
    
    	      result = OtxDrvOpenPhysicalDeviceEx(
    			  hChildDevice,
    			  DemoGetDeviceNo(hChildDevice),
    			  OTX_INVALID_HANDLE_VALUE);
    	    }
    	  }
    	  break;
    	}
    
    	// Now do the same thing for all children of this device (recursion)
    	ms_nIndentLevel += 1;
    	EnumerateDevices(hChildDevice);
    	ms_nIndentLevel -= 1;
          }
        } // while loop
      } // while loop
    }
    

    See Also

    OtxDrvEnumDeviceType
    OtxDrvIteratorBegin
    OtxDrvIsIteratorEnd
    OTX_ITERATOR

    OtxDrvEnumDeviceType

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvEnumDeviceType(IN OTX_HANDLE hDevice, IN OUT OTX_ITERATOR * pItr, OUT OTX_INT32 * peDeviceType)
    Enumerates over all device types supported by a parent device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the physical parent device
    pItr
    Enumeration start position. See OTX_ITERATOR
    peDeviceType
    Physical or logical device type. See OtxPhysicalDeviceTypeE and OtxLogicalDeviceTypeE

    Comments

    Retrievs data for item referenced by the iterator

    The iterator is incremented to reference the next item in the sequence. It can be used in a subsequent call to the same function to fetch data for the next element in the same sequence. Repeated calls to the same function with the same iterator eventually fetches data for all items in this sequence.

    The iterator must already be initialized with a call to OtxDrvIteratorBegin before the first call to this function.

    It is important that the iterator is used on the same sequence of items between each call to OtxDrvIteratorBegin, i.e. the same function must be called with the same handle and the same iterator.

    However, it is possible for multiple iterators to be used on the same sequence independently, at the same time, even in separate threads.

    see example on OtxDrvEnumDevice

    See Also

    OtxDrvEnumDevice
    OtxDrvIteratorBegin
    OtxDrvIsIteratorEnd
    OTX_ITERATOR

    OtxDrvEventCode2String

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvEventCode2String(IN OTX_HANDLE hDevice, IN OTX_INT32 nEventCode, IN OTX_UINT32 nBufLen, OUT char szStrBuf[])
    Translate an Event message into English text describing the event.
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device who generated the event
    nEventCode
    Event Cause Code to be translated. See also OtxEventDataS
    nBufLen
    Length of the User supplied String Buffer
    szStrBuf[]
    User supplied String buffer

    Comments

    The event message string is copied into a user supplied buffer

    see example on OtxHdlcReadData


    OtxDrvGetAttributeType

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvGetAttributeType(IN OTX_HANDLE hDevice, IN OTX_ATTRIB_ID nAttribId, OUT OtxAttribTypeE * peAttribType, OUT OTX_UINT32 * pcbAttribValue, OUT OTX_BOOL * pbReadOnly)
    Get the an attribute type of a device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device being queried
    nAttribId
    ID of attribute
    peAttribType
    Type of the attribute, if attribute exists
    pcbAttribValue
    Size in bytes of attribute value (Get value with OtxDrvGetAttributeValue)
    pbReadOnly
    Is attribute writable or read-only

    Comments

    This function can, for example, be used to retrieve the revision of the currently loaded driver, or a firmware revision of a physical device. Different devices have different attributes, see the header file for the device in question for specific information

    Example


    // Read Serial Number from the board
    OtxAttribTypeE  eAttribType;
    OTX_UINT32      cbAttribValue;
    OTX_BOOL        bReadOnly;
    char *pszSerialNumber;
    
    result = OtxDrvGetAttributeType(
    	    g_hPhysDevs.hBoardController,
    	    OTX_ATTR_BRD_SERIAL_NUMBER,
    	    &eAttribType,
    	    &cbAttribValue,
    	    &bReadOnly);
    
    assert(eAttribType == OTX_ATTRIB_SZ);
    assert(bReadOnly == OTX_TRUE);
    
    pszSerialNumber = (char *) malloc(cbAttribValue * sizeof(char));
    
    result = OtxDrvGetAttributeValueSz(
    	    g_hPhysDevs.hBoardController,
    	    OTX_ATTR_BRD_SERIAL_NUMBER,
    	    pszSerialNumber,
    	    cbAttribValue);
    
    // display
    DemoLogf("Board Serial Number: %s\\n", pszSerialNumber);
    
    free(pszSerialNumber);
    

    See Also

    OtxDrvGetAttributeValue
    OtxDrvSetAttributeValue
    OtxDrvResultCode2String
    OtxDrvEventCode2String
    OtxDrvConnectLib

    OtxDrvGetAttributeValue

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvGetAttributeValue(IN OTX_HANDLE hDevice, IN OTX_ATTRIB_ID nAttribId, OUT OTX_PVOID pAttribValueBuf, IN OTX_UINT32 cbAttribValueBuf, OUT OTX_UINT32 * pcbAttribValue)
    Get an attribute (void* type) of a device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device being queried
    nAttribId
    ID of attribute
    pAttribValueBuf
    Buffer to hold the value of the attribute
    cbAttribValueBuf
    Size of the attribValueBuf in bytes
    pcbAttribValue
    Bytes actually used in attribValueBuf

    Comments

    This function can, for example be used to retrieve the revision of the currently loaded driver, or a firmware revision of a physical device.

    Example


    // get driver version
    OtxVersionInfo sVersionInfo;
    char szVersionInfo[255];
    
    OtxDrvGetAttributeValueSz(
       0,
       OTX_ATTR_DRV_REV_STR,
       szVersionInfo,
       255);
    OtxDrvGetAttributeValue(
       0,
       OTX_ATTR_DRV_REV_NUM,
       &sVersionInfo,
       sizeof(OtxVersionInfo),
       NULL);
    
    // display
    DemoLogf("Driver version string     %s\\n", szVersionInfo);
    DemoLogf("Driver major version      %d\\n", sVersionInfo.nMjRev);
    DemoLogf("Driver minor version      %d\\n", sVersionInfo.nMnRev);
    DemoLogf("Driver status             %s\\n", sVersionInfo.bRelStatus ? "Released" : "Preliminary");
    DemoLogf("Driver preliminary level  %d\\n", sVersionInfo.nPrelLevel);
    

    See Also

    OtxDrvGetAttributeType
    OtxDrvSetAttributeValue
    OtxDrvResultCode2String
    OtxDrvEventCode2String
    OtxDrvConnectLib

    OtxDrvGetAttributeValueBool

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvGetAttributeValueBool(IN OTX_HANDLE hDevice, IN OTX_ATTRIB_ID nAttribId, OUT OTX_BOOL * pAttribValue)
    Get an attribute (Boolean type) of a device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device being queried
    nAttribId
    ID of attribute
    pAttribValue
    Buffer to hold the value of the attribute

    Example


    // Query Library revision
    char szVersionInfo[255];
    OTX_BOOL bIsStaticLinkedLibrary;
    char szLibFileName[64];
    result = OtxDrvGetAttributeValueSz(
    	    OTX_LIB_HANDLE,
    	    OTX_ATTR_LIB_REV_STR,
    	    szVersionInfo,
    	    255);
    
    result = OtxDrvGetAttributeValueBool(
    	    OTX_LIB_HANDLE,
    	    OTX_ATTR_LIB_TYPE_STATIC,
    	    &bIsStaticLinkedLibrary);
    
    result = OtxDrvGetAttributeValueSz(
    	    OTX_LIB_HANDLE,
    	    OTX_ATTR_LIB_FILE_NAME,
    	    szLibFileName,
    	    64);
    
    // display
    DemoLogf("Library version %s (filename %s, %s linked)\\n", szVersionInfo, szLibFileName, bIsStaticLinkedLibrary ? "static":"dynamic");
    

    See Also

    OtxDrvSetAttributeValueBool

    OtxDrvGetAttributeValueSz

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvGetAttributeValueSz(IN OTX_HANDLE hDevice, IN OTX_ATTRIB_ID nAttribId, OUT char * pAttribValueBuf, IN OTX_INT32 cbAttribValueBuf)
    Get an attribute (char* type) of a device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device being queried
    nAttribId
    ID of attribute
    pAttribValueBuf
    Buffer to hold the value of the attribute
    cbAttribValueBuf
    Size of the attribValueBuf in bytes

    Comments

    see example on OtxDrvGetAttributeType

    See Also

    OtxDrvSetAttributeValueSz

    OtxDrvGetAttributeValueUint32

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvGetAttributeValueUint32(IN OTX_HANDLE hDevice, IN OTX_ATTRIB_ID nAttribId, OUT OTX_UINT32 * pAttribValue)
    Get an attribute (unsigned long type) of a device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device being queried
    nAttribId
    ID of attribute
    pAttribValue
    Buffer to hold the value of the attribute

    Example


    // get board Device ID and SubSystem ID
    OTX_UINT32 nDeviceId;
    OTX_UINT32 nSubsystemId;
    
    result = OtxDrvGetAttributeValueUint32(
    	    g_hPhysDevs.hBoardController,
    	    OTX_ATTR_BRD_DEVICE_ID,
    	    &nDeviceId);
    
    result = OtxDrvGetAttributeValueUint32(
    	    g_hPhysDevs.hBoardController,
    	    OTX_ATTR_BRD_SUBSYSTEM_ID,
    	    &nSubsystemId);
    
    // display
    DemoLogf("Board Device ID: %d, SubsystemId: 0x%.4X\\n", nDeviceId, nSubsystemId);
    

    See Also

    OtxDrvSetAttributeValueUint32

    OtxDrvGetCurrentTime

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvGetCurrentTime(OUT OTX_DATETIME * pnTimeStamp)
    Gets the current time from the host.
    Defined in: OtxDrv.h

    Parameters

    pnTimeStamp
    Current time of the host

    Example


    result = OtxDrvGetCurrentTime(&nTimeStamp);
    

    See Also

    OTX_DATETIME

    OtxDrvGetDeviceHandle

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvGetDeviceHandle(IN OTX_HANDLE hDevice, IN OtxDeviceType nDeviceType, IN OTX_INT32 nDevice, OUT OTX_HANDLE * phDevice)
    Gets a handle to an already existing Device Object
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device being queried
    nDeviceType
    Device type, either OtxPhysicalDeviceTypeE or OtxLogicalDeviceTypeE
    nDevice
    Sequence number of device within it's class
    phDevice
    Buffer to hold returned device handle

    Comments

    The returned handle can only be used for query operations such as getting attributes and for opening child devices which requires the handle of the parent.

    Example


    // Get a handle to the ASM Daughter Board
    result = OtxDrvGetDeviceHandle(
    	    g_hPhysDevs.hThorController,
    	    OTX_DEVICE_VIDAR_5x_ASM,
    	    0,
    	    &g_hPhysDevs.hVidarAsmController);
    

    See Also

    OtxDrvOpenPhysicalDevice
    OtxPhysicalDeviceTypeE
    OtxLogicalDeviceTypeE
    OTX_HANDLE

    OtxDrvGetEventData

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvGetEventData(IN OTX_HANDLE hEventQueue, OUT OtxEventDataS * pEventData)
    Fetch information about events that occurred in the driver.
    Defined in: OtxDrv.h

    Parameters

    hEventQueue
    Event queue to read event from
    pEventData
    Pointer to place-holder for event data See also OtxEventDataS

    Comments

    Data about the events are returned in the order they occured.

    Each event is time stamped.

    Win32 applications can wait efficiently for events to occur by setting up a Win32 Event with the driver, see OtxWaitForSingleEvent

    see example on OtxDrvWaitForSingleEvent

    See Also

    OtxDrvCreateEventQueue
    OtxDrvGetEventDataEx
    OtxDrvEnable
    OtxDrvDisable
    OtxDrvReset
    OtxEventDataS

    OtxDrvGetEventDataEx

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvGetEventDataEx(IN OTX_HANDLE hEventQueue, OUT OtxEventDataS * psqEventData, IN OTX_INT32 coEventData, OUT OTX_INT32 * pcoEventsReturned)
    Fetch multiple events that occurred in the driver. This function has the same functionality as the OtxDrvGetEventData function, except that this function is able to fetch multiple event from the driver in one call (and thus reduce overhead introduce by context-switching).
    Defined in: OtxDrv.h

    Parameters

    hEventQueue
    Event queue to read event from
    psqEventData
    Pointer to place-holder array for event data (OtxEventDataS)
    coEventData
    Capacity of psqEventData (in number of OtxEventDataS elements), i.e. maximum number of events which the driver can entry in psqEventData.
    pcoEventsReturned
    Number of events returned by this function (number of elements which the driver entered in psqEventData).

    Example


    void  *DemoIdleFunction(
      void *lpParameter   // thread data
    )
    {
      OTX_RESULT result;
    
      while (1) {
        OtxDrvWaitForSingleEvent(
           g_hNotificationEvent,
           OTX_TIME_INFINITY);
    
        do {
          // Multiple reads of events
          OtxEventDataS sqEventData[DEMO_EVENT_DATA_BUF_SIZE];
          OTX_INT32 coEventsFetched;
          OTX_INT32 i;
    
          result = OtxDrvGetEventDataEx(
    		  g_hEventQueue,
    		  sqEventData,
    		  10,
    		  &coEventsFetched);
    
          if (OTX_RESULT_CODE(result) == OTX_S_OK) {
    	// We have a driver event (one at least)
    	//DemoLogf("OtxDrvGetEventDataEx() fetched %d events\\n", coEventsFetched);
    
    	assert(coEventsFetched <= coEventsFetched);
    
    	for (i = 0; i < coEventsFetched; i++) {
    	  // Print the event data.
    	  // In a real application branch based on the data
    	  DemoPrintEvent(&sqEventData[i]);
    	}
    
          }
        } while (OTX_RESULT_CODE(result) == OTX_S_OK);
    
      }
    
      return 0;
    
    }
    

    See Also

    OtxDrvGetEventData
    OtxEventDataS

    OtxDrvGetState

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvGetState(IN OTX_HANDLE hObject, OUT OtxDeviceStateE * peDevState)
    Gets the status of a device.
    Defined in: OtxDrv.h

    Parameters

    hObject
    Handle to a driver object to get state info about
    peDevState
    State of the device. See also OtxDeviceStateE

    Comments

    Any device can be in one of the 3 states: "WORKING," "MANUALLY BLOCKED," or "AUTO BLOCKED." Disabling device with function OtxDrvDisable forces the device to a state MANUALLY BLOCKED. Enabling of a device with function OtxDrvEnable attempts to set the device into a WORKING state. However, if the device does not operate correctly, e.g., it generates excessive amounts of interrupts, the driver can automatically block the device and force it to state "AUTO BLOCKED."

    Example


    // toggle OTX_DEVICE_WORKING on device
    OTX_RESULT result;
    OtxDeviceStateE  eDevState;
    OTX_HANDLE hHandle = g_hLogicDevs.hDtmfDialler[nCurrentLi];
    
    result = OtxDrvGetState(
    	    hHandle,
    	    &eDevState);
    
    if (eDevState == OTX_DEVICE_WORKING) {
      // disable sending device on current Li
      result = OtxDrvDisable(
    	      hHandle,
    	      OTX_TASK_SYNC,
    	      5000L);
    } else {
      // enable sending device on current Li
      result = OtxDrvEnable(
    	      hHandle,
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    

    See Also

    OtxDrvEnable
    OtxDrvDisable
    OtxDeviceStateE

    OtxDrvIsIteratorEnd

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvIsIteratorEnd(OTX_ITERATOR * pItr)
    Checks an iterator to see if it has reached past the end of the sequence being enumerated.
    Defined in: OtxDrv.h

    Parameters

    pItr
    pointer to iterator to check. See OTX_ITERATOR

    See Also

    OtxDrvIteratorBegin
    OtxDrvIteratorNext
    OTX_ITERATOR

    To Do



    OtxDrvIteratorBegin

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvIteratorBegin(OTX_ITERATOR * pItr)
    Initializes an iterator so that it can be used to retrieve data for the first element/device in a sequence
    Defined in: OtxDrv.h

    Parameters

    pItr
    pointer to iterator to initialize. See OTX_ITERATOR

    Comments

    see example on OtxDrvEnumDevice

    See Also

    OtxDrvEnumDeviceType
    OtxDrvEnumDevice
    OtxDrvIsIteratorEnd
    OTX_ITERATOR

    OtxDrvOpenPhysicalDevice

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvOpenPhysicalDevice(IN OTX_HANDLE hHostDevice, IN OtxPhysicalDeviceTypeE eDevType, IN OTX_INT32 nDevice, IN OTX_INT32 nEventSourceId, IN OTX_HANDLE hEventQueue, OUT OTX_HANDLE * phPhysDevice)
    Opens a Device Object representing a physical hardware device, which can be an entire board or an integrated circuit (chip) on a board. The number of physical devices is set in hardware and cannot change dynamically.
    Defined in: OtxDrv.h

    Parameters

    hHostDevice
    Parent (typically Board Device) who owns the device we are connecting to Specify NULL when opening a board device
    eDevType
    Class of device we are looking for. See OtxPhysicalDeviceTypeE
    nDevice
    Sequence number of device within it's class
    nEventSourceId
    User specified ID to be used by this device as the Source ID for the events generated by the device
    hEventQueue
    Handle to separate event queue (specify OTX_INVALID_HANDLE_VALUE to create device specific event queue)
    phPhysDevice
    Handle to the new physical device (if result code OTX_S_OK)

    Comments

    Each physical devices in the system are identified by 3 parameters Parent : Physical Device contaning the device Type : Type of the Physical Device Sequence Number : Number of the device within the host and with its type

    The physical devices can be classified in 2 categories:

    BOARD Devices: A board device represents one OTX Network Interface card or a Daughter Board Module. The board device is the placeholder and controller of other physical devices on the board.

    CHIP Devices: A chip device represents a physical integrated circuit on the board performing one or several functions. A logical device can be created to represent each of the functions implemented by a chip device. For example, a Digital Signal Processor is a physical "chip" device. However, the DSP software may implement several functions which then can be represented by a multiple of logical devices.

    The chip devices can be further categorized as follows:

    Line Interface Devices: A hardware device that interfaces with the external network and converts/maps the non-TTL level external data interface to the internal serial data highways. Typically an actual line interface transceiver chip on a board. Examples of Line Interface Devices include T1/E1, BRI, POTS, T3/E3 Li’s.

    Processor Devices: A processor (general purpose micro processor or Digital Signal Processor) is an integrated circuit that implements certain functionality (logical devices) under software control.

    Switch Device: A device connecting and disconnecting data-paths.

    Other miscellaneous chips.

    Example


    // open mother board
    result = OtxDrvOpenPhysicalDevice(
    	    0,                      // '0' for mother board
    	    OTX_DEVICE_THOR_PCI,
    	    nboardNo,
    	    nboardNo,
    	    g_hEventQueue,
    	    &g_hPhysDevs.hBoardController);
    
    
    // open daughter board or chip devices
    
    // open two T1/E1 Line Interfaces
    for (i = 0; i < 2; i++) {
      result = OtxDrvOpenPhysicalDevice(
    	      g_hPhysDevs.hBoardController,
    	      OTX_DEVICE_LI_T1E1,
    	      i,
    	      i,
    	      g_hEventQueue,
    	      &g_hPhysDevs.hLi[i]);
    }
    

    See Also

    OtxDrvClose
    OtxPhysicalDeviceTypeE
    OtxLogicalDeviceTypeE
    OTX_HANDLE

    OtxDrvOpenPhysicalDeviceEx

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvOpenPhysicalDeviceEx(IN OTX_HANDLE hPhysDevice, IN OTX_INT32 nEventSourceId, IN OTX_HANDLE hEventQueue)
    Opens a Device Object representing a physical hardware device, for which a handle has already been acquired (e.g with OtxDrvEnumDevice). Otherwise this function has the same functionality as OtxDrvOpenPhysicalDevice.
    Defined in: OtxDrv.h

    Parameters

    hPhysDevice
    Handle to the physical device
    nEventSourceId
    User specified ID to be used by this device as the Source ID for the events generated by the device
    hEventQueue
    Handle to separate event queue (specify OTX_INVALID_HANDLE_VALUE to create device specific event queue)

    Comments

    see example on OtxDrvEnumDevice

    See Also

    OtxDrvEnumDevice OtxDrvOpenPhysicalDevice

    OtxDrvPollEvents

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvPollEvents(IN OTX_HANDLE hDevice)
    Polls for Events from the driver.
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to device

    Comments

    This function can be used if interrupts can not be used for some reason. Instead of an interrupt service routine servicing interrupts upon arrival, the application can constantly poll this function and force the interrupt service routine to be executed periodically without having interrupts enabled.

    Example


    OtxEventDataS eventData;
    OTX_RESULT result;
    
    OtxDrvPollEvents(g_hPhysDevs.hThorController0);
    
    result = OtxDrvGetEventData(g_hEventQueue, &eventData);
    
    if (OTX_RESULT_CODE(result) == OTX_S_OK) {
      // We have a driver event
      // Printf the event data.
      // In a real application branch based on the data
      DemoPrintEvent(&eventData);
    }
    

    OtxDrvReadReg16

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvReadReg16(IN OTX_HANDLE hDevice, IN OTX_UINT32 nAddress, OUT OTX_UINT32 * pnValue)
    Read a 16-bit register from a physical device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device to read from
    nAddress
    Register address within the device
    pnValue
    16-bit value read from the device

    Example


    OTX_UINT32 readVal;
    char strBuf[12];
    static OTX_UINT32 nAddress = 0;
    
    // read from a 16-bit register in board device
    DemoLogf("Which Address (0x%X): ", nAddress);
    OsaConsoleGetStr(strBuf);
    if (*strBuf) {
      nAddress = strtoul(strBuf, NULL, 0);
    }
    
    result = OtxDrvReadReg16(
    	    g_hPhysDevs.hBoardController,
    	    nAddress,
    	    &readVal);
    
    // display
    DemoLogf("Brd Address 0x%X = %.4X\\n", nAddress, (OTX_UINT16)readVal);
    

    OtxDrvReadReg32

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvReadReg32(IN OTX_HANDLE hDevice, IN OTX_UINT32 nAddress, OUT OTX_UINT32 * pnValue)
    Read a 32-bit register from a physical device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device to read from
    nAddress
    Register address within the device
    pnValue
    32-bit value read from the device

    To Do



    OtxDrvReadReg8

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvReadReg8(IN OTX_HANDLE hDevice, IN OTX_UINT32 nAddress, OUT OTX_UINT32 * pnValue)
    Read an 8-bit register from a physical device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device to read from
    nAddress
    Register address within the device
    pnValue
    8-bit value read from the device

    Example


    OTX_UINT32 readVal;
    char strBuf[12];
    static OTX_UINT32 nAddress = 0;
    
    // read from an 8-bit register in current Li
    DemoLogf("Which Address (0x%X): ", nAddress);
    
    OsaConsoleGetStr(strBuf);
    if (*strBuf) {
      nAddress = strtoul(strBuf, NULL, 0);
    }
    
    result = OtxDrvReadReg8(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    nAddress,
    	    &readVal);
    
    // display
    DemoLogf("Li%d Address 0x%X = %.2X\\n", nCurrentLi, nAddress, (OTX_UINT8)readVal);
    

    OtxDrvReleaseLib

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvReleaseLib(void)
    Releases all references that this driver is holding.
    Defined in: OtxDrv.h

    Comments

    This is the last function to be called in OTX board application. All handles that an application is holding are closed automatically when a process terminates. If the application is about to terminate, calling this function is not necessary. However a server application may need this function if it never terminates.

    see example on

    Example

    OtxDrvConnectLib
    
    

    See Also

    OtxDrvConnectLib

    OtxDrvReset

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvReset(IN OTX_HANDLE hObject)
    Resets a device. It is not normally necessary to reset a device. A reset is normally done to resolve and error condition. Some objects must be disabled before they can be reset.

    Events in the event queue for the particular object are removed by this command.
    Defined in: OtxDrv.h

    Parameters

    hObject
    Handle to a object to reset

    Example


    // reset HdlcReceiver on current Li
    result = OtxDrvReset(g_hLogicDevs.hHdlcReceiver[nCurrentLi]);
    

    See Also

    OtxDrvEnable
    OtxDrvDisable
    OTX_HANDLE

    OtxDrvResultCode2String

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvResultCode2String(IN OTX_HANDLE hDevice, IN OTX_RESULT nResultCode, IN OTX_UINT32 nBufLen, OUT char szStrBuf[])
    Translate a result code into English text describing the code.
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device who generated the result code
    nResultCode
    Result Code to be translated. See also OTX_RESULT
    nBufLen
    Length of the User supplied String Buffer
    szStrBuf[]
    User supplied String buffer

    Comments

    The result message string is copied into a user supplied buffer

    Usaully it is used in DemoCheckRc() on demo programs

    Example


    static void DemoCheckRc(IN OTX_HANDLE hDevice, IN OTX_RESULT result)
    {
      if ( OTX_FAILURE(result) ) {
    
        if (hDevice == OTX_INVALID_HANDLE_VALUE) {
          DemoLogf("ERROR(%#lX) \\n", result);
        } else {
          OTX_RESULT otxRc;
          char msgStr[256];
          OtxAttribTypeE  eAttribType;
          OTX_UINT32      cbAttribValue;
          OTX_BOOL        bReadOnly;
          OTX_UINT32      eDeviceType = 999;
          OTX_UINT32      nDeviceNumber = 999;
    
          // Get the Device Type for hHandle
          otxRc = OtxDrvGetAttributeType(
    		 hDevice,
    		 OTX_ATTR_DEVICE_TYPE,
    		 &eAttribType,
    		 &cbAttribValue,
    		 &bReadOnly);
    
          if (OTX_SUCCESS(otxRc)) {
    	assert(eAttribType == OTX_ATTRIB_UINT32);
    	assert(cbAttribValue == sizeof(OTX_UINT32));
    	OtxDrvGetAttributeValueUint32(
    		 hDevice,
    		 OTX_ATTR_DEVICE_TYPE,
    		 &eDeviceType);
          }
    
          // Get the Device Number for hHandle
          otxRc = OtxDrvGetAttributeType(
    		 hDevice,
    		 OTX_ATTR_DEVICE_NO,
    		 &eAttribType,
    		 &cbAttribValue,
    		 &bReadOnly);
    
          if (OTX_SUCCESS(otxRc)) {
    	assert(eAttribType == OTX_ATTRIB_UINT32);
    	assert(cbAttribValue == sizeof(OTX_UINT32));
    	OtxDrvGetAttributeValueUint32(hDevice, OTX_ATTR_DEVICE_NO, &nDeviceNumber);
          }
    
          // Convert the result code to a more descriptive string
          otxRc = OtxDrvResultCode2String(
    		 hDevice,
    		 result,
    		 256,
    		 &msgStr[0]);
    
          if (OTX_FAILURE(otxRc)) {
    	strcpy(msgStr, "Cannot translate this result code.");
          }
          DemoLogf("ERROR(%#lX [%d.%d]) Dev(%X,%d,%d): %s \\n", OTX_RESULT_CODE(result), OTX_RESULT_SOURCE_ID(result), OTX_RESULT_LINE_NUM(result), hDevice, (int) eDeviceType, (int)nDeviceNumber, msgStr);
        }
    
        DemoExitQuestion();
      }
    }
    

    OtxDrvSetAttributeValue

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvSetAttributeValue(IN OTX_HANDLE hDevice, IN OTX_ATTRIB_ID nAttribId, OUT OTX_UINT8 attribValueBuf[], IN OTX_UINT32 cbAttribValueBuf)
    Set an attribute of a device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device being queried
    nAttribId
    ID of attribute
    attribValueBuf[]
    Value of the attribute, if attribute exists
    cbAttribValueBuf
    Size in bytes of the buffer for the value

    Comments

    This function can, for example be used to disable and enable certain functions of a device, for example, enable or disable reception of Caller ID for a Pots device . Note that some attributes are read-only. If an attempt to set a read-only attribute is made, an error code is returned as result.

    See Also

    OtxDrvGetAttributeType
    OtxDrvGetAttributeValue
    OtxDrvResultCode2String
    OtxDrvEventCode2String
    OtxDrvConnectLib

    To Do



    OtxDrvSetAttributeValueBool

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvSetAttributeValueBool(IN OTX_HANDLE hDevice, IN OTX_ATTRIB_ID nAttribId, IN OTX_BOOL attribValue)
    Set an attribute (Boolean type) of a device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device being queried
    nAttribId
    ID of attribute
    attribValue
    Value of the attribute, if attribute exists

    Example


    // toggle OTX_ATTR_T1E1_AUTOMATIC_RESET attribute
    OTX_BOOL bAutomaticResetMode;
    
    result = OtxDrvGetAttributeValueBool(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    OTX_ATTR_T1E1_AUTOMATIC_RESET,
    	    &bAutomaticResetMode);
    
    bAutomaticResetMode = !bAutomaticResetMode;
    
    result = OtxDrvSetAttributeValueBool(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    OTX_ATTR_T1E1_AUTOMATIC_RESET,
    	    bAutomaticResetMode);
    

    See Also

    OtxDrvGetAttributeValueBool

    OtxDrvSetAttributeValueSz

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvSetAttributeValueSz(IN OTX_HANDLE hDevice, IN OTX_ATTRIB_ID nAttribId, IN char * pAttribValue)
    Set an attribute (char* type) of a device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device being queried
    nAttribId
    ID of attribute
    pAttribValue
    Value of the attribute, if attribute exists

    Example


    // configuring Thor-2-PCMCIA series board for dongle type
    result = OtxDrvSetAttributeValueSz(
    	    g_hPhysDevs.hBoardController,
    	    OTX_ATTR_BRD_PCMCIA_DONGLE_TYPE,
    	    "HMA-1079-2-1.0");
    

    See Also

    OtxDrvGetAttributeValueSz

    OtxDrvSetAttributeValueUint32

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvSetAttributeValueUint32(IN OTX_HANDLE hDevice, IN OTX_ATTRIB_ID nAttribId, IN OTX_UINT32 attribValue)
    Set an attribute (unsigned long type) of a device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device being queried
    nAttribId
    ID of attribute
    attribValue
    Value of the attribute, if attribute exists

    Example


    // set Receive Input Threshold for current Li
    char strBuf[12];
    OTX_UINT32 nThresholdInMilliVolts;
    
    result = OtxDrvGetAttributeValueUint32(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    OTX_ATTR_T1E1_RX_INPUT_THRESHOLD,
    	    &nThresholdInMilliVolts);
    
    // display
    DemoLogf("Threshold (%d mV): ", nThresholdInMilliVolts);
    
    nThresholdInMilliVolts = 100;
    
    // set attribute
    result = OtxDrvSetAttributeValueUint32(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    OTX_ATTR_T1E1_RX_INPUT_THRESHOLD,
    	    nThresholdInMilliVolts);
    
    // get attribute
    result = OtxDrvGetAttributeValueUint32(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    OTX_ATTR_T1E1_RX_INPUT_THRESHOLD,
    	    &nThresholdInMilliVolts);
    
    // display
    DemoLogf("Receive Input Threshold is changed to %d mV.\\n", nThresholdInMilliVolts);
    

    See Also

    OtxDrvGetAttributeValueUint32

    OtxDrvSetEventData

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvSetEventData(IN OTX_HANDLE hEventQueue, IN OTX_UINT32 eDeviceType, IN OTX_UINT32 nSourceId, IN OTX_HANDLE hDevice, IN OTX_NOTIFY_CAUSE nCode, IN OTX_TASK_REF nRequestId, IN OTX_UINT32 nParam)
    Place an event data to an event queue.
    Defined in: OtxDrv.h

    Parameters

    hEventQueue
    Event queue to be used
    eDeviceType
    Device Type with which the event is associated
    nSourceId
    Device Id of the device that the event is associated with (supplied by the user when the device for opened/created)
    hDevice
    Handle to the Device with which the event is associated
    nCode
    Device specific cause code indicating what happened. Each device types has it own set of event cause codes
    nRequestId
    If the message is for a previous user request this member holds the user assigned request ID
    nParam
    Optional parameter with user defined meaning

    Comments

    This function allows a module to place data into a previously created event queue. This function can be used by layered applications where lower layer module can pass an event to an upper layer module which can be waiting efficiently using the OtxDrvWaitForSingleEvent function.

    The driver will time stamp the event.

    Example


    // set an event in the event queue
    OtxDrvSetEventData(
       g_hEventQueue,
       OTX_DEVICE_LI_T1E1,
       0,
       g_hPhysDevs.hLi[nCurrentLi],
       OTX_T1E1_EC_AIS,
       0,
       9);
    

    See Also

    OtxDrvCreateEventQueue
    OtxDrvGetEventData
    OtxEventDataS

    OtxDrvSetEventDataEx

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvSetEventDataEx(IN OTX_HANDLE hEventQueue, IN OTX_UINT32 eDeviceType, IN OTX_UINT32 nSourceId, IN OTX_HANDLE hDevice, IN OTX_NOTIFY_CAUSE nCode, IN OTX_TASK_REF nRequestId, IN OTX_UINT32 nParam, IN OTX_DATETIME nTimeStamp)
    Place an event data to an event queue.
    Defined in: OtxDrv.h

    Parameters

    hEventQueue
    Event queue to be used
    eDeviceType
    Device Type with which the event is associated
    nSourceId
    Device Id of the device that the event is associated with (supplied by the user when the device for opened/created)
    hDevice
    Handle to the Device with which the event is associated
    nCode
    Device specific cause code indicating what happened. Each device types has it own set of event cause codes
    nRequestId
    If the message is for a previous user request this member holds the user assigned request ID
    nParam
    Optional parameter with user defined meaning
    nTimeStamp
    Timestamp to mark the event with

    Comments

    This function allows a module to place data into a previously created event queue. This function can be used by layered applications where lower layer module can pass an event to an upper layer module which can be waiting efficiently using the OtxDrvWaitForSingleEvent function.

    The driver will time stamp the event.

    Example


    // set an event in the event queue
    OtxDrvSetEventDataEx(
       g_hEventQueue,
       OTX_DEVICE_LI_T1E1,
       0,
       g_hPhysDevs.hLi[nCurrentLi],
       OTX_T1E1_EC_AIS,
       0,
       9,
       nTimeStamp);
    

    See Also

    OtxDrvCreateEventQueue
    OtxDrvGetEventData
    OtxEventDataS

    OtxDrvSignalEvent

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvSignalEvent(IN OTX_EVENT hEvent)
    Set an event into a signaled state.
    Defined in: OtxDrv.h

    Parameters

    hEvent
    Handle to an Event to be set into signalled state. See Also OTX_EVENT

    Comments

    This function allows a previously created event to be set into signalled state. This function can be used by layered applications where lower layer module can signal an event to upper layer module which can be waiting efficiently using the OtxDrvWaitForSingleEvent function.

    Example


    // just a demostration of usage of OtxDrvSignalEvent() and OtxDrvCloseEvent()
    OTX_EVENT g_hEvent;
    
    void *DemoTestThreadFunc(
      void *lpParameter   // thread data
    )
    {
      int i, j, x;
      // Thread Running, waiting for event
      OtxDrvWaitForSingleEvent(g_hEvent, OTX_TIME_INFINITY);
    
      // just spend some time
      for (i=0; i<20; i++) {
        for (j=0;j<1000; j++) {
          x = 3 * i + 4 * j;
        }
      }
      DemoLogf("Thread exiting\\n");
    
      return 0;
    }
    
    
    if (OTX_SUCCESS(OtxDrvCreateEvent(&g_hEvent))) {
      // starting Thread
      OsaThreadStart(DemoTestThreadFunc);
    
      OsaThreadSleep(0);
      DemoLogf("Hit return to signaling event\\n");
      getch();
      OtxDrvSignalEvent(g_hEvent);
      OsaThreadSleep(0);
    
      DemoLogf("Hit return to close event and exit\\n");
      getch();
      OtxDrvCloseEvent(g_hEvent);
    
    } else {
      DemoLogf("Failed to create event\\n");
      getch();
    }
    

    See Also


    OtxDrvCreateEvent
    OtxDrvWaitForSingleEvent
    OtxDrvWaitForMultipleEvents
    OtxDrvCloseEvent
    OTX_EVENT

    OtxDrvWaitForMultipleEvents

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvWaitForMultipleEvents(IN OTX_INT32 coEventHandles, IN OTX_EVENT sqhEvents[], IN OTX_TIME nWaitMaxMs, IN OTX_BOOL bWaitAll, OUT OTX_INT32 * pnEventFired)
    Wait for a notification event from the driver
    Defined in: OtxDrv.h

    Parameters

    coEventHandles
    Event handle count
    sqhEvents[]
    Array of event handles. See Also OTX_EVENT
    nWaitMaxMs
    Max time to wait in millisconds
    bWaitAll
    Specifies the wait type. If OTX_TRUE, the function returns when the state all objects in the lpHandles array is signaled. If OTX_FALSE, the function returns when the state of any one of the objects set to is signaled. In the latter case, the return value indicates the object whose state caused the function to return. See also OTX_BOOL
    pnEventFired
    index to event in array that fired

    Comments

    Waits efficiently using a Win32 event.

    Specify nMilliseconds = OTX_TIME_INFINITY to wait forever.

    See Also

    OtxDrvWaitForSingleEvent
    OtxDrvCreateEvent
    OTX_EVENT
    OTX_BOOL

    To Do



    OtxDrvWaitForSingleEvent

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvWaitForSingleEvent(IN OTX_EVENT hEvent, IN OTX_TIME nWaitMaxMs)
    Wait for a notification event from the driver
    Defined in: OtxDrv.h

    Return Value

    Returns one of the following values:
    OTX_E_HANDLE
    Handle invalid
    OTX_S_TIMEOUT
    Wait timed out
    OTX_S_OK
    Event occured
    OTX_E_FAIL
    Non-specified failure

    Parameters

    hEvent
    Event handle, initilized with OtxDrvCreateEvent
    nWaitMaxMs
    Max time to wait in millisconds

    Comments

    Waits efficiently using a Win32 event.

    Specify nMilliseconds = OTX_TIME_INFINITY to wait forever.

    Example


    // check for Events from the OTX Driver
    while (1) {
      OtxDrvWaitForSingleEvent(
         g_hNotificationEvent,
         OTX_TIME_INFINITY);
      do {
        result = OtxDrvGetEventData(
    		g_hEventQueue,
    		&eventData);
    
        if (OTX_RESULT_CODE(result) == OTX_S_OK) {
          // We have a driver event
          // Print the event data.
          // In a real application branch based on the data
          DemoPrintEvent(&eventData);
      }
    } while (OTX_RESULT_CODE(result) == OTX_S_OK);
    

    See Also

    OtxDrvWaitForMultipleEvents
    OtxDrvCreateEvent
    OTX_EVENT

    OtxDrvWriteReg16

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvWriteReg16(IN OTX_HANDLE hDevice, IN OTX_UINT32 nAddress, OUT OTX_UINT32 nValue)
    Write a 16-bit value to a 16-bit register in a physical device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device to write to
    nAddress
    Register address within the device
    nValue
    16-bit value to be written to the device

    Example


    char strBuf[12];
    static OTX_UINT32 nAddress = 0;
    static OTX_UINT32 nValue = 0;
    
    // write to a 16-bit register in board device
    DemoLogf("Which Address (0x%X): ", nAddress);
    OsaConsoleGetStr(strBuf);
    if (*strBuf) {
      nAddress = strtoul(strBuf, NULL, 0);
    }
    DemoLogf("Which Value (0x%X): ", nValue);
    OsaConsoleGetStr(strBuf);
    if (*strBuf) {
      nValue = strtoul(strBuf, NULL, 0);
    }
    
    result = OtxDrvWriteReg16(
    	    g_hPhysDevs.hBoardController,
    	    nAddress,
    	    nValue);
    
    DemoLogf("Wrote %.4X to Brd Address 0x%X\\n", (OTX_UINT16)nValue, nAddress);
    

    OtxDrvWriteReg32

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvWriteReg32(IN OTX_HANDLE hDevice, IN OTX_UINT32 nAddress, OUT OTX_UINT32 nValue)
    Write a 32-bit value to a 32-bit register in a physical device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device to write to
    nAddress
    Register address within the device
    nValue
    32-bit value to be written to the device

    To Do



    OtxDrvWriteReg8

    OTX_EXPORT OTX_RESULT OTX_API OtxDrvWriteReg8(IN OTX_HANDLE hDevice, IN OTX_UINT32 nAddress, OUT OTX_UINT32 nValue)
    Write an 8-bits value to an 8-bit register in a physical device
    Defined in: OtxDrv.h

    Parameters

    hDevice
    Handle to the device to write to
    nAddress
    Register address within the device
    nValue
    8-bit value to be written to the device

    Example


    char strBuf[12];
    static OTX_UINT32 nAddress = 0;
    static OTX_UINT32 nValue = 0;
    
    // write to an 8-bit register in current Li
    DemoLogf("Which Address (0x%X): ", nAddress);
    OsaConsoleGetStr(strBuf);
    if (*strBuf) {
      nAddress = strtoul(strBuf, NULL, 0);
    }
    DemoLogf("Which Value (0x%X): ", nValue);
    OsaConsoleGetStr(strBuf);
    if (*strBuf) {
      nValue = strtoul(strBuf, NULL, 0);
    }
    
    result = OtxDrvWriteReg8(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    nAddress,
    	    nValue);
    
    DemoLogf("Wrote %.2X to Li%d Address 0x%X\\n", (OTX_UINT8)nValue, nCurrentLi, nAddress);
    

    OtxDspCreateProgramImage

    OTX_EXPORT OTX_RESULT OTX_API OtxDspCreateProgramImage(IN const char * szProgfile, IN const char * szEntryPoint, IN OTX_UINT16 coProgImageMax, IN OUT OTX_UINT16 * psqProgImage, OUT OTX_UINT16 * coProgImage, OUT OTX_INT32 * nEntryAddr)
    Convert a DSP Application file from COFF format (*.out) for a C548/549 DSP to the OTX DSP Image format (used by OtxDspRunImage).
    Defined in: OtxDsp.h

    Parameters

    szProgfile
    Application file to be converted to an image
    szEntryPoint
    Label for the entry point of the application. Usually "_c_int00" for a C-compiled application.
    coProgImageMax
    Count of objects (size) of psqProgImage (in elements) provided by the user
    psqProgImage
    Image Buffer provided by the user
    coProgImage
    Number of image elements returned in psqProgImage
    nEntryAddr
    Program Entry address

    Example


    OTX_UINT16 *psqProgImage;
    OTX_UINT16 coProgImage;
    OTX_INT32  nEntryAddr;
    const OTX_UINT16 DEMO_DSP_IMAGE_BUF_SIZE = 60000;
    
    psqProgImage = (OTX_UINT16 *)malloc(DEMO_DSP_IMAGE_BUF_SIZE*sizeof(OTX_UINT16));
    
    // convert "OtxSpm1.out" to DSP image format
    result = OtxDspCreateProgramImage(
    	    "OtxSpm1.out",
    	    "_c_int00",
    	    DEMO_DSP_IMAGE_BUF_SIZE,
    	    psqProgImage,
    	    &coProgImage,
    	    &nEntryAddr);
    
    // load DSP program with image format
    for (nDsp = 0; nDsp < 2; nDsp++) {
      result = OtxDspRunImage(
    	      g_hPhysDevs.hDsp[nDsp],
    	      psqProgImage,
    	      coProgImage,
    	      nEntryAddr);
    }
    
    free(psqProgImage);
    

    See Also

    OtxDspRunImage OtxDspRunProgram

    OtxDspCreateProgramImageEx

    OTX_EXPORT OTX_RESULT OTX_API OtxDspCreateProgramImageEx(IN const char * szProgfile, IN const char * szEntryPoint, IN OTX_UINT32 coProgImageMax, IN OUT OTX_UINT16 * psqProgImage, OUT OTX_UINT32 * coProgImage, OUT OTX_INT32 * nEntryAddr)
    Converts a DSP Application file from COFF format (*.out) for C5400 and C5510 DSPs to the OTX DSP Extended Image format (used by OtxDspRunImage).
    Defined in: OtxDsp.h

    Parameters

    szProgfile
    Application file to be converted to an image
    szEntryPoint
    Label for the entry point of the application. Usually "_c_int00" for a C-compiled application.
    coProgImageMax
    Count of objects (size) of psqProgImage (in elements) provided by the user
    psqProgImage
    Image Buffer provided by the user
    coProgImage
    Number of image elements returned in psqProgImage
    nEntryAddr
    Program Entry address

    Example


    #define IMAGE_BUF_SIZE 128000
    static OTX_UINT16 g_psqProgImage[IMAGE_BUF_SIZE];
    
    // convert "OtxSpm5.out" to DSP Extended Image format
    result = OtxDspCreateProgramImageEx(
    	    "OtxSpm5.out",
    	    "_c_int00",
    	    IMAGE_BUF_SIZE,
    	    g_psqProgImage,
    	    &coProgImage,
    	    &nEntryAddr);
    
    // load DSP program with image format
    for (nDsp = 0; nDsp < 2; nDsp++) {
      result = OtxDspRunImage(
    	      g_hPhysDevs.hDsp[nDsp],
    	      psqProgImage,
    	      coProgImage,
    	      nEntryAddr);
    }
    
    free(psqProgImage);
    

    See Also

    OtxDspRunImage OtxDspRunProgram

    OtxDspIoControl

    OTX_EXPORT OTX_RESULT OTX_API OtxDspIoControl(IN OTX_HANDLE hDspDevice, IN OTX_UINT16 nIoControlCode, IN void * pInBuf, IN OTX_UINT32 nInBufSize, IN void * pOutBuf, IN OTX_UINT32 nOutBufSize, OUT OTX_UINT32 * pnBytesReturned, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Send a user command to a user supplied DSP application
    Defined in: OtxDsp.h

    Parameters

    hDspDevice
    Handle to the physical DSP device
    nIoControlCode
    I/O Control Code to be passed
    pInBuf
    Pointer to the user allocated input buffer
    nInBufSize
    Size of the input buffer
    pOutBuf
    Pointer to the user allocated output buffer
    nOutBufSize
    Size of the output buffer
    pnBytesReturned
    Number of Bytes returned
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Example


    Demo1IoInSetBlinkFreqS sIn;
    OTX_UINT32 nBytesReturned;
    OTX_UINT16 nDemo1Rc;
    
    sIn.nBlinkCountFactor = DEMO_FAST_BLINK_COUNT_FACTOR;
    sIn.nDummyData = 6;
    
    // sending Blink Count factor DEMO_FAST_BLINK_COUNT_FACTOR to User App
    result = OtxDspIoControl(
    	    g_hLogicDevs.hUserApp,
    	    DEMO1_IOCTL_SET_BLINK_FREQ,
    	    &sIn,
    	    sizeof(sIn),
    	    &nDemo1Rc,
    	    sizeof(nDemo1Rc),
    	    &nBytesReturned,
    	    OTX_TASK_SYNC,
    	    OTX_TIME_INFINITY);
    

    OtxDspReadData

    OTX_EXPORT OTX_RESULT OTX_API OtxDspReadData(IN OTX_HANDLE hDspDevice, IN OTX_TASK_REF nTaskRef, OUT OTX_UINT8 * pOutBuf, IN OTX_UINT32 nOutBufSize, OUT OTX_UINT32 * pnBytesReturned, OUT OTX_UINT32 * pnIoControlCode)
    Read data from a user supplied DSP application
    Defined in: OtxDsp.h

    Return Value

    Returns one of the following values:
    OTX_S_OK
    Data was fetched
    OTX_S_FALSE
    No Data available at this moment
    OTX_E_BUFFER_TO_SMALL
    The supplied user data buffer is too small to fit the received data

    Parameters

    hDspDevice
    Handle to the physical DSP device
    nTaskRef
    See OTX_TASK_REF
    pOutBuf
    Pointer to the user allocated output buffer
    nOutBufSize
    Size of the output buffer
    pnBytesReturned
    Number of Bytes returned
    pnIoControlCode
    I/O Control Code the returned data is associated with

    Comments

    Usually it is used in event case OTX_LDEVICE_USER_APPLICATION of user DSP application

    Example


    // Note: function DemoLogf() is used to display message in our demo programs
    
    case OTX_LDEVICE_USER_APPLICATION:
      if (pEventData->m_nCode == OTX_USER_APPLICATION_EC_READ_DATA) {
        OTX_UINT8  buf[8192];
        OTX_UINT32 nBytesReturned;
        OTX_UINT32 nIoControlCode;
    
        otxRc = OtxDspReadData(
    	       pEventData->m_hDevice,
    	       OTX_TASK_SYNC,
    	       buf,
    	       8192,
    	       &nBytesReturned,
    	       &nIoControlCode);
    
        if (OTX_RESULT_CODE(otxRc) == OTX_S_OK) {
          switch(nIoControlCode) {
    	case DEMO1_NOTIFY_DEBUG_DATA:
    	{
    	  Demo1NotifyGetDebugDataS *pDataS = (Demo1NotifyGetDebugDataS *)buf;
    	  if (nBytesReturned != sizeof(Demo1NotifyGetDebugDataS)) {
    	    DemoLogf("Unexpected data length for this IoControlCode (nIoControlCode = %d, nBytesReturned=%d)\\n", nIoControlCode, nBytesReturned);
    	  } else {
    	    DemoLogf("DEMO1_NOTIFY_DEBUG_DATA (nRequestId=%d, nBytes=%d)\\n", pEventData->m_nRequestId, nBytesReturned);
    	    DemoLogf("nData0 = %.4X\\n", pDataS->nData0);
    	    DemoLogf("nData1 = %.4X\\n", pDataS->nData1);
    	    DemoLogf("nData2 = %.4X\\n", pDataS->nData2);
    
    	    DemoLogf("sqBuf[299] = %.4X\\n", pDataS->sqBuf[299]);
    	  }
    	}
    	break;
    
    	default:
    	  DemoLogf("Unknown IoControlCode received in OtsDspReadData (nIoControlCode = %d, nBytesReturned=%d, nRequestId=%d)\\n", nIoControlCode, nBytesReturned, pEventData->m_nRequestId);
    	break;
          }
    
        } else {
    
          OTX_RESULT errorCode = otxRc;
          otxRc = OtxDrvResultCode2String(
    		 pEventData->m_hDevice,
    		 errorCode,
    		 256,
    		 &msgStr[0]);
    
          if (OTX_SUCCESS(otxRc)) {
    	DemoLogf("User App[%d] Error: %s \\n", pEventData->m_nSourceId, msgStr);
          } else {
    	DemoLogf("User App[%d] Invalid Error Code: %ld\\n", pEventData->m_nSourceId, errorCode);
          }
        }
    
      } else {
    
        otxRc = OtxDrvEventCode2String(
    	       pEventData->m_hDevice,
    	       pEventData->m_nCode,
    	       256,
    	       &msgStr[0]);
    
        if (OTX_SUCCESS(otxRc)) {
          DemoLogf("User App[%d] Event: %s (nRequestId=%d)\\n", pEventData->m_nSourceId, msgStr, pEventData->m_nRequestId);
        } else {
          DemoLogf("User App[%d] Invalid Event: %ld (nRequestId=%d)\\n", pEventData->m_nSourceId, pEventData->m_nCode, pEventData->m_nRequestId);
        }
      }
    break;  // end of OTX_LDEVICE_USER_APPLICATION
    

    See Also



    OtxDspReadHpi

    OTX_EXPORT OTX_RESULT OTX_API OtxDspReadHpi(IN OTX_HANDLE hDspDevice, IN OTX_UINT32 nHpiAddress, IN OTX_UINT32 coWordsToRead, IN OUT OTX_UINT16 * pReadBuf)
    Read a number of octets from the DSP's Host Port Interface (HPI) into a user supplied buffer.
    Defined in: OtxDsp.h

    Parameters

    hDspDevice
    Handle to the physical DSP device
    nHpiAddress
    HPI Address to start to read from
    coWordsToRead
    Number of OTX_UINT16s (Words) to read from the HPI
    pReadBuf
    Pointer to the user allocated output buffer (Words)

    Comments

    Note: This function should be used with caution. It is intended for debugging purposes and advanced users only.

    API OtxDspWriteHpi can be used to write the data

    Example


    OTX_UINT32 i;
    OTX_UINT16 sqReadBuf[0x800];
    
    // dump the entire HPI memory for the current DSP
    result = OtxDspReadHpi(
    	    g_hPhysDevs.hDsp,
    	    0x1000,
    	    0x800,
    	    sqReadBuf);
    
    // display the data
    for (i = 0; i < 0x800; i++) {
        if (i && ((i % 8) == 0))
        DemoLogf("\\n %.4X ", sqReadBuf[i]);
      }
    }
    

    See Also

    OtxDspWriteHpi

    OtxDspRestartProgram

    OTX_EXPORT OTX_RESULT OTX_API OtxDspRestartProgram(IN OTX_HANDLE hDspDevice)
    DSP Debugging utility function. Restarts a previously loaded and/or running program.

    This function is only meant to be called if a DSP Debugger is being used.
    Defined in: OtxDsp.h

    Parameters

    hDspDevice
    Handle to DSP device

    Example

    This function should only be used on the following call sequence:
    1. First the OtxDspRunImage(), OtxDspRunSpm(), or OtxDspRunProgram() is called.
    2. Immediately thereafter the host application must be stopped.
    3. While the host application is stopped the DSP program is loaded and started
       from the DSP Debugger.
    4. Once the DSP program is running again, OtxDspRunProgram() should be called
       to bring the DSP program back to the state it was right after step 1 was
       executed.
    

    // load DSP program
    for (nDsp = 0; nDsp < 2; nDsp++) {
      result = OtxDspRunSpm(
    	      g_hPhysDevs.hDsp[nDsp],
    	      OTX_DSP_SPM_OTXSPM1);
    }
    
    // load and run DSP program to all of the DSPs in the DSP Debugger
    
    // restart program on DSPs
    for (i = 0; i < 2; i++) {
        result = OtxDspRestartProgram(g_hPhysDevs.hDsp[i]);
    }
    

    See Also

    OtxDspRunProgram

    OtxDspRunImage

    OTX_EXPORT OTX_RESULT OTX_API OtxDspRunImage(IN OTX_HANDLE hDspDevice, IN OTX_UINT16 * psqProgImage, IN OTX_UINT16 coProgImage, IN OTX_INT32 nEntryAddr)
    Load and start a DSP application program. The DSP application program must be in the OTX DSP Image format (created by a call to OtxDspCreateProgramImage).
    Defined in: OtxDsp.h

    Parameters

    hDspDevice
    Handle to DSP device
    psqProgImage
    Program image
    coProgImage
    Number of elements in psqProgImage
    nEntryAddr
    Program Entry Address

    Example


    see example on
    
    OtxDspCreateProgramImage
    
    OtxDspCreateProgramImageEx
    
    

    See Also

    OtxDspCreateProgramImage

    OtxDspRunProgram

    OTX_EXPORT OTX_RESULT OTX_API OtxDspRunProgram(IN OTX_HANDLE hDspDevice, IN const char * szPrgfile, IN const char * szEntryPoint)
    Load and Run a program on a DSP from a COFF format (*.out) file
    Defined in: OtxDsp.h

    Parameters

    hDspDevice
    Handle to DSP device
    szPrgfile
    Application file to be loaded
    szEntryPoint
    Label for the entry point of the application

    Example


    // open physical device of DSP
    for (i = 0; i < 2; i++) {
      result = OtxDrvOpenPhysicalDevice(
    	      g_hPhysDevs.hBoardController, // Vidar series or Thor-2-PCMCIA series
    	      OTX_DEVICE_DSP,
    	      i,
    	      i,
    	      g_hEventQueue,
    	      &g_hPhysDevs.hDsp[i]);
    }
    
    // load DSP program from file OtxSpm1.out
    for (nDsp = 0; nDsp < 2; nDsp++) {
      result = OtxDspRunProgram(
    	      g_hPhysDevs.hDsp[nDsp],
    	      "OtxSpm1.out",
    	      "_c_int00");
    }
    

    See Also

    OtxDspRunSpm OtxDspRestartProgram

    OtxDspRunSpm

    OTX_EXPORT OTX_RESULT OTX_API OtxDspRunSpm(IN OTX_HANDLE hDspDevice, IN OtxDspSpmE eProgramModule)
    Load and Run an OTX Standard Program Module (SPM) on a DSP from the a program image stored in the OTX lib.
    Defined in: OtxDsp.h

    Parameters

    hDspDevice
    Handle to DSP device
    eProgramModule
    Standard Program Module to be loaded in the DSP (from the Lib)

    Example


    // open physical device of DSP
    for (i = 0; i < 2; i++) {
      result = OtxDrvOpenPhysicalDevice(
    	      g_hPhysDevs.hBoardController, // Vidar series or Thor-2-PCMCIA series
    	      OTX_DEVICE_DSP,
    	      i,
    	      i,
    	      g_hEventQueue,
    	      &g_hPhysDevs.hDsp[i]);
    }
    
    
    // load DSP Program OTX_DSP_SPM_OTXSPM1
    for (i = 0; i < 2; i++) {
      result = OtxDspRunSpm(
    	      g_hPhysDevs.hDsp[i],
    	      OTX_DSP_SPM_OTXSPM1);
    }
    

    See Also

    OtxDspRunProgram OtxDspSpmE

    OtxDspWriteHpi

    OTX_EXPORT OTX_RESULT OTX_API OtxDspWriteHpi(IN OTX_HANDLE hDspDevice, IN OTX_UINT32 nHpiAddress, IN OTX_UINT32 coWordsToWrite, IN OUT OTX_UINT16 * pWriteBuf)
    Write a number of octets to the DSP's Host Port Interface (HPI) from a user supplied buffer.
    Defined in: OtxDsp.h

    Parameters

    hDspDevice
    Handle to the physical DSP device
    nHpiAddress
    HPI Address to start to write to
    coWordsToWrite
    Number of OTX_UINT16s (Words) to write to the HPI
    pWriteBuf
    Pointer to the user allocated input buffer (Words)

    Comments

    Note: This function should be used with caution since it can corrupt the communication buffers between the DSP and the host. It is intended for debugging purposes and advanced users only.

    API OtxDspReadHpi can be used to check the data written

    Example


    static OTX_UINT16 writeVal = 0x5A5A;
    OTX_UINT16 sqWriteBuf[1];
    
    sqWriteBuf[0] = writeVal;
    
    // write a value to the last address in the HPI memory for the current DSP
    result = OtxDspWriteHpi(
    	    g_hPhysDevs.hDsp,
    	    0x17FF,
    	    1,
    	    sqWriteBuf);
    

    See Also

    OtxDspReadHpi

    OtxE1GetABCDBit

    OTX_EXPORT OTX_RESULT OTX_API OtxE1GetABCDBit(IN OTX_HANDLE hLogicDevice, OUT OtxE1ABCDBitDataS * pABCDBitData)
    Get the latest received E1 ABCD Signalling information for Channel Associated Signalling (CAS)
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the E1 ABCD-Bit Access Logical Device
    pABCDBitData
    ABCD CAS signalling data received. See also OtxE1ABCDBitDataS

    Comments

    Start signalling by calling function OtxDrvEnable for the logical device and end it with function OtxDrvDisable

    Example


    OTX_INT32 i;
    OTX_INT32 nCurrentLi = 0;
    OtxE1ABCDBitDataS  rxABCDBitData;
    
    for (i = 0; i < 2; i++) {
      // create CAS logical devices hosted in the physical Line Interface devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_E1_ABCD_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC, 5000L);
    
    }
    
    // get ABCD bit data from current Line
    result = OtxE1GetABCDBit(
    	    g_hLogicDevs.hT1E1Cas[nCurrentLi],
    	    &rxABCDBitData);
    
    // display the data
    printf("A = %.6X, B = %.6X, C = %.6X, D = %.6X\\n", rxABCDBitData.chA, rxABCDBitData.chB, rxABCDBitData.chC, rxABCDBitData.chD);
    printf("\\n");
    printf("            ABCD              ABCD\\n");
    printf("            ====              ====\\n");
    for (i = 1; i <= 30; i++) {
      char *pszValue;
      pszValue[0] = '\\0';
    
      printf("Channel %.2d: ", i);
    
      sprintf(pszValue + strlen(pszValue), "%d",  (pABCDBitData->chA >> (nCasCh - 1)) & 0x01 ? 1 : 0);
      sprintf(pszValue + strlen(pszValue), "%d",  (pABCDBitData->chB >> (nCasCh - 1)) & 0x01 ? 1 : 0);
      sprintf(pszValue + strlen(pszValue), "%d",  (pABCDBitData->chC >> (nCasCh - 1)) & 0x01 ? 1 : 0);
      sprintf(pszValue + strlen(pszValue), "%d",  (pABCDBitData->chD >> (nCasCh - 1)) & 0x01 ? 1 : 0);
    
      if (!(i % 2)) {
        printf("\\n");
      }
    }
    printf("\\n");
    

    Developer Notes

    Only meaningful in E1 mode and if the OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS is set to OTX_FALSE (which is default)

    See Also

    OtxE1SetABCDBit
    OtxE1ABCDBitDataS

    OtxE1GetChannelizedABCDBit

    OTX_EXPORT OTX_RESULT OTX_API OtxE1GetChannelizedABCDBit(IN OTX_HANDLE hLogicDevice, IN OTX_INT32 nChannel, OUT OTX_UINT8 * pnABCDBits)
    Get the latest received E1 ABCD Signalling information for a specific channel (1-30) for Channel Associated Signalling (CAS).
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the E1 ABCD-Bit Access Logical Device
    nChannel
    CAS Channel (1 - 30)
    pnABCDBits
    The ABCD bits for this channel are returned in the lower nibble of this parameter (A=bit3,B=bit2,C=bit1,D=bit0)

    Example


    OTX_INT32 i;
    OTX_UINT8 nABCDBits;
    OTX_INT32 nCurrentLi = 0;
    
    for (i = 0; i < 2; i++) {
      //set Channelized ABCD bit access on Line Interface
      result = OtxDrvSetAttributeValueBool(
    	      g_hPhysDevs.hLi[i],
    	      OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS,
    	      OTX_TRUE);
    
      // create CAS logical devices hosted in the physical Line Interface devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_E1_ABCD_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC, 5000L);
    
    }
    
    for (i = 1; i <= 30; i++) {
      result = OtxE1GetChannelizedABCDBit(
    	      g_hLogicDevs.hT1E1Cas[nCurrentLi],
    	      i,
    	      &nABCDBits);
    
      // display the data
      printf("   Channel %.2d: 0x%X", i, nABCDBits);
      if (!(i % 2)) {
        printf("\\n");
      }
    }
    

    Developer Notes

    Only meaningful in E1 mode and if the OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS is set to OTX_TRUE

    See Also

    OtxE1SetChannelizedABCDBit
    OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS

    OtxE1GetConfiguration

    OTX_EXPORT OTX_RESULT OTX_API OtxE1GetConfiguration(IN OTX_HANDLE hLineDevice, OUT OtxE1ConfigOptionsS * pE1ConfigOptions)
    Retrieves the current E1 Line Interface configuration data.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    pE1ConfigOptions
    E1 Configuration Data

    Example


    OtxE1ConfigOptionsS m_sE1CfgData[2];
    
    for (i = 0; i < 2; i++) {
    
      // get handle of Line Interface
      result = OtxDrvOpenPhysicalDevice(
    	    g_hPhysDevs.hBoardController,
    	    OTX_DEVICE_LI_T1E1,
    	    i,
    	    i,
    	    g_hEventQueue,
    	    &g_hPhysDevs.hLi[i]);
    
      result = OtxE1GetConfiguration(
    	    g_hPhysDevs.hLi[i],
    	    &(m_sE1CfgData[i]));
    }
    

    See Also

    OtxE1SetConfiguration
    OtxT1SetConfiguration
    OtxE1ConfigOptionsS

    OtxE1GetSaBit

    OTX_EXPORT OTX_RESULT OTX_API OtxE1GetSaBit(IN OTX_HANDLE hLogicDevice, IN OtxE1SaBitE eSaBit, OUT OTX_UINT8 * pSaVal)
    Return the value of the received SaX bits. Returns 8-bits received during the last CRC-Multiframe.
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the E1 S-Bit Access Logical Device
    eSaBit
    Sa bit to retrieve. See also OtxE1SaBitE
    pSaVal
    Last 8 received Sa-bits

    Comments

    Start signalling by calling function OtxDrvEnable and end it with function OtxDrvDisable

    Example


    for (i = 0; i < 2; i++) {
      // create CAS logical devices hosted in the physical Line Interface devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_E1_S_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    
    // read service word data (Sa and Si bits) from all Lis
    for (nLi = 0; nLi < 2; nLi++) {
      OTX_UINT16 nSaPos;
      OTX_UINT8 nSaVal;
    
      for (nSaPos = 4; nSaPos <= 8; nSaPos++) {
        result =  OtxE1GetSaBit(
    		 g_hLogicDevs.hT1E1Cas[nLi],
    		 (OtxE1SaBitE)(OTX_E1_SA4 + (nSaPos - 4)),
    		 &nSaVal);
    
        // display them
        printf("  SA%d=%.2X \\n", nSaPos, nSaVal);
      }
    }
    

    Developer Notes

    Only meaningful in E1 mode

    See Also

    OtxE1SetSaBit
    OtxE1SaBitE

    OtxE1GetSiBit

    OTX_EXPORT OTX_RESULT OTX_API OtxE1GetSiBit(IN OTX_HANDLE hLogicDevice, OUT OTX_UINT8 * pSi1Val, OUT OTX_UINT8 * pSi2Val)
    Retrieve the value to Si bits received in the last frame.
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the E1 S-Bit Access Logical Device
    pSi1Val
    Value of the FAS Si-bit in doubleframe format or Si (E) bit in frame 13 in CRC-multiframe format
    pSi2Val
    Value of the service word Si bit in DoubleFrame format or Si (E) bit in frame 15 in CRC-multiframe format

    Comments

    In Doubleframe format, these are the first bits of each frame.

    In CRC-Multiframe format, the Si bit are the first bits of frames 13 and 15. In CRC-Multiframe format these bits are also known as the E-bits.

    Example


    OTX_UINT8 nSi1Val;
    OTX_UINT8 nSi2Val;
    
    for (i = 0; i < 2; i++) {
      // create CAS logical devices hosted in the physical Line Interface devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_E1_S_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    
    for (nLi = 0; nLi < 2; nLi++) {
      result =  OtxE1GetSiBit(
    	       g_hLogicDevs.hT1E1Cas[nLi],
    	       &nSi1Val,
    	       &nSi2Val);
      // display
      printf("  Si1=%.1X", nSi1Val);
      printf("  Si2=%.1X \\n", nSi2Val);
    }
    

    Developer Notes

    Only meaningful in E1 mode

    See Also

    OtxE1SetSiBit

    OtxE1SetABCDBit

    OTX_EXPORT OTX_RESULT OTX_API OtxE1SetABCDBit(IN OTX_HANDLE hLogicDevice, IN OtxE1ABCDBitDataS * pABCDBitData)
    Set the E1 ABCD Signalling information for Channel Associated Signalling (CAS)
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the E1 ABCD-Bit Access Logical Device
    pABCDBitData
    ABCD CAS signalling data to be transmitted. See also OtxE1ABCDBitDataS

    Comments

    Start signalling by calling function OtxDrvEnable for the logical device and end it with function OtxDrvDisable

    Example


    OTX_INT32 nCurrentLi = 0;
    OtxE1ABCDBitDataS  g_sqSendABCDBitData[2];
    
    for (i = 0; i < 2; i++) {
      // create CAS logical devices hosted in the physical Line Interface devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_E1_ABCD_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC, 5000L);
    
    }
    
    // set ABCD-bits to ABCD = 0101 on all CAS channels on current Li
    g_sqSendABCDBitData[nCurrentLi].chA = 0x00000000;
    g_sqSendABCDBitData[nCurrentLi].chB = 0xffffffff;
    g_sqSendABCDBitData[nCurrentLi].chC = 0x00000000;
    g_sqSendABCDBitData[nCurrentLi].chD = 0xffffffff;
    
    result = OtxE1SetABCDBit(
    	    g_hLogicDevs.hT1E1Cas[nCurrentLi],
    	    &g_sqSendABCDBitData[nCurrentLi]);
    

    Developer Notes

    Only meaningful in E1 mode and if the OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS is set to OTX_FALSE (which is default)

    See Also

    OtxE1GetABCDBit
    OtxE1ABCDBitDataS

    OtxE1SetChannelizedABCDBit

    OTX_EXPORT OTX_RESULT OTX_API OtxE1SetChannelizedABCDBit(IN OTX_HANDLE hLogicDevice, IN OTX_INT32 nChannel, IN OTX_UINT8 nABCDBits)
    Set the E1 ABCD Signalling information for a specific channel (1-30) for Channel Associated Signalling (CAS).
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the E1 ABCD-Bit Access Logical Device
    nChannel
    CAS Channel (1 - 30)
    nABCDBits
    The ABCD bits for this channel to be transmitted (A=bit3,B=bit2,C=bit1,D=bit0)

    Comments

    Start signalling by calling function OtxDrvEnable for the logical device and end it with function OtxDrvDisable

    Example


    OTX_INT32 nCurrentLi = 0;
    
    for (i = 0; i < 2; i++) {
      //set Channelized ABCD bit access on Line Interface
      result = OtxDrvSetAttributeValueBool(
    	      g_hPhysDevs.hLi[i],
    	      OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS,
    	      OTX_TRUE);
    
      // create CAS logical devices hosted in the physical Line Interface devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_E1_ABCD_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC, 5000L);
    
    }
    
    // set transmitted ABCD bit data (for all channels) to 0101 (0x05) on current Li
    for (i = 1; i <= 30; i++) {
      result = OtxE1SetChannelizedABCDBit(
    	      g_hLogicDevs.hT1E1Cas[nCurrentLi],
    	      i,
    	      0x05);
    }
    

    Developer Notes

    Only meaningful in E1 mode and if the OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS is set to OTX_TRUE

    See Also

    OtxE1GetChannelizedABCDBit
    OtxE1ABCDBitDataS

    OtxE1SetConfiguration

    OTX_EXPORT OTX_RESULT OTX_API OtxE1SetConfiguration(IN OTX_HANDLE hLineDevice, IN OtxE1ConfigOptionsS * pE1ConfigOptions)
    Configures the E1 Line Interface transceiver.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    pE1ConfigOptions
    E1 Configuration Data

    Example


    // see example on
    
    OtxT1E1SetLiMode
    
    

    See Also

    OtxE1GetConfiguration
    OtxT1SetConfiguration
    OtxE1ConfigOptionsS

    OtxE1SetSaBit

    OTX_EXPORT OTX_RESULT OTX_API OtxE1SetSaBit(IN OTX_HANDLE hLogicDevice, IN OtxE1SaBitE eSaBit, IN OTX_UINT8 nSaVal)
    Set the value to be sent at the SaX bits. Eight bits to be sent can be specified per Sa-bit.
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the E1 S-Bit Access Logical Device
    eSaBit
    Sa bit to set. See also OtxE1SaBitE
    nSaVal
    Byte (8 bits) to be sent. LSB will be sent first.

    Comments

    In CRC-Multiframe format, one bit is sent in the corresponsing Sa-bit location of time-slot 0 in every other frame (in frames that do not contain frame alignment information). The least significant bit of the saVal byte is sent first in frame 1 of the multiframe and the most significant bit of the Byte is sent last in frame 15 of the multiframe.

    In Doubleframe format one bit of the saVal word is sent in the every other frame starting from the least significant bit.

    Start signalling by calling function OtxDrvEnable and end it with function OtxDrvDisable

    Example


    OTX_INT32 nCurrentLi = 0;
    OTX_UINT8 nSaVal;
    char wValStr[12];
    
    for (i = 0; i < 2; i++) {
      // create CAS logical devices hosted in the physical Line Interface devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_E1_S_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    
    // set Sa4 values 0x04 on current Line
    result = OtxE1SetSaBit(
    	    g_hLogicDevs.hT1E1Cas[nCurrentLi],
    	    OTX_E1_SA4,
    	    0x04);
    

    Developer Notes

    Only meaningful in E1 mode

    See Also

    OtxE1SaBitsEnable
    OtxE1SaBitsDisable
    OtxE1GetSaBit
    OtxE1SaBitE

    OtxE1SetSiBit

    OTX_EXPORT OTX_RESULT OTX_API OtxE1SetSiBit(IN OTX_HANDLE hLogicDevice, IN OTX_UINT8 nSi1Val, IN OTX_UINT8 nSi2Val)
    Set the value to be sent at the Si bit positions.
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the E1 S-Bit Access Logical Device
    nSi1Val
    Value of the FAS Si-bit in doubleframe format or Si (E) bit in frame 13 in CRC-multiframe format
    nSi2Val
    Value of the service word Si bit in DoubleFrame format or Si (E) bit in frame 15 in CRC-multiframe format

    Comments

    In Doubleframe format, these are the first bits of each frame.

    In CRC-Multiframe format, the Si bit are the first bits of frames 13 and 15. In CRC-Multiframe format these bits are also known as the E-bits.

    Example


    OTX_INT32 nCurrentLi = 0;
    
    for (i = 0; i < 2; i++) {
      // create CAS logical devices hosted in the physical Line Interface devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_E1_S_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    
    // set Si-bit values (both 0 on Si1 and Si2) on current Li
    result = OtxE1SetSiBit(
    	    g_hLogicDevs.hT1E1Cas[nCurrentLi],
    	    0,
    	    0);
    

    Developer Notes

    Only meaningful in E1 mode

    See Also

    OtxE1GetSiBit

    OtxFailure

    OTX_EXPORT OTX_BOOL OTX_API OtxFailure(void)
    Returns OTX_FALSE if failure on any status value.
    Defined in: OtxDrv.h

    Comments

    It is to allow a callable routine to the API in lieu of using the macros provided in the C header file. If you are using a language other than C this routine allows you to consistently obtain this data without having to port an interface routine.

    See Also

    OTX_RESULT_CODE

    OtxHdlcReadData

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcReadData(IN OTX_HANDLE hHdlcDevice, OUT OTX_UINT8 * pDataBuf, IN OTX_UINT32 nBufLen, OUT OTX_UINT32 * pnFrameLen, OUT OTX_UINT32 * pnFrameSeq, OUT OtxHdlcFrameEndCodeE * pnFrameEndCode, OUT OTX_DATETIME * pnTimeStamp)
    Read data received by the HDLC receiver
    Defined in: OtxHdlc.h

    Return Value

    Returns one of the following values:
    OTX_S_OK
    Hdlc Data was fetched
    OTX_S_FALSE
    No Hdlc Data available at this moment
    OTX_E_BUFFER_TO_SMALL
    The supplied user data buffer is too small to fit the received HDLC frame

    Parameters

    hHdlcDevice
    Handle to the HDLC Receiver Device
    pDataBuf
    Data buffer for the received data
    nBufLen
    Length of the user data buffer
    pnFrameLen
    Length of the received HDLC frame
    pnFrameSeq
    Sequence number of the received HDLC frame (matches the number in the event queue)
    pnFrameEndCode
    Frame Status Code
    pnTimeStamp
    Timestamp of the last received octet of the frame

    Comments

    Usually it is used in driver event case "OTX_LDEVICE_HDLC_RECEIVER"

    Example


    // Note: function DemoLogf() is used to display message in our demo programs
    
    case OTX_LDEVICE_HDLC_RECEIVER:
      otxRc = OtxDrvEventCode2String(
    	     pEventData->m_hDevice,
    	     pEventData->m_nCode,
    	     256,
    	     &msgStr[0]);
    
      if (OTX_SUCCESS(otxRc)) {
        // Event from HLDC Receiver
        if (pEventData->m_nCode == OTX_HDLC_RECEIVER_EC_COMPLETE_FRAME) {
    
          otxRc = OtxHdlcReadData(
    		 pEventData->m_hDevice,
    		 buf,
    		 1024,
    		 &nFrameLen,
    		 &nFrameSeq,
    		 &nFrameEndCode,
    		 &nTimeStamp);
    
          while (OTX_RESULT_CODE(otxRc) == OTX_S_OK) {
    
    	if (pEventData->m_nSourceId < 256) {
    	  g_coHdlcRxFrames[pEventData->m_nSourceId]++;
    	}
    
    	if (g_bHdlcVerbose) {
    	  DemoLogf("HDLC Frame Received, Sequence Number = %d\\n", pEventData->m_nParam);
    
    	  DemoLogf("HdlcReceiver[%d] Len=%d, Fe=0x%.2X, Sq=%d: ", pEventData->m_nSourceId, nFrameLen, nFrameEndCode, nFrameSeq);
    	  for (i = 0; i < nFrameLen && i < 1024; i++) {
    	    DemoLogf("%.2X ", buf[i]);
    	  }
    	  DemoLogf("\\n");
    	} else {
    	  if (nFrameEndCode) {
    
    	    g_coHdlcBadRxFrames[pEventData->m_nSourceId]++;
    
    	    DemoLogf("FrameEndCode Error HdlcReceiver[%d] Len=%d, Fe=0x%.2X, Sq=%d: ", pEventData->m_nSourceId, nFrameLen, nFrameEndCode, nFrameSeq);
    	    for (i = 0; i < nFrameLen && i < 256; i++) {
    	      DemoLogf("%.2X ", buf[i]);
    	    }
    	    DemoLogf("\\n");
    
    	    if (g_coHdlcBadRxFrames[pEventData->m_nSourceId] > 100) {
    	      DemoLogf("Too many bad frames from HdlcReceiver[%d]. Disabling device\\n", pEventData->m_nSourceId);
    	      otxRc = OtxDrvDisable(
    			pEventData->m_hDevice,
    			OTX_TASK_SYNC,
    		𗌘L);
    	    }
    
    	  } else {
    	    if ((nFrameLen != (OTX_UINT32)g_cbHdlcFrame) && (nFrameLen != 3)) {
    	      g_coHdlcBadRxFrames[pEventData->m_nSourceId]++;
    
    	      DemoLogf("LENGTH Error HdlcReceiver[%d] Len=%d, Fe=0x%.2X, Sq=%d: ", pEventData->m_nSourceId, nFrameLen, nFrameEndCode, nFrameSeq);
    	      for (i = 0; i < nFrameLen && i < 256; i++) {
    		DemoLogf("%.2X ", buf[i]);
    	      }
    	      DemoLogf("\\n");
    
    	    } else if (memcmp(buf+3, g_sqHdlcFrame+3, g_cbHdlcFrame-3)) {
    	      g_coHdlcBadRxFrames[pEventData->m_nSourceId]++;
    
    	      DemoLogf("memcmp Error HdlcReceiver[%d] Len=%d, Fe=0x%.2X, Sq=%d: ", pEventData->m_nSourceId, nFrameLen, nFrameEndCode, nFrameSeq);
    	      for (i = 0; i < nFrameLen && i < 256; i++) {
    		DemoLogf("%.2X ", buf[i]);
    	      }
    	      DemoLogf("\\n");
    	    }
    	  }
    	}
    	otxRc = OtxHdlcReadData(
    		   pEventData->m_hDevice,
    		   buf,
    		   1024,
    		   &nFrameLen,
    		   &nFrameSeq,
    		   &nFrameEndCode,
    		   &nTimeStamp);
          }
          if (OTX_RESULT_CODE(otxRc) != OTX_S_FALSE) {
    	DemoLogf("HdlcReceiver[%d] OtxHdlcReadData() was unsuccessful (rc = %X).\\n", pEventData->m_nSourceId, otxRc);
          }
    
        } else {
          // Unexpected event from this device
          DemoLogf("HdlcReceiver[%d] Event: %s \\n", pEventData->m_nSourceId, msgStr);
        }
      } else {
        DemoLogf("HdlcReceiver[%d] Invalid Event: %ld \\n", pEventData->m_nSourceId, pEventData->m_nCode);
      }
      break;  // end of OTX_LDEVICE_HDLC_RECEIVER
    

    See Also

    OtxHdlcReceiverInit
    OTX_LDEVICE_HDLC_RECEIVER
    OtxHdlcFrameEndCodeE
    OtxHdlcSendData
    OtxHdlcReadDataEx

    OtxHdlcReadDataEx

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcReadDataEx(IN OTX_HANDLE hHdlcDevice, OUT OTX_UINT8 * psqInfoAndDataBuffer, IN OTX_UINT32 cbBufferCapacity, IN OTX_UINT32 coMaxFrames, IN OTX_BOOL bTruncate, OUT OTX_UINT32 * pcoFrames)
    Read multiple data frames received by the HDLC receiver.
    Defined in: OtxHdlc.h

    Return Value

    Returns one of the following values:
    OTX_S_OK
    Hdlc Data was fetched
    OTX_S_FALSE
    No Hdlc Data available at this moment
    OTX_E_BUFFER_TO_SMALL
    The supplied user data buffer is too small to fit the first HDLC frame info and data

    Parameters

    hHdlcDevice
    Handle to the HDLC Receiver Device
    psqInfoAndDataBuffer
    Data buffer for the received data and info for all received frames
    cbBufferCapacity
    Length of the buffer
    coMaxFrames
    Maximum number of HDLC frames to be read by this call. A count of zero means read until buffer full
    bTruncate
    Utilize whole buffer even if it means that the last frame is truncated and the remainder discarded
    pcoFrames
    Number of frames actually placed in buffer upon return

    Comments

    The data in the returned buffer is organized so that it always starts with a frame info struct: OtxHdlcFrameInfoS, after which we have the HDLC data, the next OtxHdlcFrameInfoS follows shortly after the last data byte. In order to find the next frame, all frames info structs (except the last one) contain a field with the relative index of the start of the next frame. The index is a byte index relative to the start of the current frame's info struct, i.e. if we have a pointer p1, to the beginning of the first info struct in the buffer we get a pointer to the second struct p2, by adding the byte offset found in the current info struct, i.e.:

    OtxHdlcFrameInfoS p1 = buffer; OtxHdlcFrameInfoS p2 = OTX_STRUCT_ADD_BYTE_OFFSET(OtxHdlcFrameInfoS, p1, p1->nOffsetNext);

    This dispenses with the need to worry about the byte alignments of the OtxHdlcFrameInfoS structs.

    The last frame's nOffsetNext field will be zero

    Example


    // Note: function DemoLogf() is used to display message in our demo programs
    
    // Multiple frame read
    case OTX_LDEVICE_HDLC_RECEIVER:
      // Event from HLDC Receiver
      if (pEventData->m_nCode == OTX_HDLC_RECEIVER_EC_COMPLETE_FRAME) {
        OTX_UINT8  buf[CB_BUF_SIZE];
        OTX_UINT8  *pBuf;
    		      OtxHdlcFrameInfoS *pFrame;
        OTX_UINT32 coFrames;
        OTX_UINT32 j;
    
        otxRc = OtxHdlcReadDataEx(
    	       pEventData->m_hDevice,
    	       buf,
    	       CB_BUF_SIZE,
    	       DEMO_MAX_MULTIPLE_FRAME_READ,
    	       OTX_FALSE,
    	       &coFrames);
    
        while (OTX_RESULT_CODE(otxRc) == OTX_S_OK) {
    
          if (pEventData->m_nSourceId < 32) {
    	g_coHdlcRxFrames[pEventData->m_nSourceId] += coFrames;
          }
    
          if (g_bHdlcVerbose) {
    	DemoLogf("%d HDLC Frame(s) Received, Sequence Number = %d\\n", coFrames, pEventData->m_nParam);
          }
    
          pFrame = (OtxHdlcFrameInfoS *) buf;
    
          for (j = 0; j < coFrames; j++) {
    
    				      pBuf = pFrame->sqData;
    
    	if (g_bHdlcVerbose) {
    	  DemoLogf("HdlcReceiver[%d] Len=%d, Fe=0x%.2X, Sq=%d: ", pEventData->m_nSourceId, pFrame->cbOctets, pFrame->nFrameEndCode, pFrame->nFrameSeq);
    	  for (i = 0; i < pFrame->cbOctets && i < CB_BUF_SIZE; i++) {
    	    DemoLogf("%.2X ", pBuf[i]);
    	  }
    	  DemoLogf("\\n");
    	} else {
    	  if (pFrame->nFrameEndCode) {
    
    	    g_coHdlcBadRxFrames[pEventData->m_nSourceId]++;
    
    	    DemoLogf("FrameEndCode Error HdlcReceiver[%d] Len=%d, Fe=0x%.2X, Sq=%d: ", pEventData->m_nSourceId, pFrame->cbOctets, pFrame->nFrameEndCode, pFrame->nFrameSeq);
    	    for (i = 0; i < pFrame->cbOctets && i < 256; i++) {
    	      DemoLogf("%.2X ", pBuf[i]);
    	    }
    	    DemoLogf("\\n");
    
    	    if (g_coHdlcBadRxFrames[pEventData->m_nSourceId] > 100) {
    	      DemoLogf("Too many bad frames from HdlcReceiver[%d]. Disabling device\\n", pEventData->m_nSourceId);
    	      otxRc = OtxDrvDisable(
    			pEventData->m_hDevice,
    			OTX_TASK_SYNC,
    		𗌘L);
    	    }
    	  } else {
    	    if ((pFrame->cbOctets != (OTX_UINT32)g_cbHdlcFrame) && (pFrame->cbOctets != 3)) {
    	      g_coHdlcBadRxFrames[pEventData->m_nSourceId]++;
    
    	      DemoLogf("LENGTH Error HdlcReceiver[%d] Len=%d, Fe=0x%.2X, Sq=%d: ", pEventData->m_nSourceId, pFrame->cbOctets, pFrame->nFrameEndCode, pFrame->nFrameSeq);
    	      for (i = 0; i < pFrame->cbOctets && i < 256; i++) {
    		DemoLogf("%.2X ", pBuf[i]);
    	      }
    	      DemoLogf("\\n");
    
    	    } else if (memcmp(pBuf+3, g_sqHdlcFrame+3, g_cbHdlcFrame-3)) {
    	      g_coHdlcBadRxFrames[pEventData->m_nSourceId]++;
    
    	      DemoLogf("memcmp Error HdlcReceiver[%d] Len=%d, Fe=0x%.2X, Sq=%d: ", pEventData->m_nSourceId, pFrame->cbOctets, pFrame->nFrameEndCode, pFrame->nFrameSeq);
    	      for (i = 0; i < pFrame->cbOctets && i < 256; i++) {
    		DemoLogf("%.2X ", pBuf[i]);
    	      }
    	      DemoLogf("\\n");
    	    }
    	  }
    	}
    
    	// Step pointer to next frame (if any)
    				      pFrame = OTX_STRUCT_ADD_BYTE_OFFSET(OtxHdlcFrameInfoS, pFrame, pFrame->nOffsetNext);
          }
    
          // Read next frame (if any)
          otxRc = OtxHdlcReadDataEx(
    		 pEventData->m_hDevice,
    		 buf,
    		 CB_BUF_SIZE,
    		 DEMO_MAX_MULTIPLE_FRAME_READ,
    		 OTX_FALSE,
    		 &coFrames);
        }
        if (OTX_RESULT_CODE(otxRc) != OTX_S_FALSE) {
          DemoLogf("HdlcReceiver[%d] OtxHdlcReadDataEx() was unsuccessful.\\n", pEventData->m_nSourceId);
          DemoCheckRc(pEventData->m_hDevice, otxRc);
        }
      } else {
        otxRc = OtxDrvEventCode2String(
    	       pEventData->m_hDevice,
    	       pEventData->m_nCode,
    	       256,
    	       &msgStr[0]);
    
        if (OTX_SUCCESS(otxRc)) {
          DemoLogf("HdlcReceiver[%d] Event: %s \\n", pEventData->m_nSourceId, msgStr);
        } else {
          DemoLogf("HdlcReceiver[%d] Invalid Event: %ld \\n", pEventData->m_nSourceId, pEventData->m_nCode);
        }
      }
      break; // end of OTX_LDEVICE_HDLC_RECEIVER
    

    See Also

    OtxHdlcReceiverInit
    OTX_LDEVICE_HDLC_RECEIVER
    OtxHdlcSendData
    OtxHdlcReadData
    OtxHdlcFrameInfoS

    OtxHdlcReceiverInit

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcReceiverInit(IN OTX_HANDLE hHdlcDevice, IN OtxHdlcFrameFillTypeE eFrameFillType, IN OTX_INT32 nInterFrameTimeFill, IN OtxHdlcCrcModeE eCrcMode, IN OTX_BOOL bBitInversion, IN OTX_BOOL bExcludeRxCrc, IN OtxHdlcTxRateE eTxRate, IN OTX_BOOL bEventForEveryFrame)
    Initializate the HDLC Receiver.
    Defined in: OtxHdlc.h

    Parameters

    hHdlcDevice
    Handle to logical HDLC Filter Device
    eFrameFillType
    Fill character(s) to be send between HDLC frames. See also OtxHdlcFrameFillTypeE
    nInterFrameTimeFill
    Minimum No of interframe time characters between 2 HDLC frames (1=shared flags, 2=non-shared) Min value is 1. Max is 1024.
    eCrcMode
    Cyclic Redundancy Check (CRC) mode: 16-bit, 32-bit, or none. See also OtxHdlcCrcModeE
    bBitInversion
    If OTX_TRUE then all bits are inverted when transmitted and before received
    bExcludeRxCrc
    If OTX_TRUE the HDLC device will remove the CRC from the received frame, if OTX_FALSE the CRC is passed on to the receiving software
    eTxRate
    HDLC Transmission Rate for V.110 and X.30 modes. See also OtxHdlcTxRateE
    bEventForEveryFrame
    If OTX_TRUE the HDLC device will generate an event for every received frame, if OTX_FALSE then the HDLC device will only generate an event when one or more frames have been received since the last call to OtxHdlcReadData or OtxHdlcReadDataEx.

    Comments

    Start HDLC operation with by calling the function OtxDrvEnable and stop it by calling the function OtxDrvDisable

    For a description of how to connect of pipe to HDLC of various capacities (64kpbs, 56kpbs, 16kpbs, Nx64kpbs, etc) please refer to OtxDrvConnectPipe.

    Example


    // two HDLC logical devices in this example, logical devices can be hosted
    // either in Line Interface device (Li) or DSP
    
    for (i = 0; i < 2; i++) {
      // create logical devices
      result = OtxDrvCreateLogicalDevice(
    		    g_hPhysDevs.hHostDevice[i],
    		    OTX_LDEVICE_HDLC_RECEIVER,
    		    g_hEventQueue,
    		    i+100,
    		    &g_sqHdlcReceiver[i].hHandle);
    
      // pipe creation and connection, see example on
    
    OtxDrvConnectPipe
    // connect logical devices
    result = OtxDrvConnectLogicalDevice(
    		  g_sqHdlcReceiver[i].hPipe,
    		  -1,
    		  g_sqHdlcReceiver[i].hHandle,
    		  -1);
    
    // initialize the HDLC Receiver
    result = OtxHdlcReceiverInit(
    		  g_sqHdlcReceiver[i].hHandle,
    		  OTX_HDLC_FFT_FLAGS,
    		  2,
    		  OTX_HDLC_CRC16,
    		  OTX_FALSE,
    		  OTX_TRUE,
    		  OTX_HDLC_TR_NA,
    		  OTX_FALSE);
    
    // enable HDLC sender before it can receive frame
    result = OtxDrvEnable(
    		  g_sqLiHdlcReceiver[i].hHandle,
    		  OTX_TASK_SYNC,
    		  5000L);
    
    }
    

    See Also

    OtxDrvConnectPipe
    OtxHdlcSenderInit
    OTX_LDEVICE_HDLC_SENDER
    OtxHdlcFrameFillTypeE
    OtxHdlcCrcModeE
    OtxHdlcTxRateE

    OtxHdlcSendData

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcSendData(IN OTX_HANDLE hHdlcDevice, IN OTX_UINT8 * sqData, IN OTX_UINT32 nDataLen, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Sends transparent data or HDLC frames on a configured HDLC pipe.
    Defined in: OtxHdlc.h

    Parameters

    hHdlcDevice
    Handle to the HDLC Sender Device
    sqData
    Data to be sent
    nDataLen
    Length of the data to be send
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Example


    // send one HDLC frame with data "00 01 02 03 04 05 06 07 08 09"
    for (i = 0; i < 10; i++) {
      arMsg[i] = (OTX_UINT8) i;
    }
    
    // send one HDLC Frame
    result = OtxHdlcSendData(
    	    g_hLogicDevs.hHdlcSender[nCurrentLi],
    	    arMsg,
    	    10,
    	    DEMO_TASK_REF,
    	    OTX_TIME_INFINITY);
    

    See Also

    OtxHdlcSS7SendData

    OtxHdlcSenderFlush

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcSenderFlush(IN OTX_HANDLE hHdlcDevice)
    Flushes (empties) the queue of HDLC frames waiting to be transmitted (if any),
    Defined in: OtxHdlc.h

    Parameters

    hHdlcDevice
    Handle to the HDLC Sender Device

    Example


    // from the following example, 10 HDLC frames are waiting to be transmitted,
    // when the sleep time is short enough before all the 10 HDLC frames are
    // transmitted, several (less than 10) HDLC frames can be detected, because
    // others are removed from the waiting queue; if the sleep time is long enough,
    // 10 HDLC frames would be detected.
    
    hHandle = g_hLogicDevs.hHdlcSender;
    
    // data to be transmitted, length 100
    for (i = 0; i < 100; i++) {
      arMsg[i] = (OTX_UINT8) i;
    }
    
    // Send the HDLC frame
    for (i = 0; i < 10; i++) {
      result = OtxHdlcSendData(
    	      hHandle,
    	      arMsg,
    	      100,
    	      DEMO_TASK_REF,
    	      200);
    }
    
    // Sleeping...
    OsaThreadSleep(50);
    
    // flush HDLC sender
    result = OtxHdlcSenderFlush(hHandle);
    

    See Also

    OtxHdlcSendData

    OtxHdlcSenderInit

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcSenderInit(IN OTX_HANDLE hHdlcDevice, IN OtxHdlcFrameFillTypeE eFrameFillType, IN OTX_INT32 nInterFrameTimeFill, IN OtxHdlcCrcModeE eCrcMode, IN OTX_BOOL bBitInversion, IN OTX_BOOL bAppendTxCrc, IN OtxHdlcTxRateE eTxRate)
    Initializate the HDLC Sender.
    Defined in: OtxHdlc.h

    Parameters

    hHdlcDevice
    Handle to logical HDLC Filter Device
    eFrameFillType
    Fill character(s) to be send between HDLC frames. See also OtxHdlcFrameFillTypeE
    nInterFrameTimeFill
    Minimum No of interframe time characters between 2 HDLC frames (1=shared flags, 2=non-shared) Min value is 1. Max is 1024.
    eCrcMode
    Cyclic Redundancy Check (CRC) mode: 16-bit, 32-bit, or none. See also OtxHdlcCrcModeE
    bBitInversion
    If OTX_TRUE then all bits are inverted when transmitted and before received
    bAppendTxCrc
    If OTX_TRUE the HDLC device will append the CRC to the frame to be transmitted. If OTX_FALSE, the CRC is generated with software
    eTxRate
    HDLC Transmission Rate for V.110 and X.30 modes. See also OtxHdlcTxRateE

    Comments

    Start HDLC operation with by calling the function OtxDrvEnable and stop it by calling the function OtxDrvDisable.

    For a description of how to connect of pipe to HDLC of various capacities (64kpbs, 56kpbs, 16kpbs, Nx64kpbs, etc) please refer to OtxDrvConnectPipe.

    Example


    // two HDLC logical devices in this example, logical devices can be hosted
    // either in Line Interface device (Li) or DSP
    
    for (i = 0; i < 2; i++) {
      // create logical devices
      result = OtxDrvCreateLogicalDevice(
    		    g_hPhysDevs.hHostDevice[i],
    		    OTX_LDEVICE_HDLC_SENDER,
    		    g_hEventQueue,
    		    i+100,
    		    &g_sqHdlcSender[i].hHandle);
    
      // pipe creation and connection, see example on
    
    OtxDrvConnectPipe
    // connect logical devices
    result = OtxDrvConnectLogicalDevice(
    		  g_sqHdlcSender[i].hHandle,
    		  -1,
    		  g_sqHdlcSender[i].hPipe,
    		  -1);
    
    // initialize the HDLC Sender
    result = OtxHdlcSenderInit(
    		  g_hLogicDevs.hHdlcSender,
    		  OTX_HDLC_FFT_FLAGS,
    		  2,
    		  OTX_HDLC_CRC16,
    		  OTX_FALSE,
    		  OTX_TRUE,
    		  OTX_HDLC_TR_NA);
    
    // enable HDLC sender before it can send frame
    result = OtxDrvEnable(
    		  g_hLogicDevs.hHdlcSender,
    		  OTX_TASK_SYNC,
    		  5000L);
    }
    

    See Also

    OtxDrvConnectPipe
    OtxHdlcReceiverInit
    OtxHdlcFrameFillTypeE
    OtxHdlcCrcModeE
    OtxHdlcTxRateE

    OtxHdlcSS7GetFilter

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcSS7GetFilter(IN OTX_HANDLE hHdlcDevice, OUT OTX_UINT32 * pFilterMask)
    Returns the currently active filter mask for filtering out FISUs, LSSUs and/or MSUs
    Defined in: OtxHdlc.h

    Parameters

    hHdlcDevice
    Handle to the HDLC Device
    pFilterMask
    Currently active Filter Mask (see HDLC_SS7_FILTER_XXXX Macros)

    Example


    OTX_HANDLE hHandle;
    OTX_UINT32 filterMask;
    
    hHandle = g_sqDspHdlcReceiver.hHandle;
    
    // toggle OTX_HDLC_SS7_FILTER_FISU_ALL filter mask on/off
    result = OtxHdlcSS7GetFilter(
    	    hHandle,
    	    &filterMask);
    
    if (filterMask & OTX_HDLC_SS7_FILTER_FISU_ALL) {
      filterMask &= ~OTX_HDLC_SS7_FILTER_FISU_ALL;
    } else {
      filterMask |= OTX_HDLC_SS7_FILTER_FISU_ALL;
    }
    
    // reset the filter mask
    result = OtxHdlcSS7SetFilter(
    	    hHandle,
    	    filterMask);
    

    See Also

    OtxHdlcSS7SetFilter

    OtxHdlcSS7GetReceiveStatus

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcSS7GetReceiveStatus(IN OTX_HANDLE hHdlcDevice, OUT OTX_UINT32 * pnFisuCount, OUT OTX_UINT32 * pnLssuCount, OUT OTX_UINT32 * pnMsuCount, OUT OtxHdlcSS7FisuS * pFisu)
    Get the status and statistics of the incoming SS7 link on a specified pipe
    Defined in: OtxHdlc.h

    Parameters

    hHdlcDevice
    Handle to the HDLC Device
    pnFisuCount
    Number of FISUs received
    pnLssuCount
    Number of LSSUs received
    pnMsuCount
    Number of MSUs received
    pFisu
    The last received FISU on the pipe. See also OtxHdlcSS7FisuS

    Example


    OTX_UINT32  nFisuCount;   // Number of FISUs received
    OTX_UINT32  nLssuCount;   // Number of LSSUs received
    OTX_UINT32  nMsuCount;    // Number of MSUs received
    OtxHdlcSS7FisuS fisu;     // The last received FISU on the pipe.
    
    result = OtxHdlcSS7GetReceiveStatus(
    	    g_sqDspHdlcReceiver.hHandle,
    	    &nFisuCount,
    	    &nLssuCount,
    	    &nMsuCount,
    	    &fisu);
    
    // print out status
    if (OTX_SUCCESS(result)) {
      DemoLogf("FISUs received: %lu\\n", nFisuCount);
      DemoLogf("LSSUs received: %lu\\n", nLssuCount);
      DemoLogf("MSUs  received: %lu\\n", nMsuCount);
      DemoLogf("Last FISU received: bsn = %d, bib = %d, fsn = %d, fib = %d,
    	    li = %d\\n", fisu.bsn, fisu.bib, fisu.fsn, fisu.fib, fisu.li);
    }
    

    See Also

    OtxHdlcSS7SetFilter
    OtxHdlcSS7GetFilter
    OtxHdlcSS7FisuS

    OtxHdlcSS7SendData

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcSS7SendData(IN OTX_HANDLE hHdlcDevice, IN OTX_UINT8 * psqData, IN OTX_UINT32 nDataLen, OtxHdlcSS7FisuS * pFisu, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Send a message (LSSU, MSU, or arbitrary data) on a SS7 pipe. After the sending of the message has been completed, continues sending the new FISU provided as a parameter to the function.
    Defined in: OtxHdlc.h

    Parameters

    hHdlcDevice
    Handle to the Logical HDLC Device
    psqData
    Data (MSU, LSSU, or other arbitrary frame) to be sent
    nDataLen
    Length of the data to be sent
    pFisu
    Next FISU to be sent after the data
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Example


    OtxHdlcSS7FisuS msu;
    OtxHdlcSS7FisuS *pFisu;
    OTX_UINT8 sqHdlcFrame[300];
    
    memcpy(&msu, pFisu, OTX_HDLC_SS7_CB_FISU);        // Build the first 3 bytes of the MSU
    msu.li = 10 - OTX_HDLC_SS7_CB_FISU;               // Set the Length Indicator
    memcpy(sqHdlcFrame, &msu, OTX_HDLC_SS7_CB_FISU);  // Put the first 3 bytes of the MSU in the HDLC frame buffer
    for (i = OTX_HDLC_SS7_CB_FISU; i < 10; i++) {     // Add the payload the HDLC frame buffer
      sqHdlcFrame[i + OTX_HDLC_SS7_CB_FISU] = (OTX_UINT8) i;
    }
    
    // Send MSU Frame with length of 10
    result = OtxHdlcSS7SendData(
    	    g_sqDspHdlcSender.hHandle,
    	    sqHdlcFrame,
    	    10,
    	    pFisu,
    	    DEMO_TASK_REF,
    	    OTX_TIME_INFINITY);
    
    if (OTX_RESULT_CODE(result) == OTX_E_BUSY) {
      // Driver IO Request buffer is full. We need to retransmit this frame.
      i--;
      busyCount++;
    } else {
      // time to sleep (in ms) between transmitted HDLC Frames
      OsaThreadSleep(10);
    }
    

    See Also

    OtxHdlcSendData

    OtxHdlcSS7SetFilter

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcSS7SetFilter(IN OTX_HANDLE hHdlcDevice, IN OTX_UINT32 filterMask)
    Set the filter mask for the filtering out FISUs, LSSUs, and/or MSUs
    Defined in: OtxHdlc.h

    Parameters

    hHdlcDevice
    Handle to the HDLC Pipe
    filterMask
    Filter Mask (see HDLC_SS7_FILTER_XXXX Macros)

    Comments

    It should be used after HDLC receiver device is initialized

    Example


    // set filter mask on 2 DSP
    for (nDsp = 0; nDsp < 2; nDsp++) {
    
      // Initialize the Hdlc Receiver
      result = OtxHdlcReceiverInit(
    	      g_hLogicDevs[nDsp].hReceiver,
    	      OTX_HDLC_FFT_FLAGS,
    	      1,
    	      OTX_HDLC_CRC16,
    	      OTX_FALSE,
    	      OTX_FALSE,
    	      OTX_HDLC_TR_NA,
    	      OTX_TRUE
        );
    
      result = OtxHdlcSS7SetFilter(
    	      g_hLogicDevs[nDsp].hReceiver,
    	      OTX_HDLC_SS7_FILTER_FISU | OTX_HDLC_SS7_FILTER_SHORT_LSSU | OTX_HDLC_SS7_FILTER_LONG_LSSU);
    }
    

    See Also

    OtxHdlcSS7GetFilter

    OtxHdlcStartRepeatData

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcStartRepeatData(IN OTX_HANDLE hHdlcDevice, IN OTX_UINT8 * psqData, IN OTX_UINT32 nDataLen, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Load an HDLC frame to be repeated for the HDLC pipe and begin transmission. The Repeat Data is an HDLC frame which will be sent continuosly when there is no other user data frames to be sent. User data can be sent with OtxHdlcSendData function on which case the user data frame in interleaved between two consecutive Repeat Data frames. After the sending of user data frame has been completed, the HDLC controller will resume the sending of the Repeat Data frame.

    This function can be used to continously send SS7 FISUs or LSSUs.
    Defined in: OtxHdlc.h

    Parameters

    hHdlcDevice
    Handle to the HDLC Device
    psqData
    Repeat Data frame to be sent
    nDataLen
    Length of the data frame to be sent
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Example


    OTX_UINT8 *pRepeatFrame = (OTX_UINT8 *)"\\x10\\x11\\x12\\x13\\x14";
    OTX_HANDLE hHandle;
    
    hHandle = g_sqDspHdlcSender.hHandle;
    
    // start Repeat Data Frames with length of 5 from HDLC Sender
    result = OtxHdlcStartRepeatData(
    	    hHandle,
    	    pRepeatFrame,
    	    5,
    	    DEMO_TASK_REF,
    	    OTX_TIME_INFINITY);
    

    See Also

    OtxHdlcStopRepeatData

    OtxHdlcStopRepeatData

    OTX_EXPORT OTX_RESULT OTX_API OtxHdlcStopRepeatData(IN OTX_HANDLE hHdlcDevice)
    Stop sending of Repeat Data frames on a specified HDLC pipe.
    Defined in: OtxHdlc.h

    Parameters

    hHdlcDevice
    Handle to the HDLC Device

    Example


    OTX_HANDLE hHandle;
    
    hHandle = g_sqDspHdlcSender.hHandle;
    
    // stop Repeat Data Frames from HDLC Sender
    result = OtxHdlcStopRepeatData(hHandle);
    

    See Also

    OtxHdlcStartRepeatData

    OtxJtagControl

    OTX_EXPORT OTX_RESULT OTX_API OtxJtagControl(IN OTX_HANDLE hDevice, IN OtxJtagControlCmdE nCmd)
    Control function for the JTAG TBC device.
    Defined in: OtxJtag.h

    Parameters

    hDevice
    Handle to the TBC Device
    nCmd
    Command to be executed

    See Also

    OtxJtagControlCmdE

    OtxJtagScanDr

    OTX_EXPORT OTX_RESULT OTX_API OtxJtagScanDr(IN OTX_HANDLE hDevice, IN OTX_INT32 nTms, IN char * pszUDataIn, OUT char * psUzDataOut)
    Scan in the Data Register
    Defined in: OtxJtag.h

    Parameters

    hDevice
    Handle to the TBC Device
    nTms
    TMS chain number (0-7)
    pszUDataIn
    Data string to be scanned in
    psUzDataOut
    Data string scanned out

    See Also

    OtxJtagScanIr

    OtxJtagScanIr

    OTX_EXPORT OTX_RESULT OTX_API OtxJtagScanIr(IN OTX_HANDLE hDevice, IN OTX_INT32 nTms, IN char * pszUCommand, OUT char * pszUOutBuf)
    Scan in the Instruction Register
    Defined in: OtxJtag.h

    Parameters

    hDevice
    Handle to the TBC Device
    nTms
    TMS chain number (0-7)
    pszUCommand
    Instruction string of be scanned in
    pszUOutBuf
    Instruction string scanned out

    See Also

    OtxJtagScanDr

    OtxNetConnectLib

    OTX_EXPORT OTX_RESULT OTX_API OtxNetConnectLib(void)
    Opens a communication channel to the OTX Network Driver API library.
    Defined in: OtxDrv.h

    Comments

    This is the first function to be called in OTX board application, it sets up a communication channel with the driver.

    Its complement is OtxDrvReleaseLib which closes the communication channel and is the last function to be called.

    Example


    // start of OTX applicaton
    result = OtxNetConnectLib();
    ......
    ......
    // end of OTX application
    result = OtxDrvReleaseLib();
    

    See Also

    OtxDrvReleaseLib

    OtxPotsGetLiMode

    OTX_EXPORT OTX_RESULT OTX_API OtxPotsGetLiMode(IN OTX_HANDLE hDevice, OUT OtxPotsLiModeE * peLiMode)
    Returns the Line Interface Mode of the device.
    Defined in: OtxPots.h

    Parameters

    hDevice
    A handle to a POTS line device.
    peLiMode
    Line Interface Device mode

    Example


    // read the operation mode of the Active LI Device ...
    OtxPotsLiModeE eLiMode;
    
    hCurrentPotsLine = g_hPhysDevs.hLi[nCurrentPotsLine];
    
    result = OtxPotsGetLiMode(
    	    hCurrentPotsLine,
    	    &eLiMode);
    

    See Also

    OtxPotsSetLiMode
    OtxPotsLiModeE

    OtxPotsHookFlash

    OTX_EXPORT OTX_RESULT OTX_API OtxPotsHookFlash(IN OTX_HANDLE hDevice, IN OTX_TIME nDurationMs, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    An atomic on-hook off-hook operation
    Defined in: OtxPots.h

    Parameters

    hDevice
    A handle to a POTS line device.
    nDurationMs
    Time to stay on-hook.
    nTaskRef
    Callers reference, see also OTX_TASK_REF.
    nWaitMaxMs
    Maximum time for operation to complete, see also OTX_TIME.

    Comments

    A non-operation if the device is not off-hook

    Example


    hCurrentPotsLine = g_hPhysDevs.hLi[nCurrentPotsLine];
    
    // flash Hook on current POTS line
    result = OtxPotsHookFlash(
    	    hCurrentPotsLine,
    	    200,
    	    OTX_TASK_SYNC,
    	    5000L);
    

    See Also

    OtxPotsOffHook
    OtxPotsOnHook

    OtxPotsOffHook

    OTX_EXPORT OTX_RESULT OTX_API OtxPotsOffHook(IN OTX_HANDLE hDevice)
    Make the POTS line device to go off-hook
    Defined in: OtxPots.h

    Parameters

    hDevice
    A handle to a POTS line device.

    Comments

    This function does not wait for a dial tone, to wait for a dial tone, an Audio Receiver must be associated with the Line Device. This is done by installing the Audio module and connecting PotsLine timeslots to Audio Receivers in the Audio Module by means of the Tss module.

    No operation if already off-hook.

    Example


    hCurrentPotsLine = g_hPhysDevs.hLi[nCurrentPotsLine];
    
    // set active POTS Line Off-Hook
    result = OtxPotsOffHook(hCurrentPotsLine);
    

    See Also

    OtxPotsOnHook
    OtxPotsHookFlash

    OtxPotsOnHook

    OTX_EXPORT OTX_RESULT OTX_API OtxPotsOnHook(IN OTX_HANDLE hDevice)
    Make the POTS line device go on-hook
    Defined in: OtxPots.h

    Parameters

    hDevice
    A handle to a POTS line device.

    Comments

    No operation if already off-hook.

    Example


    hCurrentPotsLine = g_hPhysDevs.hLi[nCurrentPotsLine];
    
    // set active POTS Line On-Hook
    result = OtxPotsOnHook(hCurrentPotsLine);
    

    See Also

    OtxPotsOffHook
    OtxPotsHookFlash

    OtxPotsPulseDial

    OTX_EXPORT OTX_RESULT OTX_API OtxPotsPulseDial(IN OTX_HANDLE hDevice, IN OTX_TIME nDisconnectMs, IN OTX_TIME nConnectMs, IN OTX_TIME nInterPulseGroupMs, IN OTX_UINT8 * sqPulseGroups, IN OTX_UINT32 coPulseGroups, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Dial a phone number in the form of legacy pulse groups.
    Defined in: OtxPots.h

    Parameters

    hDevice
    A handle to a POTS line device.
    nDisconnectMs
    Time to keep line on-hook for each pulse
    nConnectMs
    Time to keep line off-hook for each pulse
    nInterPulseGroupMs
    Time to keep line off-hook between each pulse group (i.e. digit)
    sqPulseGroups
    Sequence (i.e. array) of digits constituting one pulse group each
    coPulseGroups
    Count of digits (i.e. pulse groups)
    nTaskRef
    Callers reference, see also OTX_TASK_REF.
    nWaitMaxMs
    Maximum time for operation to complete, see also OTX_TIME.

    Comments

    A pulse group is realized as group of pulses. Example, in Sweden a '0' is one pulse, and '1' are two pulses.

    A pulse is a disconnection of the line, and it is therefore a prerequisite that the line is off-hook prior to calling this function.

    Example


    char *g_sqNumber0 = "102";
    
    hCurrentPotsLine = g_hPhysDevs.hLi[nCurrentPotsLine];
    
    // pulse dial "102"
    result = OtxPotsPulseDial(
    	    hCurrentPotsLine,
    	    40,
    	    60,
    	    500,
    	    (OTX_UINT8 *) g_sqNumber0,
    	    strlen(g_sqNumber0),
    	    DEMO_TASK_REF,
    	    OTX_TIME_INFINITY);
    

    See Also

    OtxToneDtmfDial

    OtxPotsSetLiMode

    OTX_EXPORT OTX_RESULT OTX_API OtxPotsSetLiMode(IN OTX_HANDLE hDevice, IN OtxPotsLiModeE eLiMode)
    Set the Line Interface Mode.
    Defined in: OtxPots.h

    Parameters

    hDevice
    A handle to a POTS line device.
    eLiMode
    Line Interface Device mode

    Comments

    This function is mainly used for testing/debugging. Not needed in normal applications.

    Example


    // set the operation mode of the Active POTS LI Device
    OtxPotsLiModeE eLiMode;
    
    hCurrentPotsLine = g_hPhysDevs.hLi[nCurrentPotsLine];
    eLiMode = OTX_POTS_MODE_RINGING;
    
    result = OtxPotsSetLiMode(
    	    hCurrentPotsLine,
    	    eLiMode);
    

    See Also

    OtxPotsGetLiMode
    OtxPotsLiModeE

    OtxRawDataReadData

    OTX_EXPORT OTX_RESULT OTX_API OtxRawDataReadData(IN OTX_HANDLE hRawDataDevice, OUT OTX_UINT8 * pDataBuf, IN OTX_UINT32 nBufLen, OUT OTX_UINT32 * pnFrameLen, OUT OTX_BOOL * pbFrameEnd)
    Read data received by the Raw Data receiver
    Defined in: OtxRaw.h

    Return Value

    Returns one of the following values:
    OTX_S_OK
    Raw Data Data was fetched
    OTX_S_FALSE
    No Raw Data Data available at this moment
    OTX_E_BUFFER_TO_SMALL
    The supplied user data buffer is too small to fit the received data

    Parameters

    hRawDataDevice
    Handle to the Raw Data Receiver Device
    pDataBuf
    Data buffer for the received data
    nBufLen
    Length of the user data buffer
    pnFrameLen
    Length of the received raw data buffer (number of octets)
    pbFrameEnd
    Set to OTX_TRUE if a flag (as specified in OtxRawDataReceiverInit) followed the received data frame (valid if OTX_TRUE if OtxRawDataReceiverInit was initialized with bExtractFlag=OTX_TRUE)

    Comments

    Usually it is used in Raw Data Receiver Thread

    Example


    // Raw Data Receiver Thread
    {
      OtxEventDataS eventData;
      OTX_RESULT result;
      OTX_RESULT otxRc;
      OTX_UINT8  buf[2048];
      OTX_UINT32 nFrameLen;
      OTX_UINT32 nMaxFrameLen = 0;
      OTX_UINT32 nEventCount = 0;
      OTX_UINT32 nReadDataCount = 0;
      char msgStr[256];
      clock_t startTime, stopTime;
    
      startTime = clock();
    
      result = OtxDrvEnable(
    	      g_hLogicDevs.mRawDataReceiver.hHandle,
    	      OTX_TASK_SYNC,
    	      5000L);
    
      while (clock() < (startTime + g_hLogicDevs.mRawDataReceiver.nMsDuration)) {
        OtxDrvWaitForSingleEvent(
           g_hLogicDevs.mRawDataReceiver.hNotificationEvent,
           OTX_TIME_INFINITY);
        do {
          result = OtxDrvGetEventData(
    		  g_hLogicDevs.mRawDataReceiver.hEventQueue,
    		  &eventData);
    
          nEventCount++;
    
          if (OTX_RESULT_CODE(result) == OTX_S_OK) {
    	// We have a driver event
    	switch (eventData.m_eDeviceType) {
    	  // Event from Raw Data Receiver
    	  case OTX_LDEVICE_DATA_RAW_RECEIVER:
    
    	  switch (eventData.m_nCode) {
    	    case OTX_RAWDATA_RECEIVER_EC_DATA_AVAILABLE:
    	    {
    	      OTX_BOOL bFrameEnd;
    	      otxRc = OtxRawDataReadData(
    			 eventData.m_hDevice,
    			 buf,
    			 2048,
    			 &nFrameLen,
    			 &bFrameEnd);
    	      while (OTX_RESULT_CODE(otxRc) == OTX_S_OK) {
    
    		nReadDataCount++;
    
    		if (g_hLogicDevs.mRawDataReceiver.pRxFile) {
    		  int cbWritten;
    
    		  if (nFrameLen > nMaxFrameLen) {
    		  nMaxFrameLen = nFrameLen;
    		  }
    
    		  cbWritten = fwrite(buf, sizeof(OTX_UINT8), nFrameLen, g_hLogicDevs.mRawDataReceiver.pRxFile);
    
    		  if (cbWritten != (int)nFrameLen) {
    		    DemoLogf("RawDataReceiver[%d] Error: Could not write data to file.  (nFrameLen=%d, cbWritten=%d) \\n", eventData.m_nSourceId, nFrameLen, cbWritten);
    		  }
    
    		  if (bFrameEnd) {
    		    DemoLogf("RawDataSender[%d] Frame End occurred (unexpectedly). Data reception complete. Closing data file. \\n", eventData.m_nSourceId);
    		    fclose(g_hLogicDevs.mRawDataReceiver.pRxFile);
    		    g_hLogicDevs.mRawDataReceiver.pRxFile = NULL;
    		    goto END;
    		  }
    		}
    
    		otxRc = OtxRawDataReadData(
    			   eventData.m_hDevice,
    			   buf,
    			   2048,
    			   &nFrameLen,
    			   &bFrameEnd);
    	      }
    
    	      if (OTX_RESULT_CODE(otxRc) != OTX_S_FALSE) {
    		DemoLogf("RawDataReceiver[%d] OtxRawDataReadData() was unsuccessful.\\n", eventData.m_nSourceId);
    		DemoCheckRc(eventData.m_hDevice, otxRc);
    	      }
    
    	    }
    	    break;
    
    	    default:
    	      otxRc = OtxDrvEventCode2String(
    			 eventData.m_hDevice,
    			 eventData.m_nCode,
    			 256,
    			 &msgStr[0]);
    	      // Unexpected event from this device
    	      if (OTX_SUCCESS(otxRc)) {
    		DemoLogf("RawDataReceiver[%d] Event: %s \\n", eventData.m_nSourceId, msgStr);
    	      } else {
    		DemoLogf("RawDataReceiver[%d] Invalid Event: %ld \\n", eventData.m_nSourceId, eventData.m_nCode);
    	      }
    	    break;
    
    	  }
    	  break;
    
    	  default:
    	  // Unhandled event
    	    DemoLogf("DemoRawDataSender: Event from an unknown object 0x%X\\n", eventData.m_hDevice);
    	  break;
    	}
    
          }
        } while (OTX_RESULT_CODE(result) == OTX_S_OK);
    
        OsaThreadSleep(256); // Give the driver some time to fill up more data for us to fetch (256ms fills 2048 bytes in a 64kbit/s pipe)
      }
    
      END:
    
        stopTime = clock();
    
        result = OtxDrvDisable(
    		g_hLogicDevs.mRawDataReceiver.hHandle,
    		OTX_TASK_SYNC,
    	𗌘L);
    
        if (g_hLogicDevs.mRawDataReceiver.pRxFile) {
          fclose(g_hLogicDevs.mRawDataReceiver.pRxFile);
          g_hLogicDevs.mRawDataReceiver.pRxFile = NULL;
        }
    
        DemoLogf("DemoRawDataReceiver: nEventCount=%d, nReadDataCount=%d, nMaxFrameLen=%d\\n", nEventCount, nReadDataCount, nMaxFrameLen);
        DemoLogf("DemoRawDataReceiver: Done (time=%2.1f seconds).\\n", (double)(stopTime - startTime) / CLOCKS_PER_SEC);
    }
    

    See Also

    OtxRawDataReceiverInit
    OTX_LDEVICE_DATA_RAW_RECEIVER
    OtxRawDataSendData

    OtxRawDataReceiverInit

    OTX_EXPORT OTX_RESULT OTX_API OtxRawDataReceiverInit(IN OTX_HANDLE hRawDataDevice, IN OtxDataFormatE eDataFormat, IN OTX_UINT8 flag, IN OTX_BOOL bExtractFlag, IN OTX_BOOL bLsbReceivedFirst)
    Initializate the HDLC Receiver.
    Defined in: OtxRaw.h

    Parameters

    hRawDataDevice
    Handle to logical Raw Data Device
    eDataFormat
    Format of the received Raw Data. Use OTX_DATA_FORMAT_UINT8 if no data conversion to be applied. Use OTX_DATA_FORMAT_COMPAND8_A_LAW or OTX_DATA_FORMAT_COMPAND8_U_LAW to expand the 8-bit values from the incoming data stream to 16-bit signed integer values retrieved in the OtxRawDataReadData calls.
    flag
    Flag to be extracted if bExtractFlag is TRUE
    bExtractFlag
    if TRUE then received octets that equal the flag value are extracted from the receive data stream
    bLsbReceivedFirst
    Only applicable for subchannels (pipe capacity of 8, 16, or 32kpbs). If TRUE then the received octets are formatted so that the least significant bits of the octet contains the the first received bits of the subchannel. If FALSE then the received octets are formatted so that the most significant bits of the octet contains the the first received bits of the subchannel;

    Comments

    Start HDLC operation with by calling the function OtxDrvEnable and stop it by calling the function OtxDrvDisable

    Example

    Using the Raw Data Receiver with a 16 kpbs (two bits) subchannel with bLsbReceivedFirst==OTX_TRUE. When working with a 16 kbps subchannel the Raw Data Receiver will extract 2 bits from 4 consecutive frames and format the 4*2=8 bits into one octet according to the figure below:
    |
    |7 6 5 4 3 2 1 0
    |---+---+---+---+
    |x x|x x|x x|x x|  Octet received by the Raw Data Receiver
    |---------------+
    | ^           ^
    | |           |
    | |           +----- These two bits are the first two bits received
    | |                  from the subchannel pipe
    | |
    | |
    | +----- These two bits are the last two bits received
    |        from the subchannel pipe
    
    see example on <f OtxRawDataSenderInit>
    

    See Also

    OtxRawDataSenderInit
    OtxRawDataReadData
    OTX_LDEVICE_DATA_RAW_RECEIVER
    OtxDataFormatE

    OtxRawDataSendData

    OTX_EXPORT OTX_RESULT OTX_API OtxRawDataSendData(IN OTX_HANDLE hRawDataDevice, IN OTX_UINT8 * sqData, IN OTX_UINT32 nDataLen, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Sends transparent data.
    Defined in: OtxRaw.h

    Parameters

    hRawDataDevice
    Handle to the Raw Data Sender Device
    sqData
    Data to be sent
    nDataLen
    Length of the data to be send
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Comments

    Usaully it is used in Raw Data Sender Thread

    Example


    {
      OtxEventDataS eventData;
      OTX_RESULT result;
      OTX_RESULT otxRc;
      char msgStr[256];
      clock_t startTime, stopTime;
    
      // Discard any events from  event queue (if any)
      do {
        result = OtxDrvGetEventData(
    		g_hLogicDevs.mRawDataSender.hEventQueue,
    		&eventData);
      } while (OTX_RESULT_CODE(result) == OTX_S_OK);
    
      // Flush (empty) the queue of raw data octets waiting to be transmitted (if any).
      result = OtxRawDataSenderFlush(g_hLogicDevs.mRawDataSender.hHandle);
    
      startTime = clock();
      g_hLogicDevs.mRawDataSender.nTaskRef = 1;
    
      // Stuff the Raw Data Sender device full with data before we start to wait for OTX_RAWDATA_SENDER_EC_BUF_DEPLETED events
      do {
        g_hLogicDevs.mRawDataSender.cbTxBuf = fread(g_hLogicDevs.mRawDataSender.sqTxBuf, sizeof(OTX_UINT8), DEMO_RAW_TX_BUF_SIZE, g_hLogicDevs.mRawDataSender.pTxFile);
    
        otxRc = OtxRawDataSendData(
    	       g_hLogicDevs.mRawDataSender.hHandle,
    	       g_hLogicDevs.mRawDataSender.sqTxBuf,
    	       g_hLogicDevs.mRawDataSender.cbTxBuf,
    	       g_hLogicDevs.mRawDataSender.nTaskRef,
    	       OTX_TIME_INFINITY);
    
        if (OTX_RESULT_CODE(otxRc) != OTX_E_BUSY) {
          g_hLogicDevs.mRawDataSender.nTaskRef++;
        }
    
      } while (g_hLogicDevs.mRawDataSender.cbTxBuf && (OTX_RESULT_CODE(otxRc) != OTX_E_BUSY));
    
    
      result = OtxDrvEnable(
    	      g_hLogicDevs.mRawDataSender.hHandle,
    	      OTX_TASK_SYNC,
    	      5000L);
    
      if (g_hLogicDevs.mRawDataSender.cbTxBuf) {
        DemoLogf("DemoRawDataSender: Primed the Sender with %d packets.\\n", g_hLogicDevs.mRawDataSender.nTaskRef);
      } else {
        DemoLogf("DemoRawDataSender: The entire file fit in the driver buffer. Closing file\\n");
        fclose(g_hLogicDevs.mRawDataSender.pTxFile);
        g_hLogicDevs.mRawDataSender.pTxFile = NULL;
      }
    
    
      // Wait for events from the Raw Data Sender
      while (1) {
        OtxDrvWaitForSingleEvent(
           g_hLogicDevs.mRawDataSender.hNotificationEvent,
           3);
    
        do {
          result = OtxDrvGetEventData(
    		  g_hLogicDevs.mRawDataSender.hEventQueue,
    		  &eventData);
    
          if (OTX_RESULT_CODE(result) == OTX_S_OK) {
    	// We have a driver event
    	switch (eventData.m_eDeviceType) {
    	  case OTX_LDEVICE_DATA_RAW_SENDER:
    	  // Event from Raw Data Sender
    
    	  switch (eventData.m_nCode) {
    	    case OTX_RAWDATA_SENDER_EC_BUF_DEPLETED:
    	    {
    	      OTX_RESULT otxRc;
    
    	      DemoLogf("Buffer sent (eventData.m_nRequestId = %d)\\n", eventData.m_nRequestId);
    
    	      if (g_hLogicDevs.mRawDataSender.pTxFile) {
    		while (g_hLogicDevs.mRawDataSender.cbTxBuf) {
    		  otxRc = OtxRawDataSendData(
    			     g_hLogicDevs.mRawDataSender.hHandle,
    			     g_hLogicDevs.mRawDataSender.sqTxBuf,
    			     g_hLogicDevs.mRawDataSender.cbTxBuf,
    			     g_hLogicDevs.mRawDataSender.nTaskRef,
    			     OTX_TIME_INFINITY);
    
    		  if (OTX_RESULT_CODE(otxRc) == OTX_E_BUSY) {
    		    break;
    		  } else {
    		    g_hLogicDevs.mRawDataSender.nTaskRef++;
    		  }
    
    		  g_hLogicDevs.mRawDataSender.cbTxBuf = fread(g_hLogicDevs.mRawDataSender.sqTxBuf, sizeof(OTX_UINT8), DEMO_RAW_TX_BUF_SIZE, g_hLogicDevs.mRawDataSender.pTxFile);
    
    		}
    
    		if (!g_hLogicDevs.mRawDataSender.cbTxBuf) {
    		  DemoLogf("DemoRawDataSender: EOF reached. Closing file\\n");
    		  fclose(g_hLogicDevs.mRawDataSender.pTxFile);
    		  g_hLogicDevs.mRawDataSender.pTxFile = NULL;
    		}
    	      }
    	    }
    	    break;
    
    	    case OTX_RAWDATA_SENDER_EC_COMPLETED:
    	      DemoLogf("DemoRawDataSender: Raw Data transmission ended.\\n");
    	      goto END;
    	      break;
    
    	    default:
    	      otxRc = OtxDrvEventCode2String(
    			 eventData.m_hDevice,
    			 eventData.m_nCode,
    			 256,
    			 &msgStr[0]);
    	      // Unexpected event from this device
    	      if (OTX_SUCCESS(otxRc)) {
    		DemoLogf("DemoRawDataSender: Unexpected Event: %s \\n", msgStr);
    	      } else {
    		DemoLogf("DemoRawDataSender: Invalid Event: %ld \\n", eventData.m_nCode);
    	      }
    	    break;
    	  }
    	  break;
    
    	  default:
    	    // Unhandled event
    	    DemoLogf("DemoRawDataSender: Event from an unknown object 0x%X\\n", eventData.m_hDevice);
    	  break;
    	}
          }
        } while (OTX_RESULT_CODE(result) == OTX_S_OK);
      }
    
    END:
    
      stopTime = clock();
    
      DemoLogf(".\\n");
    
      result = OtxDrvDisable(
    	      g_hLogicDevs.mRawDataSender.hHandle,
    	      OTX_TASK_SYNC,
    	      5000L);
    
      DemoLogf("DemoRawDataSender: Done (time=%2.1f seconds, Last nTaskRef=%d).\\n", (double)(stopTime - startTime) / CLOCKS_PER_SEC, g_hLogicDevs.mRawDataSender.nTaskRef-1);
    }
    

    OtxRawDataSenderFlush

    OTX_EXPORT OTX_RESULT OTX_API OtxRawDataSenderFlush(IN OTX_HANDLE hRawDataDevice)
    Flushes (empties) the queue of raw data octets waiting to be transmitted (if any).
    Defined in: OtxRaw.h

    Parameters

    hRawDataDevice
    Handle to the Raw Data Sender Device

    Example


    // discard any events from event queue (if any)
    do {
      result = OtxDrvGetEventData(
    	      g_hLogicDevs.mRawDataSender.hEventQueue,
    	      &eventData );
    } while (OTX_RESULT_CODE(result) == OTX_S_OK);
    
    
    // empty the queue of raw data octets waiting to be transmitted (if any).
    result = OtxRawDataSenderFlush(g_hLogicDevs.mRawDataSender.hHandle);
    

    See Also

    OtxRawDataSendData

    OtxRawDataSenderInit

    OTX_EXPORT OTX_RESULT OTX_API OtxRawDataSenderInit(IN OTX_HANDLE hRawDataDevice, IN OtxDataFormatE eDataFormat, IN OTX_UINT8 flag, IN OTX_BOOL bLsbSentFirst)
    Initialize the Raw Data Sender.
    Defined in: OtxRaw.h

    Parameters

    hRawDataDevice
    Handle to logical Raw Data Device
    eDataFormat
    Format of the Raw Data supplied to this device. Use OTX_DATA_FORMAT_UINT8 if no conversion to be applied. Use OTX_DATA_FORMAT_COMPAND8_A_LAW or OTX_DATA_FORMAT_COMPAND8_U_LAW to supply 16-bit signed integer values in the calls to OtxRawDataSendData and let the device compress these value to 8-bit A-law/U-law values before they are placed in the outgoing data stream.
    flag
    Value to send when there is no more Raw Data to send
    bLsbSentFirst
    Only applicable for subchannels (pipe capacity of 8, 16, or 32kpbs). Determines in which order bits are extracted from the each octet before they are placed into a subchannel pipe. If TRUE the device will send the least significant bits of the octet first, and send the most significant bits last. If FALSE the device will send the most significant bits of the octet first, and send the least significant bits last.

    Comments

    Start Raw Data Sender operation with by calling the function OtxDrvEnable and stop it by calling the function OtxDrvDisable

    Example

    Using the Raw Data Sender with a 16 kpbs (two bits) subchannel with bLsbSentFirst==OTX_TRUE: When working with a 16 kbps subchannel the Raw Data Sender will extract 2 bits from each octet passed to the device and put these bits in 4 consecutive frames. The 2 bits are extracted from the octet according to the figure below:
    |
    |7 6 5 4 3 2 1 0
    |---+---+---+---+
    |x x|x x|x x|x x|  Octet passed to the Raw Data Sender
    |---------------+
    | ^           ^
    | |           |
    | |           +----- These two bits are sent first
    | |
    | |
    | +----- These two bits are sent last
    

    // create logical devices
    {
      OTX_RESULT result;
      OTX_INT32 i;
      OTX_UINT32 nIrpQueueLimit;
      OTX_UINT32 nFifoSize;
      OTX_UINT32 iDevNo;
      OTX_UINT32 nLi = 2;
    
      for (i = 0; i < nLi; i++) {
    
        // hDspDevNo is the dsp device
        iDevNo = i;
    
        // Create a notification Event and Event Queue for the Raw Data Sender
        result = OtxDrvCreateEvent(&g_hLogicDevs.mRawDataSender[i].hNotificationEvent);
        result = OtxDrvCreateEventQueue(
    	⎨,
    		g_hLogicDevs.mRawDataSender[i].hNotificationEvent,
    		&g_hLogicDevs.mRawDataSender[i].hEventQueue);
        result = OtxDrvEnable(
    		g_hLogicDevs.mRawDataSender[i].hEventQueue,
    		OTX_TASK_SYNC,
    	𗌘L);
    
        // Create Raw Data Sender
        result = OtxDrvCreateLogicalDevice(
    		g_hPhysDevs.hDsp[iDevNo],
    		OTX_LDEVICE_DATA_RAW_SENDER,
    		g_hLogicDevs.mRawDataSender[i].hEventQueue,
    		i,
    		&g_hLogicDevs.mRawDataSender[i].hHandle);
    
        // Store sourceId so that we can easily print it from the Sender Thread
        g_hLogicDevs.mRawDataSender[i].nSourceId = i;
    
        // Increase the IRP Queue limit for fast pipes (to be able to buffer more transmit data in the driver)
        result = OtxDrvGetAttributeValueUint32(
    		g_hLogicDevs.mRawDataSender[i].hHandle,
    		OTX_ATTR_DEVICE_IRP_QUEUE_LIMIT,
    		&nIrpQueueLimit);
    
        // create a notification Event and Event Queue for the Raw Data Receiver
    
        result = OtxDrvCreateEvent(&g_hLogicDevs.mRawDataReceiver[i].hNotificationEvent);
        result = OtxDrvCreateEventQueue(
    	⎨,
    		g_hLogicDevs.mRawDataReceiver[i].hNotificationEvent,
    		&g_hLogicDevs.mRawDataReceiver[i].hEventQueue);
        result = OtxDrvEnable(
    		g_hLogicDevs.mRawDataReceiver[i].hEventQueue,
    		OTX_TASK_SYNC,
    	𗌘L);
    
        // Create Raw Data Receiver
        result = OtxDrvCreateLogicalDevice(
    		g_hPhysDevs.hDsp[iDevNo],
    		OTX_LDEVICE_DATA_RAW_RECEIVER,
    		g_hLogicDevs.mRawDataReceiver[i].hEventQueue,
    		i,
    		&g_hLogicDevs.mRawDataReceiver[i].hHandle);
    
        // store sourceId so that we can easily print it from the Receiver Thread
        g_hLogicDevs.mRawDataReceiver[i].nSourceId = i;
    
    
        // Modify the FIFO size of the Raw Data Receiver
        result = OtxDrvGetAttributeValueUint32(
    		g_hLogicDevs.mRawDataReceiver[i].hHandle,
    		OTX_ATTR_RAWDATA_RECEIVER_FIFO_SIZE,
    		&nFifoSize);
    
        // Prevent the driver from generating the OTX_RAWDATA_RECEIVER_EC_DATA_AVAILABLE event
        // (to reduce driver overhead)
        result = OtxDrvSetAttributeValueBool(
    		g_hLogicDevs.mRawDataReceiver[i].hHandle,
    		OTX_ATTR_RAWDATA_RECEIVER_GENERATE_DATA_EVENTS,
    		OTX_FALSE);
    
      }
    
    }
    
    
    // connect devices
    {
      OTX_INT32 nLi, nDsp;
      OTX_RESULT result;
    
      OTX_UINT8 sqTimeSlotMask[32];
    
      // create the Pipes (one for each direction) between the two DSPs and the two LIs
      for (nLi = 0; nLi < g_demoEnv.coLi; nLi++) {
        OTX_INT32 nCapacity;
        OTX_INT32 nTs;
    
        // create Raw Data pipes (one for each direction) Use all timeslots except TS0.
        memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
    
        // Standard (64kpbs) or superchannel
        nCapacity = 64;
    
        // creating pipe for RawData Sender/Receiver
    
        for (nTs = g_demoEnv.nStartingTimeslot; nTs < 32; nTs++) {
    
          if (nTs == 0) {
    	continue; // TS0 is sync timeslot
          }
    
          sqTimeSlotMask[nTs] = 0xFF;
          nCapacity += 64;
        }
    
        result = OtxDrvCreatePipe(
    		nCapacity,
    		&g_hPipes[nLi].hLiDspRawData);
        result = OtxDrvCreatePipe(
    		nCapacity, &g_hPipes[nLi].hDspLiRawData);
    
        // connect pipe: Dsp -> Li
        result = OtxDrvConnectPipe(
    		g_hPipes[nLi].hDspLiRawData,
    		OTX_PIPE_INPUT,
    		g_hPhysDevs.hDsp[nLi],
    		-1,
    		sqTimeSlotMask,
    	Τ);
        result = OtxDrvConnectPipe(
    		g_hPipes[nLi].hDspLiRawData,
    		OTX_PIPE_OUTPUT,
    		g_hPhysDevs.hLi[nLi],
    		-1,
    		sqTimeSlotMask,
    	Τ);
    
        // Connect pipe: Li  -> Dsp
        result = OtxDrvConnectPipe(
    		g_hPipes[nLi].hLiDspRawData,
    		OTX_PIPE_INPUT,
    		g_hPhysDevs.hLi[nLi],
    		-1,
    		sqTimeSlotMask,
    	Τ);
        result = OtxDrvConnectPipe(
    		g_hPipes[nLi].hLiDspRawData,
    		OTX_PIPE_OUTPUT,
    		g_hPhysDevs.hDsp[nLi],
    		-1,
    		sqTimeSlotMask,
    	Τ);
      }
    
      // connect logical devices within DSP
      for (nDsp = 0; nDsp < 2; nDsp++) {
        // connecting RawData Sender/Receiver Logical Device
        // Receive direction:
        // Connect Raw Data Receiver
        result = OtxDrvConnectLogicalDevice(
    		g_hPipes[nDsp].hLiDspRawData,
    		-1,
    		g_hLogicDevs.mRawDataReceiver[nDsp].hHandle,
    		-1);
    
        // Transmit direction:
        // Connect Raw Data Sender
        result = OtxDrvConnectLogicalDevice(
    		g_hLogicDevs.mRawDataSender[nDsp].hHandle,
    		-1,
    		g_hPipes[nDsp].hDspLiRawData,
    		-1);
      }
    
      // initialize logical devices
      {
        OTX_RESULT result;
        OTX_INT32 nDsp;
    
        for (nDsp = 0; nDsp < 2; nDsp++) {
    
          // initialize the Raw Data Receivers (hosted in the DSP)
          result = OtxRawDataReceiverInit(
    		  g_hLogicDevs.mRawDataReceiver[nDsp].hHandle,
    		  OTX_DATA_FORMAT_UINT8,
    		  0xFF,
    		  OTX_FALSE,
    		  OTX_TRUE);
    
          // initialize the Raw Data Senders (hosted in the DSP)
          result = OtxRawDataSenderInit(
    		  g_hLogicDevs.mRawDataSender[nDsp].hHandle,
    		  OTX_DATA_FORMAT_UINT8,
    		  0xFF,
    		  OTX_TRUE);
        }
    }
    
    // enable logical devices
    for (nDsp = 0; nDsp < 2; nDsp++) {
      // enable Raw Data Sender
      result = OtxDrvEnable(g_hLogicDevs.mRawDataSender[nDsp].hHandle,
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    
    // enable Raw Data Receivers in the thread, see example on
    
    OtxRawDataReadData
    
    

    See Also

    OtxRawDataReceiverInit OtxRawDataSendData OTX_LDEVICE_DATA_RAW_SENDER OtxDataFormatE

    OtxRawDataStartIdlePattern

    OTX_EXPORT OTX_RESULT OTX_API OtxRawDataStartIdlePattern(IN OTX_HANDLE hRawDataDevice, IN OTX_UINT8 * sqData, IN OTX_UINT32 nDataLen)
    Load an idle pattern for the Raw Data Sender devicie and begin transmission. The Idle Pattern is a sequence of data which will be send continuosly always when there is no actual user data to be send. User data can be send with OtxRawDataSendData function on which case the user data frame in interleaved between two consequtive idle patterns. After the sending of user data has been completed, the Raw Data device will resume the sending of the idle pattern.
    Defined in: OtxRaw.h

    Parameters

    hRawDataDevice
    Handle to the HDLC Device
    sqData
    Data to be sent
    nDataLen
    Length of the data to be send

    See Also

    OtxRawDataStopIdlePattern

    To Do



    OtxRawDataStopIdlePattern

    OTX_EXPORT OTX_RESULT OTX_API OtxRawDataStopIdlePattern(IN OTX_HANDLE hRawDataDevice)
    Stop sending of idle pattern on the specified Raw Data Sender device.
    Defined in: OtxRaw.h

    Parameters

    hRawDataDevice
    Handle to the HDLC Device

    See Also

    OtxRawDataStartIdlePattern

    To Do



    OtxResultCode

    OTX_EXPORT void OTX_API OtxResultCode(OTX_RESULT OtxResult, OTX_UINT32 * Result, OTX_UINT32 * Severity, OTX_UINT32 * SourceId, OTX_UINT32 * LineNum)
    Returns the portions that make up the OTX_RESULT code.
    Defined in: OtxDrv.h

    Parameters

    OtxResult
    OTX Result code to process.
    Result
    pointer to store the Result Code in.
    Severity
    pointer to store the Severity Code in.
    SourceId
    pointer to store the SourceID in.
    LineNum
    pointer to store the Line Number in.

    Comments

    This routine returns the portions of the OTX_RESULT return code. It is to allow a callable routine to the API in lieu of using the macros provided in the C header file. If you are using a language other than C this routine allows you to consistently obtain this data without having to port an interface routine.

    See Also

    OTX_RESULT_CODE OTX_RESULT_SEVERITY OTX_RESULT_EX_SOURCE_ID OTX_RESULT_EX_LINE_NUM

    OtxResultErrorCode

    OTX_EXPORT OTX_UINT32 OTX_API OtxResultErrorCode(void)
    Returns the Error Code from the OTX_RESULT code.
    Defined in: OtxDrv.h

    Comments

    This routine returns the Error Code from the OTX_RESULT return code. It is to allow a callable routine to the API in lieu of using the macros provided in the C header file. If you are using a language other than C this routine allows you to consistently obtain this data without having to port an interface routine.

    See Also

    OTX_RESULT_CODE

    OtxResultLineNum

    OTX_EXPORT OTX_UINT32 OTX_API OtxResultLineNum(void)
    Returns the Line Number from the OTX_RESULT code.
    Defined in: OtxDrv.h

    Comments

    This routine returns the Line Number from the OTX_RESULT return code. It is to allow a callable routine to the API in lieu of using the macros provided in the C header file. If you are using a language other than C this routine allows you to consistently obtain this data without having to port an interface routine.

    See Also

    OTX_RESULT_CODE OTX_RESULT_EX_LINE_NUM

    OtxResultSeverity

    OTX_EXPORT OTX_UINT32 OTX_API OtxResultSeverity(void)
    Returns the Severity Code from the OTX_RESULT code.
    Defined in: OtxDrv.h

    Comments

    This routine returns the Severity Code from the OTX_RESULT return code. It is to allow a callable routine to the API in lieu of using the macros provided in the C header file. If you are using a language other than C this routine allows you to consistently obtain this data without having to port an interface routine.

    See Also

    OTX_RESULT_CODE OTX_RESULT_SEVERITY

    OtxResultSourceId

    OTX_EXPORT OTX_UINT32 OTX_API OtxResultSourceId(void)
    Returns the Source ID from the OTX_RESULT code.
    Defined in: OtxDrv.h

    Comments

    This routine returns the Source ID from the OTX_RESULT return code. It is to allow a callable routine to the API in lieu of using the macros provided in the C header file. If you are using a language other than C this routine allows you to consistently obtain this data without having to port an interface routine.

    See Also

    OTX_RESULT_CODE OTX_RESULT_EX_SOURCE_ID

    OtxSuccess

    OTX_EXPORT OTX_BOOL OTX_API OtxSuccess(void)
    Returns OTX_TRUE if success on any status value.
    Defined in: OtxDrv.h

    Comments

    It is to allow a callable routine to the API in lieu of using the macros provided in the C header file. If you are using a language other than C this routine allows you to consistently obtain this data without having to port an interface routine.

    See Also

    OTX_RESULT_CODE

    OtxT1E1AlarmOff

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1AlarmOff(IN OTX_HANDLE hLineDevice, IN OtxT1E1AlarmTypeE eAlarmType)
    Clears an earlier initiated alarm.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    eAlarmType
    Alarm type to turned off

    Example


    see example on
    
    OtxT1E1AlarmOn
    
    

    See Also

    OtxT1E1AlarmTypeE
    OtxT1E1AlarmOn

    OtxT1E1AlarmOn

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1AlarmOn(IN OTX_HANDLE hLineDevice, IN OtxT1E1AlarmTypeE eAlarmType)
    Initiates a sending of an alarm or a series of alarms on the T1/E1 physical layer (depending on alarmType)
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    eAlarmType
    Alarm type to be sent to the Remote End

    Example


    // start/stop sending Remote (Yellow) alarm on current Li
    
    static OTX_BOOL g_bSendingRemoteAlarm = OTX_FALSE;
    
    if (g_bSendingRemoteAlarm) {
      // stop sending Remote (Yellow) Alarm on current Li
      result = OtxT1E1AlarmOff(
    	      g_hPhysDevs.hLi[nCurrentLi],
    	      OTX_T1E1_ALARM_RAI);
    } else {
      // send Remote (Yellow) Alarm on current Li
      result = OtxT1E1AlarmOn(
    	      g_hPhysDevs.hLi[nCurrentLi],
    	      OTX_T1E1_ALARM_RAI);
    }
    
    // update status
    g_bSendingRemoteAlarm = !g_bSendingRemoteAlarm;
    

    See Also

    OtxT1E1AlarmTypeE
    OtxT1E1AlarmOff

    OtxT1E1ForceResynch

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1ForceResynch(IN OTX_HANDLE hLineDevice)
    Initiates a resynchronization procedure of the pulse frame and the CRC-multiframe starting directly after the old framing candidate.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device

    Example


    // force resynchronization on Line 0 and 1
    for (nLi = 0; nLi < 2; nLi++) {
    
      // get handle of Line Interface
      result = OtxDrvOpenPhysicalDevice(
    	      g_hPhysDevs.hBoardController,
    	      OTX_DEVICE_LI_T1E1,
    	      nLi,
    	      nLi,
    	      g_hEventQueue,
    	      &g_hPhysDevs.hLi[nLi]);
    
      result = OtxT1E1ForceResynch(g_hPhysDevs.hLi[nLi]);
    }
    

    OtxT1E1GetLayer1Status

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1GetLayer1Status(IN OTX_HANDLE hLineDevice, OUT OtxT1E1Layer1StatusE * eLayer1Status)
    Read the physical line status of the T1/E1 Line Interface. The line status is defined by two factors: Loss Of Signal and Framing Error. Both of these two factors have to be false for Line Status to be defined as "OK". If either of the factors are false, then the Line Status is defined as "DOWN".
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    eLayer1Status
    T1/E1 Physical Layer Line Status. Either OTX_T1E1_RES_L1_DOWN or OTX_T1E1_RES_L1_OK

    Example


    OtxT1E1Layer1StatusE eLayer1Status;
    OTX_INT32 nLi;
    
    for (nLi = 0; nLi < 2; nLi++) {
      // get handle of Line Interface
      result = OtxDrvOpenPhysicalDevice(
    	      g_hPhysDevs.hBoardController,
    	      OTX_DEVICE_LI_T1E1,
    	      nLi,
    	      nLi,
    	      g_hEventQueue,
    	      &g_hPhysDevs.hLi[nLi]);
    
      // get line status of Li
      result = OtxT1E1GetLayer1Status(
    	      g_hPhysDevs.hLi[nLi],
    	      &eLayer1Status);
    
      // display the status
      printf("%s\\n", eLayer1Status == OTX_T1E1_LAYER1_OK ? "OK" : "DOWN");
    }
    

    See Also

    OtxT1E1Layer1StatusE

    OtxT1E1GetLayer1StatusEx

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1GetLayer1StatusEx(IN OTX_HANDLE hLineDevice, OUT OtxT1E1Layer1StatusExS * sLayer1Status)
    Poll the current physical line status of the T1/E1 Line Interface.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    sLayer1Status
    T1/E1 Physical Layer Line Status.

    Example


    OtxT1E1Layer1StatusExS sLayer1Status;
    
    // get line status of Li
    result = OtxT1E1GetLayer1StatusEx(
    	    g_hPhysDevs.hLi,
    	    &sLayer1Status);
    
    // display the status
    printf("Red Alarm        = %s\\n", (sLayer1Status.bRedAlarm) ? "YES" : "NO");
    printf("Blue Alarm       = %s\\n", (sLayer1Status.bBlueAlarm) ? "YES" : "NO");
    printf("Yellow Alarm     = %s\\n", (sLayer1Status.bYellowAlarm) ? "YES" : "NO");
    printf("Frame Error      = %s\\n", (sLayer1Status.bFrameError) ? "YES" : "NO");
    printf("MultiFrame Error = %s\\n", (sLayer1Status.bMultiFrameError) ? "YES" : "NO");
    

    See Also

    OtxT1E1Layer1StatusExS

    OtxT1E1InsertSingleBitDefect

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1InsertSingleBitDefect(IN OTX_HANDLE hLineDevice, IN OtxT1E1DefectE eDefectType)
    Creates a single bit defect on the E1/T1 span. After calling this function, the selected defect is inserted into the transmit data stream at the next possible position. The defect is not repeated.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    eDefectType
    Type bit defect to be inserted into the T1/E1 span

    Example


    OTX_INT32 nCurrentLi = 0;
    
    // get handle of Line Interface
    result = OtxDrvOpenPhysicalDevice(
    	    g_hPhysDevs.hBoardController,
    	    OTX_DEVICE_LI_T1E1,
    	    i,
    	    i,
    	    g_hEventQueue,
    	    &g_hPhysDevs.hLi[nCurrentLi]);
    
    // insert a Bipolar violation defect on current Line
    result = OtxT1E1InsertSingleBitDefect(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    OTX_T1E1_DEFECT_BPV);
    

    See Also

    OtxT1E1DefectE

    OtxT1E1SetLiMode

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1SetLiMode(IN OTX_HANDLE hLineDevice, IN OtxT1E1LiModeE eT1E1Mode)
    Sets up the T1/E1 Line Interface transceiver in either T1 or E1 mode.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    eT1E1Mode
    T1 or E1 mode

    Example


    // set default configuration data of T1/E1.
    // NOTE that the default values should match to your application
    
    OtxT1ConfigOptionsS *pT1CfgData
    OtxE1ConfigOptionsS *pE1CfgData,
    
    // T1 configuration data
    pT1CfgData->eSignalingMode             = OTX_T1_SM_CCS;
    pT1CfgData->eTxLineCode                = OTX_T1_LC_B8ZS;
    pT1CfgData->eRxLineCode                = OTX_T1_LC_B8ZS;
    pT1CfgData->eFrameFormat               = OTX_T1_FF_ESF;
    pT1CfgData->bCRC6Enable                = OTX_TRUE;
    pT1CfgData->eTxRemoteAlarmFormat       = OTX_T1_RA_YELLOW_A;
    pT1CfgData->eRxRemoteAlarmFormat       = OTX_T1_RA_YELLOW_A;
    pT1CfgData->bAutoResync                = OTX_TRUE;
    pT1CfgData->bAutoCrcBitInversion       = OTX_TRUE;
    pT1CfgData->eLfaSensitivity            = OTX_T1_LFA_2_OUT_OF_4;
    pT1CfgData->bAutoRemoteAlarm           = OTX_FALSE;
    pT1CfgData->nLosSensitivity            = 128;
    pT1CfgData->nLosRecovery               = 128;
    pT1CfgData->nLineLength                = 10;
    pT1CfgData->bHighTxPower               = OTX_FALSE;
    pT1CfgData->bReceiveEqualizer          = OTX_FALSE;
    pT1CfgData->bfClearChannels            = 0x0;
    
    // E1 configuration data
    pE1CfgData->eTxLineCode                = OTX_E1_LC_HDB3;
    pE1CfgData->eRxLineCode                = OTX_E1_LC_HDB3;
    pE1CfgData->eTxFrameFormat             = OTX_E1_FF_CRC4_MULTIFRAME;
    pE1CfgData->eRxFrameFormat             = OTX_E1_FF_CRC4_MULTIFRAME;
    pE1CfgData->eAisDetection              = OTX_E1_AIS_ETS300233;
    pE1CfgData->bfSiBits                   = 0x3;
    pE1CfgData->bfSaBits                   = 0x1F;
    pE1CfgData->bExtendedHDB3errorDetect   = OTX_FALSE;
    pE1CfgData->bAutoRegainMultiframe      = OTX_FALSE;
    pE1CfgData->bAutoResync                = OTX_TRUE;
    pE1CfgData->bAutoCrcBitInversion       = OTX_FALSE;
    pE1CfgData->bAutoRemoteAlarm           = OTX_FALSE;
    pE1CfgData->nLosSensitivity            = 128;
    pE1CfgData->nLosRecovery               = 128;
    pE1CfgData->nLineLength                = 10;
    pE1CfgData->bHighTxPower               = OTX_FALSE;
    pE1CfgData->bReceiveEqualizer          = OTX_FALSE;
    
    // configure T1/E1 transceiver
    for (i = 0; i < 2; i++) {
    
      // set termination for the T1/E1 Front End
      result = OtxT1E1SetLineTermination(
    	      g_hPhysDevs.hLi[i],
    	      OTX_T1E1_TERM_100_OHM);
    
      // configure Transceivers
      if (g_demoEnv.eT1E1Mode == OTX_T1E1_MODE_T1) {
        // T1 mode
        result = OtxT1SetConfiguration(
    		g_hPhysDevs.hLi[i],
    		&(g_T1E1CfgData.t1CfgData));
      } else {
        // E1 mode
        result = OtxE1SetConfiguration(
    		g_hPhysDevs.hLi[i],
    		&(g_T1E1CfgData.e1CfgData));
      }
    
      // set T1 or E1 mode
      result = OtxT1E1SetLiMode(
    	      g_hPhysDevs.hLi[i],
    	      g_demoEnv.eT1E1Mode);
    }
    

    See Also

    OtxT1E1LiModeE

    OtxT1E1SetLineLoop

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1SetLineLoop(IN OTX_HANDLE hLineDevice, OtxT1E1LoopE eLoopType)
    Loops the Line Interface, i.e. received E1/T1 data will be transmitted back on the transmit pairs.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    eLoopType
    Loop Type: Line loop or Remote loop

    Example


    for (i = 0; i < 2; i++) {
    
      // get handle of Line Interface
      result = OtxDrvOpenPhysicalDevice(
    	    g_hPhysDevs.hBoardController,
    	    OTX_DEVICE_LI_T1E1,
    	    i,
    	    i,
    	    g_hEventQueue,
    	    &g_hPhysDevs.hLi[i]);
    
      // set external loopback mode
      result = OtxT1E1SetLineLoop(
    	    g_hPhysDevs.hLi[i],
    	    OTX_T1E1_LINE_LOOP);
    }
    

    See Also

    OtxT1E1LoopE

    OtxT1E1SetLineTermination

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1SetLineTermination(IN OTX_HANDLE hLineDevice, IN OtxT1E1TermModeE eTermMode)
    Sets the line termination for the E1/T1 span of the Line Interface.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    eTermMode
    Termination mode to match impedance of the cable connected to the Line Interface

    Example


    // see example on
    
    OtxT1E1SetLiMode
    
    

    See Also

    OtxT1E1TermModeE

    OtxT1E1SetMonitorMode

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1SetMonitorMode(IN OTX_HANDLE hLineDevice, IN OTX_BOOL bMonitorModeActive)
    Increases the receiver sensitivity to detect resistively attenuated signals of -20 dB. Typically used for in a monitor configuration.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    bMonitorModeActive
    If OTX_TRUE the receiver sensitivity is increased to detect resistively attenuated signals of -20 dB

    Comments

    This function is only valid for OTX_DEVICE_LI_T1E1 devices hosted by a OTX_DEVICE_QUAD_CODEC device or a OTX_DEVICE_THOR_PCMCIA (Plus version) device.

    Example


    OTX_INT32 nCurrentLi = 0;
    
    // get handle of Line Interface
    result = OtxDrvOpenPhysicalDevice(
    	    g_hPhysDevs.hBoardController,
    	    OTX_DEVICE_LI_T1E1,
    	    nCurrentLi,
    	    nCurrentLi,
    	    g_hEventQueue,
    	    &g_hPhysDevs.hLi[nCurrentLi]);
    
    // enable Monitor (-20dB) mode for Current Li
    result = OtxT1E1SetMonitorMode(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    OTX_TRUE);
    

    OtxT1E1SetPrbsConfig

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1SetPrbsConfig(IN OTX_HANDLE hDevice, IN OtxPrbsModeE ePrbsMode, IN OtxPrbsPatternE ePrbsPattern)
    Generate, Monitor or disable 2^15-1 or 2^20-1 PRBS
    Defined in: OtxT1E1.h

    Parameters

    hDevice
    Handle to the T1/E1 Transceiver Device
    ePrbsMode
    PRBS Monitor, Generate or Disable
    ePrbsPattern
    '0' for 2^15-1; '1' for 2^20-1

    Example


    OTX_INT32 nCurrentLi = 0;
    
    // get handle of Line Interface
    result = OtxDrvOpenPhysicalDevice(
    	    g_hPhysDevs.hBoardController,
    	    OTX_DEVICE_LI_T1E1,
    	    i,
    	    i,
    	    g_hEventQueue,
    	    &g_hPhysDevs.hLi[nCurrent]);
    
    // enable 2^15-1 PRBS Monitor on Current Li
    result = OtxT1E1SetPrbsConfig(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    OTX_T1E1_PRBS_MONITOR_ON,
    	    OTX_E1_PRBS_2_15);
    

    See Also

    OtxPrbsModeE OtxPrbsPatternE

    OtxT1E1XmitPinControl

    OTX_EXPORT OTX_RESULT OTX_API OtxT1E1XmitPinControl(IN OTX_HANDLE hLineDevice, IN OTX_BOOL bTxPinEnable)
    Enable or Disable (tri-state) the Transmit pair of the Line Interface. Tristating the transmit pair will in effect disconnect the transmit pair from the outgoing span.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    bTxPinEnable
    OTX_TRUE enable, OTX_FALSE disables (tri-state) the Line Interface Transmit Pins

    Example


    OTX_INT32 nCurrentLi = 0;
    
    // get handle of Line Interface
    result = OtxDrvOpenPhysicalDevice(
    	    g_hPhysDevs.hBoardController,
    	    OTX_DEVICE_LI_T1E1,
    	    nCurrentLi,
    	    nCurrentLi,
    	    g_hEventQueue,
    	    &g_hPhysDevs.hLi[nCurrentLi]);
    
    // tri-state Transmit Pins for Current Li
    result = OtxT1E1XmitPinControl(
    	    g_hPhysDevs.hLi[nCurrentLi],
    	    OTX_FALSE);
    

    OtxT1GetChannelizedRobBitData

    OTX_EXPORT OTX_RESULT OTX_API OtxT1GetChannelizedRobBitData(IN OTX_HANDLE hLogicDevice, IN OTX_INT32 nChannel, OUT OTX_UINT8 * pnABCDBits)
    Get the current received bit rob signalling (ABCD bits) for a specific channel (1-24).
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the T1 Bit Rob Access Logical Device
    nChannel
    Channel (1 - 24)
    pnABCDBits
    The ABCD bits for this channel are returned in the lower nibble of this parameter (A=bit3,B=bit2,C=bit1,D=bit0)

    Example


    OTX_INT32 nCurrentLi = 0;
    OTX_UINT8 nABCDBits;
    
    for (i = 0; i < 2; i++) {
      //set Channelized ABCD bit access on Line Interface
      result = OtxDrvSetAttributeValueBool(
    	      g_hPhysDevs.hLi[i],
    	      OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS,
    	      OTX_TRUE);
    
      // create CAS logical devices hosted in the physical Line Interface devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_T1_ROB_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    
    // read received bitrob data on current Li
    for (i = 0; i < 24; i++) {
      result = OtxT1GetChannelizedRobBitData(
    	      g_hLogicDevs.hT1E1Cas[nCurrentLi],
    	      i+1,
    	      &nABCDBits);
    
      // display the data
      printf("   Channel %.2d: 0x%X", i+1, nABCDBits);
      if (i % 2) {
        printf("\\n");
      }
    }
    

    Developer Notes

    Only meaningful in T1 mode and if the OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS is set to OTX_TRUE

    See Also

    OtxT1SetChannelizedBitRobData
    OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS

    OtxT1GetConfiguration

    OTX_EXPORT OTX_RESULT OTX_API OtxT1GetConfiguration(IN OTX_HANDLE hLineDevice, OUT OtxT1ConfigOptionsS * pT1ConfigOptions)
    Retrieves the current T1 Line Interface configuration data.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    pT1ConfigOptions
    T1 Configuration Data

    Example


    OtxT1ConfigOptionsS m_sT1CfgData[2];
    
    for (i = 0; i < 2; i++) {
    
      // get handle of Line Interface
      result = OtxDrvOpenPhysicalDevice(
    	    g_hPhysDevs.hBoardController,
    	    OTX_DEVICE_LI_T1E1,
    	    i,
    	    i,
    	    g_hEventQueue,
    	    &g_hPhysDevs.hLi[i]);
    
      result = OtxT1GetConfiguration(
    	    g_hPhysDevs.hLi[i],
    	    &(m_sT1CfgData[i]));
    }
    

    See Also

    OtxT1SetConfiguration
    OtxE1SetConfiguration
    OtxT1ConfigOptionsS

    OtxT1GetRobBitData

    OTX_EXPORT OTX_RESULT OTX_API OtxT1GetRobBitData(IN OTX_HANDLE hLogicDevice, OUT OtxT1RobBitDataS * pRobBitData)
    Get the current received bit rob signalling information (all channels).
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the T1 BitRob Access Logical Device
    pRobBitData
    Bit-robbed signalling data received. See also OtxT1RobBitDataS

    Example


    OTX_INT32 i;
    OTX_INT32 nCurrentLi = 0;
    OtxT1RobBitDataS  rcvRobBitData;
    
    // create CAS logical devices hosted in the physical Line Interface devices
    for (i = 0; i < 2; i++) {
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_T1_ROB_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    
    // get Rob Bit data from current Line
    result = OtxT1GetRobBitData(
    	    g_hLogicDevs.hT1E1Cas[nCurrentLi],
    	    &rcvRobBitData);
    
    // display the data
    printf("A = %.6X, B = %.6X, C = %.6X, D = %.6X\\n", rcvRobBitData.chA, rcvRobBitData.chB, rcvRobBitData.chC, rcvRobBitData.chD);
    printf("\\n");
    printf("            ABCD              ABCD\\n");
    printf("            ====              ====\\n");
    for (i = 0; i < 24; i++) {
      char *pszValue;
      pszValue[0] = '\\0';
    
      printf("Channel %.2d: ", i+1);
    
      sprintf(pszValue + strlen(pszValue), "%d",  (pRobBitData->chA >> (nCasCh - 1)) & 0x01 ? 1 : 0);
      sprintf(pszValue + strlen(pszValue), "%d",  (pRobBitData->chB >> (nCasCh - 1)) & 0x01 ? 1 : 0);
      sprintf(pszValue + strlen(pszValue), "%d",  (pRobBitData->chC >> (nCasCh - 1)) & 0x01 ? 1 : 0);
      sprintf(pszValue + strlen(pszValue), "%d",  (pRobBitData->chD >> (nCasCh - 1)) & 0x01 ? 1 : 0);
    
      printf("  ");
      if (i % 2) {
        printf("\\n");
      }
    }
    printf("\\n");
    }
    

    Developer Notes

    Only meaningful in T1 mode and if the OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS is set to OTX_FALSE (which is the default)

    See Also

    OtxT1SetBitRobData OtxT1BitRobDataS

    OtxT1SetChannelizedRobBitData

    OTX_EXPORT OTX_RESULT OTX_API OtxT1SetChannelizedRobBitData(IN OTX_HANDLE hLogicDevice, IN OTX_INT32 nChannel, IN OTX_UINT8 nABCDBits)
    Set the Bit Rob Signalling information (ABCD bits) for a specific channel (1-24).
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the T1 S-Bit Access Logical Device
    nChannel
    Channel (1 - 24)
    nABCDBits
    The ABCD bits for this channel to be transmitted (A=bit3,B=bit2,C=bit1,D=bit0)

    Comments

    Start bit-rob signalling by calling function OtxDrvEnable and end it with function OtxDrvDisable

    Example


    OTX_INT32 nCurrentLi = 0;
    
    for (i = 0; i < 2; i++) {
      //set Channelized ABCD bit access on Line Interface
      result = OtxDrvSetAttributeValueBool(
    	      g_hPhysDevs.hLi[i],
    	      OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS,
    	      OTX_TRUE);
    
      // create CAS logical devices hosted in the physical Line Interface devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_T1_ROB_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    
    // setting transmitted Rob Bit data (all channels) to 0 current Line
    for (i = 0; i < 24; i++) {
      result = OtxT1SetChannelizedRobBitData(
    	      g_hLogicDevs.hT1E1Cas[nCurrentLi],
    	      i+1,
    	      0);
    }
    

    Developer Notes

    Only meaningful in T1 mode and if the OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS is set to OTX_TRUE

    See Also

    OtxT1GetChannelizedBitRobData
    OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS

    OtxT1SetConfiguration

    OTX_EXPORT OTX_RESULT OTX_API OtxT1SetConfiguration(IN OTX_HANDLE hLineDevice, IN OtxT1ConfigOptionsS * pT1ConfigOptions)
    Configures the T1 Line Interface transceiver.
    Defined in: OtxT1E1.h

    Parameters

    hLineDevice
    Handle to the T1/E1 Transceiver Device
    pT1ConfigOptions
    T1 Configuration Options

    Example


    // see example on
    
    OtxT1E1SetLiMode
    
    

    See Also

    OtxT1GetConfiguration
    OtxE1SetConfiguration
    OtxT1ConfigOptionsS

    OtxT1SetDlBitData

    OTX_EXPORT OTX_RESULT OTX_API OtxT1SetDlBitData(IN OTX_HANDLE hLogicDevice, IN OTX_UINT32 nDlBits)
    Set the FS/DL-Bit data for the OTX_LDEVICE_T1_DL_BIT_ACCESS device.
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the T1 DL-Bit Access Logical Device
    nDlBits
    DL-Data to be transmitted.
    Mode OTX_T1_FF_F12:
    nDlBits should contain 8 DL bits.
    Bit0 is transmitted in frame 2 and Bit7 in frame 12.
    Remaining bits should be zero.

    Mode OTX_T1_FF_ESF:
    nDlBits should contain 16 DL bits.
    Bit0 is transmitted in frame 1 and Bit7 in frame 15.
    Bit8 is transmitted in frame 17 and Bit15 in frame 23.
    Remaining bits should be zero.

    Mode OTX_T1_FF_F72:
    nDlBits should contain 24 DL bits.
    Bit0 is transmitted in frame 26 and Bit7 in frame 40
    Bit8 is transmitted in frame 42 and Bit15 in frame 56.
    Bit16 is transmitted in frame 58 and Bit23 in frame 72.
    Remaining bits should be zero.

    Comments

    Start FS/DL bit access by calling function OtxDrvEnable and end it with function OtxDrvDisable

    Example


    OTX_INT32 nCurrentLi = 0;
    
    // create DL-Bit Access logical devices hosted in the physical Line Interface devices
    for (i = 0; i < 2; i++) {
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_T1_DL_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1DlBitAccess[i]);
    
      // Enable Logical DL-Bit Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1DlBitAccess[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    
    // send DL-Bit data: 0x09
    result = OtxT1SetDlBitData(
    	    g_hLogicDevs.hT1E1DlBitAccess[nCurrentLi],
    	    0x09);
    

    Developer Notes

    Only meaningful in T1 mode.

    See Also

    OTX_LDEVICE_T1_DL_BIT_ACCESS OTX_T1E1_EC_DL_BITS_SENT OTX_T1E1_EC_DL_BITS_RECEIVED

    OtxT1SetRobBitData

    OTX_EXPORT OTX_RESULT OTX_API OtxT1SetRobBitData(IN OTX_HANDLE hLogicDevice, IN OtxT1RobBitDataS * pRobBitData)
    Set the Bit Rob Signalling information (all channels).
    Defined in: OtxT1E1.h

    Parameters

    hLogicDevice
    Handle to the T1 BitRob Access Logical Device
    pRobBitData
    Bit-robbed signalling data to be transmitted. See also OtxT1RobBitDataS

    Comments

    Start bit-rob signalling by calling function OtxDrvEnable and end it with function OtxDrvDisable

    Example


    OTX_INT32 nCurrentLi = 0;
    OtxT1RobBitDataS  g_sqSendRobBitData[2];
    
    // create CAS logical devices hosted in the physical Line Interface devices
    for (i = 0; i < 2; i++) {
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hLi[i],
    	      OTX_LDEVICE_T1_ROB_BIT_ACCESS,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hT1E1Cas[i]);
    
      // enable Logical T1/E1 Cas Devices
      result = OtxDrvEnable(
    	      g_hLogicDevs.hT1E1Cas[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    
    // zero transmitted Rob bits on current Li
    memset(&g_sqSendRobBitData[nCurrentLi], 0, sizeof(OtxT1RobBitDataS));
    result = OtxT1SetRobBitData(
    	    g_hLogicDevs.hT1E1Cas[nCurrentLi],
    	    &g_sqSendRobBitData[nCurrentLi]);
    

    Developer Notes

    Only meaningful in T1 mode and if the OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS is set to OTX_FALSE (which is the default)

    See Also

    OtxT1GetBitRobData
    OtxT1BitRobDataS

    OtxToneConstValGeneratorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneConstValGeneratorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OTX_UINT16 nConstWord)
    Set a constant value (a byte or a word depending on the data format) to be sent on a Pipe.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Format of the Generated Data
    nConstWord
    Constant Value to be sent

    Comments

    Start generation by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    Example


    // create 64 Const Val Generator (32 on DSP#0 and 32 on DSP#1)
    for (i = 0; i < 2; i++) {
      OTX_INT32 j;
      for (j = 0; j < 32; j++) {
        if ((i*32 + j)%16 == 0) continue; // Skip 0 (sync), 16 (signalling), 32 (sync), 48 (signalling)
        // create Const Val Generator logical device
        result = OtxDrvCreateLogicalDevice(
    		g_hPhysDevs.hDsp[i],
    		OTX_LDEVICE_TONE_CONST_VAL_GENERATOR,
    		g_hEventQueue,
    		i*32 + j,
    		&g_sqConstValGenerator[i*32 + j].hHandle);
      }
    }
    
    // pipe creation and connection, see example on
    
    OtxDrvConnectPipe
    // connect logical devices within the DSP
    for (i = 0; i < 2; i++) {
      for (j = 0; j < 32; j++) {
        if ((i*32 + j)%16 == 0) continue; // Skip 0 (sync), 16 (signalling), 32 (sync), 48 (signalling)
    
          // transmit direction
          ts = j;
          memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
          sqTimeSlotMask[ts] = 0xFF;
          nCapacity = 64;
    
          result = OtxDrvCreatePipe(
    		  nCapacity,
    		  &g_sqConstValGenerator[i*32 + j].hPipe);
    
          result = OtxDrvConnectPipe(
    		  g_sqConstValGenerator[i*32 + j].hPipe,
    		  OTX_PIPE_INPUT,
    		  g_hPhysDevs.hDsp[i],
    		  -1,
    		  sqTimeSlotMask,
    		  32);
          result = OtxDrvConnectPipe(
    		  g_sqConstValGenerator[i*32 + j].hPipe,
    		  OTX_PIPE_OUTPUT,
    		  g_hPhysDevs.hLi[i],
    		  -1,
    		  sqTimeSlotMask,
    		  32);
    
          result = OtxDrvConnectLogicalDevice(
    		  g_sqConstValGenerator[i*32 + j].hHandle,
    		  -1,
    		  g_sqConstValGenerator[i*32 + j].hPipe,
    		  -1);
    
    
          // initialize the Const Val Generator (hosted in the DSP)
          result = OtxToneConstValGeneratorInit(
    		  g_sqConstValGenerator[i*32 + j].hHandle,
    		  OTX_DATA_FORMAT_UINT8,
    		  0x55);
    
          // enable Const Val Generator devices
          result = OtxDrvEnable(
    		  g_sqConstValGenerator[i].hHandle,
    		  OTX_TASK_SYNC,
    		  5000L);
      }
    }
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_CONST_VAL_GENERATOR
    OtxDataFormatE
    OtxToneReadVal
    OtxToneSineWaveGeneratorInit
    OtxToneEffectsGeneratorInit
    OtxToneDtmfGeneratorInit
    OtxToneDtmfDiallerInit
    OtxToneDtmfDial
    OtxToneSequenceGeneratorInit

    OtxToneDialtoneDetectorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneDialtoneDetectorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OTX_INT32 nToneDuration)
    Configures the Dial Tone Detector. A dial tone is detected when a dial tone has been present for the time period specied with parameter nToneDuration.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Monitored Data Stream
    nToneDuration
    Time (in 12.75ms increments) that dialtone must be present to be reported

    Comments

    Start detection by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    See Also

    OtxDrvCreateLogicalDevice
    OtxDataFormatE
    OTX_LDEVICE_TONE_DIALTONE_DETECTOR
    OtxToneDialtoneDetectorStatus
    OtxToneDtmfDetectorInit
    OtxToneFskDetectorInit

    To Do



    OtxToneDialtoneDetectorStatus

    OTX_EXPORT OTX_RESULT OTX_API OtxToneDialtoneDetectorStatus(IN OTX_HANDLE hDevice, OUT OTX_BOOL * bDialtone)
    Reports whether the Dial Tone Detector has detected a dial tone or not
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    bDialtone
    OTX_TRUE if Dial Tone present, OTX_FALSE if not

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_DIALTONE_DETECTOR
    OtxToneDialtoneDetectorInit
    OtxToneDtmfDetectorStatus
    OtxToneSilenceDetectorStatus

    To Do



    OtxToneDtmfDetectorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneDtmfDetectorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OTX_BOOL bStoreInQueue)
    Configures the DTMF Detector.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Monitored Data Stream
    bStoreInQueue
    If OTX_TRUE, generate events and store the received digits in the Event QueusFifo, If OTX_FALSE Don't store. Provide polling test with function OtxToneDtmfDetectorStatus

    Comments

    The received digits can either be stored in the Event Queue and be extracted with the appropriate Read function, or they can be stored internally in which case only the most recently received digit can be retrieved with a call to function OtxToneDtmfDetectorStatus

    Start detection by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    see example on OtxToneDtmfDiallerInit

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_DTMF_DETECTOR
    OtxDataFormatE
    OtxToneDtmfDetectorStatus
    OtxToneSilenceDetectorInit
    OtxToneDialtoneDetectorInit
    OtxToneFskDetectorInit

    OtxToneDtmfDetectorStatus

    OTX_EXPORT OTX_RESULT OTX_API OtxToneDtmfDetectorStatus(IN OTX_HANDLE hDevice, OUT char * cDtmfDigit)
    This function allows the user to poll and check for the most recently received DTMF tone. If a tone was received, the function returns OTX_S_OK and the last digit is in the cDtmfDigit parameter. If no tone was detected, the function returns OTX_S_FALSE.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    cDtmfDigit
    Most recent DTMF digit detected (or \\0 if none)

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_DTMF_DETECTOR
    OtxToneDtmfDetectorInit
    OtxToneSilenceDetectorStatus

    To Do



    OtxToneDtmfDial

    OTX_EXPORT OTX_RESULT OTX_API OtxToneDtmfDial(IN OTX_HANDLE hDevice, IN OTX_UINT8 sqDigits[], IN OTX_INT32 nDigits, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Set the number to be dialled by the DTMF dialler.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    sqDigits[]
    Digits to send
    nDigits
    Number of digits to send
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Comments

    Start dialling by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    Example


    char *g_sqNumber0 = "0123456789ABCD*#";
    OTX_INT32 nDigits = strlen(g_sqNumber0);
    OTX_HANDLE hHandle = g_hLogicDevs.hDtmfDialler[nCurrentLi];
    
    // sending digits on current Line, will receive Event when completed
    result = OtxToneDtmfDial(
    	    hHandle,
    	    (OTX_UINT8 *)g_sqNumber0,
    	    nDigits,
    	    DEMO_TASK_REF,
    	    OTX_TIME_INFINITY);
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_DTMF_DIALER
    OtxToneConstValGeneratorInit
    OtxToneEffectsGeneratorInit
    OtxToneSineWaveGeneratorInit
    OtxToneDtmfGeneratorInit
    OtxToneDtmfDiallerInit
    OtxToneSequenceGeneratorInit

    OtxToneDtmfDiallerInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneDtmfDiallerInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OTX_INT32 nOnTime, IN OTX_INT32 nOffTime, IN OtxToneGainE eToneGain)
    Initialize the DTMF sequence generator. The time between tone can be specified in the 'nSilence' parameter, and the duration of each tone is determined by the valued of the 'nDuration' parameter.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Generated DTMF digits
    nOnTime
    Duration of DTMF tones in milliseconds, 12.75 milliseconds resolution (0 for infinity)
    nOffTime
    Silence time between of DTMF tones in increments of 12.75ms
    eToneGain
    Digital gain of generated tone

    Comments

    To set the number to be dialled, call function OtxToneDtmfDial

    Start generation by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    Example


    // create DTMF logical devices
    {
      OTX_RESULT result;
      OTX_INT32  i;
    
      for (i = 0; i < 2; i++) {
        // create Dtmf Detector Logical Devices
        result = OtxDrvCreateLogicalDevice(
    		g_hPhysDevs.hDsp[i],
    		OTX_LDEVICE_TONE_DTMF_DETECTOR,
    		g_hEventQueue,
    		i,
    		&g_hLogicDevs.hDtmfDetector[i]);
    
        // create DTMF Dialers Logical Devices
        result = OtxDrvCreateLogicalDevice(
    		g_hPhysDevs.hDsp[i],
    		OTX_LDEVICE_TONE_DTMF_DIALER,
    		g_hEventQueue,
    		i,
    		&g_hLogicDevs.hDtmfDialler[i]);
    
      }
    }
    
    // connect devices
    {
      OTX_INT32 nLi;
      OTX_INT32 nDsp;
      OTX_INT32 i;
      OTX_RESULT result;
      OTX_UINT8 sqTimeSlotMask[32];
      OTX_INT32 ts;
    
      for (nDsp = 0; nDsp < 2; nDsp++) {
        result = OtxDrvCreatePipe(
    	τ,
    		&g_hPipes.hLiDspDtmfDetector[i]);
        result = OtxDrvCreatePipe(
    	τ,
    		&g_hPipes.hDspLiDtmfDialer[i]);
      }
    
      // connect pipes for the DTMF Dialer and Detector
      for (nLi = 0; nLi < 2; nLi++) {
    
        // Create two pipes per Li. One pipe to each DSP
        for (i = 0; i < 2; i++) {
    
          nDsp = nLi;
    
          // Connect Pipes
          ts = 1+i;
          memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
          sqTimeSlotMask[ts] = 0xFF;
    
          result = OtxDrvConnectPipe(
    		  g_hPipes.hLiDspDtmfDetector[nDsp],
    		  OTX_PIPE_INPUT,
    		  g_hPhysDevs.hLi[nLi],
    		  -1,
    		  sqTimeSlotMask,
    		  32);
          result = OtxDrvConnectPipe(
    		  g_hPipes.hDspLiDtmfDialer[nDsp],
    		  OTX_PIPE_OUTPUT,
    		  g_hPhysDevs.hLi[nLi],
    		  -1,
    		  sqTimeSlotMask,
    		  32);
    
          result = OtxDrvConnectPipe(
    		  g_hPipes.hLiDspDtmfDetector[nDsp],
    		  OTX_PIPE_OUTPUT,
    		  g_hPhysDevs.hDsp[nDsp],
    		  -1,
    		  NULL,
    		  0);
          result = OtxDrvConnectPipe(
    		  g_hPipes.hDspLiDtmfDialer[nDsp],
    		  OTX_PIPE_INPUT,
    		  g_hPhysDevs.hDsp[nDsp],
    		  -1,
    		  NULL,
    		  0);
        }
      }
    } // connect devices
    
    // connect logical devices in DSP
    for (i = 0; i < 2; i++) {
    
      // make the following connections in receive direction:
      // Li ---> DtmfDetector
      result = OtxDrvConnectLogicalDevice(
    	      g_hPipes.hLiDspDtmfDetector[i],
    	      -1,
    	      g_hLogicDevs.hDtmfDetector[i],
    	      -1);
    
      // make the following connections in transmit direction:
      // DtmfDialler   -----> Li
      result = OtxDrvConnectLogicalDevice(
    	      g_hLogicDevs.hDtmfDialler[i],
    	      -1,
    	      g_hPipes.hDspLiDtmfDialer[i],
    	      -1);
    }
    
    for (i = 0; i < 2; i++) {
      // initialize DTMF logical devices
    
      // Initialize the DTMF Detector
      result = OtxToneDtmfDetectorInit(
    	      g_hLogicDevs.hDtmfDetector[i],
    	      OTX_DATA_FORMAT_COMPAND8_A_LAW,
    	      OTX_TRUE);
    
      // Initialize the DTMF Diallers
      result = OtxToneDtmfDiallerInit(
    	      g_hLogicDevs.hDtmfDialler[i],
    	      OTX_DATA_FORMAT_COMPAND8_A_LAW,
    	      8,
    	      8,
    	      OTX_TONE_GAIN_0DB);
    
      // enable DTMF logical device
      result = OtxDrvEnable(
    	      g_hLogicDevs.hDtmfDetector[i],
    	      OTX_TASK_SYNC,
    	      5000L);
      result = OtxDrvEnable(
    	      g_hLogicDevs.hDtmfDialler[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_DTMF_DIALER
    OtxDataFormatE
    OtxToneGainE
    OtxToneConstValGeneratorInit
    OtxToneEffectsGeneratorInit
    OtxToneSineWaveGeneratorInit
    OtxToneDtmfGeneratorInit
    OtxToneDtmfDial
    OtxToneSequenceGeneratorInit

    OtxToneDtmfGeneratorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneDtmfGeneratorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OTX_UINT8 nDigit, IN OtxToneGainE eToneGain)
    Initialize the DTMF generator. The DTMF generator will generate one DTMF tone infinitely.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Generated DTMF digit
    nDigit
    Digit to be generated
    eToneGain
    Digital gain of generated tone

    Comments

    Start generation by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    See Also

    OtxDrvCreateLogicalDevice
    OtxDataFormatE
    OtxToneGainE
    OTX_LDEVICE_TONE_DTMF_GENERATOR
    OtxToneConstValGeneratorInit
    OtxToneEffectsGeneratorInit
    OtxToneSineWaveGeneratorInit
    OtxToneDtmfDiallerInit
    OtxToneDtmfDial
    OtxToneSequenceGeneratorInit

    To Do



    OtxToneDualDetectorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneDualDetectorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OTX_UINT32 sqFreq[], IN OTX_INT32 coFreq, IN OTX_BOOL bStoreInQueue, IN OTX_BOOL bReportPause, IN OTX_INT16 nMinDuration)
    Configures the Dual Tone Detector.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Monitored Data Stream
    sqFreq[]
    An array of up to 6 frequencies to be detected.
    coFreq
    Number of elements in sqFreq
    bStoreInQueue
    If OTX_TRUE, generate events and store the received digits
    bReportPause
    If OTX_TRUE the detector generates an event when a tone ends
    nMinDuration
    Minimum duration required to validate a digit

    Comments

    The dual tone detector can detect a number tone pairs (two-frequency tones). The frequencies to detect are supplied as a parameter to this function. This device can handle 6 frequencies (FreqA through FreqF). When a certain dual tone is detected, an event is generated and the detected dual tone is coded according to the table below.
    The Dual Tone detector device is highly configurable to be able to detect various tones of various amplitudes. This is a brief description of how the device works:


    1. The device gathers 102 samples of tone data (12.75 ms).


    2. It then runs an algorithm for each of the 6 frequencies that the device can work with. The algorithm will produce energy numbers for each frequency. If the buffer of 102 samples contains a frequency component which closely matches one of the detection frequencies it will produce a high energy number for that frequency. If there is a mismatch in frequencies then the energy number will be low.


    3. The code now has 6 energy numbers to work with. It will now run these numbers through a series of tests to see if they pass the thresholds (which can be specified through attributes through API functions). The first test performed is the OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_TONE_ENERGY threshold. The two highest energy values have to be higher than this threshold to pass as a detected tone. The default value for this threshold is 900. Lower values will make the detection criteria less stringent.


    4. The next test is the OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_TWIST threshold. The code will look at the two highest energy levels and calculate their ratio (MaxEnergy/2ndMaxEnergy*100). The ratio must be less than this threshold to pass as a detected tone. The default value for this threshold is 150 (1.5 times). Higher values will make the detection criteria less stringent.


    5. The next test is the OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_RELATIVE_3RD threshold. The code has already looked at the two highest energy levels. It will now look at the third highest energy level. It will calculate the ration between the 2nd highest and the 3rd highest (2ndMaxEnergy/3rdMaxEnergy*100). The ratio must be greater than this threshold to pass as a detected tone. The default value for this threshold is 150 (1.5 times). Lower values will make the detection criteria less stringent.


    6. The last check performed is the duration test. The duration paramter is supplied in this init function. The detection has to generate a positive and consistent result for a number of 12.75 ms buffers in order for the code to generate a detection event to the API.


    If the symptom is that you are not the correct detection events, it might be necessary to adjust the thresholds for the device. To further analyze which threshold that need to be adjusted, the OTX_ATTR_DUAL_TONE_DETECTOR_VERBOSE_STATUS attribute can be set to a value higher than zero, which causes the device to generate OTX_DUAL_TONE_DETECTOR_EC_VERBOSE_STATUS events. Higher values generates more verbose debug information. The m_nParam member of the OTX_DUAL_TONE_DETECTOR_EC_VERBOSE_STATUS event provides the following information:
    The detected tones can either be stored in the Event Queue and be extracted with the appropriate Read function, or they can be stored internally in which case only the most recently received digit can be retrieved with a call to function OtxToneDualDetectorStatus

    Start detection by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    Example

    Dual Tone Coding Matrix
    .         FreqA	 FreqB  FreqC  FreqD  FreqE	 FreqF
    FreqA    { -1,    1,      2,     4,     7,    11  },
    FreqB    {  1,   -1,      3,     5,     8,    12  },
    FreqC    {  2,    3,     -1,     6,     9,    13  },
    FreqD    {  4,    5,      6,    -1,    10,    14  },
    FreqE    {  7,    8,      9,    10,    -1,    15  },
    FreqF    { 11,   12,     13,    14,    15,    -1  }
    
    Verbose Status Information (verbose level 1)
    Bit 15-0: Bit 31-16:                            Event occurs when
    ~~~~~~~~~ ~~~~~~~~~                             ~~~~~~~~~~~~~~~~~~
    2         n2ndMaxEnergy                         THRESHOLD_TONE_ENERGY test has failed to meet criteria
    3         nMaxEnergy/n2ndMaxEnergy*100          THRESHOLD_TWIST test has failed to meet criteria
    4         n2ndMaxEnergy/n3rdMaxEnergy*100       THRESHOLD_RELATIVE_3RD test has failed to meet criteria
    5         nDualTone ID of detected dual tone    Duration consistency test failed. Another dual
    .                                               tone was detected before the end of the required
    .                                               duration.
    
    Verbose Status Information (verbose level 5)
    Bit 15-0: Bit 31-16:                             Event occurs when
    ~~~~~~~~~ ~~~~~~~~~                              ~~~~~~~~~~~~~~~~~~
    20        Energy level of tone index 0           once for every 12.75ms buffer
    21        Energy level of tone index 1           once for every 12.75ms buffer
    22        Energy level of tone index 2           once for every 12.75ms buffer
    23        Energy level of tone index 3           once for every 12.75ms buffer
    24        Energy level of tone index 4           once for every 12.75ms buffer
    25        Energy level of tone index 5           once for every 12.75ms buffer
    

    // create Dula Tone Detector Logical Devices
    for (i = 0; i < 2; i++) {
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hDsp[i],
    	      OTX_LDEVICE_TONE_DUAL_DETECTOR,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hDualToneDetector[i]);
    }
    
    // pipe connection between DSP and LI, see example on
    
    OtxDrvConnectPipe
    // connect logical device
    for (i = 0; i < g_demoEnv.coDsp; i++) {
      // create the following connections in receive direction:
      //  Li --> DualToneDetector
      result = OtxDrvConnectLogicalDevice(
    	      g_hPipes.hLiDspDualToneDetector[i],
    	      -1,
    	      g_hLogicDevs.hDualToneDetector[i],
    	      -1);
    }
    
    // initialize Dual Tone Detector logical devices
    {
      OTX_RESULT result;
      OTX_INT32  i;
    
      OTX_UINT32 nThreshold;
      i = 0;
    
      // get current thresholds
      result = OtxDrvGetAttributeValueUint32(
    	      g_hLogicDevs.hDualToneDetector[i],
    	      OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_TONE_ENERGY,
    	      &nThreshold);
      result = OtxDrvGetAttributeValueUint32(
    	      g_hLogicDevs.hDualToneDetector[i],
    	      OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_PAUSE_ENERGY,
    	      &nThreshold);
      result = OtxDrvGetAttributeValueUint32(
    	      g_hLogicDevs.hDualToneDetector[i],
    	      OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_TWIST,
    	      &nThreshold);
    
      result = OtxDrvGetAttributeValueUint32(
    	      g_hLogicDevs.hDualToneDetector[i],
    	      OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_RELATIVE_3RD,
    	      &nThreshold);
    
    
      // Modifing default thresholds
      nThreshold = 600; // Min tone energy for first and second tones
      result = OtxDrvSetAttributeValueUint32(
    	      g_hLogicDevs.hDualToneDetector[i],
    	      OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_TONE_ENERGY,
    	      nThreshold);
    
      nThreshold = 200;  // Max energy for pause
      result = OtxDrvSetAttributeValueUint32(
    	      g_hLogicDevs.hDualToneDetector[i],
    	      OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_PAUSE_ENERGY,
    	      nThreshold);
    
      nThreshold = 300; // Max ratio HighestEnergy/2ndHighestEnergy*100 (225 = 2.25 times)
      result = OtxDrvSetAttributeValueUint32(
    	      g_hLogicDevs.hDualToneDetector[i],
    	      OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_TWIST,
    	      nThreshold);
    
      nThreshold = 30;  // Min ratio 2ndHighestEnergy/3rdHighestEnergy*100  (30 = 0.3 times)
      result = OtxDrvSetAttributeValueUint32(
    	      g_hLogicDevs.hDualToneDetector[i],
    	      OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_RELATIVE_3RD,
    	      nThreshold);
    
    
      for (i = 0; i < g_demoEnv.coDsp; i++) {
    
        OTX_UINT32    sqFreq[4];       // An array of up to 6 frequencies to be detected.
        OTX_INT32     coFreq = 4;      // Number of elements in <p sqFreq>
    
    
        // 350/440 is dial tone (dualtone index 1)
        // 440/480 is ring tone (dualtone index 3)
        // 480/620 is busy tone (dualtone index 6)
    
        // refer to "Dual Tone Coding Matrix"
        sqFreq[0] = 350;  // Freq A in Hz
        sqFreq[1] = 440;  // Freq B in Hz
        sqFreq[2] = 480;  // Freq C in Hz
        sqFreq[3] = 620;  // Freq D in Hz
    
        // Initialize the Generic Dual Tone Detector. Use a couple of DTMF tone frequencies as an example
        result =  OtxToneDualDetectorInit(
    		g_hLogicDevs.hDualToneDetector[i],
    		g_demoEnv.law,
    		sqFreq,
    		coFreq,
    		OTX_TRUE,
    		OTX_TRUE,
    	⎌);
    
        result = OtxDrvEnable(
    		g_hLogicDevs.hDualToneDetector[i],
    		OTX_TASK_SYNC,
    	𗌘L);
    }
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_DUAL_DETECTOR
    OtxDataFormatE
    OtxToneDualDetectorStatus

    OtxToneDualDetectorStatus

    OTX_EXPORT OTX_RESULT OTX_API OtxToneDualDetectorStatus(IN OTX_HANDLE hDevice, OUT char * nCode)
    This function allows the user to poll and check for the most recently received dual tone. If a tone was received, the function returns OTX_S_OK and the last code is in the cCode parameter. If no tone was detected, the function returns OTX_S_FALSE.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    nCode
    Most recent dual tone code detected (or -1 if none)

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_DUAL_DETECTOR
    OtxToneDualDetectorInit

    To Do



    OtxToneEffectsGeneratorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneEffectsGeneratorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OtxToneEffectE eToneType, IN OtxToneGainE eToneGain)
    Set the tone effects to be generated by tone generator data filter
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Generated Tone
    eToneType
    Type of tone effect to be generated on the channel
    eToneGain
    Digital gain of generated tone

    Comments

    Start generation by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    Example


    // create Tone Effect Generators Logical Devices (one per DSP)
    for (nDsp = 0; nDsp < 2; nDsp++) {
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hDsp[nDsp],
    	      OTX_LDEVICE_TONE_EFFECTS_GENERATOR,
    	      g_hEventQueue,
    	      nDsp,
    	      &g_hLogicDevs.hToneGenerator[nDsp]);
    }
    
    // connect devices
    {
    OTX_INT32 i;
    OTX_RESULT result;
    OTX_UINT8 sqTimeSlotMask[32];
    OTX_INT32 ts;
    
    // create Pipes
    for (i = 0; i < 2; i++) {
      // Dsp <--> Codec
      result = OtxDrvCreatePipe(
    	      64,
    	      &g_hPipes.hDspCodec[i]);  // DSP --> CODEC
      result = OtxDrvCreatePipe(
    	      64,
    	      &g_hPipes.hCodecDsp[i]);  // CODEC --> DSP
      result = OtxDrvCreatePipe(
    	      64,
    	      &g_hPipes.hDspDsp[i]);    // DSP --> DSP
    
    }
    
    for (i = 0; i < 2; i++) {
      // connect one end of the handset Pipes to DSPs
      result = OtxDrvConnectPipe(
    	      g_hPipes.hDspCodec[i],
    	      OTX_PIPE_INPUT,
    	      g_hPhysDevs.hDsp[i],
    	      -1,
    	      NULL,
    	      0);
      result = OtxDrvConnectPipe(
    	      g_hPipes.hCodecDsp[i],
    	      OTX_PIPE_OUTPUT,
    	      g_hPhysDevs.hDsp[i],
    	      -1,
    	      NULL,
    	      0);
    
    }
    
    // connect logical devices within the DSPs
    for (i = 0; i < 2; i++) {
      // transmit direction: Tone Generator --> Codec
      result = OtxDrvConnectLogicalDevice(
    	      g_hLogicDevs.hToneGenerator[i],
    	      -1,
    	      g_hPipes.hDspCodec[i],
    	      -1);
    }
    }
    
    for (i = 0; i < g_demoEnv.iDspNo; i++) {
    
    // initialize the Tone Effect Generators
    result = OtxToneEffectsGeneratorInit(
    	    g_hLogicDevs.hToneGenerator[i],
    	    OTX_DATA_FORMAT_COMPAND8_U_LAW,
    	    OTX_TONE_SINEWAVE,
    	    OTX_TONE_GAIN_0DB);
    }
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_EFFECTS_GENERATOR
    OtxDataFormatE
    OtxToneEffectE
    OtxToneGainE
    OtxToneSineWaveGeneratorInit
    OtxToneConstValGeneratorInit
    OtxToneDtmfGeneratorInit
    OtxToneDtmfDiallerInit
    OtxToneDtmfDial
    OtxToneSequenceGeneratorInit

    OtxToneFskDetectorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneFskDetectorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat)
    Initialize the Logical FSK Detector Device
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Monitored Data Stream

    Comments

    Start detection by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    Example


    // create FSK Detector
    result = OtxDrvCreateLogicalDevice(
    	    g_hPhysDevs.hDsp,
    	    OTX_LDEVICE_TONE_FSK_DETECTOR,
    	    g_hEventQueue,
    	    0,
    	    &g_hLogicDevs.mFskDetector.hHandle);
    
    // pipe connection between DSP and CODEC, see example on
    
    OtxDrvConnectPipe
    // connect logical device
    {
      OTX_HANDLE hPipe;
    
      result = OtxDrvCreatePipe(
    	      64,
    	      &hPipe);
    
      memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
      sqTimeSlotMask[6] = 0xFF;
      result = OtxDrvConnectPipe(
    	      hPipe,
    	      OTX_PIPE_INPUT,
    	      g_hPhysDevs.hLi[0],
    	      -1,
    	      sqTimeSlotMask,
    	      32);
      result = OtxDrvConnectPipe(
    	      hPipe,
    	      OTX_PIPE_OUTPUT,
    	      g_hPhysDevs.hDsp,
    	      -1,
    	      sqTimeSlotMask,
    	      32);
    
      // connect the Fsk detector as the sink of this connection
      result = OtxDrvConnectLogicalDevice(
    	      hPipe,
    	      -1,
    	      g_hLogicDevs.mFskDetector.hHandle,
    	      -1);
    }
    
    // Initialize FSK Detector
    result = OtxToneFskDetectorInit(
    	    g_hLogicDevs.mFskDetector.hHandle,
    	    OTX_DATA_FORMAT_COMPAND8_A_LAW);
    
    // enable FSK Detector (always on)
    result = OtxDrvEnable(
    	    g_hLogicDevs.mFskDetector.hHandle,
    	    OTX_TASK_SYNC,
    	    5000L);
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_FSK_DETECTOR
    OtxDataFormatE
    OtxToneSilenceDetectorInit
    OtxToneDtmfDetectorInit
    OtxToneDialtoneDetectorInit

    OtxToneMfDetectorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneMfDetectorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OtxMfToneE eMfToneType, IN OTX_BOOL bStoreInQueue, IN OTX_BOOL bReportPause, IN OTX_INT16 nMinDuration)
    Configures the MF Detector.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Monitored Data Stream
    eMfToneType
    Type of MF Tone to detect (see OtxMfToneE)
    bStoreInQueue
    If OTX_TRUE, generate events and store the received digits in the Event QueusFifo, If OTX_FALSE Don't store. Provide polling test with function OtxToneMfDetectorStatus
    bReportPause
    If OTX_TRUE the detector generates an event when a tone ends
    nMinDuration
    Minimum duration required to validate a digit

    Comments

    The received digits can either be stored in the Event Queue and be extracted with the appropriate Read function, or they can be stored internally in which case only the most recently received digit can be retrieved with a call to function OtxToneMfDetectorStatus

    Start detection by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    see example on OtxToneMfDiallerInit

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_MF_DETECTOR
    OtxDataFormatE
    OtxMfToneE
    OtxToneMfDetectorStatus

    OtxToneMfDetectorStatus

    OTX_EXPORT OTX_RESULT OTX_API OtxToneMfDetectorStatus(IN OTX_HANDLE hDevice, OUT char * nDigit)
    This function allows the user to poll and check for the most recently received MF tone. If a tone was received, the function returns OTX_S_OK and the last digit is in the cDigit parameter. If no tone was detected, the function returns OTX_S_FALSE.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    nDigit
    Most recent digit detected (or -1 if none)

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_MF_DETECTOR
    OtxToneMfDetectorInit

    To Do



    OtxToneMfDial

    OTX_EXPORT OTX_RESULT OTX_API OtxToneMfDial(IN OTX_HANDLE hDevice, IN OTX_UINT8 sqDigits[], IN OTX_INT32 nDigits, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Dial a string of MF digits (tones).
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    sqDigits[]
    Digits/Tones (see OtxMfToneE) to send. The digits can either be specified as a numeric value (0-15), or as characters '0' through '9' and 'a' through 'f' (where 'a' through 'f' represents 10 through 15). Please not that the R1 digits are in the range of 0-14, and the R2 digits are in the range of 1-15.
    nDigits
    Number of digits/tones to send
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Comments

    This function is a non-blocking function. The event OTX_MF_DIALER_EC_COMPLETE is generated when the device has completed dialing the specified string of MF digits.

    Example


    static OTX_INT32 nCurrentLi = 0;
    OTX_HANDLE hHandle = g_hLogicDevs.hMfDialler[nCurrentLi];
    char *sqDigitString;
    
    switch (g_demoEnv.eMfToneType) {
      case OTX_TONE_MF_R1:
        sqDigitString = "0123456789abcde";
        break;
      case OTX_TONE_MF_R2_FORWARD:
      case OTX_TONE_MF_R2_BACKWARD:
        sqDigitString = "123456789abcdef";
        break;
      default:
        sqDigitString = "1";
        break;
     }
    
    // dial MF digit string, will receive Event when completed
    result = OtxToneMfDial(
    	    hHandle,
    	    (OTX_UINT8 *)sqDigitString,
    	    strlen(sqDigitString),
    	    DEMO_TASK_REF,
    	    OTX_TIME_INFINITY);
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_MF_DIALER
    OtxToneMfDiallerInit

    OtxToneMfDiallerInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneMfDiallerInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OtxMfToneE eMfToneType, IN OTX_INT32 nOnTime, IN OTX_INT32 nOffTime, IN OtxToneGainE eToneGain)
    Initialize the MF sequence generator. The time between tone can be specified in the 'nSilence' parameter, and the duration of each tone is determined by the valued of the 'nDuration' parameter.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Generated DTMF digits
    eMfToneType
    Type of MF Tone to detect (see OtxMfToneE)
    nOnTime
    Duration of MF tones in milliseconds, 12.75 milliseconds resolution (0 for infinity)
    nOffTime
    Silence time between of MF tones in milliseconds, 12.75 milliseconds resolution
    eToneGain
    Digital gain of generated tone

    Comments

    To set the number to be dialled, call function OtxToneMfDial

    Example


    // createLogicalDevices(
    for (i = 0; i < 2; i++) {
      // create Sinewave Receiver (MF Tone Detector) logical devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hDsp[i],
    	      OTX_LDEVICE_TONE_MF_DETECTOR,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hSineWaveReceiver[i]);
    
      // create MF Dialers Logical Devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hDsp[i],
    	      OTX_LDEVICE_TONE_MF_DIALER,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hMfDialler[i]);
    
    }
    
    // connect devices(
    {
      OTX_INT32 nLi;
      OTX_INT32 nDsp;
      OTX_INT32 i;
      OTX_RESULT result;
      OTX_UINT8 sqTimeSlotMask[32];
      OTX_INT32 ts;
    
      // connect HDLC pipes
      for (i = 0; i < 2; i++) {
        // Create an incoming and outgoing Pipe representing the external T1/E1
        result = OtxDrvCreatePipe(
    	τ,
    		&g_hPipes.hLiIn[i]);
        result = OtxDrvCreatePipe(
    	τ,
    		&g_hPipes.hLiOut[i]);
    
        // Connect external T1/E1 pipes. Only connect one end of each pipe.
        if (g_demoEnv.eT1E1Mode == OTX_T1E1_MODE_T1) {
          // T1 mode
          ts = 24;
        } else {
          // E1 mode
          ts = 16;
        }
        memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
        sqTimeSlotMask[ts] = 0xFF;
        result = OtxDrvConnectPipe(
    		g_hPipes.hLiIn[i],
    		OTX_PIPE_OUTPUT,
    		g_hPhysDevs.hLi[i],
    	[,
    		sqTimeSlotMask, 32);
        result = OtxDrvConnectPipe(
    		g_hPipes.hLiOut[i],
    		OTX_PIPE_INPUT,
    		g_hPhysDevs.hLi[i],
    	[,
    		sqTimeSlotMask,
    	Τ);
    
        // Connect HDLC Sender and Receiver to the external T1/E1 Pipes
        result = OtxDrvConnectLogicalDevice(
    		g_hPipes.hLiIn[i],
    		-1,
    		g_hLogicDevs.hHdlcReceiver[i],
    		-1);
        result = OtxDrvConnectLogicalDevice(
    		g_hLogicDevs.hHdlcSender[i],
    		-1,
    		g_hPipes.hLiOut[i],
    		-1);
      }
    }
    
    // connect logical devices in DSP
    for (i = 0; i < 2; i++) {
      // create pipes
      result = OtxDrvCreatePipe(
    	      64,
    	      &g_hPipes.hLiDspSineWaveReceiver[i]);
      result = OtxDrvCreatePipe(
    	      64,
    	      &g_hPipes.hDspLiSineWaveSender[i]);
    
      // make the following connections in receive direction:
      result = OtxDrvConnectLogicalDevice(
    	      g_hPipes.hLiDspSineWaveReceiver[i],
    	      -1,
    	      g_hLogicDevs.hSineWaveReceiver[i],
    	      -1);
    
      // make the following connections in transmit direction:
      result = OtxDrvConnectLogicalDevice(
    	      g_hLogicDevs.hMfDialler[i],
    	      -1,
    	      g_hPipes.hDspLiSineWaveSender[i],
    	      -1);
    
    }
    
    for (i = 0; i < 2; i++) {
      // initialize MF logical devices
    
      // initialize the SineWave Receiver (MF Tone Detector)
      result = OtxToneMfDetectorInit(
    	      g_hLogicDevs.hSineWaveReceiver[i],
    	      OTX_DATA_FORMAT_COMPAND8_A_LAW,
    	      OTX_TONE_MF_R1,
    	      OTX_TRUE,
    	      OTX_FALSE,
    	      25);
    
      // initialize the MF Diallers
      result = OtxToneMfDiallerInit(
    	      g_hLogicDevs.hMfDialler[i],
    	      OTX_DATA_FORMAT_COMPAND8_A_LAW,
    	      OTX_TONE_MF_R1,
    	      50,
    	      25,
    	      OTX_TONE_GAIN_0DB);
    
      // enable MF logical device
      result = OtxDrvEnable(
    	      g_hLogicDevs.hSineWaveReceiver[i],
    	      OTX_TASK_SYNC,
    	      5000L);
      result = OtxDrvEnable(
    	      g_hLogicDevs.hMfDialler[i],
    	      OTX_TASK_SYNC,
    	      5000L);
    }
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_MF_DIALER
    OtxDataFormatE
    OtxMfToneE
    OtxToneGainE
    OtxToneMfDial

    OtxToneReadVal

    OTX_EXPORT OTX_RESULT OTX_API OtxToneReadVal(IN OTX_HANDLE hDevice, OUT OTX_UINT16 * nVal)
    Reads one value (a byte or a word depending on the data format) from a specified Channel
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    nVal
    Value received on a Pipe

    To Do



    OtxToneSequenceGeneratorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneSequenceGeneratorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OTX_TIME nOnTime, IN OTX_TIME nOffTime, IN OtxToneGainE eToneGain)
    Initialize the Single Frequency sequence generator. The time between tones can be specified in the 'nOffTime' parameter, and the duration of each tone is determined by the valued of the 'nOntime' parameter.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Generated DTMF digits
    nOnTime
    Length of (tones) in milliseconds
    nOffTime
    Delay between (tones) in milliseconds
    eToneGain
    Digital gain of generated tone

    Comments

    Start generation by calling the function OtxToneFrequencySequencySend

    See Also

    OtxDrvCreateLogicalDevice
    OtxDataFormatE
    OtxToneGainE
    OTX_LDEVICE_TONE_SEQUENCE_GENERATOR
    OtxToneFrequencySequencySend
    OtxToneConstValGeneratorInit
    OtxToneEffectsGeneratorInit
    OtxToneSineWaveGeneratorInit
    OtxToneDtmfGeneratorInit
    OtxToneDtmfDiallerInit

    To Do



    OtxToneSequenceSend

    OTX_EXPORT OTX_RESULT OTX_API OtxToneSequenceSend(IN OTX_HANDLE hDevice, IN OTX_INT32 sqFreqs[], IN OTX_INT32 nTones, IN OTX_TASK_REF nTaskRef, IN OTX_TIME nWaitMaxMs)
    Send a frequency sequence.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    sqFreqs[]
    Frequencies to send in Hz
    nTones
    Number of Frequencies (tones) to send
    nTaskRef
    See OTX_TASK_REF
    nWaitMaxMs
    See OTX_TIME

    Comments

    Set the duration lengths and the gain of the tone by calling the function OtxToneSequenceGeneratorInit

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_SEQUENCE_GENERATOR
    OtxToneSequenceGeneratorInit
    OtxToneDtmfDial

    To Do



    OtxToneSilenceDetectorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneSilenceDetectorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OTX_INT32 nSilenceDuration, IN OTX_INT32 nThreshold)
    Configures the Silence Detector. A silence is detected when a certain number of received samples have a combined energy level of less than the specified threshold.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Monitored Data Stream
    nSilenceDuration
    Time (in 12.75ms increments) that silence must be present to be reported
    nThreshold
    Low thresHold stipulates very silent silence for silence to be reported; Higher thresHold accepts noise in the silence and silence is still being reported Typical value to be used: 4000

    Comments

    Start detection by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    Example


    // create silence Detector
    result = OtxDrvCreateLogicalDevice(
    	  g_hPhysDevs.hDsp,
    	  OTX_LDEVICE_TONE_SILENCE_DETECTOR,
    	  g_hEventQueue,
    	  0,
    	  &g_hLogicDevs.mSilenceDetector.hHandle);
    
    // pipe connection between DSP and CODEC, see example on
    
    OtxDrvConnectPipe
    // connect logical device
    {
      OTX_HANDLE hPipe;
    
      result = OtxDrvCreatePipe(
    	      64,
    	      &hPipe);
    
      memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
      sqTimeSlotMask[6] = 0xFF;
      result = OtxDrvConnectPipe(
    	      hPipe,
    	      OTX_PIPE_INPUT,
    	      g_hPhysDevs.hLi[0],
    	      -1,
    	      sqTimeSlotMask,
    	      32);
      result = OtxDrvConnectPipe(
    	      hPipe,
    	      OTX_PIPE_OUTPUT,
    	      g_hPhysDevs.hDsp,
    	      -1,
    	      sqTimeSlotMask,
    	      32);
    
      // connect the silence detector as the sink of this connection
      result = OtxDrvConnectLogicalDevice(
    	      hPipe,
    	      -1,
    	      g_hLogicDevs.mSilenceDetector.hHandle,
    	      -1);
    }
    
    // Initialize Silence Detector
    result = OtxToneSilenceDetectorInit(
    	    g_hLogicDevs.mSilenceDetector.hHandle,
    	    OTX_DATA_FORMAT_COMPAND8_A_LAW,
    	    2,
    	    2000);
    
    // enable Silence Detector (always on)
    result = OtxDrvEnable(
    	    g_hLogicDevs.mSilenceDetector.hHandle,
    	    OTX_TASK_SYNC,
    	    5000L);
    

    See Also

    OtxDrvCreateLogicalDevice
    OtxDataFormatE
    OTX_LDEVICE_TONE_SILENCE_DETECTOR
    OtxToneSilenceDetectorStatus
    OtxToneDtmfDetectorInit
    OtxToneFskDetectorInit

    OtxToneSilenceDetectorStatus

    OTX_EXPORT OTX_RESULT OTX_API OtxToneSilenceDetectorStatus(IN OTX_HANDLE hDevice, OUT OTX_BOOL * bSilence)
    Reports whether the silence detector has detected silence or a tone
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    bSilence
    OTX_TRUE if silence, OTX_FALSE if tone detected

    Example


    OTX_BOOL  bSilence;
    
    result = OtxToneSilenceDetectorStatus(
    	    g_hLogicDevs.mSilenceDetector.hHandle,
    	    &bSilence);
    
    // display the status: OTX_TRUE if silence, OTX_FALSE if tone detected
    if (bSilence) {
      DemoLogf("s");
    } else {
      DemoLogf(".");
    }
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_SILENCE_DETECTOR
    OtxToneSilenceDetectorInit
    OtxToneDtmfDetectorStatus

    OtxToneSineWaveGeneratorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneSineWaveGeneratorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OtxToneSineWaveDataS sqSineWaveData[], IN OTX_INT32 coSineWaveData, IN OtxToneGainE eToneGain)
    Set the custom parameters for each sinewave component to be generated by the digital sinewave generator. A multiple frequency sinewave tone is specified by using multiple elements in the sqSineWaveData array.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Generated Sinewave
    sqSineWaveData[]
    Array of Sine Wave data (each element specifies one sine wave (frequency and gain))
    coSineWaveData
    Number of elements in sqSineWaveData (1-5)
    eToneGain
    Digital gain of generated tone

    Comments

    Start generation by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable

    Example


    for (i = 0; i < 2; i++) {
    
      // create Sinewave Generator Logical Devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hDsp[i],
    	      OTX_LDEVICE_TONE_SINEWAVE_GENERATOR,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hSineWaveSender[i]);
    }
    
    // pipe creation and connection between DSP and Li, see example on
    
    OtxDrvConnectPipe
    // connect logical devices within the DSP
    for (i = 0; i < g_demoEnv.coDsp; i++) {
    
      // transmit direction:
      // SineWaveGenerator --> Li
      result = OtxDrvConnectLogicalDevice(
    	      g_hLogicDevs.hSineWaveSender[i],
    	      -1,
    	      g_hPipes.hDspLiSineWaveSender[i],
    	      -1);
    }
    
    // use the SineWaveGenerator device to send a tone (a DTMF tone) on current Line
    {
      static OTX_INT32 nCurrentLi = 0;
    
      OTX_RESULT result;
      static OTX_INT32 nDtmfDigit = 0;
    
      // Initialize the SineWave Sender
      OtxToneSineWaveDataS sqSineWaveData[5];
    
      sqSineWaveData[0].nAttenuation = -9; // -9dB is about 25% of maximum amplitude
      sqSineWaveData[0].nPhase       = 0;
    
      sqSineWaveData[1].nAttenuation = -9; // -9dB is about 25% of maximum amplitude
      sqSineWaveData[1].nPhase       = 0;
    
      switch (nDtmfDigit) {
      case 0:
        // DTMF digit 0
        sqSineWaveData[0].nFrequency   = 941;  // in Hz
        sqSineWaveData[1].nFrequency   = 1336; // in Hz
        break;
      case 1:
        // DTMF digit 1
        sqSineWaveData[0].nFrequency   = 697;  // in Hz
        sqSineWaveData[1].nFrequency   = 1209; // in Hz
        break;
      case 2:
        // DTMF digit 2
        sqSineWaveData[0].nFrequency   = 697;  // in Hz
        sqSineWaveData[1].nFrequency   = 1336; // in Hz
        break;
      case 3:
        // DTMF digit 3
        sqSineWaveData[0].nFrequency   = 697;  // in Hz
        sqSineWaveData[1].nFrequency   = 1477; // in Hz
        break;
      case 4:
        // DTMF digit 4
        sqSineWaveData[0].nFrequency   = 770;  // in Hz
        sqSineWaveData[1].nFrequency   = 1209; // in Hz
        break;
      case 5:
        // DTMF digit 5
        sqSineWaveData[0].nFrequency   = 770;  // in Hz
        sqSineWaveData[1].nFrequency   = 1336; // in Hz
        break;
      case 6:
        // DTMF digit 6
        sqSineWaveData[0].nFrequency   = 770;  // in Hz
        sqSineWaveData[1].nFrequency   = 1477; // in Hz
        break;
      case 7:
        // DTMF digit 7
        sqSineWaveData[0].nFrequency   = 852;  // in Hz
        sqSineWaveData[1].nFrequency   = 1209; // in Hz
        break;
      case 8:
        // DTMF digit 8
        sqSineWaveData[0].nFrequency   = 852;  // in Hz
        sqSineWaveData[1].nFrequency   = 1336; // in Hz
        break;
      case 9:
        // DTMF digit 9
        sqSineWaveData[0].nFrequency   = 852;  // in Hz
        sqSineWaveData[1].nFrequency   = 1477; // in Hz
        break;
      }
    
      // initializing SineWave Generator
      result = OtxToneSineWaveGeneratorInit(
    	      g_hLogicDevs.hSineWaveSender[nCurrentLi],
    	      g_demoEnv.law,
    	      sqSineWaveData,
    	      2, // coSineWaveData
    	      OTX_TONE_GAIN_0DB);
    
    
      // enable SineWave Generator
      result = OtxDrvEnable(
    	      g_hLogicDevs.hSineWaveSender[nCurrentLi],
    	      OTX_TASK_SYNC, 5000L);
    }
    

    See Also

    OTX_LDEVICE_TONE_SINEWAVE_GENERATOR
    OtxDataFormatE
    OtxToneSineWaveDataS
    OtxToneGainE
    OtxToneConstValGeneratorInit
    OtxToneEffectsGeneratorInit
    OtxToneDtmfGeneratorInit
    OtxToneDtmfDiallerInit
    OtxToneDtmfDial
    OtxToneSequenceGeneratorInit

    OtxToneSingleDetectorInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneSingleDetectorInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat, IN OTX_UINT32 sqFreq[], IN OTX_INT32 coFreq, IN OTX_BOOL bStoreInQueue, IN OTX_BOOL bReportPause, IN OTX_INT16 nMinDuration)
    Configures the Single Tone Detector.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Data Format of the Monitored Data Stream
    sqFreq[]
    An array of up to 6 frequencies to be detected.
    coFreq
    Number of elements in sqFreq
    bStoreInQueue
    If OTX_TRUE, generate events and store the received digits
    bReportPause
    If OTX_TRUE the detector generates an event when a tone ends
    nMinDuration
    Minimum duration required to validate a digit

    Comments

    The Single tone detector can detect a Single tone. The frequencies to detect are supplied as a parameter to this function. This device can handle 6 frequencies (FreqA through FreqF). When a certain single tone is detected, an event is generated and the detected single tone is coded according to the table below.
    The detected tones can either be stored in the Event Queue and be extracted with the appropriate Read function, or they can be stored internally in which case only the most recently received digit can be retrieved with a call to function OtxToneSingleDetectorStatus

    Start detection by calling the function OtxDrvEnable and stop generation by calling the function OtxDrvDisable
    The Single Tone detector device is highly configurable to be able to detect various tones of various amplitudes. This is a brief description of how the device works:


    1. The device gathers 102 samples of tone data (12.75 ms).


    2. It then runs an algorithm for each of the 6 frequencies that the device can work with. The algorithm will produce energy numbers for each frequency. If the buffer of 102 samples contains a frequency component which closely matches one of the detection frequencies it will produce a high energy number for that frequency. If there is a mismatch in frequencies then the energy number will be low.


    3. The code now has 6 energy numbers to work with. It will now run these numbers through a series of tests to see if they pass the thresholds (which can be specified through attributes through API functions). The first test performed is the OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_TONE_ENERGY threshold. The two highest energy values have to be higher than this threshold to pass as a detected tone. The default value for this threshold is 1000. Lower values will make the detection criteria less stringent.


    4. The next check performed is the duration test. The duration paramter is supplied in this init function. The detection has to generate a positive and consistent result for a number of 12.75 ms buffers in order for the code to generate a detection event to the API.


    5. The last test is the OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_VARIANCE_ENERGY threshold. The code has already found the highest energy level. This threshold determines how much the energy level is allow to vary from one 12.75ms buffer to the next. The code will look at the current energy level and compare to the average energy level detected so far. The default value for this threshold is 200. Higher values will make the detection criteria less stringent.


    If noticing symptoms of incorrect detection events, it might be necessary to adjust the thresholds for the device. To further analyze which threshold that need to be adjusted, the OTX_ATTR_SINGLE_TONE_DETECTOR_VERBOSE_STATUS attribute can be set to a value higher than zero, which causes the device to generate OTX_SINGLE_TONE_DETECTOR_EC_VERBOSE_STATUS events. Higher values generates more verbose debug information. The m_nParam member of the OTX_SINGLE_TONE_DETECTOR_EC_VERBOSE_STATUS event provides the following information:

    Example

    Single Tone Coding Matrix
    FreqA    {0}
    FreqB    {1}
    FreqC    {2}
    FreqD    {3}
    FreqE    {4}
    FreqF    {5}
    
    Verbose Status Information (verbose level 1)
    Bit 15-0: Bit 31-16:                     Event occurs when
    ~~~~~~~~~ ~~~~~~~~~                      ~~~~~~~~~~~~~~~~~~
    2         n2ndMaxEnergy                  THRESHOLD_TONE_ENERGY test has failed to meet criteria
    5         Index of detected dual tone    Duration consistency test failed. Another dual
    6         nMaxEnergy                     THRESHOLD_VARIANCE test has failed to meet criteria. The
    .                                        energy level varied beyond the threshold (when compared
    .                                        to the average energy level detected so far.
    
    Verbose Status Information (verbose level 5)
    Bit 15-0: Bit 31-16:                     Event occurs when
    ~~~~~~~~~ ~~~~~~~~~                      ~~~~~~~~~~~~~~~~~~
    20        Energy level of tone index 0   for every 12.75ms buffer
    21        Energy level of tone index 1   for every 12.75ms buffer
    22        Energy level of tone index 2   for every 12.75ms buffer
    23        Energy level of tone index 3   for every 12.75ms buffer
    24        Energy level of tone index 4   for every 12.75ms buffer
    25        Energy level of tone index 5   for every 12.75ms buffer
    

    for (i = 0; i < 2; i++) {
      // Create Single Tone Detector Logical Devices
      result = OtxDrvCreateLogicalDevice(
    	      g_hPhysDevs.hDsp[i],
    	      OTX_LDEVICE_TONE_SINGLE_DETECTOR,
    	      g_hEventQueue,
    	      i,
    	      &g_hLogicDevs.hSingleToneDetector[i]);
    }
    
    // pipe connection between DSP and LI, see example on
    
    OtxDrvConnectPipe
    // connect logical device
    for (i = 0; i < 2; i++) {
      // create the following Connections in receive direction:
      // Li --> SingleToneDetector
      result = OtxDrvConnectLogicalDevice(
    	      g_hPipes.hLiDspSingleToneDetector[i],
    	      -1,
    	      g_hLogicDevs.hSingleToneDetector[i],
    	      -1);
    }
    
    // initialize Single Tone Detector logical devices
    {
    OTX_RESULT result;
    OTX_INT32  i;
    
    OTX_UINT32 nThreshold;
    i = 0;
    
    // get current thresholds
    result = OtxDrvGetAttributeValueUint32(
    	    g_hLogicDevs.hSingleToneDetector[i],
    	    OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_TONE_ENERGY,
    	    &nThreshold);
    result = OtxDrvGetAttributeValueUint32(
    	    g_hLogicDevs.hSingleToneDetector[i],
    	    OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_VARIANCE_ENERGY,
    	    &nThreshold);
    result = OtxDrvGetAttributeValueUint32(
    	    g_hLogicDevs.hSingleToneDetector[i],
    	    OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_PAUSE_ENERGY,
    	    &nThreshold);
    
    // Modifing default thresholds
    nThreshold = 1000;
    // set OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_TONE_ENERGY
    result = OtxDrvSetAttributeValueUint32(
    	    g_hLogicDevs.hSingleToneDetector[i],
    	    OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_TONE_ENERGY,
    	    nThreshold);
    
    nThreshold = 200;
    // set OTX_ATTR_SINGLE_VARIANCE_DETECTOR_THRESHOLD_TONE_ENERGY
    result = OtxDrvSetAttributeValueUint32(
    	    g_hLogicDevs.hSingleToneDetector[i],
    	    OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_VARIANCE_ENERGY,
    	    nThreshold);
    
    nThreshold = 200;
    // set OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_PAUSE_ENERGY
    result = OtxDrvSetAttributeValueUint32(
    	    g_hLogicDevs.hSingleToneDetector[i],
    	    OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_PAUSE_ENERGY,
    	    nThreshold);
    }
    
    for (i = 0; i < 2; i++) {
    
    OTX_UINT32    sqFreq[2];     // An array of up to 6 frequencies to be detected.
    OTX_INT32     coFreq = 2;    // Number of elements in <p sqFreq>
    
    sqFreq[0] = 440;  // Freq A in Hz
    sqFreq[1] = 620;  // Freq B in Hz
    
    // initialize the Generic Single Tone Detector. Use a couple of DTMF tone frequencies as an example
    result =  OtxToneSingleDetectorInit(
    	     g_hLogicDevs.hSingleToneDetector[i],
    	     OTX_DATA_FORMAT_COMPAND8_A_LAW,
    	     sqFreq,
    	     coFreq,
    	     OTX_TRUE,
    	     OTX_TRUE,
    	     250);
    
    // enable logical device
    result = OtxDrvEnable(
    	    g_hLogicDevs.hSingleToneDetector[i],
    	    OTX_TASK_SYNC,
    	    5000L);
    }
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_SINGLE_DETECTOR
    OtxDataFormatE
    OtxToneSingleDetectorStatus

    OtxToneSingleDetectorStatus

    OTX_EXPORT OTX_RESULT OTX_API OtxToneSingleDetectorStatus(IN OTX_HANDLE hDevice, OUT char * nCode)
    This function allows the user to poll and check for the most recently received single tone. If a tone was received, the function returns OTX_S_OK and the last code is in the cCode parameter. If no tone was detected, the function returns OTX_S_FALSE.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    nCode
    Most recent single tone code detected (or -1 if none)

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_SINGLE_DETECTOR
    OtxToneSingleDetectorInit

    To Do



    OtxToneValSamplerInit

    OTX_EXPORT OTX_RESULT OTX_API OtxToneValSamplerInit(IN OTX_HANDLE hDevice, IN OtxDataFormatE eDataFormat)
    Configure a sampler device that allows to read a sample of an incoming 64kbps pipe.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    eDataFormat
    Format of the sample

    Comments

    Call OtxToneValSamplerReadData to read the sample.

    Example


    // create 64 Val Sampler (32 on DSP#0 and 32 on DSP#1)
    for (i = 0; i < 2; i++) {
      OTX_INT32 j;
      for (j = 0; j < 32; j++) {
        if ((i*32 + j)%16 == 0) continue; // Skip 0 (sync), 16 (signalling), 32 (sync), 48 (signalling)
    
        // Create Val Sampler logical device
        result = OtxDrvCreateLogicalDevice(
    		g_hPhysDevs.hDsp[i],
    		OTX_LDEVICE_TONE_VAL_SAMPLER,
    		g_hEventQueue,
    		i*32 + j,
    		&g_sqValSampler[i*32 + j].hHandle);
      }
    }
    
    // pipe creation and connection, see example on
    
    OtxDrvConnectPipe
    // connect logical devices within the DSP
    for (i = 0; i < 2; i++) {
      for (j = 0; j < 32; j++) {
        if ((i*32 + j)%16 == 0) continue; // Skip 0 (sync), 16 (signalling), 32 (sync), 48 (signalling)
    
          // receive direction:
          ts = j;
          memset(sqTimeSlotMask, 0, 32 * sizeof(OTX_UINT8));
          sqTimeSlotMask[ts] = 0xFF;
          nCapacity = 64;
    
          result = OtxDrvCreatePipe(
    		  nCapacity,
    		  &g_sqValSampler[i*32 + j].hPipe);
          result = OtxDrvConnectPipe(
    		  g_sqValSampler[i*32 + j].hPipe,
    		  OTX_PIPE_OUTPUT,
    		  g_hPhysDevs.hDsp[i],
    		  -1,
    		  sqTimeSlotMask,
    		  32);
          result = OtxDrvConnectPipe(
    		  g_sqValSampler[i*32 + j].hPipe,
    		  OTX_PIPE_INPUT,
    		  g_hPhysDevs.hLi[i],
    		  -1,
    		  sqTimeSlotMask,
    		  32);
    
          result = OtxDrvConnectLogicalDevice(
    		  g_sqValSampler[i*32 + j].hPipe,
    		  -1,
    		  g_sqValSampler[i*32 + j].hHandle,
    		  -1);
    
          // initialize the Val Sampler (hosted in the DSP)
          result = OtxToneValSamplerInit(
    		  g_sqValSampler[i*32 + j].hHandle,
    		  OTX_DATA_FORMAT_UINT8);
    
          // enable Const Val Sampler devices
          result = OtxDrvEnable(
    		  g_sqValSampler[i*32 + j].hHandle,
    		  OTX_TASK_SYNC, 5000L);
      }
    }
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_VAL_SAMPLER
    OtxDataFormatE
    OtxToneValSamplerReadData

    OtxToneValSamplerReadData

    OTX_EXPORT OTX_RESULT OTX_API OtxToneValSamplerReadData(IN OTX_HANDLE hDevice, OUT OTX_UINT16 * pSample)
    Read an 16-bit sample from a an incoming 64kbps pipe.
    Defined in: OtxTone.h

    Parameters

    hDevice
    Handle to the Logical device
    pSample
    8-bit sample from the pipe

    Example


    static OTX_INT32 nCurrentDialer = 1;
    OTX_UINT16 nSampleVal;
    
    // get sample value from a Dialer
    result = OtxToneValSamplerReadData(
    	    g_sqValSampler[nCurrentDialer].hHandle,
    	    &nSampleVal);
    
    // display it
    DemoLogf("0x%.2X \\n", nSampleVal);
    

    See Also

    OtxDrvCreateLogicalDevice
    OTX_LDEVICE_TONE_VAL_SAMPLER
    OtxToneValSamplerInit

    OTX_ANY_PIPE_TIMESLOTS_MAX

    const #define OTX_ANY_PIPE_TIMESLOTS_MAX;
    Defined in: OtxDef.h
    Maximum number of timeslots on either Local or a H.100 PCM highway.

    OTX_DRIVER_DEVICE_HANDLE

    const #define OTX_DRIVER_DEVICE_HANDLE;
    Defined in: OtxType.h
    Used to communicate with the static driver device. E.g. when reading the Revision attribute from the driver

    OTX_H100_CT_BUS_MAX

    const #define OTX_H100_CT_BUS_MAX;
    Defined in: OtxDef.h
    Maximum number of CT BUS devices

    OTX_H100_HIGHWAYS_MAX

    const #define OTX_H100_HIGHWAYS_MAX;
    Defined in: OtxDef.h
    Maximum number of PCM H100 highways.

    OTX_H100_PIPE_TIMESLOTS_MAX

    const #define OTX_H100_PIPE_TIMESLOTS_MAX;
    Defined in: OtxDef.h
    Maximum number of timeslots on a H.100 PCM highway. A H.100 highway has a capacity of either 2.048 Mbit/s (32 64kbit/s timeslots), 4.096 Mbit/s (64 64kbit/s timeslots), or 8.192 Mbits/s (128 64kbit/s timeslots).

    OTX_INVALID_EVENT_VALUE

    const #define OTX_INVALID_EVENT_VALUE;
    Defined in: OtxType.h
    Used to mark an invalid Event

    OTX_INVALID_HANDLE_VALUE

    const #define OTX_INVALID_HANDLE_VALUE;
    Defined in: OtxType.h
    Used to mark an invalid Handle to Physical and Logical devices. Used as type OTX_HANDLE

    OTX_LIB_HANDLE

    const #define OTX_LIB_HANDLE;
    Defined in: OtxType.h
    Used to communicate with the library. E.g. when reading the Revision attribute from the library

    OTX_LOCAL_HIGHWAYS_MAX

    const #define OTX_LOCAL_HIGHWAYS_MAX;
    Defined in: OtxDef.h
    Maximum number of PCM highways local to one NIC card.

    OTX_LOCAL_PIPE_TIMESLOTS_MAX

    const #define OTX_LOCAL_PIPE_TIMESLOTS_MAX;
    Defined in: OtxDef.h
    Maximum number of timeslots on a local PCM highway. A local highway is a 2.048 Mbit/s highway and it has 32 64kbit/s time-slots.

    OTX_PIPE_TIMESLOTS_MAX

    const #define OTX_PIPE_TIMESLOTS_MAX;
    Defined in: OtxDef.h
    For backwards compatibility

    OTX_TASK_ASYNC

    const #define OTX_TASK_ASYNC;
    Defined in: OtxType.h
    Arbitrary don't care task ref value (avoid using as normal task ref)

    OTX_TASK_NONE

    const #define OTX_TASK_NONE;
    Defined in: OtxType.h
    Received in events that are unreleated to any requested task Do not use as a task ref in API calls

    OTX_TASK_SYNC

    const #define OTX_TASK_SYNC;
    Defined in: OtxType.h
    The only task ref value that causes blocking

    OTX_TIME_INFINITY

    const #define OTX_TIME_INFINITY;
    Defined in: OtxType.h
    Used to mark time infinite time; E.g., timeout that will never expire. Used as type OTX_TIME

    OTX_TOTAL_HIGHWAYS_MAX

    const #define OTX_TOTAL_HIGHWAYS_MAX;
    Defined in: OtxDef.h
    Maximum number of total (Local + H.100) PCM highways.

    OTX_ATTRIB_ID

    Objects (devices, queues and pipes) can be queried about their attributes. Every object type supports different attributes. Each attribute has an ID and a value. The IDs are defined in the scope of the particular object class and unique and meaningful only for the object which defines them. See relevant header files for actual IDs for object attributes.
    Defined in: OtxType.h

    OTX_BOOL

    enum OTX_BOOL {
    	OTX_TRUE,
    	OTX_FALSE,
    };
    
    OTX Specific Boolean Data Type
    Defined in: OtxType.h

    Members

    OTX_TRUE
    True value
    OTX_FALSE
    False Value

    OTX_CHAR

    Character type (8 bits)
    Defined in: OtxType.h

    OTX_DATETIME

    Absolute time in 100 nanosecond increments since midnight Jan 1, 1601, often used for time stamps.
    Defined in: OtxType.h

    OTX_EVENT

    Handle to an Event, OTX_EVENT is treated differently from OTX_HANDLE.
    Defined in: OtxType.h

    OTX_FAILURE

    Generic test for success on any status value (negative numbers indicate failure).
    Defined in: OtxErr.h

    OTX_FP64

    Floating point value, 64 bits precision
    Defined in: OtxType.h

    OTX_HANDLE

    Standard handle to Physical, Logical, Pipe, and Event Queue Devices
    Defined in: OtxType.h

    Example

    OTX_HANDLE bit values layed out as follows
    Only positive values are valid handles.
    Negative values are not valid. Especially, -1 denotes a invalid handle.
    
      Bits  0-27: contain the handle value
      Bit     28: Least significant bit of device type field
      Bit     29: Intermediate bit of device type field
      Bit     30: Most significant bit of device type field
      Bit     31: Must be '0'
    
      |3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
      |1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
      |-+-+-+-+-+-+-+-+-----------------------------------------------+
      |0|D|D|D| | | | |                  HANDLE                       |
      |-+-+-+-+-+-+-+-+-----------------------------------------------+
    
      DDD =
        '001; then handle to a Physical Device
        '010; then handle to a Logical Device
        '011; then handle to a Event Queue Device
        '100; then handle to a Pipe Device
        '101; then handle to a Service
        '110; then handle to a Call
    

    OTX_HDLC_SS7_CB_FISU

    Size of a SS7 FISU (Fill-In Signalling Unit)
    Defined in: OtxHdlcD.h

    OTX_HDLC_SS7_CB_LONG_LSSU

    Size of a SS7 Long LSSU (Link Status Signalling Unit)
    Defined in: OtxHdlcD.h

    OTX_HDLC_SS7_CB_SHORT_LSSU

    Size of a SS7 Short LSSU (Link Status Signalling Unit)
    Defined in: OtxHdlcD.h

    OTX_HDLC_SS7_FILTER_FISU

    Filters identical consecutive FISU frames (LI=0)
    Defined in: OtxHdlcD.h

    OTX_HDLC_SS7_FILTER_FISU_ALL

    Filters all FISU frames (LI=0)
    Defined in: OtxHdlcD.h

    OTX_HDLC_SS7_FILTER_LONG_LSSU

    Filters identical consecutive long LSSU frames (LI=2)
    Defined in: OtxHdlcD.h

    OTX_HDLC_SS7_FILTER_LONG_LSSU_ALL

    Filters all long LSSU frames (LI=2)
    Defined in: OtxHdlcD.h

    OTX_HDLC_SS7_FILTER_MSU

    Filters all MSU frames (LI>2)
    Defined in: OtxHdlcD.h

    OTX_HDLC_SS7_FILTER_SHORT_LSSU

    Filters identical consecutive short LSSU frames (LI=1)
    Defined in: OtxHdlcD.h

    OTX_HDLC_SS7_FILTER_SHORT_LSSU_ALL

    Filters all short LSSU frames (LI=1)
    Defined in: OtxHdlcD.h

    OTX_INT16

    Signed integer, 16 bits
    Defined in: OtxType.h

    OTX_INT32

    Signed integer, 32 bits
    Defined in: OtxType.h

    OTX_INT64

    struct with 64 bits. Organized as a union to simplify access to the two 32 bit parts The bits in the structs are organized so that it can be treated as a 64 bit int using compiler support for calculations when available, see also OsaInt64.
    Defined in: OtxType.h

    OTX_INT8

    Signed integer, 8 bits
    Defined in: OtxType.h

    OTX_ITERATOR

    Opaque data type used to store position information when enumerating (iterating over) e.g. attributes of a driver object. The value should never be interpreted and the type should never be assumed to be of a certain size. An OTX_ITERATOR can never be directly set to any value. instead an OTX_ITERATOR is initialized using OtxDrvIteratorBegin, and checked for if it has reached the end of the sequence with OtxDrvIsIteratorEnd.

    An iterator is first initialized, and then repeatedly passed to one of the enumeration functions available. After an iterator has been initialized it can only be used to iterate over the same sequence, i.e. it can only be passed repeatedly to the same enum function with the same handle.

    To reuse an iterator for anouther enumeration it must be reinitialized with a call to OtxDrvIteratorBegin

    The iterator could be checked for past-end iteration after each return from an enumeration function to stop enumeration when the last item has been examined. If a past-end iterator is passed to an enumeration function an error result code is returned.
    Defined in: OtxType.h

    See Also

    OtxDrvEnumDeviceType OtxDrvEnumDevice OtxDrvIteratorBegin OtxDrvIsIteratorEnd

    OTX_LDEVICE_VALUE

    Convert logical device enum to a value which can be used as an index
    Defined in: OtxDev.h

    OTX_NOTIFY_CAUSE

    Every notification read from an event queue holds a code describing the reason for the notification
    Defined in: OtxType.h

    To Do

    OTX_NOTIFY_CAUSE should maybe be an enum type

    OTX_PVOID

    Void Pointer type (32 bits)
    Defined in: OtxType.h

    OTX_RESULT

    Standard result code returned by all the OTX API functions
    Defined in: OtxType.h

    OTX_RESULT_CODE

    Return the result portion of the return code
    Defined in: OtxErr.h

    OTX_RESULT_ERRORCODE

    Return the error code without the severity flag
    Defined in: OtxErr.h

    OTX_RESULT_EX_LINE_NUM

    Return the line number from the source identifier
    Defined in: OtxErr.h

    OTX_RESULT_EX_SOURCE_ID

    Return the source identifier
    Defined in: OtxErr.h

    OTX_RESULT_SEVERITY

    Return the severity portion of the return code
    Defined in: OtxErr.h

    OTX_SUCCESS

    Generic test for success on any status value (non-negative numbers indicate success).
    Defined in: OtxErr.h

    OTX_TASK_REF

    Used for function calls that can not always be completed without waiting for device operations. If the task remains pending after the function has returned (usually with OTX_E_PENDING) a notification will be received in the associated event queue when the operation completes. The notification contains the reference value that was given in the function call. Note that value '0' is special.

    A pending task can be cancelled. by the user with OtxCancelTask. Also the task is automatically cancelled at the end of the specified timeout period. If not completed or manually cancelled before. Cancelled tasks result in notifications queued in the associated event queue. Note that a task is always associated with a device and a device is may be associated with an event queue. The task is associated with its associated device's event queue.
    Defined in: OtxType.h

    '0'
    Blocking call, tries to complete operation before given timeout. Operation completed or cancelled when the function returns. No notifications ever queued in the associated event queue.
    >='1'
    Non-blocking call. Function returns immediately either with the result of the requested operation or with task left as pending, in which case a notification is queued in the associated event queue when the operation completes. The notification contains the associated task reference so the user knows which operation completed. If the user do not care about keeping track of when particular tasks are completed, it is possible to always pass a task reference with the same non-zero value.

    OTX_TIME

    Relative time in milliseconds, often used for timeouts.
    Defined in: OtxType.h

    OTX_UINT16

    Unsigned integer, 16 bits
    Defined in: OtxType.h

    OTX_UINT32

    Unsigned integer, 32 bits
    Defined in: OtxType.h

    OTX_UINT64

    struct with 64 bits. Organized as a union to simplify access to the two 32 bit parts The bits in the structs are organized so that it can be treated as a 64 bit unsigned int using compiler support for calculations when available, see also OsaUint64.
    Defined in: OtxType.h

    OTX_UINT8

    Unsigned integer, 8 bits
    Defined in: OtxType.h

    OtxAttribTypeE

    enum OtxAttribTypeE {
    	OTX_ATTRIB_SZ,
    	OTX_ATTRIB_UINT32,
    	OTX_ATTRIB_BOOL,
    	OTX_ATTRIB_OCTETS,
    };
    
    Objects (devices, queues and pipes) can be queried about their attributes. Every object type supports different attributes but the values of each attribute is always one of these types.
    Defined in: OtxType.h

    Members

    OTX_ATTRIB_SZ
    The attribute value is of type 'zero terminated string', i.e. an array of 8 bit char.
    OTX_ATTRIB_UINT32
    The attribute is a 32 bit value.
    OTX_ATTRIB_BOOL
    The attribute is a 32 bit boolean value.
    OTX_ATTRIB_OCTETS
    The attribute is an arbitrary collection of octets.

    OtxBoardDeviceAttributesE

    enum OtxBoardDeviceAttributesE {
    	OTX_ATTR_BRD_SERIAL_NUMBER,
    	OTX_ATTR_BRD_BUILD,
    	OTX_ATTR_BRD_CIS_REV,
    	OTX_ATTR_BRD_CPLD_BUILD,
    	OTX_ATTR_BRD_BUS_ADDRESS,
    	OTX_ATTR_BRD_PCMCIA_SOCKET_NUMBER,
    	OTX_ATTR_BRD_PCI_DEVICE_NUMBER,
    	OTX_ATTR_BRD_PCI_FUNCTION_NUMBER,
    	OTX_ATTR_BRD_USER_STRING,
    	OTX_ATTR_BRD_PCMCIA_DONGLE_TYPE,
    	OTX_ATTR_BRD_DPC_MAX_TIMESLICE,
    	OTX_ATTR_BRD_PNP_ID,
    	OTX_ATTR_BRD_PCMCIA_AMP_DONGLE_0,
    	OTX_ATTR_BRD_PCMCIA_AMP_DONGLE_1,
    	OTX_ATTR_BRD_DEVICE_ID,
    	OTX_ATTR_BRD_SUBSYSTEM_ID,
    	OTX_ATTR_BRD_DSP_PORTS_DISABLED,
    	OTX_ATTR_BRD_LED_OVERRIDE,
    	OTX_ATTR_BRD_LED_COUNT,
    	OTX_ATTR_BRD_LED_STATE,
    	OTX_ATTR_BRD_DSP_SOURCED,
    	OTX_ATTR_BRD_FALC_SOURCED,
    	OTX_ATTR_BRD_S2P_SOURCED,
    	OTX_ATTR_BRD_FREQUENCY_COUNTER,
    	OTX_ATTR_BRD_RESET_ON_OPEN,
    };
    
    Board Device Attributes
    Defined in: OtxBrdD.h

    Members

    OTX_ATTR_BRD_SERIAL_NUMBER
    (OTX_ATTRIB_SZ) Read only. Serial Number of the board (ALL boards)
    OTX_ATTR_BRD_BUILD
    (OTX_ATTRIB_SZ) Read only. Board population build (ALL boards)
    OTX_ATTR_BRD_CIS_REV
    (OTX_ATTRIB_SZ) Read only. CIS Revision Number (PCMCIA boards)
    OTX_ATTR_BRD_CPLD_BUILD
    (OTX_ATTRIB_SZ) Read only. FUTURE USE: CPLD Build (PCI boards)
    OTX_ATTR_BRD_BUS_ADDRESS
    (OTX_ATTRIB_UINT32) Read only. WDM driver only. Bus specific location address for the board
    OTX_ATTR_BRD_PCMCIA_SOCKET_NUMBER
    (OTX_ATTRIB_UINT32) Read only. PCMCIA Socket number (0,1). (PCMCIA boards)
    OTX_ATTR_BRD_PCI_DEVICE_NUMBER
    (OTX_ATTRIB_UINT32) Read only. Device number of the PCI board (PCI boards)
    OTX_ATTR_BRD_PCI_FUNCTION_NUMBER
    (OTX_ATTRIB_UINT32) Read only. Function number of the PCI board (PCI boards)
    OTX_ATTR_BRD_USER_STRING
    (OTX_ATTRIB_SZ) Read only. User supplied string stored persistently on the board
    OTX_ATTR_BRD_PCMCIA_DONGLE_TYPE
    (OTX_ATTRIB_SZ) Read/Write. For PCMCIA boards. Product number (HMA) of attached dongle. The driver provides customized transmit pulse masks (E1/T1 span) for each dongle type.
    Thor-2-PCMCIA board supports the following dongles:
    HMA-1021-1-1.0-P1 (standard dongle, preliminary version)
    HMA-1021-1-1.0 (standard dongle, released version)
    HMA-1074-1-1.0-P1 (monitor dongle, preliminary version)
    Thor-2-PCMCIA-Plus board supports the following dongles:
    HMA-1076-2-1.0-P1 (Generator dongle, for battery powered equipment, preliminary version)
    HMA-1079-2-1.0-P1 (Monitor dongle, for battery powered equipment, preliminary version)
    HMA-1079-2-1.0 (Monitor dongle, switchable 0dB and 20dB amplification, for battery powered equipment, released version)
    OTX_ATTR_BRD_DPC_MAX_TIMESLICE
    (OTX_ATTRIB_UINT32) Read/Write. Maximum allowed time (in milliseconds) to spend serving device interrupts. If this time is execeeded the devices generating interrupts at an abnormal rate will be disabled (to prevent system from hanging)
    OTX_ATTR_BRD_PNP_ID
    (OTX_ATTRIB_OCTETS) Read only. Wide-character string. Plug-and-Play Id of this board. Only applicable for the WDM driver.
    OTX_ATTR_BRD_PCMCIA_AMP_DONGLE_0
    (OTX_ATTRIB_BOOL) Read/Write. Dongle for Li#0. Only applicable for Thor-2-PCMCIA-Plus, Thor-2-PCMCIA-CST, Thor-2-PCMCIA-EX, and Thor-2-PCMCIA-PRO cards equipped with the HMA-1079-2-1.0 dongle. The 20dB amplifier is turned on by setting this attribute to OTX_TRUE. This attribute has the same functionality as the OTX_ATTR_T1E1_RX_AMPLIFIER attribute, although that attribute uses the handle to the T1/E1 device, versus this attribute that uses the handle to the board itself.
    OTX_ATTR_BRD_PCMCIA_AMP_DONGLE_1
    (OTX_ATTRIB_BOOL) Read/Write. Dongle for Li#1. Only applicable for Thor-2-PCMCIA-Plus, Thor-2-PCMCIA-CST, Thor-2-PCMCIA-EX, and Thor-2-PCMCIA-PRO cards equipped with the HMA-1079-2-1.0 dongle. The 20dB amplifier is turned on by setting this attribute to OTX_TRUE. This attribute has the same functionality as the OTX_ATTR_T1E1_RX_AMPLIFIER attribute, although that attribute uses the handle to the T1/E1 device, versus this attribute that uses the handle to the board itself.
    OTX_ATTR_BRD_DEVICE_ID
    (OTX_ATTRIB_UINT32) Read only. The Device ID is the first number of the Product number for the board. E.g. the device number for Thor-2-PCI (HAA-1022-1) is 1022.
    OTX_ATTR_BRD_SUBSYSTEM_ID
    (OTX_ATTRIB_UINT32) Read only. The Subsystem ID is contain the revision of the board in the following 32-bit format:
    MMMMMM + NNNN + R + PPPPP
    where
    MMMMMM: Major revision (6 bits)
    NNNN: Minor revision (4 bits)
    R: Released/Preliminary (1 bit), 1=R, 0=P
    PPPPP: Preliminary step (5 bits)
    Example:
    A board of revision 1.0 (released) would have the Subsystem ID of 0x0420.
    A board of revision 1.1-P1 (preliminary) would have the Subsystem ID of 0x0441.
    OTX_ATTR_BRD_DSP_PORTS_DISABLED
    (OTX_ATTRIB_BOOL) Read/Write. Default = OTX_FALSE. By setting this attribute to OTX_TRUE, the clocks (Frame Sync and Data) to the serial ports of the DSPs can be disabled. Leaving theses clocks disabled while loading the DSP programs, and then enabling the clocks, will ensure that the all DSPs in the board are synchronized.
    OTX_ATTR_BRD_LED_OVERRIDE
    (OTX_ATTRIB_BOOL) Read/Write. Default is OTX_FALSE. Set to OTX_TRUE to override the driver control of the boards LEDs (see OTX_ATTR_BRD_LED_STATE)
    OTX_ATTR_BRD_LED_COUNT
    (OTX_ATTRIB_UINT32) Read only. Count of Number of LEDS
    OTX_ATTR_BRD_LED_STATE
    (OTX_ATTRIB_UINT32) Read/Write. State of LED (On, Off, blink or steady, Color, etc).
    The following bit mapping of the value for this attribute applies to the Sleipnir-1-PCI board:
    Bit 0-15: led state
    0x0 = Off ,
    0x1 = ConstantRed ,
    0x2 = ConstantGreen ,
    0x3 = ConstantYellow ,
    0x5 = BlinkRed ,
    0x6 = BlinkGreen ,
    0x7 = BlinkYellow
    Bit 16-31: led number
    0x0 - AUX
    0x1 - FRM ERR
    0x2 - ALARM
    0x3 - LOS/ACT
    OTX_ATTR_BRD_DSP_SOURCED
    (OTX_ATTRIB_UINT32) Read/Write. DSP Sourced value.
    OTX_ATTR_BRD_FALC_SOURCED
    (OTX_ATTRIB_UINT32) Read/Write. Falc Sourced value.
    OTX_ATTR_BRD_S2P_SOURCED
    (OTX_ATTRIB_UINT32) Read/Write. S2P Sourced value.
    OTX_ATTR_BRD_FREQUENCY_COUNTER
    (OTX_ATTRIB_UINT32) Read only. This attribute is available for certain E1/T1 boards like Thor-8-PCI-Plus and Gimle-16-PCI-Plus. The readable attribute contains a counter value that can be used to calculate the frequency of the current clock source (set by OtxBrdSetClocks). This attribute returns the 1 second count of the clock source. For E1, the line frequency is the register value + 1 divided by 8. For T1, the line frequency is the register value +1 times 193 divided by 2048
    OTX_ATTR_BRD_RESET_ON_OPEN
    (OTX_ATTRIB_BOOL) Read/Write. Perform a Reset when the device is opened. The default is OTX_TRUE. If this attribute is OTX_FALSE, the configuration of the board is taken as-is, and the board is not configured. This attribute must be set immediately after the physical board device is opened to have any affect. This attribute setting remains through the lifetime of the board being loaded by the operating system.

    OtxBrdClockModeE

    enum OtxBrdClockModeE {
    	OTX_CLOCK_MODE_NA,
    	OTX_CLOCK_MODE_LOCAL,
    	OTX_CLOCK_MODE_H100,
    	OTX_CLOCK_MODE_H100_ETCF,
    };
    
    Board Clock Mode. Specifies a connection/disconnection to a H.100 bus, clocks to drive, etc.
    Defined in: OtxBrdD.h

    Members

    OTX_CLOCK_MODE_NA
    Board Clock Mode Not Applicable (used on an OTX boards which are not equipped with an H.100 interface, e.g. Thor-2-PCMCIA)
    OTX_CLOCK_MODE_LOCAL
    Board is disconnected (tri-stated) from the H.100 bus
    OTX_CLOCK_MODE_H100
    Board is connected to the H.100 bus (MC-1 mode). If this mode is used with any of the bus driving clock sources (see OtxBrdClockSourceE), this mode will drive the C8A, C8B, FRAMEA and FRAMEB H.100 clocks in MC-1 mode (inverted 4.096 MHz).
    OTX_CLOCK_MODE_H100_ETCF
    Board is connected to the H.100 bus (ETCF mode). If this mode is used with any of the bus driving clock sources (see OtxBrdClockSourceE), this mode will drive the C8A, C8B, FRAMEA and FRAMEB H.100 clocks in ETCF mode (noninverted 8.192 MHz).

    OtxBrdClockSourceE

    enum OtxBrdClockSourceE {
    	OTX_CLOCK_SOURCE_INTERNAL,
    	OTX_CLOCK_SOURCE_CT_NETREF,
    	OTX_CLOCK_SOURCE_A_CLOCKS,
    	OTX_CLOCK_SOURCE_A_CLOCKS_ETCF,
    	OTX_CLOCK_SOURCE_B_CLOCKS,
    	OTX_CLOCK_SOURCE_B_CLOCKS_ETCF,
    	OTX_CLOCK_SOURCE_MVIP,
    	OTX_CLOCK_SOURCE_HMVIP,
    	OTX_CLOCK_SOURCE_SC_BUS_2_MHZ,
    	OTX_CLOCK_SOURCE_SC_BUS_4_8_MHZ,
    	OTX_CLOCK_SOURCE_LOCAL_0,
    	OTX_CLOCK_SOURCE_LOCAL_1,
    	OTX_CLOCK_SOURCE_LOCAL_2,
    	OTX_CLOCK_SOURCE_LOCAL_3,
    	OTX_CLOCK_SOURCE_LOCAL_4,
    	OTX_CLOCK_SOURCE_LOCAL_5,
    	OTX_CLOCK_SOURCE_LOCAL_6,
    	OTX_CLOCK_SOURCE_LOCAL_7,
    	OTX_CLOCK_SOURCE_LOCAL_8,
    	OTX_CLOCK_SOURCE_LOCAL_9,
    	OTX_CLOCK_SOURCE_LOCAL_10,
    	OTX_CLOCK_SOURCE_LOCAL_11,
    	OTX_CLOCK_SOURCE_LOCAL_12,
    	OTX_CLOCK_SOURCE_LOCAL_13,
    	OTX_CLOCK_SOURCE_LOCAL_14,
    	OTX_CLOCK_SOURCE_LOCAL_15,
    };
    
    Board Clock Source. The highways on the OTX boards are all synchronized to one clock. This type (used as parameter to OtxBrdSetClocks) specified the source of this clock.
    Defined in: OtxBrdD.h

    Members

    OTX_CLOCK_SOURCE_INTERNAL
    Board Clock Source Internal Oscillator. The board operates as a clock master. The clock source is the internal oscillator populated on the OTX board. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE).
    OTX_CLOCK_SOURCE_CT_NETREF
    Board Clock Source CT_NETREF The board operates as a clock slave, and slaves to the CT_NETREF clock provided on the H.100 bus.
    OTX_CLOCK_SOURCE_A_CLOCKS
    Board Clock Source A Clocks (C8A & FRAMEA); MC-1 (inverted 4.096 MHz on C8A) The board operates as a clock slave, and slaves to the C8A & FRAMEA clocks provided on the H.100 bus.
    OTX_CLOCK_SOURCE_A_CLOCKS_ETCF
    Board Clock Source A Clocks (C8A & FRAMEA); ETCF (noninverted 8.192 MHz on C8A) The board operates as a clock slave, and slaves to the C8A & FRAMEA clocks provided on the H.100 bus.
    OTX_CLOCK_SOURCE_B_CLOCKS
    Board Clock Source B Clocks (C8B & FRAMEB); MC-1 (inverted 4.096 MHz on C8B) The board operates as a clock slave, and slaves to the C8B & FRAMEB clocks provided on the H.100 bus.
    OTX_CLOCK_SOURCE_B_CLOCKS_ETCF
    Board Clock Source B Clocks (C8B & FRAMEB); ETCF (noninverted 8.192 MHz on C8B) The board operates as a clock slave, and slaves to the C8B & FRAMEB clocks provided on the H.100 bus.
    OTX_CLOCK_SOURCE_MVIP
    Board Clock Source MVIP The board operates as a clock slave, and slaves to the /C4 clock provided on the H.100 bus.
    OTX_CLOCK_SOURCE_HMVIP
    Board Clock Source H-MVIP The board operates as a clock slave, and slaves to the /C16 clock provided on the H.100 bus.
    OTX_CLOCK_SOURCE_SC_BUS_2_MHZ
    Board Clock Source SC-Bus 2 Mhz The board operates as a clock slave, and slaves to the SCLKX2# clock provided on the H.100 bus.
    OTX_CLOCK_SOURCE_SC_BUS_4_8_MHZ
    Board Clock Source SC-Bus 4 or 8 Mhz The board operates as a clock slave, and slaves to the SCLK clock provided on the H.100 bus.
    OTX_CLOCK_SOURCE_LOCAL_0
    Board Clock Source Local Reference 0. The board will recover (slave to) the clock from Local Reference 0. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_1
    Board Clock Source Local Reference 1. The board will recover (slave to) the clock from Local Reference 1. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_2
    Board Clock Source Local Reference 2. The board will recover (slave to) the clock from Local Reference 2. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_3
    Board Clock Source Local Reference 3. The board will recover (slave to) the clock from Local Reference 3. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_4
    Board Clock Source Local Reference 4. The board will recover (slave to) the clock from Local Reference 4. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_5
    Board Clock Source Local Reference 5. The board will recover (slave to) the clock from Local Reference 5. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_6
    Board Clock Source Local Reference 6. The board will recover (slave to) the clock from Local Reference 6. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_7
    Board Clock Source Local Reference 7. The board will recover (slave to) the clock from Local Reference 7. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_8
    Board Clock Source Local Reference 8. The board will recover (slave to) the clock from Local Reference 8. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_9
    Board Clock Source Local Reference 9. The board will recover (slave to) the clock from Local Reference 9. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_10
    Board Clock Source Local Reference 10. The board will recover (slave to) the clock from Local Reference 10. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_11
    Board Clock Source Local Reference 11. The board will recover (slave to) the clock from Local Reference 11. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_12
    Board Clock Source Local Reference 12. The board will recover (slave to) the clock from Local Reference 12. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_13
    Board Clock Source Local Reference 13. The board will recover (slave to) the clock from Local Reference 13. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_14
    Board Clock Source Local Reference 14. The board will recover (slave to) the clock from Local Reference 14. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.
    OTX_CLOCK_SOURCE_LOCAL_15
    Board Clock Source Local Reference 15. The board will recover (slave to) the clock from Local Reference 15. This mode can drive clocks on the H.100 bus (please refer to OtxBrdClockModeE). This mode is board specific. For further details please refer to the documentation for each specific OTX board.

    OtxBrdDevSourcedCodesE

    enum OtxBrdDevSourcedCodesE {
    	OTX_BRD_DSP_SOURCED_FALC,
    	OTX_BRD_DSP_SOURCED_P2S,
    	OTX_BRD_FALC_SOURCED_P2S,
    	OTX_BRD_FALC_SOURCED_DSP,
    	OTX_BRD_S2P_SOURCED_DSP,
    	OTX_BRD_S2P_SOURCED_FALC,
    };
    
    Sourced Attribute Codes (OTX_ATTR_BRD_xxx)
    Defined in: OtxBrdD.h

    Members

    OTX_BRD_DSP_SOURCED_FALC
    DSP is sourced by the Falc
    OTX_BRD_DSP_SOURCED_P2S
    DSP is sourced by the P2S (DMA/Burst) OTX_ATTR_BRD_FALC_SOURCED
    OTX_BRD_FALC_SOURCED_P2S
    Falc is sourced by the P2S (DMA/Burst)
    OTX_BRD_FALC_SOURCED_DSP
    Falc is sourced by the DSP OTX_ATTR_BRD_S2P_SOURCED
    OTX_BRD_S2P_SOURCED_DSP
    S2P (DMA/Burst) is sourced by the DSP
    OTX_BRD_S2P_SOURCED_FALC
    S2P (DMA/Burst) is sourced by the Falc

    OtxBrdEventCodesE

    enum OtxBrdEventCodesE {
    	OTX_BRD_EC_AUTO_DISABLED,
    	OTX_BRD_EC_INTR_FREQ_TOO_HIGH,
    	OTX_BRD_EC_INVALID_INTERRUPT,
    };
    
    Board Event Codes
    Defined in: OtxBrdD.h

    Members

    OTX_BRD_EC_AUTO_DISABLED
    Fatal error has occurred. The board is automatically disabled.
    OTX_BRD_EC_INTR_FREQ_TOO_HIGH
    Interrupt frequency is too high. Data loss is imminent.
    OTX_BRD_EC_INVALID_INTERRUPT
    Invalid interrupt has occurred. Interrupt ignored.

    OtxBrdResultCodesE

    enum OtxBrdResultCodesE {
    ,
    };
    
    Board Result Codes
    Defined in: OtxBrdD.h

    OtxBriLayer1StatusE

    enum OtxBriLayer1StatusE {
    ,
    };
    
    Layer 1 Status
    Defined in: OtxBriD.h

    See Also

    OtxBriGetLineStatus

    OtxBriLiModeE

    enum OtxBriLiModeE {
    	OTX_BRI_MODE_TE,
    	OTX_BRI_MODE_LT_T,
    	OTX_BRI_MODE_LT_S,
    	OTX_BRI_MODE_NT,
    	OTX_BRI_MODE_MON,
    	OTX_BRI_MODE_NO,
    };
    
    BRI Line Interface Operating Modes
    Defined in: OtxBriD.h

    Members

    OTX_BRI_MODE_TE
    The line interface is configured to operate in Terminal mode (as a TE).
    OTX_BRI_MODE_LT_T
    The line interface is configured to operate in Trunk Line Termination mode.
    OTX_BRI_MODE_LT_S
    The line interface is configured to operate in Subscriber Line Termination mode.
    OTX_BRI_MODE_NT
    The line interface is configured to operate in Network Termination mode (as an NT).
    OTX_BRI_MODE_MON
    The line interface is configured to operate in Monitor mode.
    OTX_BRI_MODE_NO
    The line interface has not been configured

    See Also



    OtxBurstDeviceAttributesE

    enum OtxBurstDeviceAttributesE {
    	OTX_ATTR_BURST_TRIGGER,
    	OTX_ATTR_BURST_TX_BUFFER_SIZE,
    	OTX_ATTR_BURST_MAX_TIMESLOTS,
    	OTX_ATTR_BURST_STAT_RECV_STARTS,
    	OTX_ATTR_BURST_STAT_RECV_COMPLETES,
    	OTX_ATTR_BURST_STAT_RECV_PARTIAL,
    	OTX_ATTR_BURST_STAT_RECV_FULL,
    	OTX_ATTR_BURST_STAT_RECV_ABORTS,
    	OTX_ATTR_BURST_STAT_RECV_AMOUNT,
    	OTX_ATTR_BURST_STAT_RECV_ERRORS,
    	OTX_ATTR_BURST_STAT_RECV_OURUNS,
    	OTX_ATTR_BURST_STAT_RECV_OURUNS_USER,
    	OTX_ATTR_BURST_STAT_RECV_DMABUSY,
    	OTX_ATTR_BURST_STAT_RECV_NOTIFY,
    	OTX_ATTR_BURST_STAT_RECV_NOTIFY_PARTIAL,
    	OTX_ATTR_BURST_STAT_SEND_STARTS,
    	OTX_ATTR_BURST_STAT_SEND_COMPLETES,
    	OTX_ATTR_BURST_STAT_SEND_PARTIAL,
    	OTX_ATTR_BURST_STAT_SEND_FULL,
    	OTX_ATTR_BURST_STAT_SEND_ABORTS,
    	OTX_ATTR_BURST_STAT_SEND_AMOUNT,
    	OTX_ATTR_BURST_STAT_SEND_ERRORS,
    	OTX_ATTR_BURST_STAT_SEND_OURUNS,
    	OTX_ATTR_BURST_STAT_SEND_OURUNS_USER,
    	OTX_ATTR_BURST_STAT_SEND_DMABUSY,
    	OTX_ATTR_BURST_STAT_SEND_NOTIFY,
    	OTX_ATTR_BURST_STAT_SEND_NOTIFY_PARTIAL,
    	OTX_ATTR_BURST_GET_FRAME_REF_DATA,
    	OTX_ATTR_BURST_RECEIVER_FIFO_SIZE,
    	OTX_ATTR_BURST_RECEIVER_FIFO_TRIGGER,
    	OTX_ATTR_BURST_SENDER_FIFO_SIZE,
    	OTX_ATTR_BURST_SENDER_FIFO_TRIGGER,
    	OTX_ATTR_BURST_RECEIVER_FIFO_COUNT,
    	OTX_ATTR_BURST_RECEIVER_FIFO_PEAK,
    	OTX_ATTR_BURST_RECEIVER_FIFO_TRIGGER_COUNT,
    	OTX_ATTR_BURST_SENDER_FIFO_COUNT,
    	OTX_ATTR_BURST_SENDER_FIFO_PEAK,
    	OTX_ATTR_BURST_SENDER_FIFO_TRIGGER_COUNT,
    };
    
    DSP Device Attributes
    Defined in: OtxBurstD.h

    Members

    OTX_ATTR_BURST_TRIGGER
    (OTX_ATTRIB_UINT32) Read/Write. DMA transfer signal trigger value (1,2,4,8,16,32).
    OTX_ATTR_BURST_TX_BUFFER_SIZE
    (OTX_ATTRIB_UINT32) Read only. DMA Send buffer size.
    OTX_ATTR_BURST_MAX_TIMESLOTS
    (OTX_ATTRIB_UINT32) Read only. DMA Buffer max timeslots per transfer.
    OTX_ATTR_BURST_STAT_RECV_STARTS
    (OTX_ATTRIB_UINT32) Read only. Number of Recv actual dma transfers initiated.
    OTX_ATTR_BURST_STAT_RECV_COMPLETES
    (OTX_ATTRIB_UINT32) Read only. Number of Recv actual dma transfers completed.
    OTX_ATTR_BURST_STAT_RECV_PARTIAL
    (OTX_ATTRIB_UINT32) Read only. Number of Recv partial transfer due to framemask.
    OTX_ATTR_BURST_STAT_RECV_FULL
    (OTX_ATTRIB_UINT32) Read only. Number of Recv count of max dma size transfers.
    OTX_ATTR_BURST_STAT_RECV_ABORTS
    (OTX_ATTRIB_UINT32) Read only. Number of Recv actual dma transfers aborts.
    OTX_ATTR_BURST_STAT_RECV_AMOUNT
    (OTX_ATTRIB_UINT32) Read only. Number of Recv amount of data transfered.
    OTX_ATTR_BURST_STAT_RECV_ERRORS
    (OTX_ATTRIB_UINT32) Read only. Number of Recv count of processing errors.
    OTX_ATTR_BURST_STAT_RECV_OURUNS
    (OTX_ATTRIB_UINT32) Read only. Number of Recv amount of over runs.
    OTX_ATTR_BURST_STAT_RECV_OURUNS_USER
    (OTX_ATTRIB_UINT32) Read only. Number of Send amount of over runs caused by the user app not reading the data in a timely manner.
    OTX_ATTR_BURST_STAT_RECV_DMABUSY
    (OTX_ATTRIB_UINT32) Read only. Number of Recv count of DMA busy occurances.
    OTX_ATTR_BURST_STAT_RECV_NOTIFY
    (OTX_ATTRIB_UINT32) Read only. Number of Recv logical device notifies.
    OTX_ATTR_BURST_STAT_RECV_NOTIFY_PARTIAL
    (OTX_ATTRIB_UINT32) Read only. Number of Recv logical device notifies - partial.
    OTX_ATTR_BURST_STAT_SEND_STARTS
    (OTX_ATTRIB_UINT32) Read only. Number of Send actual dma transfers initiated.
    OTX_ATTR_BURST_STAT_SEND_COMPLETES
    (OTX_ATTRIB_UINT32) Read only. Number of Send actual dma transfers completed.
    OTX_ATTR_BURST_STAT_SEND_PARTIAL
    (OTX_ATTRIB_UINT32) Read only. Number of Send partial transfer due to framemask.
    OTX_ATTR_BURST_STAT_SEND_FULL
    (OTX_ATTRIB_UINT32) Read only. Number of Send count of max dma size transfers.
    OTX_ATTR_BURST_STAT_SEND_ABORTS
    (OTX_ATTRIB_UINT32) Read only. Number of Send actual dma transfers aborts.
    OTX_ATTR_BURST_STAT_SEND_AMOUNT
    (OTX_ATTRIB_UINT32) Read only. Number of Send amount of data transfered.
    OTX_ATTR_BURST_STAT_SEND_ERRORS
    (OTX_ATTRIB_UINT32) Read only. Number of Send count of processing errors.
    OTX_ATTR_BURST_STAT_SEND_OURUNS
    (OTX_ATTRIB_UINT32) Read only. Number of Send amount of under runs.
    OTX_ATTR_BURST_STAT_SEND_OURUNS_USER
    (OTX_ATTRIB_UINT32) Read only. Number of Send amount of under runs caused by the user app not keeping the data pump primed.
    OTX_ATTR_BURST_STAT_SEND_DMABUSY
    (OTX_ATTRIB_UINT32) Read only. Number of Send count of DMA busy occurances.
    OTX_ATTR_BURST_STAT_SEND_NOTIFY
    (OTX_ATTRIB_UINT32) Read only. Number of Send logical device notifies.
    OTX_ATTR_BURST_STAT_SEND_NOTIFY_PARTIAL
    (OTX_ATTRIB_UINT32) Read only. Number of Send logical device notifies - partial.
    OTX_ATTR_BURST_GET_FRAME_REF_DATA
    (OTX_ATTRIB_UINT32) Read only. Fills a OtxBurstFrameRefAndTime with Burst Frame Reference data.
    OTX_ATTR_BURST_RECEIVER_FIFO_SIZE
    (OTX_ATTRIB_UINT32) Read/Write. Burst Receiver user buffer size.
    OTX_ATTR_BURST_RECEIVER_FIFO_TRIGGER
    (OTX_ATTRIB_UINT32) Read/Write. Burst Receiver user buffer trigger level.
    OTX_ATTR_BURST_SENDER_FIFO_SIZE
    (OTX_ATTRIB_UINT32) Read/Write. Burst Sender user buffer size.
    OTX_ATTR_BURST_SENDER_FIFO_TRIGGER
    (OTX_ATTRIB_UINT32) Read/Write. Burst Sender user buffer trigger level.
    OTX_ATTR_BURST_RECEIVER_FIFO_COUNT
    (OTX_ATTRIB_UINT32) Read Only. Burst Receiver user buffer current level.
    OTX_ATTR_BURST_RECEIVER_FIFO_PEAK
    (OTX_ATTRIB_UINT32) Read Only. Burst Receiver user buffer peak level.
    OTX_ATTR_BURST_RECEIVER_FIFO_TRIGGER_COUNT
    (OTX_ATTRIB_UINT32) Read Only. Burst Receiver user buffer current trigger count
    OTX_ATTR_BURST_SENDER_FIFO_COUNT
    (OTX_ATTRIB_UINT32) Read Only. Burst Sender user buffer current level.
    OTX_ATTR_BURST_SENDER_FIFO_PEAK
    (OTX_ATTRIB_UINT32) Read Only. Burst Sender user buffer peak level.
    OTX_ATTR_BURST_SENDER_FIFO_TRIGGER_COUNT
    (OTX_ATTRIB_UINT32) Read Only. Burst Sender user buffer current trigger count

    OtxBurstEventCodesE

    enum OtxBurstEventCodesE {
    	OTX_BURST_EC_BUFFER_OVERRUN,
    	OTX_BURST_EC_BUFFER_UNDERRUN,
    	OTX_BURST_RECEIVER_EC_DATA_AVAILABLE,
    	OTX_BURST_SENDER_EC_BUF_DEPLETED,
    };
    
    DSP Event Codes
    Defined in: OtxBurstD.h

    Members

    OTX_BURST_EC_BUFFER_OVERRUN
    Receiver data overrun error - data lost
    OTX_BURST_EC_BUFFER_UNDERRUN
    Sender data underrun error
    OTX_BURST_RECEIVER_EC_DATA_AVAILABLE
    Receiver has data available for the user (Receiver trigger level has been hit)
    OTX_BURST_SENDER_EC_BUF_DEPLETED
    Sender buffer has depleted lower than the trigger level. Now accepting more data.

    OtxBurstFrameRefAndTime structure

    struct {
    	OTX_UINT64 m_FrameCounter;
    	OsaDateTime m_FrameDateTime;
    } OtxBurstFrameRefAndTime;
    
    Contains the given Frame Reference Counter, as well as the Frame's System Time. This is used to track the reference time frames from the Burst Device.
    Defined in: OtxBurstD.h

    Members

    m_FrameCounter
    Frame Reference Counter
    m_FrameDateTime
    Absolute time in 100 nanosecond increments since midnight Jan 1, 1601, of the given Frame Counter

    OtxCommonDeviceAttributesE

    enum OtxCommonDeviceAttributesE {
    	OTX_ATTR_DEVICE_HOST,
    	OTX_ATTR_DEVICE_NIC,
    	OTX_ATTR_DEVICE_TYPE,
    	OTX_ATTR_DEVICE_NO,
    	OTX_ATTR_DEVICE_IRP_QUEUE_LIMIT,
    	OTX_ATTR_DEVICE_IRP_QUEUE_SIZE,
    	OTX_ATTR_DEVICE_SYNC_ENABLE,
    	OTX_ATTR_DEVICE_SYNC_DISABLE,
    	OTX_ATTR_DEVICE_STRING,
    };
    
    Common Device Attributes
    Defined in: OtxType.h

    Members

    OTX_ATTR_DEVICE_HOST
    (OTX_ATTRIB_UINT32) Read-only.
    Handle of the host device
    OTX_ATTR_DEVICE_NIC
    (OTX_ATTRIB_UINT32) Read-only.
    Handle of the NIC (board)
    OTX_ATTR_DEVICE_TYPE
    (OTX_ATTRIB_UINT32) Read-only.
    OTX_ATTR_DEVICE_NO
    (OTX_ATTRIB_UINT32) Read-only.
    Device number
    OTX_ATTR_DEVICE_IRP_QUEUE_LIMIT
    (OTX_ATTRIB_UINT32) Read/Write.
    Set (or get) the number of the IO Request Packets (IRP) that the driver can buffer for this device. Setting this attribute will also flush (clear) all pending IRPs for this device.
    OTX_ATTR_DEVICE_IRP_QUEUE_SIZE
    (OTX_ATTRIB_UINT32) Read-only.
    Current number of IO Request Packets (IRP) in the IRP queue for this device.
    OTX_ATTR_DEVICE_SYNC_ENABLE
    (OTX_ATTRIB_UINT32) Read/Write.
    If set to any other value than 0xFFFFFFFF (-1), and if functionality is supported by the device, the device will be enabled at the specified time (device specific counter value). If the case of logical devices hosted by a DSP, the device will be enabled (see OtxDrvEnable) when the Frame Buffer Counter (OTX_ATTR_DSP_FRAME_BUFFER_COUNTER) reaches the specified value. This attribute can therefore be used to synchronize the enabling moment for multiple devices.
    OTX_ATTR_DEVICE_SYNC_DISABLE
    (OTX_ATTRIB_UINT32) Read/Write.
    If set to any other value than 0xFFFFFFFF (-1), and if functionality is supported by the device, the device will be disabled at the specified time (device specific counter value). If the case of logical devices hosted by a DSP, the device will be disabled (see OtxDrvDisable) when the Frame Buffer Counter (OTX_ATTR_DSP_FRAME_BUFFER_COUNTER) reaches the specified value. This attribute can therefore be used to synchronize the disabling moment for multiple devices.
    OTX_ATTR_DEVICE_STRING
    (OTX_ATTRIB_SZ) Read-only.
    Type of the device as a zero terminated string. Informational string only. String could change in future driver releases, and applications should not branch on any value returned by this attribute.

    OtxCommonResultCodesE

    enum OtxCommonResultCodesE {
    	OTX_RES_OK,
    	OTX_RES_FALSE,
    	OTX_RES_SIGNALLED,
    	OTX_RES_TIMEOUT,
    	OTX_RES_PENDING,
    	OTX_RES_UNEXPECTED,
    	OTX_RES_NOTIMPL,
    	OTX_RES_OUTOFMEMORY,
    	OTX_RES_OUT_OF_RESOURCES,
    	OTX_RES_INVALIDARG,
    	OTX_RES_POINTER,
    	OTX_RES_HANDLE,
    	OTX_RES_ABORT,
    	OTX_RES_FAIL,
    	OTX_RES_ACCESSDENIED,
    	OTX_RES_CALL_FAIL,
    	OTX_RES_NO_SUCH_OBJECT,
    	OTX_RES_NOT_SUPPORTED,
    	OTX_RES_REG_NO,
    	OTX_RES_BLOCKED,
    	OTX_RES_NO_INTERRUPT,
    	OTX_RES_WRONG_CONTEXT,
    	OTX_RES_NOT_INITIALIZED,
    	OTX_RES_ALREADY_EXISTS,
    	OTX_RES_IN_USE,
    	OTX_RES_BUSY,
    	OTX_RES_NOT_WORKING,
    	OTX_RES_NOT_CONNECTED,
    	OTX_RES_BUFFER_TO_SMALL,
    };
    
    Common Result Codes
    Defined in: OtxErr.h

    Members

    OTX_RES_OK
    Everything ok.
    OTX_RES_FALSE
    Everything ok, but result is logically false.
    OTX_RES_SIGNALLED
    An event was signalled.
    OTX_RES_TIMEOUT
    A wait operation timed out.
    OTX_RES_PENDING
    The data necessary to complete this operation is not yet available.
    OTX_RES_UNEXPECTED
    Unexpected situation.
    OTX_RES_NOTIMPL
    Not implemented.
    OTX_RES_OUTOFMEMORY
    Creation (new/malloc) failed, i.e. ran out of memory.
    OTX_RES_OUT_OF_RESOURCES
    Ran out of software resources.
    OTX_RES_INVALIDARG
    One or more arguments are invalid.
    OTX_RES_POINTER
    Invalid pointer.
    OTX_RES_HANDLE
    Invalid handle.
    OTX_RES_ABORT
    Operation aborted.
    OTX_RES_FAIL
    Unspecified error.
    OTX_RES_ACCESSDENIED
    General access denied error.
    OTX_RES_CALL_FAIL
    Call into other process failed (e.g. app to driver).
    OTX_RES_NO_SUCH_OBJECT
    Reference to non-existent object or type, etc..
    OTX_RES_NOT_SUPPORTED
    Functionality not supported by the object.
    OTX_RES_REG_NO
    Invalid Register Number.
    OTX_RES_BLOCKED
    Device Blocked.
    OTX_RES_NO_INTERRUPT
    No Interrupt.
    OTX_RES_WRONG_CONTEXT
    Call not allowed in the current context.
    OTX_RES_NOT_INITIALIZED
    Device Object not properly initialized.
    OTX_RES_ALREADY_EXISTS
    Attempted to create an already existing Device Object.
    OTX_RES_IN_USE
    The requested resource is already in use.
    OTX_RES_BUSY
    The requested resource or function cannot service the request at this time.
    OTX_RES_NOT_WORKING
    Device Object is not in working state.
    OTX_RES_NOT_CONNECTED
    Device Object is not connected.
    OTX_RES_BUFFER_TO_SMALL
    Buffer too small for return data.

    Developer Notes

    When result codes are added, remember to add the corresponding string to OdDevice.
    The following macros are kept for backwards compatibility, new code uses OtxCommonResultCodesE instead
    The following macros are kept for backwards compatibility, new code uses OtxCommonResultCodesE instead

    OtxConstValGeneratorEventCodesE

    enum OtxConstValGeneratorEventCodesE {
    ,
    };
    
    Const Val Generator Event Codes
    Defined in: OtxToneD.h

    OtxConstValGeneratorResultCodesE

    enum OtxConstValGeneratorResultCodesE {
    ,
    };
    
    Const Val Generator Error Result Codes
    Defined in: OtxToneD.h

    OtxCtBusDataRateE

    enum OtxCtBusDataRateE {
    ,
    };
    
    DSP Error Result Codes
    Defined in: OtxDrvD.h

    OtxCtBusDeviceAttributesE

    enum OtxCtBusDeviceAttributesE {
    	OTX_ATTR_CTBUS_OTX_TIMESLOTS_PER_HWY,
    	OTX_ATTR_CTBUS_OTX_HWYS,
    };
    
    CtBus Device Attributes
    Defined in: OtxType.h

    Members

    OTX_ATTR_CTBUS_OTX_TIMESLOTS_PER_HWY
    (OTX_ATTRIB_UINT32) Read/Write. Number of timeslot to reserve for OTX pipe connections (on CT Bus Highway 0 through the value assigned to attribute OTX_ATTR_CTBUS_OTX_HWYS) Default is OTX_PIPE_TIMESLOTS_MAX (all timeslot).
    OTX_ATTR_CTBUS_OTX_HWYS
    (OTX_ATTRIB_UINT32) Read/Write. Number of highways to reserve for OTX pipe connections. Default is OTX_H100_HIGHWAYS_MAX (all highways).

    OtxDataConverterEventCodesE

    enum OtxDataConverterEventCodesE {
    ,
    };
    
    Data Converter Event Codes
    Defined in: OtxDataD.h

    OtxDataFormatE

    enum OtxDataFormatE {
    	OTX_DATA_FORMAT_UNKNOWN,
    	OTX_DATA_FORMAT_UINT8,
    	OTX_DATA_FORMAT_UINT16,
    	OTX_DATA_FORMAT_COMPAND8_A_LAW,
    	OTX_DATA_FORMAT_COMPAND8_U_LAW,
    };
    
    Format of the data transmitted on a Pipe
    Defined in: OtxDataD.h

    Members

    OTX_DATA_FORMAT_UNKNOWN
    Unknown or uninitialized data format
    OTX_DATA_FORMAT_UINT8
    Unsigned integer 8 bits. Raw data. Use for example HDLC transmission
    OTX_DATA_FORMAT_UINT16
    Unsigned integer 16-bits. Raw Data, each sample occupying 2 time-slots
    OTX_DATA_FORMAT_COMPAND8_A_LAW
    G.711 A-law (International) companded PCM data (8 bit samples)
    OTX_DATA_FORMAT_COMPAND8_U_LAW
    G.711 U-law (North American) companded PCM data (8 bit samples)

    OtxDeviceEventCodesE

    enum OtxDeviceEventCodesE {
    ,
    };
    
    Generic Device Event Codes
    Defined in: OtxType.h

    OtxDeviceInterfaceE

    enum OtxDeviceInterfaceE {
    ,
    };
    
    Model of a Physical or Logical Devices. Every Physical or Logical Device contain 4 interfaces: Data In, Data Out, Control, and Events.
    Defined in: OtxType.h

    Example

    A Device can be characterized as follows
    <nl>
    <nl>                         Control
    <nl>                 User Handle (OTX_HANDLE)
    <nl>                            |
    <nl>                           \\|/
    <nl>                +----------------------+
    <nl>                |                      |
    <nl>                |     A Physical       |
    <nl>  DATA IN  ---> |         or           | ---> DATA OUT
    <nl>                |     Logical Device   |
    <nl>                |                      |
    <nl>                +----------------------+
    <nl>                            |
    <nl>                           \\|/
    <nl>                        Events Out
    <nl>
    

    OtxDeviceStateE

    enum OtxDeviceStateE {
    	OTX_DEVICE_STATE_UNKNOWN,
    	OTX_DEVICE_WORKING,
    	OTX_DEVICE_BLOCKED_AUTO,
    	OTX_DEVICE_BLOCKED_MANUAL,
    };
    
    State of a Hardware Device. Before a device has been configured, it's state is UNKNOWN. After configuration and call to function OtxDrvEnable can put the device into WORKING state. The driver can automatically block the device and change the state to BLOCKED_AUTO in a case of non-working device. The device can also be manually blocked with function OtxDrvDisable
    Defined in: OtxType.h

    Members

    OTX_DEVICE_STATE_UNKNOWN
    Device state is unknown, device has not been initialized
    OTX_DEVICE_WORKING
    Device is operational
    OTX_DEVICE_BLOCKED_AUTO
    Device is automatically blocked due to an error condition
    OTX_DEVICE_BLOCKED_MANUAL
    Device is manually blocked

    OtxDeviceType

    Generic type for either OtxPhysicalDeviceTypeE or OtxLogicalDeviceTypeE
    Defined in: OtxType.h

    OtxDriverDeviceAttributesE

    enum OtxDriverDeviceAttributesE {
    	OTX_ATTR_DRV_REV_STR,
    	OTX_ATTR_DRV_REV_NUM,
    	OTX_ATTR_DRV_TIMESTAMP_TICK_FREQUENCY,
    	OTX_ATTR_DRV_TIMESTAMP_FROM_1601,
    	OTX_ATTR_DRV_GET_COMPATIBILITY_VERSION,
    };
    
    Driver Device Attributes
    Defined in: OtxType.h

    Members

    OTX_ATTR_DRV_REV_STR
    (OTX_ATTRIB_SZ) Read-only. The Driver revision as a string (E.g "1.0-P62" or "1.0" etc.)
    OTX_ATTR_DRV_REV_NUM
    (OTX_ATTRIB_OCTETS) Read-only. The Driver revision formatted as OtxVersionInfo
    OTX_ATTR_DRV_TIMESTAMP_TICK_FREQUENCY
    (OTX_ATTRIB_UINT32) Read-only. The timestamp tick frequency (in Hz)
    OTX_ATTR_DRV_TIMESTAMP_FROM_1601
    (OTX_ATTRIB_BOOL) Read/Write. If OTX_TRUE (default) the timestamp is generated in 100ns increments from January 1, 1601. If set to OTX_FALSE, the timestamp is generated using the finest grained running count available in the system (QueryPerformanceCounter() in Win32).
    OTX_ATTR_DRV_GET_COMPATIBILITY_VERSION
    (OTX_ATTRIB_SZ) Read-only. The Driver compatibility revision as a string (E.g "1.0-P62" or "1.0" etc.)

    OTXDSP_LDEVICE_USER_APPLICATION

    Reserved. The logical device type is the 8 most significant bits of the OTXDSP_SDK_IOCTL_HANDLE_ADDR address
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_ABORT

    Otx DSP SDK Result Code: Operation aborted
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_ACCESSDENIED

    Otx DSP SDK Result Code: General access denied error
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_ALREADY_EXISTS

    Otx DSP SDK Result Code: Attempted to create an already existing Logical device
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_BLOCKED

    Otx DSP SDK Result Code: Device Blocked
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_CALL_FAIL

    Otx DSP SDK Result Code: Call into other process failed (e.g. app to driver)
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_FAIL

    Otx DSP SDK Result Code: Unspecified error
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_HANDLE

    Otx DSP SDK Result Code: Invalid handle
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_IN_USE

    Otx DSP SDK Result Code: The requested resource is in use by another application
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_IN_USE

    Otx DSP SDK Result Code: The requested resource or function cannot service the request at this time
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_INVALIDARG

    Otx DSP SDK Result Code: One or more arguments are invalid
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_NO_INTERRUPT

    Otx DSP SDK Result Code: No Interrupt
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_NO_SUCH_OBJECT

    Otx result Code: Reference to non-existent object or type, etc.
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_NOT_CONNECTED

    Otx DSP SDK Result Code: The logical device is not connected
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_NOT_INITIALIZED

    Otx DSP SDK Result Code: The OtxXxxxInit() function needs to be called for this logical device
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_NOT_SUPPORTED

    Otx DSP SDK Result Code: Functionality not supported by the logical device
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_NOT_WORKING

    Otx DSP SDK Result Code: The logical device is not in working state
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_NOTIMPL

    Otx DSP SDK Result Code: Not implemented
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_OUT_OF_CONNECTIONS

    Otx DSP SDK Result Code: Connection limit is reached. The DSP code cannot accept more connections until a connection is freed.
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_OUT_OF_RESOURCES

    Otx DSP SDK Result Code: Ran out of software resources
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_OUTOFMEMORY

    Otx DSP SDK Result Code: Creation (new/malloc) failed, i.e. ran out of memory
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_POINTER

    Otx DSP SDK Result Code: Invalid pointer
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_REG_NO

    Otx DSP SDK Result Code: Invalid Register Number
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_TIMEOUT

    Otx DSP SDK Result Code: Timeout
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_UNEXPECTED

    Otx DSP SDK Result Code: Catastrophic failure
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_UNSUPPORTED_DEVICE

    Otx DSP SDK Result Code: The DSP code cannot support the requested Logical Device
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_UNSUPPORTED_IO_CODE

    Otx DSP SDK Result Code: The DSP code does not support this IO code
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_UNSUPPORTED_PIPE_CAPACITY

    Otx DSP SDK Result Code: The DSP code cannot support the requested pipe capacity
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_UNSUPPORTED_VERSION

    Otx DSP SDK Result Code: The DSP code does not support this driver version
    Defined in: DspIoctl.h

    OTXDSP_SDK_E_WRONG_CONTEXT

    Otx DSP SDK Result Code: Call not allowed here
    Defined in: DspIoctl.h

    OTXDSP_SDK_EVENT_NO_COMMAND

    Marks the end of the pending Events to be processed by the host
    Defined in: DspIoctl.h

    OTXDSP_SDK_FAILURE

    Generic test for success on any status value (negative numbers indicate failure).
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_CLOSE

    Issued when OtxDrvClose() is called. Data Length 0
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_CONNECT

    Issued when OtxDrvConnectLogicalDevice() is called. Data is OtxDspSdkIoInConnectS.
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_CREATE

    Issued when OtxDrvCreateLogicalDevice() is called. Data Length 0
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_DISABLE

    Issued when OtxDrvDisable() is called. Data Length 0
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_DISCONNECT

    Issued when OtxDrvDisconnectLogicalDevice() is called. Data is OtxDspSdkIoInDisconnectS.
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_ENABLE

    Issued when OtxDrvEnable() is called. Data Length 0
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_GET_FRAME_BUFFER_COUNTER

    Returns the current Frame Buffer Counter from the DSP. The size of the frame buffer is set by each DSP program.
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_INIT_BSP

    Issued internally from the driver. DSP application should call OtxDspInitBufferedSerialPorts when the driver sends this IO command. Data Length 0
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_INIT_TIMER

    Issued internally from the driver to synchronize the timers used for timestamping. Data Length is 0.
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_NO_COMMAND

    Reserved. Not to be used an IO Control Code. This value should be written to OTXDSP_SDK_IOCTL_CODE_ADDR when the DSP completes the IO packet.
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_RESET

    Issued when OtxDrvReset is called. Data Length 0
    Defined in: DspIoctl.h

    OTXDSP_SDK_IO_START_PROGRAM

    Issued internally from the driver after the program is downloaded to the DSP. DSP application should call OtxDspStartProgram when the driver sends this IO command. Data is OtxDspSdkIoInStartProgramS.
    Defined in: DspIoctl.h

    OTXDSP_SDK_MAX_TIMESLOTS

    Maximum number of timeslots on any OTX highway. Some DSP code will only support maximum 64 timeslots, and some DSP code will only support a maximum of 32 timeslots.
    Defined in: DspIoctl.h

    Developer Notes

    Structs for passing data over the DSP IOCTL interface

    OTXDSP_SDK_RX_DIRECTION

    Otx DSP SDK Receive Direction, i.e. data for the DSP code to process
    Defined in: DspIoctl.h

    OTXDSP_SDK_S_FALSE

    Otx DSP SDK Result Code: Everything ok, but result is logically false
    Defined in: DspIoctl.h

    OTXDSP_SDK_S_OK

    Otx DSP SDK Result Code: Everything ok
    Defined in: DspIoctl.h

    OTXDSP_SDK_S_PENDING

    Otx DSP SDK Result Code: The data necessary to complete this operation is not yet available.
    Defined in: DspIoctl.h

    OTXDSP_SDK_S_SIGNALLED

    Otx DSP SDK Result Code: An event was signalled
    Defined in: DspIoctl.h

    OTXDSP_SDK_S_TIMEOUT

    Otx DSP SDK Result Code: An wait operation timed out
    Defined in: DspIoctl.h

    OTXDSP_SDK_SUCCESS

    Generic test for success on any status value (non-negative numbers indicate success).
    Defined in: DspIoctl.h

    OTXDSP_SDK_TX_DIRECTION

    Otx DSP SDK Transmit Direction, i.e. data generated by the DSP code
    Defined in: DspIoctl.h

    OtxDspDeviceAttributesE

    enum OtxDspDeviceAttributesE {
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_CURRENT_USAGE,
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_MAX_USAGE,
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_LOST_EVENTS,
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_EXT_QUEUE_CURRENT_USAGE,
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_EXT_QUEUE_PEAK_USAGE,
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_ADDR,
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_SIZE,
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_PROCESSING_ADDR,
    	OTX_ATTR_DSP_IOCTL_CODE_ADDR,
    	OTX_ATTR_DSP_IOCTL_DATA_MAX_SIZE,
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_INCLUDE_HANDLE,
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_INCLUDE_TASKREF,
    	OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_INCLUDE_TIMESTAMP,
    	OTX_ATTR_DSP_IOCTL_INCLUDE_HANDLE,
    	OTX_ATTR_DSP_IOCTL_INCLUDE_TASKREF,
    	OTX_ATTR_DSP_AUTO_DISABLE,
    	OTX_ATTR_DSP_FRAME_BUFFER_COUNTER,
    	OTX_ATTR_DSP_FRAME_COUNTER,
    	OTX_ATTR_DSP_HIGHWAY_SPEED,
    	OTX_ATTR_DSP_HIGHWAY_BIT_FREQUENCY,
    };
    
    DSP Device Attributes
    Defined in: OtxDspD.h

    Members

    OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_CURRENT_USAGE
    (OTX_ATTRIB_UINT32) Read-only. Current number of words in use of the HPI Notification Event Buffer
    OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_MAX_USAGE
    (OTX_ATTRIB_UINT32) Read-only. Maximum number of words in use of the HPI Notification Event Buffer (since the application started)
    OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_LOST_EVENTS
    (OTX_ATTRIB_UINT32) Read-only. Number of the lost events (due to a full HPI Notification Event Buffer)
    OTX_ATTR_DSP_NOTIFICATION_EVENT_EXT_QUEUE_CURRENT_USAGE
    (OTX_ATTRIB_UINT32) Read-only. Current number of Notification Event packets in the extended event queue (located outside of the HPI Notification Buffer)
    OTX_ATTR_DSP_NOTIFICATION_EVENT_EXT_QUEUE_PEAK_USAGE
    (OTX_ATTRIB_UINT32) Read-only. Current number of Notification Event packets in the extended event queue (located outside of the HPI Notification Buffer)
    OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_ADDR
    (OTX_ATTRIB_UINT32) Read/Write. Start address of the HPI Notification Event Buffer
    OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_SIZE
    (OTX_ATTRIB_UINT32) Read/Write. Size (in words) of the HPI Notification Event Buffer
    OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_PROCESSING_ADDR
    (OTX_ATTRIB_UINT32) Read/Write. Address of where the host driver will write the address of its Notification Event Buffer Read Pointer (i.e. the address of where it will read the next Notification Event from)
    OTX_ATTR_DSP_IOCTL_CODE_ADDR
    (OTX_ATTRIB_UINT32) Read/Write. Start address of the DSP IO Control packet.
    OTX_ATTR_DSP_IOCTL_DATA_MAX_SIZE
    (OTX_ATTRIB_UINT32) Read/Write. Maximum data length of the DSP IO Control packet.
    OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_INCLUDE_HANDLE
    (OTX_ATTRIB_BOOL) Read/Write. If OTX_TRUE the DSP code must include the DSP Handle in the Notification Events
    OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_INCLUDE_TASKREF
    (OTX_ATTRIB_BOOL) Read/Write. If OTX_TRUE the DSP code must include the TaskRef in the Notification Events
    OTX_ATTR_DSP_NOTIFICATION_EVENT_BUF_INCLUDE_TIMESTAMP
    (OTX_ATTRIB_BOOL) Read/Write. If OTX_TRUE the DSP code must include the TimeStamp in the Notification Events
    OTX_ATTR_DSP_IOCTL_INCLUDE_HANDLE
    (OTX_ATTRIB_BOOL) Read/Write. If OTX_TRUE the host driver will include the DSP Handle in the DSP IO Control packet
    OTX_ATTR_DSP_IOCTL_INCLUDE_TASKREF
    (OTX_ATTRIB_BOOL) Read/Write. If OTX_TRUE the host driver will include the TaskRef in the DSP IO Control packet
    OTX_ATTR_DSP_AUTO_DISABLE
    (OTX_ATTRIB_BOOL) Read/Write. Default OTX_TRUE. If OTX_TRUE the driver will automatically disable the device if the Notification Event buffer encounters to many serious errors. A call to OtxDrvReset will reset the error counter for serious errors.
    OTX_ATTR_DSP_FRAME_BUFFER_COUNTER
    (OTX_ATTRIB_UINT32) Read only. The Frame Buffer Counter is a 16 bit value which is incremented by the DSP code every time it receives another buffer interrupt (highway serial port). Since each DSP is clocked from the same Frame Sync clock this counter can be used to synchronize certain events (such as a synchronized enabling of multiple devices). The counter will wrap once it reaches 0xFFFF. The size of the frame buffer (auto buffer) is set by each DSP program, but the Frame sync pulse always occurs every 125 us.
    OTX_ATTR_DSP_FRAME_COUNTER
    (OTX_ATTRIB_UINT32) Read only. The Frame Counter is a 16 bit value which is incremented by the DSP code every time it receives another buffer interrupt (highway serial port). It is similar to the OTX_ATTR_DSP_FRAME_BUFFER_COUNTER attribute except that this counter is incremented by the number of frames in each buffer. Therefore this attribute can be used to get an accurate count of how many frames that the DSP has received since the DSP was started. The time difference between each frame is 125us.
    OTX_ATTR_DSP_HIGHWAY_SPEED
    (OTX_ATTRIB_UINT32) Read only. DSP Highway speed in kbps. Valid values are 2048, 4096, and 8192. The highway speed determines how many timeslots that the DSP can work with. On a 2048 kpbs highway there are 32 timeslots. On a 4096 kbps highway there are 64 timeslots, and on an 8192 kpbs highway there are 128 timeslots.
    OTX_ATTR_DSP_HIGHWAY_BIT_FREQUENCY
    (OTX_ATTRIB_UINT32) Read only.
    If supported by the loaded DSP program, this attribute returns the bit frequency of the DSP highway in Hertz.

    OtxDspEventCodesE

    enum OtxDspEventCodesE {
    	OTX_DSP_EC_RX_OVERFLOW,
    	OTX_DSP_EC_INTERNAL_ERROR,
    	OTX_DSP_EC_UNKNOWN_NOTIFY_CODE,
    	OTX_DSP_EC_INVALID_NOTIFY_EVENT_HANDLE,
    	OTX_DSP_EC_NOTIFY_EVENT_OVERFLOW,
    	OTX_DSP_EC_AUTO_DISABLED,
    	OTX_DSP_EC_NOTIFY_EVENT_FREQ_HIGH,
    };
    
    DSP Event Codes
    Defined in: OtxDspD.h

    Members

    OTX_DSP_EC_RX_OVERFLOW
    OtxSpm1 Receive overflow
    OTX_DSP_EC_INTERNAL_ERROR
    OtxSpm1 Undefined Internal error
    OTX_DSP_EC_UNKNOWN_NOTIFY_CODE
    OtxSpm1 Error. Unknown notify code for System Notify Event Handle.
    OTX_DSP_EC_INVALID_NOTIFY_EVENT_HANDLE
    Invalid Notify Event Handle. Could not find a matching logical device for this handle.
    OTX_DSP_EC_NOTIFY_EVENT_OVERFLOW
    Event frequency too high. Driver cannot handle all these events.
    OTX_DSP_EC_AUTO_DISABLED
    Fatal error has occurred. The device is automatically disabled.
    OTX_DSP_EC_NOTIFY_EVENT_FREQ_HIGH
    Event frequency from the DSP is seriously high. Fatal errors are imminent. OTX_DSP_EC_DEBUG_INFO = 0x07, // @emem Internal use. For driver debugging.

    OtxDspResultCodesE

    enum OtxDspResultCodesE {
    	OTX_DSP_RES_DATA_TOO_LARGE,
    	OTX_DSP_RES_INVALID_CHANNEL,
    	OTX_DSP_RES_COMM_FAILURE,
    	OTX_DSP_RES_NO_KERNEL_RESPONSE,
    	OTX_DSP_RES_NO_FREE_LOGICAL_DEVICE,
    };
    
    DSP Error Result Codes
    Defined in: OtxDspD.h

    Members

    OTX_DSP_RES_DATA_TOO_LARGE
    Data too large for the supplied buffer. Supply a larger buffer.
    OTX_DSP_RES_INVALID_CHANNEL
    Invalid channel
    OTX_DSP_RES_COMM_FAILURE
    Communication failure with the DSP
    OTX_DSP_RES_NO_KERNEL_RESPONSE
    No response from DSP Kernel
    OTX_DSP_RES_NO_FREE_LOGICAL_DEVICE
    No free logical device

    OtxDspSdkIoInConnectS structure

    struct {
    	short nDirection;
    	short nCapacity;
    	unsigned short sqConnectMask[OTXDSP_SDK_MAX_TIMESLOTS/2];
    	unsigned short coMaskSize;
    	unsigned short hPipeHandleLowPart;
    	unsigned short hPipeHandleHighPart;
    } OtxDspSdkIoInConnectS;
    
    Data for the OTXDSP_SDK_IO_CONNECT IO Control code
    Defined in: DspIoctl.h

    Members

    nDirection
    Either OTXDSP_SDK_RX_DIRECTION or OTXDSP_SDK_TX_DIRECTION
    nCapacity
    Pipe capacity in kbytes/s
    sqConnectMask[OTXDSP_SDK_MAX_TIMESLOTS/2]
    Timeslots to connect to on the DSP Highway
    coMaskSize
    Actual number of timeslots used in sqConnectMask
    hPipeHandleLowPart
    Lower 16 bits of the host's handle for this pipe
    hPipeHandleHighPart
    Upper 16 bits of the host's handle for this pipe

    OtxDspSdkIoInDisconnectS structure

    struct {
    	short nDirection;
    	short nCapacity;
    	unsigned short sqConnectMask[OTXDSP_SDK_MAX_TIMESLOTS/2];
    	unsigned short coMaskSize;
    	unsigned short hPipeHandleLowPart;
    	unsigned short hPipeHandleHighPart;
    } OtxDspSdkIoInDisconnectS;
    
    Data for the OTXDSP_SDK_IO_DISCONNECT IO Control code
    Defined in: DspIoctl.h

    Members

    nDirection
    Either OTXDSP_SDK_RX_DIRECTION or OTXDSP_SDK_TX_DIRECTION
    nCapacity
    Pipe capacity in kbytes/s
    sqConnectMask[OTXDSP_SDK_MAX_TIMESLOTS/2]
    Timeslots to connect to on the DSP Highway
    coMaskSize
    Actual number of timeslots used in sqConnectMask
    hPipeHandleLowPart
    Lower 16 bits of the host's handle for this pipe
    hPipeHandleHighPart
    Upper 16 bits of the host's handle for this pipe

    OtxDspSdkIoInStartProgramS structure

    struct {
    	unsigned short nClkMdVal;
    	unsigned short nHighwaySpeed;
    	unsigned short nDrvRevNoMajor;
    	unsigned short nDrvRevNoMinor;
    	unsigned short nDrvRevNoPr;
    	unsigned short nDrvRevNoPversion;
    	unsigned short nReserved0;
    	unsigned short nReserved1;
    	unsigned short nReserved2;
    	unsigned short nReserved3;
    	unsigned short nReserved4;
    	unsigned short nReserved5;
    	unsigned short nReserved6;
    	unsigned short nReserved7;
    } OtxDspSdkIoInStartProgramS;
    
    Data for the OTXDSP_SDK_IO_START_PROGRAM IO Control code
    Defined in: DspIoctl.h

    Members

    nClkMdVal
    The PLLMUL, PLLDIV, and PLLCOUNT bits of the Clock Mode Register
    nHighwaySpeed
    DSP Serial port highway speed in kbps (2048, 4096, or 8192 kpbs)
    nDrvRevNoMajor
    Driver Revision; Major
    nDrvRevNoMinor
    Driver Revision; Minor
    nDrvRevNoPr
    Driver Revision; PR (PR = 0 = Preliminary, PR = 1 = Release, If PR = 1 P-Version is always 0)
    nDrvRevNoPversion
    Driver Revision; P-Version: (Only valid if PR = 0)
    nReserved0
    Reserved for future use
    nReserved1
    Reserved for future use
    nReserved2
    Reserved for future use
    nReserved3
    Reserved for future use
    nReserved4
    Reserved for future use
    nReserved5
    Reserved for future use
    nReserved6
    Reserved for future use
    nReserved7
    Reserved for future use

    OtxDspSdkIoOutResultS structure

    struct {
    	unsigned short nResult;
    } OtxDspSdkIoOutResultS;
    
    Standard return code struct
    Defined in: DspIoctl.h

    Members

    nResult
    DSP Application return code

    OtxDspSpmE

    enum OtxDspSpmE {
    	OTX_DSP_SPM_OTXSPM1,
    	OTX_DSP_SPM_OTXSPM2,
    	OTX_DSP_SPM_OTXSPM2_EXTMEM,
    	OTX_DSP_SPM_OTXSPM3,
    	OTX_DSP_SPM_OTXHDLC,
    	OTX_DSP_SPM_OTXHDLCEX,
    	OTX_DSP_SPM_OTXDTTX,
    	OTX_DSP_BERT,
    	OTX_DSP_DIAG,
    	OTX_DSP_DS0,
    	OTX_DSP_SPM_DSPBERT,
    };
    
    Standard Program Modules (SPM)
    Defined in: OtxDspD.h

    Members

    OTX_DSP_SPM_OTXSPM1
    DSP Program OtxSpm1 (available for C548/C549, C54CST, C5410A, and C5416 DSPs)
    OTX_DSP_SPM_OTXSPM2
    DSP Program OtxSpm2.out (available for C548/C549, C54CST, C5410A, and C5416 DSPs)
    OTX_DSP_SPM_OTXSPM2_EXTMEM
    DSP Program OtxSpm2c549ExtMem.out(available for C548/C549 with 64kword external memory (Vidar-5x4-ASM))
    OTX_DSP_SPM_OTXSPM3
    DSP Program OtxSpm3.out (only targeted for the C548/C549 DSPs)
    OTX_DSP_SPM_OTXHDLC
    DSP Program OtxHdlc.out (available for C548/C549, C54CST, C5410A, C5416, and C5510 DSPs)
    OTX_DSP_SPM_OTXHDLCEX
    DSP Program OtxHdlcEx.out (available for C5416 and C5510 DSPs)
    OTX_DSP_SPM_OTXDTTX
    DSP Program OtxDtTx.out (only targeted for the C548/C549 DSPs)
    OTX_DSP_BERT
    DSP bert program bert.out (Odin internal)
    OTX_DSP_DIAG
    DSP Diagnostics program (Odin internal)
    OTX_DSP_DS0
    DSP DS0 Visual program (Odin internal)
    OTX_DSP_SPM_DSPBERT
    DSP DspBert program dspbert.out (Odin internal, available for C548/C549 DSPs)

    Comments

    DSP program modules are loaded in the DSPs by calling OtxDspRunSpm. The DSP program modules listed below are supported by all of the following boards:
    Thor-2-PCMCIA,
    Thor-2-PCMCIA-Plus,
    Thor-2-PCMCIA-EX,
    Thor-2-PCMCIA-PRO,
    Thor-2-PCMCIA-CST,
    Vidar-5x4-ASM,
    Vidar-5x4-ASM-EX,
    Vidar-5x4-ASM-PRO,
    Vidar-5x4-ASM-CST,
    Vidar-5x16-PCI.
    OtxSpm1 supports the following logical devices:
    OTX_LDEVICE_HDLC_RECEIVER,
    OTX_LDEVICE_HDLC_SENDER,
    OTX_LDEVICE_DATA_RAW_RECEIVER,
    OTX_LDEVICE_DATA_RAW_SENDER,
    OTX_LDEVICE_TONE_DTMF_DETECTOR,
    OTX_LDEVICE_TONE_DTMF_DIALER,
    OTX_LDEVICE_TONE_EFFECTS_GENERATOR,
    OTX_LDEVICE_DATA_CONVERTER,
    OTX_LDEVICE_TONE_CONST_VAL_GENERATOR,
    OTX_LDEVICE_TONE_VAL_SAMPLER,
    OTX_LDEVICE_TONE_SINEWAVE_GENERATOR,
    OTX_LDEVICE_TONE_SILENCE_DETECTOR,
    OTX_LDEVICE_TONE_FSK_DETECTOR

    The OtxSpm1 is memory limited to 8 devices for the HDLC Sender, HDLC Receiver, Raw Data Sender, Raw Data Receiver.

    The HDLC Sender and HDLC Receiver devices consume a fair amount of mips, thus the mips limitation might be reached before the memory limitation is reached.

    The number of other devices (other than HDLC and Raw Data) that the OtxSpm1 supports varies depending on which DSP is populated on the board. The following list specifies the number of other devices that the OtxSpm1 supports:
    Thor-2-PCMCIA - 16 devices,
    Thor-2-PCMCIA-Plus - 16 devices,
    Thor-2-PCMCIA-EX - 20 devices,
    Thor-2-PCMCIA-PRO - 32 devices,
    Thor-2-PCMCIA-CST - 16 devices,
    Vidar-5x4-ASM - 16 devices,
    Vidar-5x4-ASM-EX - 20 devices,
    Vidar-5x4-ASM-PRO - 32 devices,
    Vidar-5x4-ASM-CST - 16 devices,
    Vidar-5x16-PCI - 16 devices.

    OtxSpm1 supports pipes of capacity 64kbps and 128kbps.
    OtxSpm2 supports the following logical devices:
    OTX_LDEVICE_HDLC_SENDER
    OTX_LDEVICE_HDLC_RECEIVER
    OTX_LDEVICE_DATA_RAW_SENDER
    OTX_LDEVICE_DATA_RAW_RECEIVER
    OTX_LDEVICE_TONE_FSK_DETECTOR
    OTX_LDEVICE_TONE_DTMF_DETECTOR
    OTX_LDEVICE_TONE_MF_DETECTOR
    OTX_LDEVICE_TONE_DUAL_DETECTOR
    OTX_LDEVICE_TONE_SINGLE_DETECTOR
    OTX_LDEVICE_TONE_DTMF_GENERATOR
    OTX_LDEVICE_TONE_DTMF_DIALER
    OTX_LDEVICE_TONE_MF_DIALER
    OTX_LDEVICE_TONE_EFFECTS_GENERATOR
    OTX_LDEVICE_DATA_CONVERTER
    OTX_LDEVICE_TONE_CONST_VAL_GENERATOR
    OTX_LDEVICE_TONE_VAL_SAMPLER
    OTX_LDEVICE_TONE_SINEWAVE_GENERATOR
    OTX_LDEVICE_TONE_SILENCE_DETECTOR

    OtxSpm2 supports pipes of capacity 64kbps and 128kbps.

    The OtxSpm2 is memory limited to 8 devices for the HDLC Sender, HDLC Receiver, Raw Data Sender, Raw Data Receiver.

    The HDLC Sender and HDLC Receiver devices consume a fair amount of mips, thus the mips limitation might be reached before the memory limitation is reached.

    The number of other devices (other than HDLC and Raw Data) that the OtxSpm2 supports varies depending on which DSP is populated on the board. The following list specifies the number of other devices that the OtxSpm2 supports:
    Thor-2-PCMCIA - 8 devices,
    Thor-2-PCMCIA-Plus - 8 devices,
    Thor-2-PCMCIA-EX - 20 devices,
    Thor-2-PCMCIA-PRO - 32 devices,
    Thor-2-PCMCIA-CST - 8 devices,
    Vidar-5x4-ASM - 8 devices,
    Vidar-5x4-ASM-EX - 20 devices,
    Vidar-5x4-ASM-PRO - 32 devices,
    Vidar-5x4-ASM-CST - 8 devices,
    Vidar-5x16-PCI - 8 devices.
    OtxHdlc supports the following logical devices:
    OTX_LDEVICE_HDLC_RECEIVER
    OTX_LDEVICE_HDLC_SENDER
    OTX_LDEVICE_DATA_RAW_SENDER
    OTX_LDEVICE_DATA_RAW_RECEIVER
    OTX_LDEVICE_DATA_CONVERTER

    OtxHdlc supports pipes of capacity 8kbps, 16kbps, 32kbps and n*64kbps.

    The OtxHdlc is memory limited to 32 devices for all of the devices listed above. However, the HDLC Sender and HDLC Receiver devices consume a fair amount of mips, thus the mips limitation will be reached before the memory limitation is reached. The mips limitation varies depending on which DSP is populated on the board. The following list specifies the approximate number of other devices that can be safely be used before the mips limiation is reached:
    Thor-2-PCMCIA - 8 devices,
    Thor-2-PCMCIA-Plus - 12 devices,
    Thor-2-PCMCIA-EX - 16 devices,
    Thor-2-PCMCIA-PRO - 16 devices,
    Thor-2-PCMCIA-CST - 12 devices,
    Vidar-55x4-ASM - 32 devices,
    Vidar-5x4-ASM - 8 devices,
    Vidar-5x4-ASM-EX - 16 devices,
    Vidar-5x4-ASM-PRO - 16 devices,
    Vidar-5x4-ASM-CST - 12 devices,
    Vidar-5x16-PCI - 8 devices.
    OtxHdlcEx supports the following logical devices:
    OTX_LDEVICE_HDLC_RECEIVER
    OTX_LDEVICE_HDLC_SENDER

    OtxHdlcEx supports pipes of capacity n*64kbps.

    The OtxHdlcEx can be run on 5416 and 5510 DSPs and it can handle HDLC pipes as wide as 31 timeslots. OtxHdlcEx is memory limited (not MIPS limited). The following limitations apply:


    Thor-2-PCMCIA-PRO - 16 devices,
    Vidar-55x4-ASM - 32 devices,
    The OtxDtTx and OtxSpm3 are only supported by the
    Thor-2-PCMCIA,
    Thor-2-PCMCIA-Plus,
    Vidar-5x4-ASM,
    Vidar-5x16-ASM

    For other boards, please use the OtxSpm2 program. The OtxDtTx and OtxSpm3 is just a subset of the OtxSpm2 program, and the only reason for their existance is the memory constaint (32kword) on the 548/549 DSPs.

    The OtxDtTx supports the following logical devices:
    OTX_LDEVICE_TONE_DTMF_DIALER
    OTX_LDEVICE_TONE_CONST_VAL_GENERATOR
    OTX_LDEVICE_TONE_VAL_SAMPLER

    OtxDtTx supports pipes of capacity 64kbps.

    OtxSpm3 supports the following logical devices:
    OTX_LDEVICE_HDLC_RECEIVER
    OTX_LDEVICE_HDLC_SENDER
    OTX_LDEVICE_DATA_RAW_RECEIVER
    OTX_LDEVICE_DATA_RAW_SENDER
    OTX_LDEVICE_TONE_DTMF_DETECTOR
    OTX_LDEVICE_TONE_DTMF_DIALER
    OTX_LDEVICE_TONE_CONST_VAL_GENERATOR
    OTX_LDEVICE_TONE_VAL_SAMPLER

    The OtxSpm3 is memory limited to 2 devices for the HDLC Sender, HDLC Receiver, Raw Data Sender, Raw Data Receiver.

    The OtxSpm3 is memory limited to 30 devices for other supported devices listed above.


    OtxDtmfDetectorAttributesE

    enum OtxDtmfDetectorAttributesE {
    	OTX_ATTR_DTMF_DETECTOR_MIN_DURATION,
    };
    
    DTMF Detector Attributes
    Defined in: OtxToneD.h

    Members

    OTX_ATTR_DTMF_DETECTOR_MIN_DURATION
    (OTX_ATTRIB_UINT32) Read/Write. Minimum required duration (in milliseconds) of a tone before it is reported as a detected tone.

    OtxDtmfDetectorEventCodesE

    enum OtxDtmfDetectorEventCodesE {
    	OTX_DTMF_DETECTOR_EC_DIGIT,
    	OTX_DTMF_DETECTOR_EC_PAUSE,
    };
    
    DTMF Detector Event Codes
    Defined in: OtxToneD.h

    Members

    OTX_DTMF_DETECTOR_EC_DIGIT
    DTMF tone detected
    OTX_DTMF_DETECTOR_EC_PAUSE
    Pause detected

    OtxDtmfDetectorResultCodesE

    enum OtxDtmfDetectorResultCodesE {
    	OTX_DTMF_DETECTOR_RES_NO_TONE,
    	OTX_DTMF_DETECTOR_RES_TONE,
    };
    
    DTMF Detector Error Result Codes
    Defined in: OtxToneD.h

    Members

    OTX_DTMF_DETECTOR_RES_NO_TONE
    No DTMF tone presently detected
    OTX_DTMF_DETECTOR_RES_TONE
    DTMF tone is presently detected

    OtxDtmfDialerEventCodesE

    enum OtxDtmfDialerEventCodesE {
    ,
    };
    
    DTMF Dialer Event Codes
    Defined in: OtxToneD.h

    OtxDtmfDialerResultCodesE

    enum OtxDtmfDialerResultCodesE {
    	OTX_DTMF_DIALER_RES_INVALID_DTMF_VALUE,
    	OTX_DTMF_DIALER_RES_BUSY,
    };
    
    DTMF Dialer Error Result Codes
    Defined in: OtxToneD.h

    Members

    OTX_DTMF_DIALER_RES_INVALID_DTMF_VALUE
    Invalid DTMF value
    OTX_DTMF_DIALER_RES_BUSY
    DTMF Dialer is busy

    OtxDualToneDetectorAttributesE

    enum OtxDualToneDetectorAttributesE {
    	OTX_ATTR_DUAL_TONE_DETECTOR_VERBOSE_STATUS,
    	OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_TONE_ENERGY,
    	OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_PAUSE_ENERGY,
    	OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_TWIST,
    	OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_RELATIVE_3RD,
    };
    
    Dual Tone Detector Attributes
    Defined in: OtxToneD.h

    Members

    OTX_ATTR_DUAL_TONE_DETECTOR_VERBOSE_STATUS
    (OTX_ATTRIB_UINT32) Read/Write. Value range 0 through 10. Used mainly for tuning the threshold parameters to comply with detection criteria. The value 0 (default) does not generate any verbose status messages. The higher the value, the more verbose information the detector is generating.
    OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_TONE_ENERGY
    (OTX_ATTRIB_UINT32) Read/Write. Threshold for definite tone. The energy for two frequency components if the tone must both be above this level to be considered as a candidate for a detected MF tone.
    OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_PAUSE_ENERGY
    (OTX_ATTRIB_UINT32) Read/Write. Threshold for pause energy. All frequency components must be below this energy level to be considered as a pause (silence) between two tones.
    OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_TWIST
    (OTX_ATTRIB_UINT32) Read/Write. Twist. MaxEnergy-2ndMaxEnergy must be less than this threshold to be considered a candidate for a detected MF tone.
    OTX_ATTR_DUAL_TONE_DETECTOR_THRESHOLD_RELATIVE_3RD
    (OTX_ATTRIB_UINT32) Read/Write. The energy level of the 2nd highest frequency component must be this must larger than the the energy level of 3rd highest frequency component. I.e. 2ndMaxEnergy-3rdMaxEnergy must be greater than this threshold.

    OtxDualToneDetectorEventCodesE

    enum OtxDualToneDetectorEventCodesE {
    	OTX_DUAL_TONE_DETECTOR_EC_TONE,
    	OTX_DUAL_TONE_DETECTOR_EC_PAUSE,
    	OTX_DUAL_TONE_DETECTOR_EC_VERBOSE_STATUS,
    };
    
    Dual Detector Event Codes
    Defined in: OtxToneD.h

    Members

    OTX_DUAL_TONE_DETECTOR_EC_TONE
    Dual tone detected
    OTX_DUAL_TONE_DETECTOR_EC_PAUSE
    Pause detected
    OTX_DUAL_TONE_DETECTOR_EC_VERBOSE_STATUS
    Decode status

    OtxDualToneDetectorResultCodesE

    enum OtxDualToneDetectorResultCodesE {
    	OTX_DUAL_TONE_DETECTOR_RES_NO_TONE,
    	OTX_DUAL_TONE_DETECTOR_RES_TONE,
    };
    
    Dual Detector Error Result Codes
    Defined in: OtxToneD.h

    Members

    OTX_DUAL_TONE_DETECTOR_RES_NO_TONE
    No Dual tone presently detected
    OTX_DUAL_TONE_DETECTOR_RES_TONE
    Dual tone is presently detected

    OtxE1ABCDBitDataS structure

    struct {
    	OTX_UINT32 chA;
    	OTX_UINT32 chB;
    	OTX_UINT32 chC;
    	OTX_UINT32 chD;
    } OtxE1ABCDBitDataS;
    
    Value for the E1 ABCD Bits to be transmitted (used in CAS). See the OtxE1SetABCDBitData function.
    Defined in: OtxT1E1D.h

    Members

    chA
    Channel A
    chB
    Channel B
    chC
    Channel C
    chD
    Channel D

    Comments

    The A, B, C, and D channels are transmitted in time-slot 16 of a E1 multframe.

    The struct holds 30 bits for each channel. The least significant bit (bit #0, zero counting) is transmitted first in channel 1, frame 1. Bit #15 is then transmitted in channel 16, frame 1. Next the bits #1 and #16 are transmitted in channels 2 and 17 in frame 2. And Finally, the bits #14 and #29 are transmitted on channels 15 and 30 in Frame 15.

    These values will be repeated unless OtxE1SetABCDBitData is called again with a different values in this struct.

    Example

    Multi-Frame structure for time-slot 16
    +-----------+
    |   TS16    |   TS16    |   TS16    |   TS16    |     |   TS16    |
    |  Frame 0  |  Frame 1  |  Frame 2  |  Frame 3  |     |  Frame 15 |
    ... +-----------+
    | 0000xyxx  | abcd abcd | abcd abcd | abcd abcd |     | abcd abcd |
    |           | ch1  ch16 | ch2  ch17 | ch3  ch18 |     | ch15 ch30 |
    +-----------+
    

    Developer Notes

    When B, C or D are not used, they should have values B = 1, C = 0, D = 1.

    It is recommended that the combination of 0000 of A, B, C, and D should not be used for signalling purposes for channels 1 to 15.

    See Also

    OtxE1SetRobBitData OtxE1GetRobBitData

    OtxE1AisDetectModeE

    enum OtxE1AisDetectModeE {
    	OTX_E1_AIS_ETS300233,
    	OTX_E1_AIS_G775,
    };
    
    Set the algorithm that is used to detect the Alarm Indication Signal (AIS).
    Defined in: OtxT1E1D.h

    Members

    OTX_E1_AIS_ETS300233
    AIS alarm will be detected according to ETS300233
    OTX_E1_AIS_G775
    AIS alarm will be detected according to CCITT G.775

    Comments

    According to ETX300233 an AIS alarm is detected if the incoming data stream contains less than 3 zeros within 512 bits and a Loss of Frame Alignment is indicated. The alarm will be cleared if 3 or more zeros will be detected within 512 bits or a Frame Alignment Signal (FAS) word is found. According to ITU-T G.775 an AIS alarm is detected if the incoming data stream contains less than 3 zeros within a doubleframe (512 bits) over a two doubleframe period (1024 bits). The alarm will be cleared if 3 or more zeros are detected within a doubleframe for two consecutive doubleframes.

    See Also

    OtxE1ConfigOptionsS OtxE1SetConfiguration

    OtxE1ConfigOptionsS structure

    struct {
    	OtxE1LineCodeE eTxLineCode;
    	OtxE1LineCodeE eRxLineCode;
    	OtxE1FrameFormatE eTxFrameFormat;
    	OtxE1FrameFormatE eRxFrameFormat;
    	OtxE1AisDetectModeE eAisDetection;
    	OTX_UINT8 bfSiBits;
    	OTX_UINT8 bfSaBits;
    	OTX_BOOL bExtendedHDB3errorDetect;
    	OTX_BOOL bAutoRegainMultiframe;
    	OTX_BOOL bAutoResync;
    	OTX_BOOL bAutoCrcBitInversion;
    	OTX_BOOL bAutoRemoteAlarm;
    	OTX_UINT8 nLosSensitivity;
    	OTX_UINT8 nLosRecovery;
    	OTX_UINT16 nLineLength;
    	OTX_BOOL bHighTxPower;
    	OTX_BOOL bReceiveEqualizer;
    } OtxE1ConfigOptionsS;
    
    E1 Line Interface Configuration Options
    Defined in: OtxT1E1D.h

    Members

    eTxLineCode
    Line Coding in Transmit Direction
    eRxLineCode
    Line Coding in Receive Direction
    eTxFrameFormat
    Frame Format in Transmit Direction
    eRxFrameFormat
    Frame Format in Receive Direction
    eAisDetection
    Alarm Indication Signal (AIS) Detect mode
    bfSiBits
    E-bit (spare bits for international use) Due to signalling requirements the E-bits (SiBits) of frame 13 and frame 15 of the CRC multiframe can be used to indicate received errored submultiframes. E-bit of frame 15 is the least significant bit (bit 0) of this field. E-bit of frame 13 is bit 1 of this field. To set the either E-bit in the in the multiframe the corresponding bit position in this field should be turned on. E-bit Frame 13, E-bit Frame 15: 00, 01, 10, 11. E.g. to set both E-bits (frame 13 and frame 15) set this field to 0x03.
    bfSaBits
    Set the Sa bits (spare bits for national use) transmitted in bit positions 4-8 of time-slot 0 of every other (odd) frame. Use bit pattern marking the corresponding bit position '1' the bit should be turned on. Sa4, Sa5, Sa6, Sa7, Sa8: 00000, 00001, ..., 11111
    For all Sa bits on nSaBits = 0x1F
    bExtendedHDB3errorDetect
    Selects the error detection mode. When turned off (OTX_FALSE), only double violations are detected. When turned on (OTX_TRUE), 0000 strings are detected as code violations as well.
    bAutoRegainMultiframe
    When enabled (OTX_TRUE), the receiver will search a new basic- and multiframing if more than 914 CRC errors have been detected in a time interval of one second.
    bAutoResync
    If OTX_TRUE, the Framer will automatically re-synchronize after loss of synchronization. If OTX_FALSE the Framer will not synchronize automatically but a re-synchronization procedure must be specifically initiated by the software.
    bAutoCrcBitInversion
    If OTX_TRUE, all CRC bits of one outgoing sub-multiframe are inverted in case a CRC error is flagged for the previous received sub-multiframe.
    bAutoRemoteAlarm
    If OTX_TRUE, a Remote Alarm (Yellow Alarm) will be sent automatically in the outgoing data stream when the receiver is out of synchronization. The alarm will also be automatically removed when the receiver returns to the synchronized state.
    nLosSensitivity
    Sets the sensitivity level for the Loss Of Signal (LOS) detection. A LOS alarm will be generated if the incoming data stream has no transitions during programmable number (N) of consecutive pulse periods. The number given as the LOS Sensitivity value will be multiplied by 16 to arrive to the pulse count number N. The time for detecting LOS will be 16 x LOS Sensitivity x Pulse Length (488ns). The maximum time is 16 x 256 x 488ns = 2ms
    Possible Values: 1-256
    Example/Default Value: LOS Sensitivity = 128 (16 x 128 x 488ns = 1ms)
    nLosRecovery
    Sets the sensitivity level for the Loss Of Signal (LOS) recovery. A LOS alarm will be cleared if in the incoming data a number of Pulses (N) occur during the time period set with the LOS Recovery parameter. The time interval starts with the first detected pulse transition and a pulse count is incremented with every received pulse. If the pulse number is greater than the number N set with this parameter, the LOS alarm will be cleared.
    Possible Values: 1-256
    nLineLength
    Specify the length of the T1 line cable in meters. This information is used by the T1 transceivers to adjust the transmit pulse masks according to the line length.
    Possible Values: 0-65535
    bHighTxPower
    When OTX_TRUE the pulses on the line interface will be sent with high power. If OTX_FALSE the pulses will be sent with low power.
    bReceiveEqualizer
    The Receive Equalizer can be used match the 18dB ITU-T I.431 requirement. When the Equalizer is turned off (OTX_FALSE), the Receiver is -10dB (short haul), when turned on (OTX_TRUE), the Receiver is -36dB (long haul).

    See Also

    OtxE1SetConfiguration OtxE1GetConfiguration

    OtxE1FrameFormatE

    enum OtxE1FrameFormatE {
    	OTX_E1_FF_DOUBLE_FRAME,
    	OTX_E1_FF_CRC4_MULTIFRAME,
    	OTX_E1_FF_CRC4_MULTIFRAME_G706,
    };
    
    E1 Frame Formats
    Defined in: OtxT1E1D.h

    Members

    OTX_E1_FF_DOUBLE_FRAME
    Double Frame
    OTX_E1_FF_CRC4_MULTIFRAME
    CRC4 Multiframe
    OTX_E1_FF_CRC4_MULTIFRAME_G706
    CRC4 Multiframe format with modified CRC4 Multiframe alignment algorithm (Interworking according to CCITT G.706 Annex B)

    See Also

    OtxE1ConfigOptionsS OtxE1SetConfiguration

    OtxE1LineCodeE

    enum OtxE1LineCodeE {
    	OTX_E1_LC_AMI,
    	OTX_E1_LC_HDB3,
    };
    
    E1 Line Codes
    Defined in: OtxT1E1D.h

    Members

    OTX_E1_LC_AMI
    Alternate Mark Inversion (AMI) Line Coding
    OTX_E1_LC_HDB3
    High Density Bipolar 3 (HDB3) Line Coding

    See Also

    OtxE1ConfigOptionsS OtxE1SetConfiguration

    OtxE1SaBitE

    enum OtxE1SaBitE {
    	OTX_E1_SA4,
    	OTX_E1_SA5,
    	OTX_E1_SA6,
    	OTX_E1_SA7,
    	OTX_E1_SA8,
    };
    
    E1 time-slot 0 Sa bits (spare bits for national use)
    Defined in: OtxT1E1D.h

    Members

    OTX_E1_SA4
    Sa Bit number 4
    OTX_E1_SA5
    Sa Bit number 5
    OTX_E1_SA6
    Sa Bit number 6
    OTX_E1_SA7
    Sa Bit number 7
    OTX_E1_SA8
    Sa Bit number 8

    See Also

    OtxE1SetSaBit OtxE1GetSaBit

    OtxEffectsGeneratorEventCodesE

    enum OtxEffectsGeneratorEventCodesE {
    ,
    };
    
    Effects Generator Event Codes
    Defined in: OtxToneD.h

    OtxEffectsGeneratorResultCodesE

    enum OtxEffectsGeneratorResultCodesE {
    ,
    };
    
    Effects Generator Error Result Codes
    Defined in: OtxToneD.h

    OtxEventDataS structure

    struct {
    	OTX_DATETIME m_nTimeStamp;
    	OSA_ENUM_DECL(OTX_UINT32) m_eDeviceType;
    	OTX_UINT32 m_nSourceId;
    	OTX_HANDLE m_hDevice;
    	OTX_NOTIFY_CAUSE m_nCode;
    	OTX_TASK_REF m_nRequestId;
    	OTX_UINT32 m_nParam;
    } OtxEventDataS;
    
    Data recorded for an event
    Defined in: OtxType.h

    Members

    m_nTimeStamp
    Absolute time the event was recorded
    m_eDeviceType
    Device Type with which the event is associated
    m_nSourceId
    Device Id of the device that the event is associated with (supplied by the user when the device for opened/created)
    m_hDevice
    Handle to the Device with which the event is associated
    m_nCode
    Device specific cause code indicating what happened. Each device types has it own set of event cause codes
    m_nRequestId
    If the message is for a previous user request this member holds the user assigned request ID
    m_nParam
    Optional parameter, usually number of bytes to be fetched

    OtxEventQueueDeviceAttributesE

    enum OtxEventQueueDeviceAttributesE {
    	OTX_ATTR_QUEUE_EVENT,
    	OTX_ATTR_QUEUE_SIZE,
    	OTX_ATTR_QUEUE_USAGE,
    	OTX_ATTR_QUEUE_MAX_USAGE,
    	OTX_ATTR_QUEUE_LOST_EVENTS,
    };
    
    Event Queue Device Attributes
    Defined in: OtxType.h

    Members

    OTX_ATTR_QUEUE_EVENT
    (OTX_ATTRIB_UINT32) Read-only. Handle to associated OTX_EVENT
    OTX_ATTR_QUEUE_SIZE
    (OTX_ATTRIB_UINT32) Read-only. Size of the event queue in number of events
    OTX_ATTR_QUEUE_USAGE
    (OTX_ATTRIB_UINT32) Read-only. Number of events currently in queue (less than size)
    OTX_ATTR_QUEUE_MAX_USAGE
    (OTX_ATTRIB_UINT32) Read-only. Max usage since this attribute last read
    OTX_ATTR_QUEUE_LOST_EVENTS
    (OTX_ATTRIB_UINT32) Read-only. Number of lost events since this attribute last read

    OtxFskDetectorEventCodesE

    enum OtxFskDetectorEventCodesE {
    	OTX_FSK_DETECTOR_EC_ALERT,
    	OTX_FSK_DETECTOR_EC_COMPLETE,
    	OTX_FSK_DETECTOR_EC_TIMEOUT,
    	OTX_FSK_DETECTOR_EC_BYTE,
    	OTX_FSK_DETECTOR_EC_VERBOSE_STATUS,
    };
    
    FSK Detector Event Codes
    Defined in: OtxToneD.h

    Members

    OTX_FSK_DETECTOR_EC_ALERT
    ALERT Tone is detected (2130Hz/2750Hz) is detected
    OTX_FSK_DETECTOR_EC_COMPLETE
    The FSK (CallerId) message is complete. Waiting for new ALERT tone
    OTX_FSK_DETECTOR_EC_TIMEOUT
    Error occurred during FSK decoding.
    OTX_FSK_DETECTOR_EC_BYTE
    One octet of FSK (CallerId) message
    OTX_FSK_DETECTOR_EC_VERBOSE_STATUS
    Debugging status of FSK decoder

    OtxFskDetectorResultCodesE

    enum OtxFskDetectorResultCodesE {
    ,
    };
    
    FSK Detector Error Result Codes
    Defined in: OtxToneD.h

    OtxHdlcCrcModeE

    enum OtxHdlcCrcModeE {
    	OTX_HDLC_CRC16,
    	OTX_HDLC_CRC32,
    };
    
    Cyclic Redundancy Check (CRC) mode
    Defined in: OtxHdlcD.h

    Members

    OTX_HDLC_CRC16
    16-bit Cyclic Redundancy Check
    OTX_HDLC_CRC32
    32-bit Cyclic Redundancy Check

    OtxHdlcFrameEndCodeE

    enum OtxHdlcFrameEndCodeE {
    	OTX_HDLC_FEC_OK,
    	OTX_HDLC_FEC_INVALID,
    	OTX_HDLC_FEC_OVERFLOW,
    	OTX_HDLC_FEC_BAD_CRC,
    	OTX_HDLC_FEC_ABORTED,
    	OTX_HDLC_FEC_TRUNCATED,
    };
    
    Frame End Code for HDLC frames. Specifies whether the frame is a good or faulty frame. If the frame is a faulty, then this bit mask provides further indications of the cause of the fault. The frame End Code of frame is retrieved by a call to OtxHdlcReadData. Please note that the Frame End Code is a bit mask value. The Frame End code can have multiple values, e.g. both OTX_HDLC_FEC_INVALID and OTX_HDLC_FEC_ABORTED can be set.
    Defined in: OtxHdlcD.h

    Members

    OTX_HDLC_FEC_OK
    The frame is a good HDLC frame. No faults
    OTX_HDLC_FEC_INVALID
    Invalid frame; Either not a multiple of 8 bits, or a short frame
    OTX_HDLC_FEC_OVERFLOW
    Receive Data Overflow. The host is not servicing the receive FIFO fast enough.
    OTX_HDLC_FEC_BAD_CRC
    The frame failed the CRC check
    OTX_HDLC_FEC_ABORTED
    The received frame was aborted
    OTX_HDLC_FEC_TRUNCATED
    The received frame was too long for the buffer in the driver

    See Also

    OtxHdlcReadData

    OtxHdlcFrameFillTypeE

    enum OtxHdlcFrameFillTypeE {
    	OTX_THOR_FFT_NONE,
    	OTX_HDLC_FFT_FLAGS,
    	OTX_HDLC_FFT_ALL_ONES,
    };
    
    Character(s) to be send between HDLC frames
    Defined in: OtxHdlcD.h

    Members

    OTX_THOR_FFT_NONE
    No frame fill between frames
    OTX_HDLC_FFT_FLAGS
    Send HDLC flags (0x7E) between the frames.
    OTX_HDLC_FFT_ALL_ONES
    Send all ones (0xFF) between frames.

    OtxHdlcFrameInfoS structure

    struct {
    	OTX_UINT32 cbOctets;
    	OTX_UINT32 nFrameSeq;
    	OSA_ENUM_DECL(OtxHdlcFrameEndCodeE) nFrameEndCode;
    	OTX_DATETIME nTimeStamp;
    	OTX_UINT32 nOffsetNext;
    } OtxHdlcFrameInfoS;
    
    HDLC info data structs preceeding HDLC data in buffer returned by HdlcReadDataEx.

    Each frame in the buffer is preceeded with a struct of this type.
    Defined in: OtxHdlcD.h

    Members

    cbOctets
    Number of octets in the frame (not including this struct)
    nFrameSeq
    Sequence number of the received HDLC frame (matches the number in the event queue)
    nFrameEndCode
    Frame Status Code
    nTimeStamp
    Timestamp of the last received octet of the frame
    nOffsetNext
    Offset in bytes to the next OtxHdlcFrameInfoS realtive the start of this one or, 0 if this one is last

    OtxHdlcReceiverAttributesE

    enum OtxHdlcReceiverAttributesE {
    	OTX_ATTR_HDLC_RECEIVER_FIFO_SIZE_FRAMES,
    	OTX_ATTR_HDLC_RECEIVER_FIFO_SIZE_OCTETS,
    	OTX_ATTR_HDLC_RECEIVER_FIFO_PEAK_USAGE_OCTETS,
    	OTX_ATTR_HDLC_RECEIVER_FIFO_PEAK_USAGE_FRAMES,
    	OTX_ATTR_HDLC_RECEIVER_FIFO_CURRENT_USAGE_OCTETS,
    	OTX_ATTR_HDLC_RECEIVER_FIFO_CURRENT_USAGE_FRAMES,
    	OTX_ATTR_HDLC_RECEIVER_FIFO_LOST_FRAMES,
    	OTX_ATTR_HDLC_RECEIVER_USE_FRAME_COUNT_AS_SEQUENCE,
    };
    
    HDLC Receiver Attributes
    Defined in: OtxHdlcD.h

    Members

    OTX_ATTR_HDLC_RECEIVER_FIFO_SIZE_FRAMES
    (OTX_ATTRIB_UINT32) Read only. Size of allocated buffer for the HDLC Receiver Fifo (in number of frames)
    OTX_ATTR_HDLC_RECEIVER_FIFO_SIZE_OCTETS
    (OTX_ATTRIB_UINT32) Read only. Size of allocated buffer for the HDLC Receiver Fifo (in number of bytes)
    OTX_ATTR_HDLC_RECEIVER_FIFO_PEAK_USAGE_OCTETS
    (OTX_ATTRIB_UINT32) Read only. Peak usage (in octets) of the HDLC Receiver Fifo
    OTX_ATTR_HDLC_RECEIVER_FIFO_PEAK_USAGE_FRAMES
    (OTX_ATTRIB_UINT32) Read only. Peak usage (in frames) of the HDLC Receiver Fifo
    OTX_ATTR_HDLC_RECEIVER_FIFO_CURRENT_USAGE_OCTETS
    (OTX_ATTRIB_UINT32) Read only. Current usage (in octets) of the HDLC Receiver Fifo
    OTX_ATTR_HDLC_RECEIVER_FIFO_CURRENT_USAGE_FRAMES
    (OTX_ATTRIB_UINT32) Read only. Current usage (in frames) of the HDLC Receiver Fifo
    OTX_ATTR_HDLC_RECEIVER_FIFO_LOST_FRAMES
    (OTX_ATTRIB_UINT32) Read only. Number of lost frames (due to Fifo-full condition)
    OTX_ATTR_HDLC_RECEIVER_USE_FRAME_COUNT_AS_SEQUENCE
    (OTX_ATTRIB_BOOL) Read/Write. Default OTX_FALSE. If set OTX_TRUE the driver write the frame counter number (if available) in the pnFrameSeq parameter of the OtxHdlcReadData function. For more information about the frame counter, please refer to the OTX_ATTR_DSP_FRAME_BUFFER_COUNTER attribute. The frame counter number could be used to accurately timestamp events (such as received HDLC frames).

    OtxHdlcReceiverEventCodesE

    enum OtxHdlcReceiverEventCodesE {
    	OTX_HDLC_RECEIVER_EC_COMPLETE_FRAME,
    	OTX_HDLC_RECEIVER_EC_START_FRAME,
    	OTX_HDLC_RECEIVER_EC_PROTOCOL_ERROR,
    	OTX_HDLC_RECEIVER_EC_BUFFER_OVERRUN,
    };
    
    HDLC Receiver Event Codes
    Defined in: OtxHdlcD.h

    Members

    OTX_HDLC_RECEIVER_EC_COMPLETE_FRAME
    HDLC Frame Received
    OTX_HDLC_RECEIVER_EC_START_FRAME
    HDLC Receive Frame Start
    OTX_HDLC_RECEIVER_EC_PROTOCOL_ERROR
    HDLC Protocol Error
    OTX_HDLC_RECEIVER_EC_BUFFER_OVERRUN
    HDLC Buffer Overrun. The host is too slow retrieving the data from the Hdlc Receiver

    OtxHdlcReceiverResultCodesE

    enum OtxHdlcReceiverResultCodesE {
    ,
    };
    
    HDLC Receiver Error Result Codes
    Defined in: OtxHdlcD.h

    OtxHdlcSenderAttributesE

    enum OtxHdlcSenderAttributesE {
    	OTX_ATTR_HDLC_SENDER_GENERATE_FRAME_SENT_EVENT,
    	OTX_ATTR_HDLC_SENDER_SS7_AUTO_BSN,
    };
    
    HDLC Sender Attributes
    Defined in: OtxHdlcD.h

    Members

    OTX_ATTR_HDLC_SENDER_GENERATE_FRAME_SENT_EVENT
    (OTX_ATTRIB_BOOL) Read/Write. (Default is OTX_FALSE); If OTX_TRUE the HDLC Sender will generate a OTX_HDLC_SENDER_EC_FRAME_SENT event after each transmitted frame
    OTX_ATTR_HDLC_SENDER_SS7_AUTO_BSN
    (OTX_ATTRIB_BOOL) Read/Write. (Default is OTX_FALSE).
    Note: Future feature. Not implemented yet
    The event is only valid for HDLC Sender devices hosted by a DSP device and operating in SS7 mode. When this attribute is set to OTX_TRUE, the HDLC Sender will assume that there is a HDLC Receiver operating on the same timeslot as the HDLC Sender. The HDLC Receiver will analyze the FSN (Forward Sequence Number). If the FSN is one higher than the previous FSN, then the HDLC Sender will use this number as the BSN of the outgoing messages. If the FSN is not one higher than the previous FSN, then the HDLC Sender will toggle the BIB of the outgoing messages. The HDLC Receiver will also monitor received LSSU messages. If the LSSU indicates that the link is "Out of Service", then the HDLC Sender will set BSN=0x7F and BIB=1 of the outgoing messages.

    OtxHdlcSenderEventCodesE

    enum OtxHdlcSenderEventCodesE {
    	OTX_HDLC_SENDER_EC_FRAME_SENT,
    	OTX_HDLC_SENDER_EC_BUF_UNDERRUN,
    	OTX_HDLC_SENDER_EC_SHORT_FRAME,
    	OTX_HDLC_SENDER_EC_FRAME_LOST,
    };
    
    HDLC Sender Event Codes
    Defined in: OtxHdlcD.h

    Members

    OTX_HDLC_SENDER_EC_FRAME_SENT
    HDLC Frame completely sent (m_nRequestId is the nTaskRef as passed in OtxHdlcSendData call). If generation of this event is desired, it must be activated by setting the OTX_ATTR_HDLC_SENDER_GENERATE_DATA_EVENTS to OTX_TRUE before OtxHdlcSenderInit is called.
    OTX_HDLC_SENDER_EC_BUF_UNDERRUN
    Buffer Underrun. Host is to slow supplying HDLC data to the Hdlc Sender
    OTX_HDLC_SENDER_EC_SHORT_FRAME
    Short frame. Trying to transmit a frame of length=1 byte. Frame ignored.
    OTX_HDLC_SENDER_EC_FRAME_LOST
    Internal device error. Frame is lost. This could occur if the host (DSP code) of the device runs out of dynamic memory for the packet to be transmitted.

    OtxHdlcSenderResultCodesE

    enum OtxHdlcSenderResultCodesE {
    	OTX_HDLC_SENDER_RES_TX_BUSY,
    	OTX_HDLC_SENDER_RES_FRAME_TOO_LONG,
    };
    
    HDLC Sender Error Result Codes
    Defined in: OtxHdlcD.h

    Members

    OTX_HDLC_SENDER_RES_TX_BUSY
    Transmitter is busy sending a frame.
    OTX_HDLC_SENDER_RES_FRAME_TOO_LONG
    Frame too long.

    OtxHdlcSS7FisuS structure

    struct {
    	OTX_UINT8 bsn : 7;
    	OTX_UINT8 bib : 1;
    	OTX_UINT8 fsn : 7;
    	OTX_UINT8 fib : 1;
    	OTX_UINT8 li  : 6;
    	OTX_UINT8 reserved : 2;
    } OtxHdlcSS7FisuS;
    
    Fill-In Signalling Unit (FISU), used in the OTX_HDLC_MODE_SS7 mode
    Defined in: OtxHdlcD.h

    Members

    7
    Backward Sequence Number
    1
    Backward Indicator Bit
    7
    Forward Sequence Number
    1
    Forward Indicator Bit
    6
    Length Indication (2)
    2
    Reserved

    See Also

    OTX_HDLC_SS7_CB_FISU

    OtxHdlcSS7LongLssuS structure

    struct {
    	OTX_UINT8 bsn : 7;
    	OTX_UINT8 bib : 1;
    	OTX_UINT8 fsn : 7;
    	OTX_UINT8 fib : 1;
    	OTX_UINT8 li  : 6;
    	OTX_UINT8 reserved : 2;
    	OTX_UINT16 sf;
    } OtxHdlcSS7LongLssuS;
    
    Long Link Status Signalling Unit (Long LSSU), used in the OTX_HDLC_MODE_SS7 mode
    Defined in: OtxHdlcD.h

    Members

    7
    Backward Sequence Number
    1
    Backward Indicator Bit
    7
    Forward Sequence Number
    1
    Forward Indicator Bit
    6
    Length Indication (2)
    2
    Reserved
    sf
    Status Field

    See Also

    OTX_HDLC_SS7_CB_LONG_LSSU

    OtxHdlcSS7ShortLssuS structure

    struct {
    	OTX_UINT8 bsn : 7;
    	OTX_UINT8 bib : 1;
    	OTX_UINT8 fsn : 7;
    	OTX_UINT8 fib : 1;
    	OTX_UINT8 li  : 6;
    	OTX_UINT8 reserved : 2;
    	OTX_UINT8 sf;
    } OtxHdlcSS7ShortLssuS;
    
    Short Link Status Signalling Unit (Short LSSU), used in the OTX_HDLC_MODE_SS7 mode
    Defined in: OtxHdlcD.h

    Members

    7
    Backward Sequence Number
    1
    Backward Indicator Bit
    7
    Forward Sequence Number
    1
    Forward Indicator Bit
    6
    Length Indication (2)
    2
    Reserved
    sf
    Status Field

    See Also

    OTX_HDLC_SS7_CB_SHORT_LSSU

    OtxHdlcTxRateE

    enum OtxHdlcTxRateE {
    	OTX_HDLC_TR_NA,
    	OTX_HDLC_TR_600BPS,
    	OTX_HDLC_TR_1200BPS,
    	OTX_HDLC_TR_2400BPS,
    	OTX_HDLC_TR_4800BPS,
    };
    
    HDLC Transmission Rates for V.110 and X.30 modes
    Defined in: OtxHdlcD.h

    Members

    OTX_HDLC_TR_NA
    Transmission Rate Not Applicaple in this Pipe Mode
    OTX_HDLC_TR_600BPS
    Transmission Rate 600 bit/s
    OTX_HDLC_TR_1200BPS
    Transmission Rate 1200 bit/s
    OTX_HDLC_TR_2400BPS
    Transmission Rate 2400 bit/s
    OTX_HDLC_TR_4800BPS
    Transmission Rate 4800 bit/s

    OtxJtagAttributesE

    enum OtxJtagAttributesE {
    	OTX_ATTR_JTAG_HM2X20_HIGHZ,
    };
    
    JTAG Attributes
    Defined in: OtxJtagD.h

    Members

    OTX_ATTR_JTAG_HM2X20_HIGHZ
    (OTX_ATTRIB_BOOL) Read/Write. If set to OTX_TRUE the Hermod-2x20 board is tri-stated from the Hermod-PCI board.

    OtxJtagControlCmdE

    enum OtxJtagControlCmdE {
    	OTX_JTAG_CLK_PULSE,
    	OTX_JTAG_SET_TCLK,
    	OTX_JTAG_SET_TMS,
    	OTX_JTAG_SET_TDI,
    	OTX_JTAG_UNSET_TCLK,
    	OTX_JTAG_UNSET_TMS,
    	OTX_JTAG_UNSET_TDI,
    	OTX_JTAG_READ_TDO,
    	OTX_JTAG_SET_TMS0,
    	OTX_JTAG_SET_TMS1,
    	OTX_JTAG_SET_TMS2,
    	OTX_JTAG_SET_TMS3,
    	OTX_JTAG_SET_TMS4,
    	OTX_JTAG_SET_TMS5,
    	OTX_JTAG_SET_TMS6,
    	OTX_JTAG_SET_TMS7,
    	OTX_JTAG_UNSET_TMS0,
    	OTX_JTAG_UNSET_TMS1,
    	OTX_JTAG_UNSET_TMS2,
    	OTX_JTAG_UNSET_TMS3,
    	OTX_JTAG_UNSET_TMS4,
    	OTX_JTAG_UNSET_TMS5,
    	OTX_JTAG_UNSET_TMS6,
    	OTX_JTAG_UNSET_TMS7,
    };
    
    Control commands to the TBC device.
    Defined in: OtxJtagD.h

    Members

    OTX_JTAG_CLK_PULSE
    Issue a positive pulse on TCLK
    OTX_JTAG_SET_TCLK
    Set TCLK high
    OTX_JTAG_SET_TMS
    Set TMS0 high; alias for OTX_JTAG_SET_TMS0
    OTX_JTAG_SET_TDI
    Set TDI high
    OTX_JTAG_UNSET_TCLK
    Set TCLK low
    OTX_JTAG_UNSET_TMS
    Set TMS0 low; alias for OTX_JTAG_UNSET_TMS0
    OTX_JTAG_UNSET_TDI
    Set TDI low.
    OTX_JTAG_READ_TDO
    Read bit value of TDO
    OTX_JTAG_SET_TMS0
    Set TMS0 high
    OTX_JTAG_SET_TMS1
    Set TMS1 high
    OTX_JTAG_SET_TMS2
    Set TMS2 high
    OTX_JTAG_SET_TMS3
    Set TMS3 high
    OTX_JTAG_SET_TMS4
    Set TMS4 high
    OTX_JTAG_SET_TMS5
    Set TMS5 high
    OTX_JTAG_SET_TMS6
    Set TMS6 high
    OTX_JTAG_SET_TMS7
    Set TMS7 high
    OTX_JTAG_UNSET_TMS0
    Set TMS0 low
    OTX_JTAG_UNSET_TMS1
    Set TMS1 low
    OTX_JTAG_UNSET_TMS2
    Set TMS2 low
    OTX_JTAG_UNSET_TMS3
    Set TMS3 low
    OTX_JTAG_UNSET_TMS4
    Set TMS4 low
    OTX_JTAG_UNSET_TMS5
    Set TMS5 low
    OTX_JTAG_UNSET_TMS6
    Set TMS6 low
    OTX_JTAG_UNSET_TMS7
    Set TMS7 low

    See Also

    OtxJtagControl

    OtxJtagEventCodesE

    enum OtxJtagEventCodesE {
    ,
    };
    
    JTAG Event Codes
    Defined in: OtxJtagD.h

    OtxJtagResultCodesE

    enum OtxJtagResultCodesE {
    ,
    };
    
    JTAG Error Result Codes
    Defined in: OtxJtagD.h

    OtxLibraryAttributesE

    enum OtxLibraryAttributesE {
    	OTX_ATTR_LIB_REV_STR,
    	OTX_ATTR_LIB_REV_NUM,
    	OTX_ATTR_LIB_FILE_NAME,
    	OTX_ATTR_LIB_TYPE_STATIC,
    };
    
    Library Attributes
    Defined in: OtxType.h

    Members

    OTX_ATTR_LIB_REV_STR
    (OTX_ATTRIB_SZ) Read-only. The Library revision as a string (E.g "1.0-P62" or "1.0" etc.)
    OTX_ATTR_LIB_REV_NUM
    (OTX_ATTRIB_OCTETS) Read-only. The Library revision formatted as OtxVersionInfo
    OTX_ATTR_LIB_FILE_NAME
    (OTX_ATTRIB_SZ) Read-only. File name of the library
    OTX_ATTR_LIB_TYPE_STATIC
    (OTX_ATTRIB_BOOL) Read-only. OTX_TRUE if the library is a static linked library, and OTX_FALSE if the library is a dynamic linked library

    OtxLogicalDeviceTypeE

    enum OtxLogicalDeviceTypeE {
    	OTX_LDEVICE_UNKNOWN,
    	OTX_LDEVICE_EVENT_QUEUE,
    	OTX_LDEVICE_PIPE,
    	OTX_LDEVICE_TONE_CONST_VAL_GENERATOR,
    	OTX_LDEVICE_TONE_EFFECTS_GENERATOR,
    	OTX_LDEVICE_TONE_SINEWAVE_GENERATOR,
    	OTX_LDEVICE_TONE_DTMF_GENERATOR,
    	OTX_LDEVICE_TONE_MF_GENERATOR,
    	OTX_LDEVICE_TONE_SEQUENCE_GENERATOR,
    	OTX_LDEVICE_TONE_DTMF_DIALER,
    	OTX_LDEVICE_TONE_MF_DIALER,
    	OTX_LDEVICE_TONE_SILENCE_DETECTOR,
    	OTX_LDEVICE_TONE_DIALTONE_DETECTOR,
    	OTX_LDEVICE_TONE_DTMF_DETECTOR,
    	OTX_LDEVICE_TONE_MF_DETECTOR,
    	OTX_LDEVICE_TONE_FSK_DETECTOR,
    	OTX_LDEVICE_DATA_RAW_SENDER,
    	OTX_LDEVICE_DATA_RAW_RECEIVER,
    	OTX_LDEVICE_DATA_CONVERTER,
    	OTX_LDEVICE_DATA_MIXER,
    	OTX_LDEVICE_DATA_CONFERENCE_BRIDGE,
    	OTX_LDEVICE_HDLC_SENDER,
    	OTX_LDEVICE_HDLC_RECEIVER,
    	OTX_LDEVICE_T1_ROB_BIT_ACCESS,
    	OTX_LDEVICE_E1_S_BIT_ACCESS,
    	OTX_LDEVICE_E1_ABCD_BIT_ACCESS,
    	OTX_LDEVICE_MODEM_V34_SENDER,
    	OTX_LDEVICE_MODEM_V34_RECEIVER,
    	OTX_LDEVICE_FAX_V17_SENDER,
    	OTX_LDEVICE_FAX_V17_RECEIVER,
    	OTX_LDEVICE_VOICE_ECHO_CANCELLER,
    	OTX_LDEVICE_VOICE_SILENCE_SUPRESSOR,
    	OTX_LDEVICE_VOICE_CODEC_G723_ENCODER,
    	OTX_LDEVICE_VOICE_CODEC_G723_DECODER,
    	OTX_LDEVICE_VOICE_CODEC_G729_ENCODER,
    	OTX_LDEVICE_VOICE_CODEC_G729_DECODER,
    	OTX_LDEVICE_USER_APPLICATION,
    	OTX_LDEVICE_TONE_VAL_SAMPLER,
    	OTX_LDEVICE_T1_DL_BIT_ACCESS,
    	OTX_LDEVICE_TONE_DUAL_DETECTOR,
    	OTX_LDEVICE_TONE_SINGLE_DETECTOR,
    	OTX_LDEVICE_END,
    };
    
    Type of logical device
    Defined in: OtxDev.h

    Members

    OTX_LDEVICE_UNKNOWN
    Used in error conditions
    OTX_LDEVICE_EVENT_QUEUE
    Event Queue, used for notifying the host application of occurring events
    OTX_LDEVICE_PIPE
    Pipe, used for connecting a data stream between two devices
    OTX_LDEVICE_TONE_CONST_VAL_GENERATOR
    Logical Device for Generating Constant Value (See OtxTone.h)
    OTX_LDEVICE_TONE_EFFECTS_GENERATOR
    Logical Device for Generating Tone Effects (See OtxTone.h)
    OTX_LDEVICE_TONE_SINEWAVE_GENERATOR
    Logical Device for Generating Sine Wave (See OtxTone.h)
    OTX_LDEVICE_TONE_DTMF_GENERATOR
    Logical Device for Generating single DTMF tone (See OtxTone.h)
    OTX_LDEVICE_TONE_MF_GENERATOR
    Logical Device for Generating single MF tone (See OtxTone.h)
    OTX_LDEVICE_TONE_SEQUENCE_GENERATOR
    Logical Device for Generating Sequence of Frequencies (See OtxTone.h)
    OTX_LDEVICE_TONE_DTMF_DIALER
    Logical Device for Generating Sequence of DTMF tones (See OtxTone.h)
    OTX_LDEVICE_TONE_MF_DIALER
    Logical Device for Generating Sequence of MF tones (See OtxTone.h)
    OTX_LDEVICE_TONE_SILENCE_DETECTOR
    Logical Device for Silence Detection (See OtxTone.h)
    OTX_LDEVICE_TONE_DIALTONE_DETECTOR
    Logical Device for Dial Tone Detection (See OtxTone.h)
    OTX_LDEVICE_TONE_DTMF_DETECTOR
    Logical Device for DTMF Detection (See OtxTone.h)
    OTX_LDEVICE_TONE_MF_DETECTOR
    Logical Device for MF Detection (See OtxTone.h)
    OTX_LDEVICE_TONE_FSK_DETECTOR
    Logical Device for FSK Detection (See OtxTone.h)
    OTX_LDEVICE_DATA_RAW_SENDER
    Logical Device for Sending Raw Data (See OtxData.h)
    OTX_LDEVICE_DATA_RAW_RECEIVER
    Logical Device for Receiving Raw Data (See OtxData.h)
    OTX_LDEVICE_DATA_CONVERTER
    Logical Device for Converting from one data format to another (See OtxData.h)
    OTX_LDEVICE_DATA_MIXER
    Multiplexes (mixes) N inputs to 1 output. Allows device or pipe outputs to be connected together (See OtxData.h)
    OTX_LDEVICE_DATA_CONFERENCE_BRIDGE
    Conference Bridge. Conferences N inputs to N outputs. Allows construction of multi-party conferences (See OtxData.h)
    OTX_LDEVICE_HDLC_SENDER
    Logical Device for sending HDLC Framing (See OtxHdlc.h)
    OTX_LDEVICE_HDLC_RECEIVER
    Logical Device for receiving HDLC Framing (See OtxHdlc.h)
    OTX_LDEVICE_T1_ROB_BIT_ACCESS
    Logical Device for T1 Bit Rob Signalling for CAS (See OtxT1E1.h)
    OTX_LDEVICE_E1_S_BIT_ACCESS
    Logical Device for E1 Sa and Si bits access (See OtxT1E1.h)
    OTX_LDEVICE_E1_ABCD_BIT_ACCESS
    Logical Device for E1 ABCD bit access for CAS (See OtxT1E1.h)
    OTX_LDEVICE_MODEM_V34_SENDER
    V.34bis Modem Emulation Sender
    OTX_LDEVICE_MODEM_V34_RECEIVER
    V.34bis Modem Emulation Receiver
    OTX_LDEVICE_FAX_V17_SENDER
    V.17 Fax Emulation Sender
    OTX_LDEVICE_FAX_V17_RECEIVER
    V.17 Fax Emulation Receiver
    OTX_LDEVICE_VOICE_ECHO_CANCELLER
    Voice Echo Canceller
    OTX_LDEVICE_VOICE_SILENCE_SUPRESSOR
    Voice Silence Canceller
    OTX_LDEVICE_VOICE_CODEC_G723_ENCODER
    G.723 Voice Codec Encoder
    OTX_LDEVICE_VOICE_CODEC_G723_DECODER
    G.723 Voice Codec Decoder
    OTX_LDEVICE_VOICE_CODEC_G729_ENCODER
    G.729 Voice Codec Encoder
    OTX_LDEVICE_VOICE_CODEC_G729_DECODER
    G.729 Voice Codec Decoder
    OTX_LDEVICE_USER_APPLICATION
    DSP User Application compliant with the OTX DSP Software Development Kit (SDK)
    OTX_LDEVICE_TONE_VAL_SAMPLER
    Logical Device for reading an 8-bit incoming sample (See OtxTone.h)
    OTX_LDEVICE_T1_DL_BIT_ACCESS
    Logical Device for FS/DL Bit Access (See OtxT1E1.h)
    OTX_LDEVICE_TONE_DUAL_DETECTOR
    Logical Device for Dual Tone Detection (See OtxTone.h)
    OTX_LDEVICE_TONE_SINGLE_DETECTOR
    Logical Device for Single Tone Detection (See OtxTone.h)
    OTX_LDEVICE_END
    Odin internal. Positive number

    Comments

    Note that logical devices are numbered so that they don't overlap with physical devices, hence by using the number, one can tell exactly what kind of logical or physical device it is. Only the 16 lower bits are used since we also support 16 bit platforms

    OtxMfDetectorAttributesE

    enum OtxMfDetectorAttributesE {
    	OTX_ATTR_MF_DETECTOR_VERBOSE_STATUS,
    	OTX_ATTR_MF_DETECTOR_THRESHOLD_TONE_ENERGY,
    	OTX_ATTR_MF_DETECTOR_THRESHOLD_PAUSE_ENERGY,
    	OTX_ATTR_MF_DETECTOR_THRESHOLD_TWIST,
    	OTX_ATTR_MF_DETECTOR_THRESHOLD_RELATIVE_3RD,
    };
    
    MF Detector Attributes
    Defined in: OtxToneD.h

    Members

    OTX_ATTR_MF_DETECTOR_VERBOSE_STATUS
    (OTX_ATTRIB_UINT32) Read/Write. Value range 0 through 10. Used mainly for debugging. When set to a value higher than 0 the MF detector will report energy level for tones which failed to meet the criteria for a valid tone/digit
    OTX_ATTR_MF_DETECTOR_THRESHOLD_TONE_ENERGY
    (OTX_ATTRIB_UINT32) Read/Write. Threshold for definite tone. The energy for two frequency components if the tone must both be above this level to be considered as a candidate for a detected MF tone.
    OTX_ATTR_MF_DETECTOR_THRESHOLD_PAUSE_ENERGY
    (OTX_ATTRIB_UINT32) Read/Write. Threshold for pause energy. All frequency components must be below this energy level to be considered as a pause (silence) between two tones.
    OTX_ATTR_MF_DETECTOR_THRESHOLD_TWIST
    (OTX_ATTRIB_UINT32) Read/Write. Twist. MaxEnergy-2ndMaxEnergy must be less than this threshold to be considered a candidate for a detected MF tone.
    OTX_ATTR_MF_DETECTOR_THRESHOLD_RELATIVE_3RD
    (OTX_ATTRIB_UINT32) Read/Write. The energy level of the 2nd highest frequency component must be this must larger than the the energy level of 3rd highest frequency component. I.e. 2ndMaxEnergy-3rdMaxEnergy must be greater than this threshold.

    OtxMfDetectorEventCodesE

    enum OtxMfDetectorEventCodesE {
    	OTX_MF_DETECTOR_EC_DIGIT,
    	OTX_MF_DETECTOR_EC_PAUSE,
    	OTX_MF_DETECTOR_EC_VERBOSE_STATUS,
    };
    
    MF Detector Event Codes
    Defined in: OtxToneD.h

    Members

    OTX_MF_DETECTOR_EC_DIGIT
    MF tone detected
    OTX_MF_DETECTOR_EC_PAUSE
    Pause detected
    OTX_MF_DETECTOR_EC_VERBOSE_STATUS
    Decode status

    OtxMfDetectorResultCodesE

    enum OtxMfDetectorResultCodesE {
    	OTX_MF_DETECTOR_RES_NO_TONE,
    	OTX_MF_DETECTOR_RES_TONE,
    };
    
    MF Detector Error Result Codes
    Defined in: OtxToneD.h

    Members

    OTX_MF_DETECTOR_RES_NO_TONE
    No MF tone presently detected
    OTX_MF_DETECTOR_RES_TONE
    MF tone is presently detected

    OtxMfDialerAttributesE

    enum OtxMfDialerAttributesE {
    ,
    };
    
    MF Dialer Attributes
    Defined in: OtxToneD.h

    OtxMfDialerEventCodesE

    enum OtxMfDialerEventCodesE {
    ,
    };
    
    MF Dialer Event Codes
    Defined in: OtxToneD.h

    OtxMfDialerResultCodesE

    enum OtxMfDialerResultCodesE {
    	OTX_MF_DIALER_RES_INVALID_MF_VALUE,
    	OTX_MF_DIALER_RES_BUSY,
    };
    
    MF Dialer Error Result Codes
    Defined in: OtxToneD.h

    Members

    OTX_MF_DIALER_RES_INVALID_MF_VALUE
    Invalid MF value
    OTX_MF_DIALER_RES_BUSY
    MF Dialer is busy

    OtxMfToneE

    enum OtxMfToneE {
    	OTX_TONE_MF_UNKNOWN,
    	OTX_TONE_MF_R1,
    	OTX_TONE_MF_R2_FORWARD,
    	OTX_TONE_MF_R2_BACKWARD,
    };
    
    Type of MF (Multi Frequency) tone
    Defined in: OtxToneD.h

    Members

    OTX_TONE_MF_UNKNOWN
    Invalid value
    OTX_TONE_MF_R1
    CCITT R1 MF tones:
    0: 0 (1300Hz/1500Hz)
    1: 1 (700Hz/900Hz)
    2: 2 (700Hz/1100Hz)
    3: 3 (900Hz/1100Hz)
    4: 4 (700Hz/1300Hz)
    5: 5 (900Hz/1300Hz)
    6: 6 (1100Hz/1300Hz)
    7: 7 (700Hz/1500Hz)
    8: 8 (900Hz/1500Hz)
    9: 9 (1100Hz/1500Hz)
    10: KP (1100Hz/1700Hz)
    11: ST (1500Hz/1700Hz)
    12: ST1 (900Hz/1700Hz)
    13: ST2 (1300Hz/1700Hz)
    14: ST3 (700Hz/1700Hz)
    OTX_TONE_MF_R2_FORWARD
    CCITT R2 MF Forward tones:
    1: (1380Hz/1500Hz)
    2: (1380Hz/1620Hz)
    3: (1500Hz/1620Hz)
    4: (1380Hz/1740Hz)
    5: (1500Hz/1740Hz)
    6: (1620Hz/1740Hz)
    7: (1380Hz/1860Hz)
    8: (1500Hz/1860Hz)
    9: (1620Hz/1860Hz)
    10: (1740Hz/1860Hz)
    11: (1380Hz/1980Hz)
    12: (1500Hz/1980Hz)
    13: (1620Hz/1980Hz)
    14: (1740Hz/1980Hz)
    15: (1860Hz/1980Hz)
    OTX_TONE_MF_R2_BACKWARD
    CCITT R2 MF Backward tones:
    1: (1140Hz/1020Hz)
    2: (1140Hz/900Hz)
    3: (1020Hz/900Hz)
    4: (1140Hz/780Hz)
    5: (1020Hz/780Hz)
    6: (900Hz/780Hz)
    7: (1140Hz/660Hz)
    8: (1020Hz/660Hz)
    9: (900Hz/660Hz)
    10: (780Hz/660Hz)
    11: (1140Hz/540Hz)
    12: (1020Hz/540Hz)
    13: (900Hz/540Hz)
    14: (780Hz/540Hz)
    15: (660Hz/540Hz)

    OtxPhysicalDeviceTypeE

    enum OtxPhysicalDeviceTypeE {
    	OTX_DEVICE_UNKNOWN,
    	OTX_DEVICE_DRIVER,
    	OTX_DEVICE_ARNI_PCI,
    	OTX_DEVICE_BALDER_PCMCIA,
    	OTX_DEVICE_BALDER_S_PCI,
    	OTX_DEVICE_BALDER_U_PCI,
    	OTX_DEVICE_THOR_PCI,
    	OTX_DEVICE_THOR_PCMCIA,
    	OTX_DEVICE_VIDAR_5x_PCI,
    	OTX_DEVICE_VIDAR_6x_PCI,
    	OTX_DEVICE_SIF_PCI,
    	OTX_DEVICE_VIDAR_5x_ASM,
    	OTX_DEVICE_VIDAR_6x_ASM,
    	OTX_DEVICE_VIDAR_55x4_ASM,
    	OTX_DEVICE_LI_CONTROLLER,
    	OTX_DEVICE_LI_POTS,
    	OTX_DEVICE_LI_SLIC,
    	OTX_DEVICE_LI_T1E1,
    	OTX_DEVICE_LI_BRI_S,
    	OTX_DEVICE_LI_BRI_U,
    	OTX_DEVICE_HDLC,
    	OTX_DEVICE_TSS,
    	OTX_DEVICE_DSP,
    	OTX_DEVICE_PROCESSOR,
    	OTX_DEVICE_PCI_BRIDGE,
    	OTX_DEVICE_CODEC,
    	OTX_DEVICE_EEPROM,
    	OTX_DEVICE_TBC,
    	OTX_DEVICE_QUAD_T1E1,
    	OTX_DEVICE_QUAD_CODEC,
    	OTX_DEVICE_THOR_8_PCI,
    	OTX_DEVICE_CT_BUS,
    	OTX_DEVICE_HERMOD_PCI,
    	OTX_DEVICE_GIMLE_16_PCI_PLUS,
    	OTX_DEVICE_VIDAR_5X1_ASM_BASIC,
    	OTX_DEVICE_THOR_1_PCI_BASIC,
    	OTX_DEVICE_VIDAR_5X4_ASM_CST,
    	OTX_DEVICE_VIDAR_5X4_ASM_V90,
    	OTX_DEVICE_VIDAR_5X4_ASM_EX,
    	OTX_DEVICE_THOR_8_PCI_PLUS,
    	OTX_DEVICE_THOR_2_PCI_PLUS,
    	OTX_DEVICE_SLEIPNIR_1_PCI,
    	OTX_DEVICE_VIDAR_55X12_PCI,
    	OTX_DEVICE_BURST,
    	OTX_DEVICE_VIDAR_5X4_ASM_PRO,
    	OTX_DEVICE_THOR_4_PCI_PLUS,
    	OTX_DEVICE_THOR_1_PCI_PLUS,
    };
    
    Type of physical device
    Defined in: OtxDev.h

    Members

    OTX_DEVICE_UNKNOWN
    Used in error conditions
    OTX_DEVICE_DRIVER
    The root device that represents the driver
    OTX_DEVICE_ARNI_PCI
    Board Arni-16-PCI
    OTX_DEVICE_BALDER_PCMCIA
    Board Balder-2-PCMCIA
    OTX_DEVICE_BALDER_S_PCI
    Board Balder-8S-PCI
    OTX_DEVICE_BALDER_U_PCI
    Board Balder-8U-PCI
    OTX_DEVICE_THOR_PCI
    Board Thor-1-PCI, Thor-2-PCI
    OTX_DEVICE_THOR_PCMCIA
    Board Thor-2-PCMCIA and Thor-2-PCMCIA-Plus
    OTX_DEVICE_VIDAR_5x_PCI
    Board Vidar-5x8-PCI, Vidar-5x12-PCI, Vidar-5x16-PCI
    OTX_DEVICE_VIDAR_6x_PCI
    Board Vidar-6x3-PCI
    OTX_DEVICE_SIF_PCI
    Board Sif-16-PCI, Sif-32-PCI
    OTX_DEVICE_VIDAR_5x_ASM
    Board Vidar-5x2-ASM, Vidar-5x4-ASM
    OTX_DEVICE_VIDAR_6x_ASM
    Board Vidar-6x1-ASM
    OTX_DEVICE_VIDAR_55x4_ASM
    Board Vidar-55x4-ASM
    OTX_DEVICE_LI_CONTROLLER
    Line Interface Controller for a Line Interface Group
    OTX_DEVICE_LI_POTS
    Analog telephone Line Interface - Phone side (See OtxPots.h)
    OTX_DEVICE_LI_SLIC
    Analog telephone Line Interface - Line Interface Side
    OTX_DEVICE_LI_T1E1
    T1/E1 Line Interface (See OtxT1E1.h)
    OTX_DEVICE_LI_BRI_S
    ISDN BRI S/T Line Interface (See OtxBri.h)
    OTX_DEVICE_LI_BRI_U
    ISDN BRI U Line Interface (See OtxBri.h)
    OTX_DEVICE_HDLC
    HDLC controller (See OtxHdlc.h)
    OTX_DEVICE_TSS
    Time space switch (See OtxBrd.h)
    OTX_DEVICE_DSP
    Digital Signal processor (See OtxDsp.h)
    OTX_DEVICE_PROCESSOR
    General Purpose Micro Processor
    OTX_DEVICE_PCI_BRIDGE
    PCI Board Bridge
    OTX_DEVICE_CODEC
    A/D, D/A converter. Connected to a external handset and/or speaker
    OTX_DEVICE_EEPROM
    EEPROM. Storage of persistent data
    OTX_DEVICE_TBC
    JTAG Test Bus Controller
    OTX_DEVICE_QUAD_T1E1
    Quad E1/T1 Device (hosting 4 OTX_DEVICE_LI_T1E1 devices)
    OTX_DEVICE_QUAD_CODEC
    Quad Codec (hosting 4 OTX_DEVICE_CODEC devices)
    OTX_DEVICE_THOR_8_PCI
    Board Thor-4-PCI, Thor-8-PCI
    OTX_DEVICE_CT_BUS
    CT Bus (H.100 or H.110) representing the cable which connects a number of boards
    OTX_DEVICE_HERMOD_PCI
    Board Hermod-PCI (PCI JTAG Adapter)
    OTX_DEVICE_GIMLE_16_PCI_PLUS
    Board Gimle-16-PCI-Plus (8 span T1/E1 probe)
    OTX_DEVICE_VIDAR_5X1_ASM_BASIC
    Board Vidar-5x1-ASM-Basic
    OTX_DEVICE_THOR_1_PCI_BASIC
    Board Thor-1-PCI-Basic
    OTX_DEVICE_VIDAR_5X4_ASM_CST
    Board Vidar-5x4-ASM-CST
    OTX_DEVICE_VIDAR_5X4_ASM_V90
    Board Vidar-5x4-ASM-V90
    OTX_DEVICE_VIDAR_5X4_ASM_EX
    Board Vidar-5x4-ASM-EX
    OTX_DEVICE_THOR_8_PCI_PLUS
    Board Thor-8-PCI-Plus
    OTX_DEVICE_THOR_2_PCI_PLUS
    Board Thor-2-PCI-Plus
    OTX_DEVICE_SLEIPNIR_1_PCI
    Board Sleipnir-1-PCI
    OTX_DEVICE_VIDAR_55X12_PCI
    Board Vidar-55x12-PCI
    OTX_DEVICE_BURST
    PCI DMA/Burst
    OTX_DEVICE_VIDAR_5X4_ASM_PRO
    Board Vidar-5x4-ASM-PRO
    OTX_DEVICE_THOR_4_PCI_PLUS
    Board Thor-4-PCI-Plus
    OTX_DEVICE_THOR_1_PCI_PLUS
    Board Thor-1-PCI-Plus

    OtxPipeCtBusConnectionS structure

    struct {
    	OTX_UINT32 nCtBus;
    	OTX_UINT32 nHighway;
    	OTX_UINT32 nTimeslot;
    } OtxPipeCtBusConnectionS;
    
    Interconnect information for a pipe (used by the OTX_ATTR_PIPE_CT_BUS_CONNECTIONS)
    Defined in: OtxType.h

    Members

    nCtBus
    CT Bus number
    nHighway
    Highway number on the CT bus
    nTimeslot
    Timeslot on the highway on the CT bus

    OtxPipeDeviceAttributesE

    enum OtxPipeDeviceAttributesE {
    	OTX_ATTR_PIPE_CAPACITY,
    	OTX_ATTR_PIPE_IN_CONNECTED,
    	OTX_ATTR_PIPE_OUT_CONNECTED,
    	OTX_ATTR_PIPE_IN_HIGHWAY,
    	OTX_ATTR_PIPE_OUT_HIGHWAY,
    	OTX_ATTR_PIPE_IN_CONN_MASK,
    	OTX_ATTR_PIPE_OUT_CONN_MASK,
    	OTX_ATTR_PIPE_IN_CONN_MASK_SIZE,
    	OTX_ATTR_PIPE_OUT_CONN_MASK_SIZE,
    	OTX_ATTR_PIPE_CT_BUS_CONNECTIONS_COUNT,
    	OTX_ATTR_PIPE_CT_BUS_CONNECTIONS_DETAILS,
    	OTX_ATTR_PIPE_AUTO_ENABLE,
    };
    
    Pipe Device Attributes
    Defined in: OtxType.h

    Members

    OTX_ATTR_PIPE_CAPACITY
    (OTX_ATTRIB_UINT32) Read-only. Capacity of the pipe in kbps
    OTX_ATTR_PIPE_IN_CONNECTED
    (OTX_ATTRIB_UINT32) Read-only. Handle of device connected to input, or OTX_INVALID_HANDLE_VALUE
    OTX_ATTR_PIPE_OUT_CONNECTED
    (OTX_ATTRIB_UINT32) Read-only. Handle of device connected to output, or OTX_INVALID_HANDLE_VALUE
    OTX_ATTR_PIPE_IN_HIGHWAY
    (OTX_ATTRIB_UINT32) Read-only. Number of the highway used as input
    OTX_ATTR_PIPE_OUT_HIGHWAY
    (OTX_ATTRIB_UINT32) Read-only. Number of the highway used as output
    OTX_ATTR_PIPE_IN_CONN_MASK
    (OTX_ATTRIB_OCTETS) Read-only. Connection mask for input (how connected to "in" highway)
    OTX_ATTR_PIPE_OUT_CONN_MASK
    (OTX_ATTRIB_OCTETS) Read-only. Connection mask for output (how connected to "out" highway)
    OTX_ATTR_PIPE_IN_CONN_MASK_SIZE
    (OTX_ATTRIB_UINT32) Read-only. Size of the input connection mask (in octets)
    OTX_ATTR_PIPE_OUT_CONN_MASK_SIZE
    (OTX_ATTRIB_UINT32) Read-only. Size of the output connection mask (in octets)
    OTX_ATTR_PIPE_CT_BUS_CONNECTIONS_COUNT
    (OTX_ATTRIB_UINT32) Read-only. If this pipe connects to a CT bus, this attribute returns the number timeslot connections that this pipe occupies on the CT bus. This attribute can be used to determince the size of the array to supply to the OTX_ATTR_PIPE_CT_BUS_CONNECTIONS_DETAILS attribute.
    OTX_ATTR_PIPE_CT_BUS_CONNECTIONS_DETAILS
    (OTX_ATTRIB_OCTETS) Read-only. If this pipe is connected to an H.100/H.110 CT bus and is the source in such a connection, this attribute supplies the connection information for this pipe as an an array of OtxPipeCtBusConnectionS. The size of the array to supply to this attribute can be determined with the OTX_ATTR_PIPE_CT_BUS_CONNECTIONS_COUNT attribute.
    OTX_ATTR_PIPE_AUTO_ENABLE
    (OTX_ATTRIB_BOOL) Read/Write. Default is OTX_TRUE.
    If this attribute is set to OTX_TRIE the pipe is automatically enabled (i.e. it will transfer data) when the pipe is connected through a call to OtxDrvConnectPipe.
    If set to OTX_FALSE data will flow through the pipe first when the pipe is enable via a call to OtxDrvEnable.

    OtxPipeEndE

    enum OtxPipeEndE {
    	OTX_PIPE_INPUT,
    	OTX_PIPE_OUTPUT,
    };
    
    End of a Pipe. A pipe is always one-directional serial bit stream having an input and an output. Two pipes are needed for a duplex connection between two devices.
    Defined in: OtxType.h

    Members

    OTX_PIPE_INPUT
    Pipe end which receives data from a device
    OTX_PIPE_OUTPUT
    Pipe end that delivers data to a device

    Example

    A Pipe can be characterized as follows
    <nl>
    <nl>                                     Control
    <nl>                              User Handle (OTX_HANDLE)
    <nl>                                        |
    <nl>                                       \\|/
    <nl>                     +----------------------------------------+
    <nl> OTX_PIPE_INPUT ---> |       Pipe with a set capacity         | ---> OTX_PIPE_OUTPUT
    <nl>                     +----------------------------------------+
    <nl>
    <nl>
    

    OtxPotsCfgSetE

    enum OtxPotsCfgSetE {
    	OTX_POTS_CFG_SET_USA,
    	OTX_POTS_CFG_SET_GERMANY,
    	OTX_POTS_CFG_SET_UK,
    	OTX_POTS_CFG_SET_FRANCE,
    	OTX_POTS_CFG_SET_AUSTRALIA,
    	OTX_POTS_CFG_SET_JAPAN,
    };
    
    POTS Country Specific configuration sets (to be used with the OTX_ATTR_POTS_CFG_SET attribute
    Defined in: OtxPotsD.h

    Members

    OTX_POTS_CFG_SET_USA
    POTS configuration for USA
    OTX_POTS_CFG_SET_GERMANY
    POTS configuration for Germany
    OTX_POTS_CFG_SET_UK
    POTS configuration for United Kingdom
    OTX_POTS_CFG_SET_FRANCE
    POTS configuration for France
    OTX_POTS_CFG_SET_AUSTRALIA
    POTS configuration for Australia
    OTX_POTS_CFG_SET_JAPAN
    POTS configuration for Japan

    OtxPotsDeviceAttributesE

    enum OtxPotsDeviceAttributesE {
    	OTX_ATTR_POTS_CID_ENABLED,
    	OTX_ATTR_POTS_CFG_SET,
    };
    
    POTS Device Attributes
    Defined in: OtxPotsD.h

    Members

    OTX_ATTR_POTS_CID_ENABLED
    (OTX_ATTRIB_BOOL) Read/Write. For OTX_DEVICE_LI_POTS devices. Caller ID detection enabled/disabled
    OTX_ATTR_POTS_CFG_SET
    (OTX_ATTRIB_UINT32) Read/Write. For OTX_DEVICE_LI_CONTROLLER devices. Set the Country Specific configuration set for the POTS line interface (e.g. DC characteristics, ringer impedance, filter coefficients, etc). Please see OtxPotsCfgSetE for supported configuration sets.

    OtxPotsEventCodeE

    enum OtxPotsEventCodeE {
    	OTX_POTS_WAKE_UP,
    	OTX_POTS_RING_SIGNAL_DETECTED,
    	OTX_POTS_RING_SIGNAL_ON,
    	OTX_POTS_RING_SIGNAL_OFF,
    	OTX_POTS_INVALID_RING_SIGNAL,
    	OTX_POTS_CALLER_ID,
    };
    
    POTS Notify Causes. Note: Inband signals (e.g. DTMF digits) must be detected by a DSP module
    Defined in: OtxPotsD.h

    Members

    OTX_POTS_WAKE_UP
    Ring signal detected waking-up the line interface device, which had been in power-down mode.
    OTX_POTS_RING_SIGNAL_DETECTED
    A ring signal has been detected on tip and ring
    OTX_POTS_RING_SIGNAL_ON
    Ring signal On-State detected (Off --> On transition)
    OTX_POTS_RING_SIGNAL_OFF
    Ring signal Off-state detected (On --> Off transition)
    OTX_POTS_INVALID_RING_SIGNAL
    An invalid ring signal detected
    OTX_POTS_CALLER_ID
    Caller-ID (FSK octets) have been received

    OtxPotsLiModeE

    enum OtxPotsLiModeE {
    	OTX_POTS_MODE_SLEEP,
    	OTX_POTS_MODE_RINGING,
    	OTX_POTS_MODE_CONVERSATION,
    	OTX_POTS_MODE_PULSE_DIALING,
    };
    
    Operating modes of the POTS Line Interface (Li) Devices.
    Defined in: OtxPotsD.h

    Members

    OTX_POTS_MODE_SLEEP
    The line interface device is sleeping
    OTX_POTS_MODE_RINGING
    The line interface device is ringing
    OTX_POTS_MODE_CONVERSATION
    The line interface device is in conversation mode
    OTX_POTS_MODE_PULSE_DIALING
    The line interface device is pulse dialing

    Developer Notes

    The values are meaningful

    See Also

    OtxPotsSetLiMode OtxPotsGetLiMode

    OtxPotsRegsE

    enum OtxPotsRegsE {
    	OTX_POTS_CR0,
    	OTX_POTS_CR1,
    	OTX_POTS_CR2,
    	OTX_POTS_CR3,
    	OTX_POTS_CR4,
    	OTX_POTS_CR5,
    	OTX_POTS_XR0,
    	OTX_POTS_XR1,
    	OTX_POTS_XR2,
    	OTX_POTS_XR3,
    	OTX_POTS_XR4,
    	OTX_POTS_XR5,
    	OTX_POTS_XR6,
    	OTX_POTS_XR7,
    };
    
    Alis Direct Register Access for use with OtxDrvReadReg8 and OtxDrvWriteReg8
    Defined in: OtxPotsD.h

    Members

    OTX_POTS_CR0
    SOP Register CR0
    OTX_POTS_CR1
    SOP Register CR1
    OTX_POTS_CR2
    SOP Register CR2
    OTX_POTS_CR3
    SOP Register CR3
    OTX_POTS_CR4
    SOP Register CR4
    OTX_POTS_CR5
    SOP Register CR5
    OTX_POTS_XR0
    XOP Register XR0
    OTX_POTS_XR1
    XOP Register XR1
    OTX_POTS_XR2
    XOP Register XR2
    OTX_POTS_XR3
    XOP Register XR3
    OTX_POTS_XR4
    XOP Register XR4
    OTX_POTS_XR5
    XOP Register XR5
    OTX_POTS_XR6
    XOP Register XR6
    OTX_POTS_XR7
    XOP Register XR7

    OtxPrbsModeE

    enum OtxPrbsModeE {
    	OTX_T1E1_PRBS_MONITOR_ON,
    	OTX_T1E1_PRBS_GENERATE_ON,
    	OTX_T1E1_PRBS_DISABLE,
    };
    
    Pseudo Random Bit Sequence (PRBS) action type
    Defined in: OtxT1E1D.h

    Members

    OTX_T1E1_PRBS_MONITOR_ON
    Enable PRBS monitor
    OTX_T1E1_PRBS_GENERATE_ON
    Enable PRBS generate
    OTX_T1E1_PRBS_DISABLE
    Disable PRBS monitor or generate

    See Also

    OtxT1E1SetPrbsConfig OtxPrbsPatternE

    OtxPrbsPatternE

    enum OtxPrbsPatternE {
    	OTX_PRBS_2_15,
    	OTX_PRBS_2_20,
    };
    
    Pseudo Random Bit Sequence (PRBS) Line Loopback Pattern
    Defined in: OtxT1E1D.h

    Members

    OTX_PRBS_2_15
    Pattern 2^15-1
    OTX_PRBS_2_20
    Pattern 2^20-1

    See Also

    OtxT1E1SetPrbsConfig OtxPrbsModeE

    OtxRawDataReceiverAttributesE

    enum OtxRawDataReceiverAttributesE {
    	OTX_ATTR_RAWDATA_RECEIVER_FIFO_SIZE,
    	OTX_ATTR_RAWDATA_RECEIVER_GENERATE_DATA_EVENTS,
    };
    
    RAWDATA Receiver Attributes
    Defined in: OtxRawD.h

    Members

    OTX_ATTR_RAWDATA_RECEIVER_FIFO_SIZE
    (OTX_ATTRIB_UINT32) Read/Write. Fifo buffer size factor for received data in the driver. The fifo is allocated when the logical device is connected. Total fifo size in bytes is this attribute * (PipeCapacity/64).
    OTX_ATTR_RAWDATA_RECEIVER_GENERATE_DATA_EVENTS
    (OTX_ATTRIB_BOOL) Read/Write. If set to OTX_TRUE (default) the device will generate a OTX_RAWDATA_RECEIVER_EC_DATA_AVAILABLE event when the device has any data to be retrieved from the driver buffer. By setting this attribute to OTX_FALSE, such events are not generated, thus reducing event handling processing overhead.

    OtxRawDataReceiverEventCodesE

    enum OtxRawDataReceiverEventCodesE {
    	OTX_RAWDATA_RECEIVER_EC_DATA_AVAILABLE,
    	OTX_RAWDATA_RECEIVER_EC_BUFFER_OVERRUN,
    	OTX_RAWDATA_RECEIVER_EC_SYNC_ENABLE_TRIGGERED,
    	OTX_RAWDATA_RECEIVER_EC_SYNC_DISABLE_TRIGGERED,
    };
    
    RAWDATA Receiver Event Codes
    Defined in: OtxRawD.h

    Members

    OTX_RAWDATA_RECEIVER_EC_DATA_AVAILABLE
    Raw Data is available to be retrieved by calling OtxRawDataReadData Generation of this event can be blocked by setting the OTX_ATTR_RAWDATA_RECEIVER_GENERATE_DATA_EVENTS attribute to OTX_FALSE.
    OTX_RAWDATA_RECEIVER_EC_BUFFER_OVERRUN
    Raw Data Buffer Overrun. The host is too slow retrieving the data from the Raw Data Receiver
    OTX_RAWDATA_RECEIVER_EC_SYNC_ENABLE_TRIGGERED
    The trigger condition for the synchronized enabling of the device has now been triggered. The device is now enabled.
    OTX_RAWDATA_RECEIVER_EC_SYNC_DISABLE_TRIGGERED
    The trigger condition for the synchronized disabling of the device has now been triggered. The device is now disabled.

    OtxRawDataReceiverResultCodesE

    enum OtxRawDataReceiverResultCodesE {
    ,
    };
    
    RAWDATA Receiver Error Result Codes
    Defined in: OtxRawD.h

    OtxRawDataSenderAttributesE

    enum OtxRawDataSenderAttributesE {
    	OTX_ATTR_RAWDATA_SENDER_GENERATE_DATA_EVENTS,
    };
    
    RAWDATA Sender Attributes
    Defined in: OtxRawD.h

    Members

    OTX_ATTR_RAWDATA_SENDER_GENERATE_DATA_EVENTS
    (OTX_ATTRIB_BOOL) Read/Write. If set to OTX_TRUE (default) the device will generate a OTX_RAWDATA_SENDER_EC_BUF_DEPLETED event when the device is ready to accept more data. By setting this attribute to OTX_FALSE, such events are not generated, thus reducing event handling processing overhead.

    OtxRawDataSenderEventCodesE

    enum OtxRawDataSenderEventCodesE {
    	OTX_RAWDATA_SENDER_EC_COMPLETED,
    	OTX_RAWDATA_SENDER_EC_BUF_DEPLETED,
    	OTX_RAWDATA_SENDER_EC_SYNC_ENABLE_TRIGGERED,
    	OTX_RAWDATA_SENDER_EC_SYNC_DISABLE_TRIGGERED,
    	OTX_RAWDATA_SENDER_EC_BUFFER_UNDERRUN,
    };
    
    Raw Data Sender Event Codes
    Defined in: OtxRawD.h

    Members

    OTX_RAWDATA_SENDER_EC_COMPLETED
    Raw Data completely sent. The device is now sending flags. This event will also occur if the host is too slow to provide data to the Raw Data Sender device (i.e. when the device is starving for data).
    OTX_RAWDATA_SENDER_EC_BUF_DEPLETED
    Raw Data Sender has completed sending a buffer (the buffer with m_nRequestId as passed nTaskRef in OtxRawDataSendData). The device is now accepting more data. Generation of this event can be blocked by setting the OTX_ATTR_RAWDATA_SENDER_GENERATE_DATA_EVENTS attribute to OTX_FALSE before OtxRawDataSenderInit is called.
    OTX_RAWDATA_SENDER_EC_SYNC_ENABLE_TRIGGERED
    The trigger condition for the synchronized enabling of the device has now been triggered. The device is now enabled.
    OTX_RAWDATA_SENDER_EC_SYNC_DISABLE_TRIGGERED
    The trigger condition for the synchronized disabling of the device has now been triggered. The device is now disabled.
    OTX_RAWDATA_SENDER_EC_BUFFER_UNDERRUN
    The host is too slow supplying data to be sent to the Raw Data Sender.

    OtxRawDataSenderResultCodesE

    enum OtxRawDataSenderResultCodesE {
    	OTX_RAWDATA_SENDER_RES_TX_BUSY,
    	OTX_RAWDATA_SENDER_RES_FRAME_TOO_LONG,
    };
    
    Raw Data Sender Error Result Codes
    Defined in: OtxRawD.h

    Members

    OTX_RAWDATA_SENDER_RES_TX_BUSY
    Transmitter queue is full.
    OTX_RAWDATA_SENDER_RES_FRAME_TOO_LONG
    Data buffer too long.

    OtxSilenceDetectorEventCodesE

    enum OtxSilenceDetectorEventCodesE {
    ,
    };
    
    Silence Detector Event Codes
    Defined in: OtxToneD.h

    OtxSilenceDetectorResultCodesE

    enum OtxSilenceDetectorResultCodesE {
    ,
    };
    
    Silence Detector Error Result Codes
    Defined in: OtxToneD.h

    OtxSineWaveGeneratorEventCodesE

    enum OtxSineWaveGeneratorEventCodesE {
    ,
    };
    
    SineWave Generator Event Codes
    Defined in: OtxToneD.h

    OtxSineWaveGeneratorResultCodesE

    enum OtxSineWaveGeneratorResultCodesE {
    ,
    };
    
    SineWave Generator Error Result Codes
    Defined in: OtxToneD.h

    OtxSingleToneDetectorAttributesE

    enum OtxSingleToneDetectorAttributesE {
    	OTX_ATTR_SINGLE_TONE_DETECTOR_VERBOSE_STATUS,
    	OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_TONE_ENERGY,
    	OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_VARIANCE_ENERGY,
    	OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_PAUSE_ENERGY,
    };
    
    Single Tone Detector Attributes
    Defined in: OtxToneD.h

    Members

    OTX_ATTR_SINGLE_TONE_DETECTOR_VERBOSE_STATUS
    (OTX_ATTRIB_UINT32) Read/Write. Value range 0 through 10. Used mainly for tuning the threshold parameters to comply with detection criteria. The value 0 (default) does not generate any verbose status messages. The higher the value, the more verbose information the detector is generating.
    OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_TONE_ENERGY
    (OTX_ATTRIB_UINT32) Read/Write. Threshold for definite tone. The energy for two frequency components if the tone must both be above this level to be considered as a candidate for a detected MF tone. Default value is 1000.
    OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_VARIANCE_ENERGY
    (OTX_ATTRIB_UINT32) Read/Write. Maximum variance in energy between current energy level and the average of the energy level received so far. A higher value will make the single tone check less stringent. Default value is 200.
    OTX_ATTR_SINGLE_TONE_DETECTOR_THRESHOLD_PAUSE_ENERGY
    (OTX_ATTRIB_UINT32) Read/Write. Threshold for pause energy. All frequency components must be below this energy level to be considered as a pause (silence) between two tones. Default value is 200.

    OtxSingleToneDetectorEventCodesE

    enum OtxSingleToneDetectorEventCodesE {
    	OTX_SINGLE_TONE_DETECTOR_EC_TONE,
    	OTX_SINGLE_TONE_DETECTOR_EC_PAUSE,
    	OTX_SINGLE_TONE_DETECTOR_EC_VERBOSE_STATUS,
    };
    
    Single Detector Event Codes
    Defined in: OtxToneD.h

    Members

    OTX_SINGLE_TONE_DETECTOR_EC_TONE
    Dual tone detected
    OTX_SINGLE_TONE_DETECTOR_EC_PAUSE
    Pause detected
    OTX_SINGLE_TONE_DETECTOR_EC_VERBOSE_STATUS
    Decode status

    OtxSingleToneDetectorResultCodesE

    enum OtxSingleToneDetectorResultCodesE {
    	OTX_SINGLE_TONE_DETECTOR_RES_NO_TONE,
    	OTX_SINGLE_TONE_DETECTOR_RES_TONE,
    };
    
    Single Detector Error Result Codes
    Defined in: OtxToneD.h

    Members

    OTX_SINGLE_TONE_DETECTOR_RES_NO_TONE
    No Dual tone presently detected
    OTX_SINGLE_TONE_DETECTOR_RES_TONE
    Dual tone is presently detected

    OtxT1ConfigOptionsS structure

    struct {
    	OtxT1SignallingModeE eSignalingMode;
    	OtxT1LineCodeE eTxLineCode;
    	OtxT1LineCodeE eRxLineCode;
    	OtxT1FrameFormatE eFrameFormat;
    	OTX_BOOL bCRC6Enable;
    	OtxT1RemoteAlarmFormatE eTxRemoteAlarmFormat;
    	OtxT1RemoteAlarmFormatE eRxRemoteAlarmFormat;
    	OTX_BOOL bAutoResync;
    	OTX_BOOL bAutoCrcBitInversion;
    	OtxT1LfaSensitivityE eLfaSensitivity;
    	OTX_BOOL bAutoRemoteAlarm;
    	OTX_UINT8 nLosSensitivity;
    	OTX_UINT8 nLosRecovery;
    	OTX_UINT16 nLineLength;
    	OTX_BOOL bHighTxPower;
    	OTX_BOOL bReceiveEqualizer;
    	OTX_UINT32 bfClearChannels;
    } OtxT1ConfigOptionsS;
    
    T1 Line Interface Configuration Options
    Defined in: OtxT1E1D.h

    Members

    eSignalingMode
    Signalling Mode. See type OtxT1SignallingModeE.
    This setting is only used for boards equipped with the PEB2255 Line Interface device. For boards equipped with the PEB2256 (Falc56) or the PEB22554 (QuadFalc) the signalling mode is controlled by the bfClearChannels setting alone.
    eTxLineCode
    Line Coding in Transmit Direction. See type OtxT1LineCodeE
    eRxLineCode
    Line Coding in Receive Direction
    eFrameFormat
    Frame Format. See type OtxT1FrameFormatE
    bCRC6Enable
    Set whether CRC6 checking and generation will be enabled when using the ESF frame format. When disabled, the receive will not perform the CRC6 check and the CRC6 bits are set to `1' to the transmit direction.
    eTxRemoteAlarmFormat
    Transmit Remote Alarm Format. See type OtxT1RemoteAlarmFormatE
    eRxRemoteAlarmFormat
    Receive Remote Alarm Format. See type OtxT1RemoteAlarmFormatE
    bAutoResync
    If OTX_TRUE, the Framer will automatically re-synchronize after loss of synchronization. If OTX_FALSE the Framer will not synchronize automatically but a re-synchronization procedure must be specifically initiated by the software.
    bAutoCrcBitInversion
    Valid only for ESF frame format. For other frame format this value is ignored.
    If OTX_TRUE, all CRC6 bits of one outgoing sub-multiframe are inverted in case a CRC6 error is flagged for the previous received sub-multiframe.
    eLfaSensitivity
    Loss of Frame Alignment Sensitivity. See type OtxT1LfaSensitivityE
    bAutoRemoteAlarm
    If OTX_TRUE, a Remote Alarm (Yellow Alarm) will be sent automatically in the outgoing data stream when the receiver is out of synchronization. The alarm will also be automatically removed when the receiver returns to the synchronized state.
    nLosSensitivity
    Sets the sensitivity level for the Loss Of Signal (LOS) detection. A LOS alarm will be generated if the incoming data stream has no transitions during programmable number (N) of consecutive pulse periods. The number given as the LOS Sensitivity value will be multiplied by 16 to arrive to the pulse count number N. The time for detecting LOS will be 16 x LOS Sensitivity x Pulse Length (488ns). The maximum time is 16 x 256 x 488ns = 2ms
    Possible Values: 1-256
    Example Value: LOS Sensitivity = 128 (16 x 128 x 488ns = 1ms)
    nLosRecovery
    Sets the sensitivity level for the Loss Of Signal (LOS) recovery. A LOS alarm will be cleared if in the incoming data a number of Pulses (N) occur during the time period set with the LOS Recovery parameter. The time interval starts with the first detected pulse transition and a pulse count is incremented with every received pulse. If the pulse number is greater than the number N set with this parameter, the LOS alarm will be cleared.
    Possible Values: 1-256
    nLineLength
    Specify the length of the T1 line cable in meters. This information is used by the T1 transceivers to adjust the transmit pulse masks according to the line length.
    Possible Values: 0-65535
    bHighTxPower
    When OTX_TRUE the pulses on the line interface will be sent with high power. If OTX_FALSE the pulses will be sent with low power.
    bReceiveEqualizer
    The Receive Equalizer can be used match the 18dB ITU-T I.431 requirement. When the Equalizer is turned off (OTX_FALSE), the Receiver is 6dB, when turned on, the Receiver is 18dB.
    bfClearChannels
    If bit robbed signalling is used (e.g. OTX_LDEVICE_T1_ROB_BIT_ACCESS) and if a specific channel needs to use all 8 bits of a timeslot (e.g. a 64 kbps HDLC channel), then this channel needs to be designated as a "clear channel". A channel designated as a clear channel is not overwritten by internal or external bit robbing and ZCS information. Transmission of channel assigned signaling and control of pulse density must applied by the user. This field marks which channels are clear channels, and which channels are robbed bit channels.
    The value in this parameter contains a bit pattern, where a '1' indicates a clear channel. The least significant bit corresponds to Time-Slot 0 (TS0), bit 1 to TS1, etc.
    To define no channels as clear channels set this value to 0x000000.
    To define only TS24 as a clear channel set this value to 0x800000.

    See Also

    OtxT1SetConfiguration OtxT1GetConfiguration

    OtxT1E1AlarmTypeE

    enum OtxT1E1AlarmTypeE {
    	OTX_T1E1_ALARM_AUXP,
    	OTX_T1E1_ALARM_AIS,
    	OTX_T1E1_ALARM_RAI,
    	OTX_T1E1_ALARM_SIMULATION,
    };
    
    Alarms types that can be send towards the Remote End
    Defined in: OtxT1E1D.h

    Members

    OTX_T1E1_ALARM_AUXP
    Alarm Type Auxilliary Pattern (AUXP)
    OTX_T1E1_ALARM_AIS
    Alarm Indication Signal (AIS, Blue Alarm)
    OTX_T1E1_ALARM_RAI
    Remote Alarm Indication (RAI, Yellow Alarm)
    OTX_T1E1_ALARM_SIMULATION
    Initiates internal error simulation of AIS, loss of signal, loss of synchronization, auxilliary pattern indication, slip, framing errors, CRC errors, and code violations.

    See Also

    OtxT1E1AlarmOn OtxT1E1AlarmOff

    OtxT1E1AttributesE

    enum OtxT1E1AttributesE {
    	OTX_ATTR_T1E1_TX_PULSE_MASK_SUB_PULSE_0,
    	OTX_ATTR_T1E1_TX_PULSE_MASK_SUB_PULSE_1,
    	OTX_ATTR_T1E1_TX_PULSE_MASK_SUB_PULSE_2,
    	OTX_ATTR_T1E1_TX_PULSE_MASK_SUB_PULSE_3,
    	OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS,
    	OTX_ATTR_T1E1_S_BIT_CHANGE_EVENTS,
    	OTX_ATTR_T1E1_SECONDS_INTERRUPT,
    	OTX_ATTR_T1E1_AUTOMATIC_RESET,
    	OTX_ATTR_T1E1_RX_INPUT_THRESHOLD,
    	OTX_ATTR_T1E1_TR08_MODE,
    	OTX_ATTR_T1E1_RX_AMPLIFIER,
    	OTX_ATTR_T1E1_AUTOMATIC_FORCE_RESYNC,
    	OTX_ATTR_T1E1_AUTOMATIC_LOOP_CODE_RESPONSE,
    	OTX_ATTR_T1E1_LOOP_UP_CODE_ENABLE,
    	OTX_ATTR_T1E1_LOOP_DOWN_CODE_ENABLE,
    	OTX_ATTR_T1E1_LOOP_CODE_PATTERN,
    	OTX_ATTR_T1E1_TX_IDLE_CHARACTER,
    	OTX_ATTR_T1E1_USE_TX_IDLE_CHARACTER,
    	OTX_ATTR_T1E1_LINE_VOLTAGE,
    };
    
    T1E1 Attributes
    Defined in: OtxT1E1D.h

    Members

    OTX_ATTR_T1E1_TX_PULSE_MASK_SUB_PULSE_0
    (OTX_ATTRIB_UINT32) Read/Write. First (of four) sub pulse shape value of the transmit pulse mask. This 5-bit value defines the level of the analog voltage in steps of about 80mV (for this sub pulse) on transmit pins of the E1T1 span.
    OTX_ATTR_T1E1_TX_PULSE_MASK_SUB_PULSE_1
    (OTX_ATTRIB_UINT32) Read/Write. Second (of four) sub pulse shape value of the transmit pulse mask. This 5-bit value defines the level of the analog voltage in steps of about 80mV (for this sub pulse) on transmit pins of the E1T1 span.
    OTX_ATTR_T1E1_TX_PULSE_MASK_SUB_PULSE_2
    (OTX_ATTRIB_UINT32) Read/Write. Third (of four) sub pulse shape value of the transmit pulse mask. This 5-bit value defines the level of the analog voltage in steps of about 80mV (for this sub pulse) on transmit pins of the E1T1 span.
    OTX_ATTR_T1E1_TX_PULSE_MASK_SUB_PULSE_3
    (OTX_ATTRIB_UINT32) Read/Write. Forth (of four) sub pulse shape value of the transmit pulse mask. This 5-bit value defines the level of the analog voltage in steps of about 80mV (for this sub pulse) on transmit pins of the E1T1 span.
    OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS
    (OTX_ATTRIB_BOOL) Read/Write. If set to OTX_TRUE, the ABCD bit devices (OTX_LDEVICE_T1_ROB_BIT_ACCESS and OTX_LDEVICE_E1_ABCD_BIT_ACCESS) will report changes in the ABCD bit code on a channelized basis (using the OTX_T1E1_EC_BITROB_SIGNALING event). The m_nParam field in the OTX_T1E1_EC_BITROB_SIGNALING event will contain channel number in bit12-bit8 and the ABCD bit code in bit3-bit0 (A=bit3,B=bit2,C=bit1,D=bit0)
    The default is OTX_FALSE and OTX_LDEVICE_E1_ABCD_BIT_ACCESS event then contains ABCD bit information as described by OtxE1ABCDBitDataS and OtxT1RobBitDataS.
    OTX_ATTR_T1E1_S_BIT_CHANGE_EVENTS
    (OTX_ATTRIB_BOOL) Read/Write. If set to OTX_TRUE, OTX_LDEVICE_E1_S_BIT_ACCESS will generate an OTX_T1E1_EC_SA_BITS_CHANGED event for each change in the received Sa bits.
    OTX_ATTR_T1E1_SECONDS_INTERRUPT
    (OTX_ATTRIB_BOOL) Read/Write. Default is OTX_FALSE. If set to OTX_TRUE, the device will generate OTX_T1E1_EC_SEC event once every second. This event can be utilized as a "heartbeat" watch dog from the device to verify that interrupts from this device are operational.
    OTX_ATTR_T1E1_AUTOMATIC_RESET
    (OTX_ATTRIB_BOOL) Read/Write. Default is OTX_TRUE. If set to OTX_TRUE, the device will generate monitor the contents of its register and if an unexpected discrepancy is encountered, the device will reset itself and reconfigure itself to the last known good state. If the automatic reset is triggered, the device generated an OTX_T1E1_EC_AUTO_RESET In case a scenario of cyclic resets occurs, this attribute will be set to OTX_FALSE after 10 reset attempts, to avoid a system lockup.
    OTX_ATTR_T1E1_RX_INPUT_THRESHOLD
    (OTX_ATTRIB_UINT32) Read/Write. In millivolts. No signal (OTX_T1E1_EC_LOS) is declared if the voltage between pins RL1 and RL2 (analog input pins to the T1E1 device) drops below this limit (in millivolts) and the received data stream has no transition for a period defined in nLosSensitivity. Note: The threshold voltage is dependant on the value set for bReceiveEqualizer. For further details please refer to the data sheet for the T1E1 device.
    OTX_ATTR_T1E1_TR08_MODE
    (OTX_ATTRIB_BOOL) Read/Write. If set to OTX_TRUE, the OTX_LDEVICE_T1_ROB_BIT_ACCESS device will decode the received AB bits according the TR08 specification, The following 9 states are reported:
    State \'97 (A B)
    =============
    0 \'97 (0 0)
    1 \'97 (0 1)
    2 \'97 (0 0/1)
    3 \'97 (1 0)
    4 \'97 (1 1)
    5 \'97 (1 0/1)
    6 \'97 (0/1 0)
    7 \'97 (0/1 1)
    8 \'97 (0/1 0/1)
    where "0/1" indicates toggling between 0 and 1.
    The state is on a channelized basis (using the OTX_T1E1_EC_TR08_STATE_CHANGE event). The m_nParam field in the OTX_T1E1_EC_TR08_STATE_CHANGE event will contain channel number in bit12-bit8 and the state number in bit3-bit0
    The default for this attribute is OTX_FALSE. For this attribute to have any effect OTX_ATTR_T1E1_CHANNELIZED_ABCD_BIT_ACCESS must be set OTX_TRUE. This mode OTX_T1_FF_F72 frame format.
    OTX_ATTR_T1E1_RX_AMPLIFIER
    (OTX_ATTRIB_BOOL) Read/Write. If set to OTX_TRUE, an amplifier is switched on in the front end circuitry of the T1/E1 span.
    This attribute is only applicable to the Thor-8-PCI-Plus and Gimle-16-PCI-Plus boards.
    OTX_ATTR_T1E1_AUTOMATIC_FORCE_RESYNC
    (OTX_ATTRIB_BOOL) Read/Write. Default is OTX_FALSE. If set to OTX_TRUE, the device will monitor the LOF condition and will attempt to force a resynchronization if LOF is detected. The LOF condition is checked once a second if the attribute OTX_ATTR_T1E1_SECONDS_INTERRUPT has been set to OTX_TRUE. If the automatic resync is triggered, the device will generate an OTX_T1E1_EC_AUTO_FORCE_RESYNC The number of remaining attempts is returned in the event data. When the remaining attempts reaches zero, this attribute will be set to OTX_FALSE.
    OTX_ATTR_T1E1_AUTOMATIC_LOOP_CODE_RESPONSE
    (OTX_ATTRIB_BOOL) Read/Write. Default is OTX_FALSE. If set to OTX_TRUE, the device will automatically respond to loop codes detected on the span.
    OTX_ATTR_T1E1_LOOP_UP_CODE_ENABLE
    (OTX_ATTRIB_BOOL) Read/Write. Default is OTX_FALSE. If set to OTX_TRUE, the device will keep sending the Line Loop Up Code on its T1 span.
    Note that this attribute is mutally exclusive with the OTX_ATTR_T1E1_LOOP_DOWN_CODE_ENABLE attribute.
    Note that this attribute is only implemented for T1 mode yet.
    OTX_ATTR_T1E1_LOOP_DOWN_CODE_ENABLE
    (OTX_ATTRIB_BOOL) Read/Write. Default is OTX_FALSE. If set to OTX_TRUE, the device will keep sending the Line Loop Down Code on its T1 span.
    Note that this attribute is mutally exclusive with the OTX_ATTR_T1E1_LOOP_UP_CODE_ENABLE attribute.
    Note that this attribute is only implemented for T1 mode yet.
    OTX_ATTR_T1E1_LOOP_CODE_PATTERN
    (OTX_ATTRIB_UINT32) Read/Write. Loop Code Bit Pattern (both Up and Down Codes). Default is 0, which means standard loop codes are applied. If set to a non-zero value, the following bit ranges apply:
    bit 31-24: Number of bits in the Loop Up Code
    bit 23-16: Bit pattern for the Loop Up Code
    bit 15-08: Number of bits in the Loop Down Code
    bit 07-00: Bit pattern for the Loop Down Code the upper 16 specifies the number of bits in the bit pattern (range is 2-8 bits). The lower 16 bits specifies the bit pattern.
    Common T1 Loop Codes are:
    Up:10000 Down:100 (attribute value 0x05100304) Customer Service Unit loop code.
    Up:1100 Down:1110 (attribute value 0x040C040E) In-band 4-bit facility, smart jack loop loop code.
    Up:11000 Down:11100 (attribute value 0x0518051C) In-band 5-bit facility, smart jack loop loop code.
    Up:100000 Down:100 (attribute value 0x06200304) In-band 6-bit facility, smart jack loop loop code.
    Up:01110000 Down:00011100 (attribute value 0x0870081C) ESF out-of-band Line loop codes
    Up:00101000 Down:01001100 (attribute value 0x0828084C) ESF out-of-band Payload loop codes
    Up:01001000 Down:00100100 (attribute value 0x08480824) ESF out-of-band Network loop codes


    Up:00001 Down:001 (attribute value 0x05010301) Customer Service Unit loop code.
    Up:0011 Down:0111 (attribute value 0x04030407) In-band 4-bit facility, smart jack loop loop code.
    Up:00011 Down:00111 (attribute value 0x05030507) In-band 5-bit facility, smart jack loop loop code.
    Up:000001 Down:001 (attribute value 0x06010301) In-band 6-bit facility, smart jack loop loop code.
    Up:00001110 Down:00111000 (attribute value 0x080E0838) ESF out-of-band Line loop codes
    Up:00010100 Down:00110010 (attribute value 0x08140832) ESF out-of-band Payload loop codes
    Up:00010010 Down:00100100 (attribute value 0x08120824) ESF out-of-band Network loop codes
    Note: Bit0 of the loop code bit pattern is transmitted last
    Note that this attribute is only implemented for T1 mode yet.

    OTX_ATTR_T1E1_TX_IDLE_CHARACTER
    (OTX_ATTRIB_UINT32) Read/Write. Character transmitted when a timeslot is in an idle state. This attribute sets a user defined idle character to be used when a call to OtxSetAttribute with OTX_ATTR_T1E1_USE_TX_IDLE_CHARACTER is set to OTX_TRUE.
    OTX_ATTR_T1E1_USE_TX_IDLE_CHARACTER
    (OTX_ATTRIB_BOOL) Read/Write. Flag to use a previously supplied idle character (see OTX_ATTR_T1E1_TX_IDLE_CHARACTER). When this attribute is called with a value of OTX_TRUE, then the user supplied idle character supplied with a previous call to OtxSetAttribute with OTX_ATTR_T1E1_TX_IDLE_CHARACTER, is set as the idle character. When set to false, if the Line Mode has been set, tnen the internal default idle character is used.
    OTX_ATTR_T1E1_LINE_VOLTAGE
    (OTX_ATTRIB_UINT32) Read only. Returns the T1/E1 span line voltage in millivolts (peak voltage).
    . The voltage range for the voltage meter is 0 - 4 Volts.
    . The accuracy is +/- 100mV.

    OtxT1E1ClkModeE

    enum OtxT1E1ClkModeE {
    ,
    };
    
    Clock mode
    Defined in: OtxT1E1D.h

    OtxT1E1DefectE

    enum OtxT1E1DefectE {
    	OTX_T1E1_DEFECT_FAS,
    	OTX_T1E1_DEFECT_MULTIFRAME,
    	OTX_T1E1_DEFECT_CRC,
    	OTX_T1E1_DEFECT_CAS,
    	OTX_T1E1_DEFECT_PRBS,
    	OTX_T1E1_DEFECT_BPV,
    };
    
    Single Bit Defect types
    Defined in: OtxT1E1D.h

    Members

    OTX_T1E1_DEFECT_FAS
    FAS (Frame Alignment Sequence) defect
    OTX_T1E1_DEFECT_MULTIFRAME
    Multiframe defect
    OTX_T1E1_DEFECT_CRC
    CRC defect
    OTX_T1E1_DEFECT_CAS
    CAS defect
    OTX_T1E1_DEFECT_PRBS
    Pseudo Random Binary Sequence defect. Only applicable in the device is configured in PRBS mode.
    OTX_T1E1_DEFECT_BPV
    Bipolar violation defect

    Comments

    A single bit defect can be inserted into the T1/E1 bit stream. This type describes the different types of defects (errors) that can be inserted.

    See Also

    OtxT1E1InsertSingleBitDefect

    OtxT1E1EventCodesE

    enum OtxT1E1EventCodesE {
    	OTX_T1E1_EC_T8MS_ISF,
    	OTX_T1E1_EC_CASC_RSC,
    	OTX_T1E1_EC_CRC4_CRC6,
    	OTX_T1E1_EC__CASE,
    	OTX_T1E1_EC_RDO,
    	OTX_T1E1_EC_XDU,
    	OTX_T1E1_EC_XLSC,
    	OTX_T1E1_EC_FAR,
    	OTX_T1E1_EC_LFA,
    	OTX_T1E1_EC_MFAR,
    	OTX_T1E1_EC_T400MS_LMFA,
    	OTX_T1E1_EC_AIS,
    	OTX_T1E1_EC_LOS,
    	OTX_T1E1_EC_RAR,
    	OTX_T1E1_EC_RA,
    	OTX_T1E1_EC_LMFA16_XSLP,
    	OTX_T1E1_EC_AIS16_,
    	OTX_T1E1_EC_RA16_LLBSC,
    	OTX_T1E1_EC_API_,
    	OTX_T1E1_EC_SLN,
    	OTX_T1E1_EC_SLP,
    	OTX_T1E1_EC_ACTIVE,
    	OTX_T1E1_EC_DEACTIVE,
    	OTX_T1E1_EC_XLS,
    	OTX_T1E1_EC_XLO,
    	OTX_T1E1_EC_XPR,
    	OTX_T1E1_EC_SEC,
    	OTX_T1E1_EC_ES,
    	OTX_T1E1_EC_RME,
    	OTX_T1E1_EC_RPF,
    	OTX_T1E1_EC_XSP,
    	OTX_T1E1_EC_XSN,
    	OTX_T1E1_EC_BITROB_SIGNALING,
    	OTX_T1E1_EC_FEC,
    	OTX_T1E1_EC_CVC,
    	OTX_T1E1_EC_EBC,
    	OTX_T1E1_EC_CEC1,
    	OTX_T1E1_EC_CEC2,
    	OTX_T1E1_EC_CEC3,
    	OTX_T1E1_EC_APIR,
    	OTX_T1E1_EC_LOSR,
    	OTX_T1E1_EC_LMFAR16,
    	OTX_T1E1_EC_AISR,
    	OTX_T1E1_EC_SA_BITS_CHANGED,
    	OTX_T1E1_EC_DL_BITS_RECEIVED,
    	OTX_T1E1_EC_DL_BITS_SENT,
    	OTX_T1E1_EC_AUTO_DISABLED,
    	OTX_T1E1_EC_AUTO_RESET,
    	OTX_T1E1_EC_TR08_STATE_CHANGE,
    	OTX_T1E1_EC_TR08_STATE_CHANGE,
    	OTX_T1E1_EC_QRSS_PAT_SYNC,
    	OTX_T1E1_EC_QRSS_PAT_SYNC,
    	OTX_T1E1_EC_QRSS_PAT_ASYNC,
    	OTX_T1E1_EC_BITERROR_UPDATE,
    	OTX_T1E1_EC_RX_LEVEL_UPDATE,
    	OTX_T1E1_EC_RX_EQ_ADAPTING,
    	OTX_T1E1_EC_RX_EQ_NOISE,
    	OTX_T1E1_EC_RX_EQ_INVALID,
    	OTX_T1E1_EC_WEAKSIGNAL,
    	OTX_T1E1_EC_PULSE_DETECTION_COMPLETE,
    	OTX_T1E1_EC_FF_SCAN_COMPLETE,
    	OTX_T1E1_EC_PULSEDENSITY_VIOLATION_ON,
    	OTX_T1E1_EC_PULSEDENSITY_VIOLATION_OFF,
    	OTX_T1E1_EC_EXCESSZERO_ON,
    	OTX_T1E1_EC_EXCESSZERO_OFF,
    	OTX_T1E1_EC_AUTO_FORCE_RESYNC,
    	OTX_T1E1_EC_LOOP_UP_CODE,
    	OTX_T1E1_EC_LOOP_UP_CODE,
    	OTX_T1E1_EC_LOOP_DOWN_CODE,
    	OTX_T1E1_EC_LOOP_DOWN_CODE,
    	OTX_T1E1_EC_END_OF_EVENT_CODES,
    	OTX_T1E1_EC_END_OF_EVENT_CODES,
    };
    
    Event Codes

    Note that for line interfaces these messages can have a different meaning depending on whether the Line Interfaces (LIs) are configured to E1 or T1 mode.
    Defined in: OtxT1E1D.h

    Members

    OTX_T1E1_EC_T8MS_ISF
    E1: Receive Timeout 8 MSec
    T1: Incorrect Sync Format
    OTX_T1E1_EC_CASC_RSC
    E1: Received CAS information Changed
    T1: Received Signalling information Changed
    OTX_T1E1_EC_CRC4_CRC6
    E1: Receive CRC4 error
    T1: Receive CRC6 error
    OTX_T1E1_EC__CASE
    E1: -
    T1: Transmit CAS register Empty
    OTX_T1E1_EC_RDO
    E1: Receive Data Overflow
    T1: Receive Data Overflow
    OTX_T1E1_EC_XDU
    E1: Transmit Data Underrun
    T1: Transmit Data Underrun
    OTX_T1E1_EC_XLSC
    E1: Transmit Line Status Change
    T1: Transmit Line Status Change
    OTX_T1E1_EC_FAR
    E1: Frame Alignment Recovery
    T1: Frame Alignment Recovery
    OTX_T1E1_EC_LFA
    E1: Loss of Frame Alignment
    T1: Loss of Frame Alignment
    OTX_T1E1_EC_MFAR
    E1: MultiFrame Alignment Recovery
    T1: MultiFrame Alignment Recovery
    OTX_T1E1_EC_T400MS_LMFA
    E1: Receive Timeout 400 MSec
    T1: Loss of MultiFrame Alignment
    OTX_T1E1_EC_AIS
    E1: Alarm Indication Signal (Blue Alarm)
    T1: Alarm Indication Signal (Blue Alarm)
    OTX_T1E1_EC_LOS
    E1: Loss Of Signal (Red Alarm)
    T1: Loss Of Signal (Red Alarm)
    OTX_T1E1_EC_RAR
    E1: Remote Alarm Recovery
    T1: Remote Alarm Recovery
    OTX_T1E1_EC_RA
    E1: Remote Alarm (Yellow Alarm)
    T1: Remote Alarm (Yellow Alarm)
    OTX_T1E1_EC_LMFA16_XSLP
    E1: Loss of MultiFrame Alignment ts16
    T1: Transmit SLiP indication
    OTX_T1E1_EC_AIS16_
    E1: Alarm Indication Signal ts16 status change
    T1: -
    OTX_T1E1_EC_RA16_LLBSC
    E1: Remote Alarm ts16 status change
    T1: Line Loop Back Status Change
    OTX_T1E1_EC_API_
    E1: Auxuillary Pattern Indication
    T1: -
    OTX_T1E1_EC_SLN
    E1: Receive Slip Negative
    T1: Receive Slip Negative
    OTX_T1E1_EC_SLP
    E1: Receive Slip Positive
    T1: Receive Slip Positive
    OTX_T1E1_EC_ACTIVE
    E1: Physical link ACTIVE indication
    T1: Physical link ACTIVE indication
    OTX_T1E1_EC_DEACTIVE
    E1: Physical link DEACTIVE indication
    T1: Physical link DEACTIVE indication
    OTX_T1E1_EC_XLS
    E1: Transmit Line Short
    T1: Transmit Line Short
    OTX_T1E1_EC_XLO
    E1: Transmit Line Open
    T1: Transmit Line Open
    OTX_T1E1_EC_XPR
    Transmit Pool Ready
    OTX_T1E1_EC_SEC
    Second
    OTX_T1E1_EC_ES
    Errored second
    OTX_T1E1_EC_RME
    Receive Message End
    OTX_T1E1_EC_RPF
    Receive Pool Full
    OTX_T1E1_EC_XSP
    E1: Transmit Slip Positive
    T1: Transmit Slip Positive
    OTX_T1E1_EC_XSN
    E1: Transmit Slip Negative
    T1: Transmit Slip Negative
    OTX_T1E1_EC_BITROB_SIGNALING
    E1: -
    T1: BitRob Signaling Data
    OTX_T1E1_EC_FEC
    E1: Frame Error Count
    T1: Frame Error Count
    OTX_T1E1_EC_CVC
    E1: Code Violation Count
    T1: Code Violation Count
    OTX_T1E1_EC_EBC
    E1: E-bit Error Count
    T1: Errored Block Count
    OTX_T1E1_EC_CEC1
    E1: CRC Error Count
    T1: CRC Error Count
    OTX_T1E1_EC_CEC2
    E1: CRC Error Count (reported from TE via Sa6-bit)
    T1: -
    OTX_T1E1_EC_CEC3
    E1: CRC Error Count (detected at T reference point via Sa6-bit)
    T1: -
    OTX_T1E1_EC_APIR
    E1: Auxiliary Pattern Indication (Blue Alarm) Recovery
    T1: -
    OTX_T1E1_EC_LOSR
    E1: Loss Of Signal (Red Alarm) Recovery
    T1: Loss Of Signal (Red Alarm) Recovery
    OTX_T1E1_EC_LMFAR16
    E1: Loss of MultiFrame Alignment ts16 Recovery
    T1: -
    OTX_T1E1_EC_AISR
    E1: Alarm Indication Signal (Blue Alarm) Recovery
    T1: Alarm Indication Signal (Blue Alarm) Recovery
    OTX_T1E1_EC_SA_BITS_CHANGED
    E1: SA-Bits (4-8) changed. Bit0 is Sa bit from Frame1, Bit0 is Sa bit from Frame3, ... , Bit7 is Sa bit from Frame15. Bit11-Bit8 contains the Sa number (4-8).
    T1: -
    OTX_T1E1_EC_DL_BITS_RECEIVED
    E1: -
    T1: DL-Bits Received:
    Mode OTX_T1_FF_F12:
    Bit0 is received in frame 2 and Bit7 in frame 12.
    Remaining bits are zero.

    Mode OTX_T1_FF_ESF:
    Bit0 is received in frame 1 and Bit7 in frame 15.
    Bit8 is received in frame 17 and Bit15 in frame 23.
    Remaining bits are zero.

    Mode OTX_T1_FF_F72:
    Bit0 is received in frame 26 and Bit7 in frame 40
    Bit8 is received in frame 42 and Bit15 in frame 56.
    Bit16 is received in frame 58 and Bit23 in frame 72.
    Remaining bits are zero.
    OTX_T1E1_EC_DL_BITS_SENT
    E1: -
    T1: DL-Bits Sent. The function OtxT1SetDlBitData needs to be called to provide more DL-bits to be transmitted by the T1E1 device. If OtxT1SetDlBitData is not called before the start of the next multiframe then the DL-Bit device will continue to transmit the same DL-bits (as were provided by the most recent call to OtxT1SetDlBitData. The bits should be formatted in the same way as in OTX_T1E1_EC_DL_BITS_RECEIVED.
    OTX_T1E1_EC_AUTO_DISABLED
    E1: Fatal error has occurred. The device is automatically disabled.
    Try reviving the device with OtxDrvReset and OtxDrvEnable.
    T1: Fatal error has occurred. The device is automatically disabled.
    Try reviving the device with OtxDrvReset and OtxDrvEnable.
    OTX_T1E1_EC_AUTO_RESET
    E1: Serious error has occurred. The device has performed an automatic self-reset.
    OTX_T1E1_EC_TR08_STATE_CHANGE
    T1: Serious error has occurred. The device has performed an automatic self-reset.
    OTX_T1E1_EC_TR08_STATE_CHANGE
    E1: N/A
    OTX_T1E1_EC_QRSS_PAT_SYNC
    T1: TR08 State change occurred. Please refer to OTX_ATTR_T1E1_TR08_MODE.
    OTX_T1E1_EC_QRSS_PAT_SYNC
    Internal use
    OTX_T1E1_EC_QRSS_PAT_ASYNC
    Internal use
    OTX_T1E1_EC_BITERROR_UPDATE
    Internal use
    OTX_T1E1_EC_RX_LEVEL_UPDATE
    Internal use
    OTX_T1E1_EC_RX_EQ_ADAPTING
    Internal use
    OTX_T1E1_EC_RX_EQ_NOISE
    Internal use
    OTX_T1E1_EC_RX_EQ_INVALID
    Internal use
    OTX_T1E1_EC_WEAKSIGNAL
    Internal use
    OTX_T1E1_EC_PULSE_DETECTION_COMPLETE
    Internal use
    OTX_T1E1_EC_FF_SCAN_COMPLETE
    Internal use
    OTX_T1E1_EC_PULSEDENSITY_VIOLATION_ON
    Internal use
    OTX_T1E1_EC_PULSEDENSITY_VIOLATION_OFF
    Internal use
    OTX_T1E1_EC_EXCESSZERO_ON
    Internal use
    OTX_T1E1_EC_EXCESSZERO_OFF
    Internal use
    OTX_T1E1_EC_AUTO_FORCE_RESYNC
    E1: LOF detected and OTX_ATTR_T1E1_AUTOMATIC_FORCE_RESYNC is set. The device attempted to perform an automatic forced resynchronization.
    OTX_T1E1_EC_LOOP_UP_CODE
    T1: LOF detected and OTX_ATTR_T1E1_AUTOMATIC_FORCE_RESYNC is set. The device attempted to perform an automatic forced resynchronization.
    OTX_T1E1_EC_LOOP_UP_CODE
    E1: Loop Up Code (Activate) detected.
    OTX_T1E1_EC_LOOP_DOWN_CODE
    T1: Loop Up Code (Activate) detected.
    OTX_T1E1_EC_LOOP_DOWN_CODE
    E1: Loop Down Code (Deactivate) detected.
    OTX_T1E1_EC_END_OF_EVENT_CODES
    T1: Loop Down Code (Deactivate) detected.
    OTX_T1E1_EC_END_OF_EVENT_CODES
    Internal use

    OtxT1E1Layer1StatusE

    enum OtxT1E1Layer1StatusE {
    	OTX_T1E1_LAYER1_DOWN,
    	OTX_T1E1_LAYER1_OK,
    };
    
    Layer 1 Status
    Defined in: OtxT1E1D.h

    Members

    OTX_T1E1_LAYER1_DOWN
    Loss of Signal (LOS) or Loss Of Frame Alignment (LFA) is present
    OTX_T1E1_LAYER1_OK
    E1/T1 signal present (No Loss of Signal and no Loss Of Frame Alignment)

    See Also

    OtxT1E1GetLineStatus

    OtxT1E1Layer1StatusExS structure

    struct {
    	OTX_BOOL bRedAlarm;
    	OTX_BOOL bBlueAlarm;
    	OTX_BOOL bYellowAlarm;
    	OTX_BOOL bFrameError;
    	OTX_BOOL bMultiFrameError;
    } OtxT1E1Layer1StatusExS;
    
    Specific details of the current Line status. This structure is returned by the function OtxT1E1GetLayer1StatusEx.
    Defined in: OtxT1E1D.h

    Members

    bRedAlarm
    OTX_TRUE is the received signal level is below the Receive Threshold. (a.k.a Red Alarm)
    bBlueAlarm
    OTX_TRUE if the device has detected an Alarm Indication Signal (all ones) on the span.
    bYellowAlarm
    OTX_TRIE if the device has detected a Remote Alarm
    bFrameError
    OTX_TRUE if the device can not find basic framing on the received span
    bMultiFrameError
    OTX_TRUE if the device can not find a good multiframing candidate.

    See Also

    OtxT1E1GetLayer1StatusEx

    OtxT1E1LiModeE

    enum OtxT1E1LiModeE {
    	OTX_T1E1_MODE_NO,
    	OTX_T1E1_MODE_T1,
    	OTX_T1E1_MODE_E1,
    };
    
    Operating modes for the T1/E1 Line Interface (Li) Devices
    Defined in: OtxT1E1D.h

    Members

    OTX_T1E1_MODE_NO
    The line interface has not been configured
    OTX_T1E1_MODE_T1
    The line interface is configured to operate in T1 mode.
    OTX_T1E1_MODE_E1
    The line interface is configured to operate in E1 mode.

    See Also

    OtxT1E1SetLiMode

    OtxT1E1LoopE

    enum OtxT1E1LoopE {
    	OTX_T1E1_LOOPS_OFF,
    	OTX_T1E1_LINE_LOOP,
    	OTX_T1E1_REMOTE_ON_LOOP_JITTER_ATTEN,
    	OTX_T1E1_REMOTE_OFF_LOOP_JITTER_ATTEN,
    	OTX_T1E1_LOCAL_LOOP,
    };
    
    Line Interface loop type
    Defined in: OtxT1E1D.h

    Members

    OTX_T1E1_LOOPS_OFF
    All Line Loops off
    OTX_T1E1_LINE_LOOP
    Line Loop (Payload Loopback of the external highway). Looped data will pass through the entire receiver including the wander and jitter compensation.
    OTX_T1E1_REMOTE_ON_LOOP_JITTER_ATTEN
    Remote Loop with Jitter Attenuation On (Loopback of the external highway bypassing the framer)
    OTX_T1E1_REMOTE_OFF_LOOP_JITTER_ATTEN
    Remote Loop with Jitter Attenuation Off (Loopback of the external highway bypassing the framer)
    OTX_T1E1_LOCAL_LOOP
    Local Loop. The receiver on the external highway is disconnected. The internal highway is looped back to the time-space switch.

    See Also

    OtxT1E1SetLineLoop

    OtxT1E1ResultCodesE

    enum OtxT1E1ResultCodesE {
    	OTX_T1E1_RES_BAD_AIS_DETECTION_OPT,
    	OTX_T1E1_RES_BAD_ALARM_TYPE,
    	OTX_T1E1_RES_BAD_CLOCK_MODE,
    	OTX_T1E1_RES_BAD_FRAME_FORMAT,
    	OTX_T1E1_RES_BAD_HDB3_ERROR_OPT,
    	OTX_T1E1_RES_BAD_LOOP_TYPE,
    	OTX_T1E1_RES_BAD_REGAIN_M_FRAME_OPT,
    	OTX_T1E1_RES_BAD_REMOTE_ALARM_OPT,
    	OTX_T1E1_RES_BAD_RESYNC_OPT,
    	OTX_T1E1_RES_BAD_RX_EQUALIZER_OPT,
    	OTX_T1E1_RES_BAD_RX_FRAME_FORMAT,
    	OTX_T1E1_RES_BAD_RX_LINE_CODE,
    	OTX_T1E1_RES_BAD_RX_REM_ALRM_FORMAT,
    	OTX_T1E1_RES_BAD_SIGNALING_MODE,
    	OTX_T1E1_RES_BAD_TX_FRAME_FORMAT,
    	OTX_T1E1_RES_BAD_TX_LINE_CODE,
    	OTX_T1E1_RES_BAD_TX_POWER_OPT,
    	OTX_T1E1_RES_BAD_TX_REM_ALRM_FORMAT,
    	OTX_T1E1_RES_L1_DOWN,
    	OTX_T1E1_RES_L1_OK,
    	OTX_T1E1_RES_NOT_SETUP,
    	OTX_T1E1_RES_TX_BUSY,
    	OTX_T1E1_RES_WRONG_CONTEXT,
    	OTX_T1E1_RES_UNKNOWN_STATUS_CODE,
    	OTX_T1E1_RES_UNKNOWN_MODE,
    	OTX_T1E1_RES_INVALID_CHANNEL,
    	OTX_T1E1_RES_UNSUPPORTED_VER,
    };
    
    Result Codes
    Defined in: OtxT1E1D.h

    Members

    OTX_T1E1_RES_BAD_AIS_DETECTION_OPT
    Invalid parameter value passed for AIS Detection.
    OTX_T1E1_RES_BAD_ALARM_TYPE
    Invalid parameter value passed for Alarm Type.
    OTX_T1E1_RES_BAD_CLOCK_MODE
    Invalid parameter value passed for Clock Mode.
    OTX_T1E1_RES_BAD_FRAME_FORMAT
    Invalid parameter value passed for Frame Format.
    OTX_T1E1_RES_BAD_HDB3_ERROR_OPT
    Invalid parameter value passed for HDB3 Error Type.
    OTX_T1E1_RES_BAD_LOOP_TYPE
    Invalid parameter value passed for Loop Mode.
    OTX_T1E1_RES_BAD_REGAIN_M_FRAME_OPT
    Invalid parameter value passed for Regain Multiframe.
    OTX_T1E1_RES_BAD_REMOTE_ALARM_OPT
    Invalid parameter value passed for Remote Alarm.
    OTX_T1E1_RES_BAD_RESYNC_OPT
    Invalid parameter value passed for Resynchronization.
    OTX_T1E1_RES_BAD_RX_EQUALIZER_OPT
    Invalid parameter value passed for Receiver Equalizer.
    OTX_T1E1_RES_BAD_RX_FRAME_FORMAT
    Invalid parameter value passed for Receiver Frame Format.
    OTX_T1E1_RES_BAD_RX_LINE_CODE
    Invalid parameter value passed for Reciever Line Code.
    OTX_T1E1_RES_BAD_RX_REM_ALRM_FORMAT
    Invalid parameter value passed for Receiver Remote Alarm.
    OTX_T1E1_RES_BAD_SIGNALING_MODE
    Invalid parameter value passed for Signalling Mode.
    OTX_T1E1_RES_BAD_TX_FRAME_FORMAT
    Invalid parameter value passed for Transmit Frame Format.
    OTX_T1E1_RES_BAD_TX_LINE_CODE
    Invalid parameter value passed for Transmit Line Code.
    OTX_T1E1_RES_BAD_TX_POWER_OPT
    Invalid parameter value passed for Transmit Power.
    OTX_T1E1_RES_BAD_TX_REM_ALRM_FORMAT
    Invalid parameter value passed for Transmit Remote Alarm.
    OTX_T1E1_RES_L1_DOWN
    Loss Of Signal. Layer 1 is down.
    OTX_T1E1_RES_L1_OK
    E1/T1 receiver is receiving valid signals. Layer 1 is OK.
    OTX_T1E1_RES_NOT_SETUP
    The device is not setup to support this action.
    OTX_T1E1_RES_TX_BUSY
    Transmitter is busy sending a frame.
    OTX_T1E1_RES_WRONG_CONTEXT
    Wrong context for this action.
    OTX_T1E1_RES_UNKNOWN_STATUS_CODE
    Invalid event code passed to this function.
    OTX_T1E1_RES_UNKNOWN_MODE
    The device is not setup in a valid mode.
    OTX_T1E1_RES_INVALID_CHANNEL
    Invalid channel.
    OTX_T1E1_RES_UNSUPPORTED_VER
    Unsupported Device version.

    OtxT1E1TermModeE

    enum OtxT1E1TermModeE {
    	OTX_T1E1_TERM_120_OHM,
    	OTX_T1E1_TERM_100_OHM,
    	OTX_T1E1_TERM_75_OHM,
    	OTX_T1E1_TERM_HIGHZ,
    	OTX_T1E1_TERM_75_OHM_BALANCED,
    };
    
    line termination for an E1/T1 span.
    Defined in: OtxT1E1D.h

    Members

    OTX_T1E1_TERM_120_OHM
    Span is terminated for 120 ohm twisted pair (balanced differential signal)
    OTX_T1E1_TERM_100_OHM
    Span is terminated for 100 ohm twisted pair (balanced differential signal)
    OTX_T1E1_TERM_75_OHM
    Span is terminated for 75 ohm coax (unbalanced unipolar signal)
    OTX_T1E1_TERM_HIGHZ
    Span is not terminated (Balanced, High impedance, for monitoring scenarios when short (<2 meter) monitor taps are used)
    OTX_T1E1_TERM_75_OHM_BALANCED
    Span is terminated for 75 ohm balanced differential signal (for special monitoring conditions)

    Comments

    line termination mode should match the type of cable that is connected to the Line Interface. If the Line Interface is used for monitoring and connected in a bridged configuration with short monitor tap cables, the High Impedance termination mode should be used. If the Line Interface is used for generation, or the board is connected to a -20dB monitor port, then one of the 75 (E1), 100 (T1), or 120 (E1) ohm modes should be used.

    Setting the termination mode also affects transmit pulse level. The level is set to comply with the G.703 and T1.102 standards. I.e.


    G.703 E1 120 ohm Balanced: Amplitude=3.0V (+/- 0.3V)
    G.703 T1 100 ohm Balanced: Amplitude=3.0V (+/- 0.6V)
    G.703 E1 75 ohm Unbalanced: Amplitude=2.37V (+/- 0.237V)

    The default is high impedance (no termination), which is set when the driver loads.

    See Also

    OtxT1E1SetLineTermination

    OtxT1FrameFormatE

    enum OtxT1FrameFormatE {
    	OTX_T1_FF_F12,
    	OTX_T1_FF_F4,
    	OTX_T1_FF_ESF,
    	OTX_T1_FF_F72,
    	OTX_T1_FF_F12_J1,
    	OTX_T1_FF_F4_J1,
    	OTX_T1_FF_ESF_J1,
    	OTX_T1_FF_F72_J1,
    };
    
    T1 Frame Formats
    Defined in: OtxT1E1D.h

    Members

    OTX_T1_FF_F12
    12-frame multiframe format (F12, D3/4, SF)
    OTX_T1_FF_F4
    4-frame multiframe format (F4)
    OTX_T1_FF_ESF
    24-frame multiframe format (F24, ESF)
    OTX_T1_FF_F72
    72-frame multiframe format (F72, SLC96, remote switch mode)
    OTX_T1_FF_F12_J1
    J1 variant of 12-frame multiframe format (F12, D3/4, SF)
    OTX_T1_FF_F4_J1
    J1 variant of 4-frame multiframe format (F4)
    OTX_T1_FF_ESF_J1
    J1 variant of 24-frame multiframe format (F24, ESF)
    OTX_T1_FF_F72_J1
    J1 variant of 72-frame multiframe format (F72, SLC96, remote switch mode)

    See Also

    OtxT1ConfigOptionsS OtxT1SetConfiguration

    OtxT1LfaSensitivityE

    enum OtxT1LfaSensitivityE {
    	OTX_T1_LFA_2_OUT_OF_4,
    	OTX_T1_LFA_2_OUT_OF_5,
    	OTX_T1_LFA_2_OUT_OF_6,
    };
    
    Set the condition when the Loss of Frame Alignment (LFA) is reported.
    Defined in: OtxT1E1D.h

    Members

    OTX_T1_LFA_2_OUT_OF_4
    2 out of 4 framing bits incorrect
    OTX_T1_LFA_2_OUT_OF_5
    3 out of 4 framing bits incorrect
    OTX_T1_LFA_2_OUT_OF_6
    4 out of 4 framing bits incorrect

    Comments

    LFA can be reported if 2 out of 4, 5, or 6 framing bits have been detected to be incorrect.

    See Also

    OtxT1ConfigOptionsS OtxT1SetConfiguration

    OtxT1LineCodeE

    enum OtxT1LineCodeE {
    	OTX_T1_LC_AMI,
    	OTX_T1_LC_B8ZS,
    };
    
    T1 Line Codes
    Defined in: OtxT1E1D.h

    Members

    OTX_T1_LC_AMI
    Alternative Mark Inversion (AMI) Line Coding
    OTX_T1_LC_B8ZS
    Bipolar 8 Zero Subsititution (B8ZS) Line Coding

    See Also

    OtxT1ConfigOptionsS OtxT1SetConfiguration

    OtxT1RemoteAlarmFormatE

    enum OtxT1RemoteAlarmFormatE {
    	OTX_T1_RA_YELLOW_A,
    	OTX_T1_RA_YELLOW_B,
    };
    
    Select the Remote Alarm Indication (Yellow Alarm) format to be expected in Receive direction with the F12 and ESF Frames.
    Defined in: OtxT1E1D.h

    Members

    OTX_T1_RA_YELLOW_A
    F12: bit2 = 0 in every channel
    ESF: pattern '1111 1111 0000 0000' in data link channel
    OTX_T1_RA_YELLOW_B
    F12: FS bit of frame 12
    ESF: bit2 = 0 in every channel

    Comments

    If Format A is selected, with F12 Frame Format the bit #2 in every channel is set to `0'. With ESF Frame Format a pattern on `1111 1111 0000 0000 ...' is sent in the data link channel. If Format B is selected, with F12 Frame Format the Frame Synchronization (FS) bit of frame 12 is set to `0'. With ESF Frame Format the bit position 2 in every time-slot is set to `0'. With F4 and F72 frames formats the Yellow alarm is indicated in both formats by forcing the bit position 2 to `1' in every speech channel.

    See Also

    OtxT1ConfigOptionsS OtxT1SetConfiguration

    OtxT1RobBitDataS structure

    struct {
    	OTX_UINT32 chA;
    	OTX_UINT32 chB;
    	OTX_UINT32 chC;
    	OTX_UINT32 chD;
    } OtxT1RobBitDataS;
    
    T1 Bit robbing data to be transmitted (used in CAS). See the OtxT1SetRobBitData function.
    Defined in: OtxT1E1D.h

    Members

    chA
    Channel A
    chB
    Channel B
    chC
    Channel C (Only used in ESF format)
    chD
    Channel D (Only used in ESF format)

    Comments

    Note that the A and B channels are used in frame formats F12, ESF, and F72. The C and D channels are only used in the ESF frame format. The struct holds 24 bits for each channel; The least significant bit is transmitted first (in channel 1, frame 1). This 24 bit value will be repeated unless OtxT1SetRobBitData is called again with a different values in this struct.

    See Also

    OtxT1SetRobBitData OtxT1GetRobBitData

    OtxT1SignallingModeE

    enum OtxT1SignallingModeE {
    	OTX_T1_SM_CCS,
    	OTX_T1_SM_CAS_CC,
    	OTX_T1_SM_CAS_BR,
    };
    
    T1 Signalling Modes
    Defined in: OtxT1E1D.h

    Members

    OTX_T1_SM_CCS
    Common Channel Signalling
    OTX_T1_SM_CAS_CC
    Channel Associated Signalling (Common channel)
    OTX_T1_SM_CAS_BR
    Channel Associated Signalling (Bit Robbing)

    See Also

    OtxT1ConfigOptionsS OtxT1SetConfiguration

    OtxToneEffectE

    enum OtxToneEffectE {
    	OTX_TONE_SINEWAVE,
    	OTX_TONE_SAWTOOTH,
    	OTX_TONE_SWEEPING_SINE,
    	OTX_TONE_NOISE,
    	OTX_TONE_BYTE_VARIABLE,
    };
    
    Type of tone effect to be generated
    Defined in: OtxToneD.h

    Members

    OTX_TONE_SINEWAVE
    1kHz sinusoidal wave
    OTX_TONE_SAWTOOTH
    Ramp wave
    OTX_TONE_SWEEPING_SINE
    Variable frequency sinusoidal wave
    OTX_TONE_NOISE
    Random noise
    OTX_TONE_BYTE_VARIABLE
    Sequential bytes: 0, 1, 2, ..., 255, 0, 1, ...

    OtxToneGainE

    enum OtxToneGainE {
    	OTX_TONE_GAIN_0DB,
    	OTX_TONE_GAIN_DG_MINUS_3DB,
    	OTX_TONE_GAIN_DG_MINUS_6DB,
    	OTX_TONE_GAIN_DG_MINUS_9DB,
    	OTX_TONE_GAIN_DG_MINUS_12DB,
    	OTX_TONE_GAIN_DG_MINUS_15DB,
    };
    
    Gain of generated tones
    Defined in: OtxToneD.h

    Members

    OTX_TONE_GAIN_0DB
    Full Gain
    OTX_TONE_GAIN_DG_MINUS_3DB
    -3dB Gain
    OTX_TONE_GAIN_DG_MINUS_6DB
    -6dB Gain
    OTX_TONE_GAIN_DG_MINUS_9DB
    -9dB Gain
    OTX_TONE_GAIN_DG_MINUS_12DB
    -12dB Gain
    OTX_TONE_GAIN_DG_MINUS_15DB
    -15dB Gain

    OtxToneSineWaveDataS structure

    struct {
    	OTX_FP64 nFrequency;
    	OTX_FP64 nAttenuation;
    	OTX_FP64 nPhase;
    } OtxToneSineWaveDataS;
    
    Characteristics of a sinewave tone component. Tones containing multiple frequency component can be generated by using an array of this struct (see OtxToneSineWaveGeneratorInit).
    Defined in: OtxToneD.h

    Members

    nFrequency
    Frequency of sinewave component
    nAttenuation
    Attenuation of sinewave amplitude (in dB). E.g. 0dB is maximum amplitude, -3dB is 50% of maximum amplitude, -9dB is 25% of maximum amplitude.
    nPhase
    Phase (in degrees) in relation to other sinewave tone components.

    See Also

    OtxToneSineWaveGeneratorInit

    OtxTssDeviceAttributesE

    enum OtxTssDeviceAttributesE {
    	OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_A,
    	OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_B,
    	OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_C,
    	OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_D,
    	OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_E,
    	OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_F,
    	OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_G,
    	OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_H,
    };
    
    TSS Attributes
    Defined in: OtxBrdD.h

    Members

    OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_A
    (OTX_ATTRIB_UINT32) Read/Write. Operating bit rate (in kbps) for CT Bus highway d0-d3. Valid values are 2048 (default), 4096, and 8192. Note: If this attribute is modified, it must be modified before any pipe connections are made.
    OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_B
    (OTX_ATTRIB_UINT32) Read/Write. Operating bit rate (in kbps) for CT Bus highway d4-d7. Valid values are 2048 (default), 4096, and 8192. Note: If this attribute is modified, it must be modified before any pipe connections are made.
    OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_C
    (OTX_ATTRIB_UINT32) Read/Write. Operating bit rate (in kbps) for CT Bus highway d8-d11. Valid values are 2048 (default), 4096, and 8192. Note: If this attribute is modified, it must be modified before any pipe connections are made.
    OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_D
    (OTX_ATTRIB_UINT32) Read/Write. Operating bit rate (in kbps) for CT Bus highway d12-d15. Valid values are 2048 (default), 4096, and 8192. Note: If this attribute is modified, it must be modified before any pipe connections are made.
    OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_E
    (OTX_ATTRIB_UINT32) Read/Write. Operating bit rate (in kbps) for CT Bus highway d16-d19. Valid values are 2048 (default), 4096, and 8192. Note: If this attribute is modified, it must be modified before any pipe connections are made.
    OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_F
    (OTX_ATTRIB_UINT32) Read/Write. Operating bit rate (in kbps) for CT Bus highway d20-d23. Valid values are 2048 (default), 4096, and 8192. Note: If this attribute is modified, it must be modified before any pipe connections are made.
    OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_G
    (OTX_ATTRIB_UINT32) Read/Write. Operating bit rate (in kbps) for CT Bus highway d24-d27. Valid values are 2048 (default), 4096, and 8192. Note: If this attribute is modified, it must be modified before any pipe connections are made.
    OTX_ATTR_TSS_CTBUS_RATE_STREAM_GROUP_H
    (OTX_ATTRIB_UINT32) Read/Write. Operating bit rate (in kbps) for CT Bus highway d28-d31. Valid values are 2048 (default), 4096, and 8192. Note: If this attribute is modified, it must be modified before any pipe connections are made.

    OtxTssEventCodesE

    enum OtxTssEventCodesE {
    	OTX_TSS_EC_CLKERR_A,
    	OTX_TSS_EC_CLKERR_B,
    	OTX_TSS_EC_CLKERR_FR_COMP,
    	OTX_TSS_EC_CLKERR_C16,
    	OTX_TSS_EC_CLKERR_C4_C2,
    	OTX_TSS_EC_CLKERR_SCLKX2,
    	OTX_TSS_EC_CLKERR_SCLK,
    	OTX_TSS_EC_CLKERR_NETREF,
    	OTX_TSS_EC_SYSERR_NM_CAM_E,
    	OTX_TSS_EC_SYSERR_NM_CAM_O,
    	OTX_TSS_EC_SYSERR_NM_CAM_L,
    	OTX_TSS_EC_SYSERR_CAM_E,
    	OTX_TSS_EC_SYSERR_CAM_O,
    	OTX_TSS_EC_SYSERR_CAM_L,
    	OTX_TSS_EC_SYSERR_HBUS,
    	OTX_TSS_EC_SYSERR_FALLBACK,
    };
    
    Time-Space Switch (TSS) Event Codes
    Defined in: OtxBrdD.h

    Members

    OTX_TSS_EC_CLKERR_A
    C8A or Frame A Clock failed
    OTX_TSS_EC_CLKERR_B
    C8B or Frame B Clock failed
    OTX_TSS_EC_CLKERR_FR_COMP
    FR_COMPn Clock failed
    OTX_TSS_EC_CLKERR_C16
    C16+ C16- Clock failed
    OTX_TSS_EC_CLKERR_C4_C2
    C4 or C2 Clock failed
    OTX_TSS_EC_CLKERR_SCLKX2
    SCLKX2 Clock failed
    OTX_TSS_EC_CLKERR_SCLK
    SCLK Clock failed
    OTX_TSS_EC_CLKERR_NETREF
    NETREF Clock failed
    OTX_TSS_EC_SYSERR_NM_CAM_E
    Even CAM Overflow Error (No Match)
    OTX_TSS_EC_SYSERR_NM_CAM_O
    Odd CAM Overflow Error (No Match)
    OTX_TSS_EC_SYSERR_NM_CAM_L
    Local CAM Overflow Error (No Match)
    OTX_TSS_EC_SYSERR_CAM_E
    Even CAM Overflow Error
    OTX_TSS_EC_SYSERR_CAM_O
    Odd CAM Overflow Error
    OTX_TSS_EC_SYSERR_CAM_L
    Local CAM Overflow Error
    OTX_TSS_EC_SYSERR_HBUS
    H-BUS (CT Bus) Data Memory Access Error
    OTX_TSS_EC_SYSERR_FALLBACK
    Fallback Enable Indicator

    OtxUserApplicationEventCodesE

    enum OtxUserApplicationEventCodesE {
    	OTX_USER_APPLICATION_EC_READ_DATA,
    	OTX_USER_APPLICATION_EC_READ_DATA_OVERRUN,
    };
    
    DSP User Application Logical Device Event Codes
    Defined in: OtxDspD.h

    Members

    OTX_USER_APPLICATION_EC_READ_DATA
    DSP User Application Notify Data is available
    OTX_USER_APPLICATION_EC_READ_DATA_OVERRUN
    DSP User Application Notify Data Fifo Overrun. User application is too slow extracting data from the driver

    OtxUserApplicationResultCodesE

    enum OtxUserApplicationResultCodesE {
    	OTX_USER_APPLICATION_RES_DATA_TRUNCATED,
    };
    
    User Application Error Result Codes
    Defined in: OtxDspD.h

    Members

    OTX_USER_APPLICATION_RES_DATA_TRUNCATED
    DSP User application has transferred a data buffer that is too large. Data is truncated.

    OtxValSamplerEventCodesE

    enum OtxValSamplerEventCodesE {
    ,
    };
    
    Val Sampler Event Codes
    Defined in: OtxToneD.h

    OtxValSamplerResultCodesE

    enum OtxValSamplerResultCodesE {
    ,
    };
    
    Val Sampler Error Result Codes
    Defined in: OtxToneD.h

    OtxVersionInfo structure

    struct {
    } OtxVersionInfo;
    
    OTX Driver Version Struct
    Defined in: OtxType.h

    POTS_HANDLE

    An opaque object reference for definitions kept internal to the module.
    Defined in: OtxPotsD.h