| | |
| | | LOGI("<HSMS>收到消息 S%dF%d", nStream, pHeader->function); |
| | | if (nStream == 1 && pHeader->function == 1) { |
| | | // S1F1 |
| | | replyAreYouThere(pHeader->systemBytes); |
| | | replyAreYouThere(pMessage); |
| | | } |
| | | else if (nStream == 1 && pHeader->function == 13) { |
| | | replyEstablishCommunications(pHeader->systemBytes); |
| | | replyEstablishCommunications(pMessage); |
| | | } |
| | | else if (nStream == 2 && pHeader->function == 31) { |
| | | replyDatetime(pMessage); |
| | |
| | | } |
| | | |
| | | // S1F2 |
| | | int CHsmsPassive::replyAreYouThere(unsigned int systemBytes) |
| | | int CHsmsPassive::replyAreYouThere(IMessage* pRecv) |
| | | { |
| | | if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) { |
| | | return ER_NOTSELECT; |
| | | } |
| | | |
| | | IMessage* pMessage = NULL; |
| | | HSMS_Create1Message(pMessage, m_nSessionId, 1, 2, systemBytes); |
| | | HSMS_Create1Message(pMessage, m_nSessionId, 1, 2, pRecv->getHeader()->systemBytes); |
| | | ASSERT(pMessage); |
| | | |
| | | ISECS2Item* pItem = pMessage->getBody(); |
| | |
| | | } |
| | | |
| | | // S1F14 |
| | | int CHsmsPassive::replyEstablishCommunications(unsigned int systemBytes) |
| | | int CHsmsPassive::replyEstablishCommunications(IMessage* pRecv) |
| | | { |
| | | if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) { |
| | | return ER_NOTSELECT; |
| | | } |
| | | |
| | | IMessage* pMessage = NULL; |
| | | HSMS_Create1Message(pMessage, m_nSessionId, 1, 14, systemBytes); |
| | | HSMS_Create1Message(pMessage, m_nSessionId, 1, 14, pRecv->getHeader()->systemBytes); |
| | | ASSERT(pMessage); |
| | | |
| | | ISECS2Item* pItem = pMessage->getBody(); |