| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #include "StdAfx.h"
- #include "Line.h"
- CLine::CLine(int LineId) : m_IPOLineID(0), m_LineID(LineId), m_State(S_CALL_STANDBY), m_pCmdEntity(NULL)
- {
- }
- CLine::~CLine(void)
- {
- freeCmd();
- }
- /*****************************************************************
- **【函数名称】 setCmd
- **【函数功能】 实例化命令指针,并备份PDU消息。
- **【参数】 CPduEntity* pCmdEntity PDU消息指针
- **【返回值】
- ****************************************************************/
- void CLine::setCmd( CPduEntity* pCmdEntity )
- {
- if (NULL != m_pCmdEntity )
- delete m_pCmdEntity;
- m_pCmdEntity = new CPduEntity(*pCmdEntity);
- ASSERT(m_pCmdEntity != NULL);
- }
- /*****************************************************************
- **【函数名称】 FreePduEntity
- **【函数功能】 释放存储命令指针
- **【参数】
- **【返回值】
- ****************************************************************/
- void CLine::freeCmd( void )
- {
- if (NULL != m_pCmdEntity)
- {
- delete m_pCmdEntity;
- m_pCmdEntity = NULL;
- }
- }
- /*****************************************************************
- **【函数名称】 show
- **【函数功能】 显示当前线路状态
- **【参数】
- **【返回值】
- ****************************************************************/
- void CLine::show( void )
- {
- // 推送状态变化消息
- CMsgCenter::GetInstance().pushMsg(VS_MSG_LINE_STATE_UPDATE, reinterpret_cast<const PARAM>(m_LineID));
- }
|