#include <VoiceDev.h>
Inheritance diagram for bogotel::CVoiceDev:
Public Types | |
enum | targetType { local = 0, remote } |
enum | speakerState { UNDEFINED = -1, SILENT, WAV, DTMF } |
Public Member Functions | |
CVoiceDev (CBgtRt *pBgtRt) | |
int | init (std::string strName, long lHandle, long lTimeslot) |
int | listen (CSignalDev *pVD) |
int | play (DX_IOTT *pIott, const DV_TPT *pTpt, const DX_XPB *pXpb, unsigned short usMode) |
int | dial (const char *szDialStr, const DX_CAP *pCAP, unsigned short usMode) |
int | stop (unsigned short usMode) |
int | clearDigitBuffer () |
int | getDigit (const DV_TPT *pTpt, DV_DIGIT *pDigit, unsigned short usMode) |
long | getSignalHandle () |
long | getTimeslot () |
long | getHandle () |
speakerState | getState () |
char | getCurrentDtmf () |
long | getTermMsk () |
unsigned int | getStateId () |
void | truncateDtmfs (int iNumToTruncate) |
int | receiveMsg (CMsg *pMsg) |
void | sendPlayMsg (std::string strFilename) |
void | sendPlayFinishedMsg () |
void | sendDtmfMsg (char chDTMF, int iTargetType) |
void | sendDtmfFinishedMsg (int iTargetType) |
void | terminateIoOp (long lTermMsk, bool bInternalIoOp=false) |
void | eraseDigitHistory () |
void | eraseFromDigitHistory (unsigned short iToChop) |
void | eraseFromDigitHistory (DEQUE_CHAR::iterator iterTillToChop) |
DEQUE_CHAR | getDigitHistory () |
void | getDigits (DV_DIGIT *pDigit, int iNumToGet) |
Static Public Member Functions | |
const std::string & | getEventName (long lType) |
Static Public Attributes | |
const int | invalidHandle = -1 |
MAP_INT2STR | s_mapHandle2Filename |
CProperties | s_propWav2Dtmfs |
std::string | s_strWavFilenameBase |
Protected Member Functions | |
int | checkDigits () |
int | sendEvent (long lType, long lTermMsk=0) |
int | sendMsg (CMsg *pMsg, int targetType=targetType::remote) |
void | log (int iLevel, char *szFmt,...) |
void | getEvtTypeString (long lType, char *szType, int iMaxLen) |
Protected Attributes | |
QUEUE_CHAR | m_queueDigitValue |
QUEUE_CHAR | m_queueDigitType |
DEQUE_CHAR | m_dequeDigitHistory |
speakerState | m_speakerState |
unsigned int | m_uiStateId |
std::string | m_strName |
long | m_lHandle |
long | m_lSCbusTimeslot |
CSignalDev * | m_pSignalDev |
long | m_lTermMsk |
std::string | m_strCurrPlaybackFilename |
CIOOp * | m_pIoOp |
CIOOp * | m_pInternalIoOp |
Private Member Functions | |
void | registerIoOp (CIOOp *pIoOp, bool bInternalIoOp=false) |
void | stripBaseFromWavFilename (std::string &strFilename) |
bool | attemptRecognition (std::string &strFilename) |
void | updateSpeakerState (speakerState state) |
void | updateSpeakerState (speakerState state, char chDtmf) |
void | updateSpeakerState (speakerState state, std::string strFilename) |
Private Attributes | |
boost::recursive_mutex | m_mtxIoOps |
Static Private Attributes | |
const std::string | eventNames [5] |
|
Definition at line 42 of file VoiceDev.h. |
|
Definition at line 47 of file VoiceDev.h. Referenced by getState(). |
|
Definition at line 27 of file VoiceDev.cpp. |
|
Definition at line 40 of file VoiceDev.cpp. References m_lHandle, m_lSCbusTimeslot, m_strName, and bogotel::resultSUCCESS. Referenced by bogotel::CBgtRt::openVoiceDev(). |
|
Definition at line 53 of file VoiceDev.cpp. References m_pSignalDev, bogotel::resultPOINTER, and bogotel::resultSUCCESS. Referenced by bogotel::CBgtRt::listenSignalTimeslot(). |
|
Definition at line 64 of file VoiceDev.cpp. References log(), registerIoOp(), bogotel::resultFAIL, bogotel::resultFUNC_BAD_PARAMETER, and bogotel::resultSUCCESS. Referenced by bogotel::CBgtRt::mediaFilePlay(). |
|
Definition at line 83 of file VoiceDev.cpp. References log(), registerIoOp(), bogotel::resultFAIL, bogotel::resultFUNC_BAD_PARAMETER, and bogotel::resultSUCCESS. Referenced by bogotel::CBgtRt::dial(). |
|
Definition at line 192 of file VoiceDev.cpp. References log(), bogotel::resultSUCCESS, and terminateIoOp(). Referenced by bogotel::CBgtRt::stopVoice(). |
|
Definition at line 203 of file VoiceDev.cpp. References eraseDigitHistory(), log(), m_queueDigitType, m_queueDigitValue, and bogotel::resultSUCCESS. Referenced by bogotel::CBgtRt::clearDigitBuffer(). |
|
Definition at line 106 of file VoiceDev.cpp. References log(), registerIoOp(), bogotel::resultFAIL, bogotel::resultFUNC_BAD_PARAMETER, and bogotel::resultSUCCESS. Referenced by bogotel::CBgtRt::getDigit(). |
|
Definition at line 439 of file VoiceDev.cpp. References bogotel::CSignalDev::getHandle(), and m_pSignalDev. Referenced by bogotel::CBgtRt::incomingMsg(), bogotel::CTermParms::log(), and bogotel::CIOOp::log(). |
|
Definition at line 64 of file VoiceDev.h. References m_lSCbusTimeslot. |
|
Definition at line 65 of file VoiceDev.h. References m_lHandle. Referenced by bogotel::CSignalDev::sendEvent(). |
|
Definition at line 66 of file VoiceDev.h. References m_speakerState, and speakerState. Referenced by bogotel::CTermParms::update(). |
|
Definition at line 67 of file VoiceDev.h. References m_queueDigitValue. Referenced by bogotel::CTermParms::_update(). |
|
Definition at line 68 of file VoiceDev.h. References m_lTermMsk. Referenced by bogotel::CBgtRt::getTermMsk(). |
|
Definition at line 69 of file VoiceDev.h. References m_uiStateId. Referenced by bogotel::CTermParms::update(). |
|
|
|
Definition at line 216 of file VoiceDev.cpp. References bogotel::CSignalDev::getHandle(), bogotel::CMsg::getMsgTypeString(), bogotel::CMsg::getParam(), log(), m_pSignalDev, bogotel::CMsg::m_type, bogotel::MT_PLAY_DTMF, bogotel::MT_PLAY_DTMF_FINISHED, bogotel::MT_PLAY_WAV, bogotel::MT_PLAY_WAV_FINISHED, bogotel::PT_DTMF, bogotel::PT_WAV_FILENAME, bogotel::resultSUCCESS, terminateIoOp(), and updateSpeakerState(). Referenced by bogotel::CBgtRt::incomingMsg(), and sendMsg(). |
|
Definition at line 352 of file VoiceDev.cpp. References bogotel::CMsg::addParam(), bogotel::CMsg::init(), log(), m_lHandle, bogotel::CDevBase::m_pMsg, bogotel::MC_VOICE, bogotel::MT_PLAY_WAV, bogotel::PT_WAV_FILENAME, bogotel::resultSUCCESS, sendMsg(), and stripBaseFromWavFilename(). |
|
Definition at line 363 of file VoiceDev.cpp. References bogotel::CMsg::init(), log(), m_lHandle, bogotel::CDevBase::m_pMsg, bogotel::MC_VOICE, bogotel::MT_PLAY_WAV_FINISHED, bogotel::resultSUCCESS, and sendMsg(). |
|
Definition at line 371 of file VoiceDev.cpp. References bogotel::CMsg::addParam(), bogotel::CMsg::init(), log(), m_lHandle, bogotel::CDevBase::m_pMsg, bogotel::MC_VOICE, bogotel::MT_PLAY_DTMF, bogotel::PT_DTMF, bogotel::resultSUCCESS, and sendMsg(). Referenced by bogotel::CDialOp::dialSingleDigit(). |
|
Definition at line 385 of file VoiceDev.cpp. References bogotel::CMsg::init(), log(), m_lHandle, bogotel::CDevBase::m_pMsg, bogotel::MC_VOICE, bogotel::MT_PLAY_DTMF_FINISHED, bogotel::resultSUCCESS, and sendMsg(). Referenced by bogotel::CDialOp::dialSingleDigit(). |
|
Definition at line 142 of file VoiceDev.cpp. References log(), m_mtxIoOps, m_pInternalIoOp, m_pIoOp, bogotel::CDevBase::m_pTimer, bogotel::CTimer::requestTargetDeletion(), sendEvent(), bogotel::CIOOp::terminationEvent(), and bogotel::CTimerTarget::toString(). Referenced by receiveMsg(), registerIoOp(), stop(), bogotel::CIOOp::terminate(), and bogotel::CDialOp::terminate(). |
|
Definition at line 466 of file VoiceDev.cpp. References m_dequeDigitHistory. Referenced by bogotel::CTermParms::_update(), clearDigitBuffer(), and bogotel::CTermParms::initialCheck(). |
|
Definition at line 444 of file VoiceDev.cpp. References log(), and m_dequeDigitHistory. Referenced by bogotel::CTermParms::initialCheck(). |
|
Definition at line 461 of file VoiceDev.cpp. References m_dequeDigitHistory. |
|
Definition at line 83 of file VoiceDev.h. References bogotel::DEQUE_CHAR, and m_dequeDigitHistory. Referenced by bogotel::CTermParms::initialCheck(). |
|
Definition at line 499 of file VoiceDev.cpp. References eventNames. |
|
Definition at line 471 of file VoiceDev.cpp. References log(), m_dequeDigitHistory, m_queueDigitType, and m_queueDigitValue. Referenced by bogotel::CGetDigOp::terminate(). |
|
|
|
|
Definition at line 336 of file VoiceDev.cpp. References bogotel::CMsg::getMsgTypeString(), log(), bogotel::CDevBase::m_pTransport, receiveMsg(), bogotel::resultFUNC_BAD_PARAMETER, and bogotel::CMsgTransport::sendMsg(). Referenced by sendDtmfFinishedMsg(), sendDtmfMsg(), sendPlayFinishedMsg(), and sendPlayMsg(). |
|
Definition at line 427 of file VoiceDev.cpp. References bogotel::g_util, bogotel::CSignalDev::getHandle(), bogotel::CUtil::log(), and m_pSignalDev. Referenced by attemptRecognition(), clearDigitBuffer(), dial(), eraseFromDigitHistory(), getDigit(), getDigits(), play(), receiveMsg(), registerIoOp(), sendDtmfFinishedMsg(), sendDtmfMsg(), sendEvent(), sendMsg(), sendPlayFinishedMsg(), sendPlayMsg(), stop(), terminateIoOp(), and updateSpeakerState(). |
|
|
|
Definition at line 173 of file VoiceDev.cpp. References log(), m_mtxIoOps, m_pInternalIoOp, m_pIoOp, bogotel::CDevBase::m_pTimer, bogotel::CTimer::registerTarget(), bogotel::CIOOp::start(), and terminateIoOp(). Referenced by attemptRecognition(), dial(), getDigit(), and play(). |
|
Definition at line 393 of file VoiceDev.cpp. References s_strWavFilenameBase. Referenced by sendPlayMsg(). |
|
Definition at line 305 of file VoiceDev.cpp. References bogotel::g_util, bogotel::CProperties::getProperty(), log(), m_pInternalIoOp, bogotel::CUtil::m_propIni, registerIoOp(), and s_propWav2Dtmfs. Referenced by updateSpeakerState(). |
|
Definition at line 277 of file VoiceDev.cpp. References log(), m_queueDigitValue, m_speakerState, m_strCurrPlaybackFilename, and m_uiStateId. Referenced by receiveMsg(), and updateSpeakerState(). |
|
Definition at line 263 of file VoiceDev.cpp. References log(), m_queueDigitType, m_queueDigitValue, and updateSpeakerState(). |
|
Definition at line 253 of file VoiceDev.cpp. References attemptRecognition(), m_strCurrPlaybackFilename, and updateSpeakerState(). |
|
Definition at line 25 of file VoiceDev.cpp. |
|
Definition at line 22 of file VoiceDev.cpp. |
|
Definition at line 24 of file VoiceDev.cpp. Referenced by attemptRecognition(). |
|
Definition at line 23 of file VoiceDev.cpp. Referenced by stripBaseFromWavFilename(). |
|
Definition at line 95 of file VoiceDev.h. Referenced by clearDigitBuffer(), getCurrentDtmf(), getDigits(), and updateSpeakerState(). |
|
Definition at line 96 of file VoiceDev.h. Referenced by clearDigitBuffer(), getDigits(), and updateSpeakerState(). |
|
Definition at line 98 of file VoiceDev.h. Referenced by eraseDigitHistory(), eraseFromDigitHistory(), getDigitHistory(), and getDigits(). |
|
Definition at line 100 of file VoiceDev.h. Referenced by getState(), and updateSpeakerState(). |
|
Definition at line 104 of file VoiceDev.h. Referenced by getStateId(), and updateSpeakerState(). |
|
Definition at line 106 of file VoiceDev.h. Referenced by init(). |
|
Definition at line 107 of file VoiceDev.h. Referenced by getHandle(), init(), sendDtmfFinishedMsg(), sendDtmfMsg(), sendEvent(), sendPlayFinishedMsg(), and sendPlayMsg(). |
|
Definition at line 108 of file VoiceDev.h. Referenced by getTimeslot(), and init(). |
|
Definition at line 109 of file VoiceDev.h. Referenced by getSignalHandle(), listen(), log(), receiveMsg(), and sendEvent(). |
|
Definition at line 110 of file VoiceDev.h. Referenced by getTermMsk(), and sendEvent(). |
|
Definition at line 112 of file VoiceDev.h. Referenced by updateSpeakerState(). |
|
Definition at line 113 of file VoiceDev.h. Referenced by registerIoOp(), and terminateIoOp(). |
|
Definition at line 114 of file VoiceDev.h. Referenced by attemptRecognition(), registerIoOp(), and terminateIoOp(). |
|
Definition at line 126 of file VoiceDev.h. Referenced by registerIoOp(), and terminateIoOp(). |
|
Initial value: { "TDX_PLAY", "TDX_GETDIG", "TDX_ERROR", "TDX_DIAL", "Unknown" } Definition at line 510 of file VoiceDev.cpp. Referenced by getEventName(). |