/******************************************************************************* Function Name : vFormatTime Input(s) : - Output : - Functionality : Format Time Member of : CFormatMsgCAN Author(s) : Ratnadip Date Created : 8.7.2009 Modifications : *******************************************************************************/ void CFormatMsgCAN::vFormatTime(BYTE bExprnFlag, SFORMATTEDDATA_CAN* CurrDataCAN) { BYTE bTmpExprnFlag = bExprnFlag; if (IS_TM_ABS_SET(bExprnFlag)) { CLEAR_EXPR_TM_BITS(bTmpExprnFlag); SET_TM_ABS(bTmpExprnFlag); vCalculateAndFormatTM(bTmpExprnFlag, CurrDataCAN->m_u64TimeStamp, CurrDataCAN->m_acTimeAbs); } if (IS_TM_REL_SET(bExprnFlag)) { CLEAR_EXPR_TM_BITS(bTmpExprnFlag); SET_TM_REL(bTmpExprnFlag); vCalculateAndFormatTM(bTmpExprnFlag, CurrDataCAN->m_u64TimeStamp, CurrDataCAN->m_acTimeRel); } if (IS_TM_SYS_SET(bExprnFlag)) { CLEAR_EXPR_TM_BITS(bTmpExprnFlag); SET_TM_SYS(bTmpExprnFlag); vCalculateAndFormatTM(bTmpExprnFlag, CurrDataCAN->m_u64TimeStamp, CurrDataCAN->m_acTimeSys); } }
void CFrameProcessor_Common::vUpdateLoggingFlag(void) { BYTE* pbCurrFlag = m_bEditingON ? &m_bLogFlagTmp : &m_bExprnFlag_Log; CLEAR_EXPR_FLAG(*pbCurrFlag); USHORT ushLogBlocks = GetLoggingBlockCount(); for (USHORT i = 0; i < ushLogBlocks; i++) { SLOGINFO sLogInfo; GetLoggingBlock(i, sLogInfo); if (sLogInfo.m_bEnabled == FALSE) { continue; } BYTE* pbResFlag = sLogInfo.m_bResetAbsTimeStamp ? &m_bLogFlagTmp : &m_bExprnFlag_Log; switch (sLogInfo.m_eLogTimerMode) { case TIME_MODE_ABSOLUTE: SET_TM_ABS(*pbCurrFlag); SET_TM_ABS_RES(*pbResFlag); break; case TIME_MODE_RELATIVE: SET_TM_REL(*pbCurrFlag); break; case TIME_MODE_SYSTEM: SET_TM_SYS(*pbCurrFlag); break; } switch (sLogInfo.m_eNumFormat) { case HEXADECIMAL: SET_NUM_HEX(*pbCurrFlag); break; case DEC: SET_NUM_DEC(*pbCurrFlag); break; } } }
void CFormatMsgJ1939::vFormatTime(BYTE bExprnFlag, PSTJ1939_MSG psJ1939BData, PSFORMATTEDATA_J1939 psJ1939FData) { BYTE bTmpExprnFlag = bExprnFlag; if (IS_TM_ABS_RES(bExprnFlag))//for Absolute reset timestamp { CLEAR_EXPR_TM_BITS(bTmpExprnFlag); SET_TM_ABS_RES(bTmpExprnFlag); vCalculateAndFormatTM(bTmpExprnFlag, psJ1939BData->m_sMsgProperties.m_un64TimeStamp, psJ1939FData->m_acTimeAbsReset); } if (IS_TM_ABS_SET(bExprnFlag)) { CLEAR_EXPR_TM_BITS(bTmpExprnFlag); SET_TM_ABS(bTmpExprnFlag); vCalculateAndFormatTM(bTmpExprnFlag, psJ1939BData->m_sMsgProperties.m_un64TimeStamp, psJ1939FData->m_acTimeAbs); } if (IS_TM_REL_SET(bExprnFlag)) { CLEAR_EXPR_TM_BITS(bTmpExprnFlag); SET_TM_REL(bTmpExprnFlag); vCalculateAndFormatTM(bTmpExprnFlag, psJ1939BData->m_sMsgProperties.m_un64TimeStamp, psJ1939FData->m_acTimeRel); } if (IS_TM_SYS_SET(bExprnFlag)) { CLEAR_EXPR_TM_BITS(bTmpExprnFlag); SET_TM_SYS(bTmpExprnFlag); vCalculateAndFormatTM(bTmpExprnFlag, psJ1939BData->m_sMsgProperties.m_un64TimeStamp, psJ1939FData->m_acTimeSys); } }