/****************************************************************************** Function Name : nCreateMapIndexKey Input(s) : Output : Functionality : Creates a key for SmsgDispEntry map Member of : CMsgContainerJ1939 Friend of : - Author(s) : Arun kumar K Date Created : 01.02.2011 ******************************************************************************/ __int64 CMsgContainerJ1939::nCreateMapIndexKey( LPVOID pMsgData ) { STJ1939_MSG* pouJ1939Msg = (STJ1939_MSG*) pMsgData; // Form message to get message index in the CMap UINT nMsgID = MAKE_RX_TX_MESSAGE( pouJ1939Msg->m_sMsgProperties.m_uExtendedID.m_s29BitId.unGetPGN(), IS_RX_MESSAGE(pouJ1939Msg->m_sMsgProperties.m_eDirection)); // For extended message nMsgID = MAKE_EXTENDED_MESSAGE_TYPE(nMsgID); // Apply Channel Information __int64 n64MapIndex = MAKE_CHANNEL_SPECIFIC_MESSAGE( nMsgID, pouJ1939Msg->m_sMsgProperties.m_byChannel); n64MapIndex = MAKE_SOURCE_SPECIFIC_MESSAGE( n64MapIndex, pouJ1939Msg->m_sMsgProperties.m_uExtendedID.m_s29BitId.m_bySrcAddress); n64MapIndex = MAKE_DEST_SPECIFIC_MESSAGE( n64MapIndex, pouJ1939Msg->m_sMsgProperties.m_uExtendedID.m_s29BitId.m_uPGN.m_sPGN.m_byPDU_Specific); n64MapIndex = MAKE_TYPE_SPECIFIC_MESSAGE( n64MapIndex, pouJ1939Msg->m_sMsgProperties.m_eType); return n64MapIndex; }
__int64 tagSTJ1939_MSG::GetSlotID(STJ1939_MSG& pouJ1939Msg) { // Form message to get message index in the CMap UINT nMsgID = MAKE_RX_TX_MESSAGE( pouJ1939Msg.m_sMsgProperties.m_uExtendedID.m_s29BitId.unGetPGN(), IS_RX_MESSAGE(pouJ1939Msg.m_sMsgProperties.m_eDirection)); // For extended message nMsgID = MAKE_EXTENDED_MESSAGE_TYPE(nMsgID); // Apply Channel Information __int64 n64MapIndex = MAKE_CHANNEL_SPECIFIC_MESSAGE( nMsgID, pouJ1939Msg.m_sMsgProperties.m_byChannel); n64MapIndex = MAKE_SOURCE_SPECIFIC_MESSAGE( n64MapIndex, pouJ1939Msg.m_sMsgProperties.m_uExtendedID.m_s29BitId.m_bySrcAddress); n64MapIndex = MAKE_DEST_SPECIFIC_MESSAGE( n64MapIndex, pouJ1939Msg.m_sMsgProperties.m_uExtendedID.m_s29BitId.m_uPGN.m_sPGN.m_byPDU_Specific); n64MapIndex = MAKE_TYPE_SPECIFIC_MESSAGE( n64MapIndex, pouJ1939Msg.m_sMsgProperties.m_eType); return n64MapIndex; };