00001
00002 #ifndef __CONVERSE_EVENTS_H__
00003 #define __CONVERSE_EVENTS_H__
00004
00005 #include "traceCoreAPI.h"
00006 #include "converseProjections.h"
00007
00008
00009 #define _CONVERSE_LANG_ID 1 // language ID for converse
00010
00011
00012 #define _E_MSG_SENT 0
00013 #define _E_MSG_QUEUED 1 // DOUBT: Queued where ?
00014 #define _E_MSG_RECV_MC 2 // Message received in machine layer
00015 #define _E_MSG_RECV_SC 3 // Message received in scheduler
00016 #define _E_HANDLER_BEGIN 4
00017 #define _E_HANDLER_END 5
00018
00019
00020 #define REGISTER_CONVERSE \
00021 { RegisterLanguage(_CONVERSE_LANG_ID, "converse\0"); \
00022 RegisterEvent(_CONVERSE_LANG_ID, _E_MSG_SENT ); \
00023 RegisterEvent(_CONVERSE_LANG_ID, _E_MSG_QUEUED ); \
00024 RegisterEvent(_CONVERSE_LANG_ID, _E_MSG_RECV_MC ); \
00025 RegisterEvent(_CONVERSE_LANG_ID, _E_MSG_RECV_SC ); \
00026 RegisterEvent(_CONVERSE_LANG_ID, _E_HANDLER_BEGIN); \
00027 RegisterEvent(_CONVERSE_LANG_ID, _E_HANDLER_END ); \
00028 \
00029 }
00030
00031 #define _LOG_E_MSG_SENT(destPE, size) \
00032 { LOGCONDITIONAL (converse_msgSent(destPE, size)); }
00033 #define _LOG_E_MSG_QUEUED() \
00034 { LOGCONDITIONAL (LogEvent(_CONVERSE_LANG_ID, _E_MSG_QUEUED)); } //TODO
00035 #define _LOG_E_MSG_RECV_MC() \
00036 { LOGCONDITIONAL (LogEvent(_CONVERSE_LANG_ID, _E_MSG_RECV_MC)); } //TODO
00037 #define _LOG_E_MSG_RECV_SC() \
00038 { LOGCONDITIONAL (LogEvent(_CONVERSE_LANG_ID, _E_MSG_RECV_SC)); } //TODO
00039 #define _LOG_E_HANDLER_BEGIN(handlerIdx) \
00040 { LOGCONDITIONAL (converse_handlerBegin(handlerIdx)); }
00041 #define _LOG_E_HANDLER_END(handlerIdx) \
00042 { LOGCONDITIONAL (converse_handlerEnd(handlerIdx)); }
00043
00044 #endif