Skip to content

Commit

Permalink
Updated for Filters, Message Window configuration, Signal Watch and N…
Browse files Browse the repository at this point in the history
…etwork statistics for LIN
  • Loading branch information
RBEI-Saravanan committed Mar 25, 2014
1 parent 7202b35 commit 1ef5ff2
Show file tree
Hide file tree
Showing 93 changed files with 5,421 additions and 3,034 deletions.
2 changes: 1 addition & 1 deletion Installation Setup/NSISHeaders.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
!define StrStr "!insertmacro StrStr"

/* BUSMASTER Version to be updated for every release */
!define VERSION "2.2.0"
!define VERSION "2.3.0"
100 changes: 80 additions & 20 deletions Sources/Application/BUSMASTER.rc
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,21 @@ END

IDD_DLG_NETWORK_STATISTICS DIALOGEX 0, 0, 138, 303
STYLE DS_SETFONT | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Network Statistics"
CAPTION "CAN"
FONT 8, "MS Sans Serif", 400, 0, 0x0
BEGIN
CONTROL "List1",IDC_LIST_STAT,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_OWNERDRAWFIXED | WS_BORDER | WS_TABSTOP,1,0,137,302
END

IDD_DLG_NETWORK_STATISTICS_LIN DIALOGEX 0, 0, 138, 303
STYLE DS_SETFONT | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "LIN"
FONT 8, "MS Sans Serif", 400, 0, 0x0
BEGIN
CONTROL "List1",IDC_LIST_STAT,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_OWNERDRAWFIXED | WS_BORDER | WS_TABSTOP,1,0,137,302
END


IDD_DLG_MSG_BUFFER_CONGIF DIALOG 0, 0, 214, 124
STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
Expand Down Expand Up @@ -741,13 +750,13 @@ BEGIN
VALUE "Comments", "Public Copy"
VALUE "CompanyName", "RBEI, Bangalore"
VALUE "FileDescription", "BUSMASTER MFC Application"
VALUE "FileVersion", "Ver 2.2.0"
VALUE "FileVersion", "Ver 2.3.0"
VALUE "InternalName", "BUSMASTER"
VALUE "LegalCopyright", "Copyright (C) 2011"
VALUE "LegalTrademarks", "BOSCH"
VALUE "OriginalFilename", "BUSMASTER.EXE"
VALUE "ProductName", "BUSMASTER Application"
VALUE "ProductVersion", "Ver 2.2.0"
VALUE "ProductVersion", "Ver 2.3.0"
END
END
BLOCK "VarFileInfo"
Expand Down Expand Up @@ -843,6 +852,13 @@ BEGIN
BOTTOMMARGIN, 270
END

IDD_DLG_NETWORK_STATISTICS_LIN, DIALOG
BEGIN
LEFTMARGIN, 7
TOPMARGIN, 1
BOTTOMMARGIN, 270
END

IDD_DLG_MSG_BUFFER_CONGIF, DIALOG
BEGIN
LEFTMARGIN, 7
Expand Down Expand Up @@ -1138,7 +1154,7 @@ BEGIN
END
MENUITEM "&Filter Configuration", IDM_FILTER_MESSAGE_SELECTMESSAGES
MENUITEM SEPARATOR
MENUITEM "&Network Statistics", IDM_NETWORK_STATISTICS_WND, CHECKED
MENUITEM "&Network Statistics", IDM_NETWORK_STATISTICS_WND_CAN
POPUP "&Message Window"
BEGIN
MENUITEM "&Activate", ID_SHOWMESSAGEWINDOW_CAN, CHECKED
Expand Down Expand Up @@ -1315,10 +1331,13 @@ BEGIN
BEGIN
MENUITEM "Connect &LIN\tF4", IDM_LIN_CONNECT
MENUITEM "C&luster Configuration", ID_LIN_CLUSTER_CONFIG
MENUITEM "&Filter Configuration", IDM_CONFIGURE_FILTER_LIN
MENUITEM SEPARATOR
MENUITEM "&Network Statistics", IDM_NETWORK_STATISTICS_WND_LIN
POPUP "&Message Window"
BEGIN
MENUITEM "&Activate", ID_SHOWMESSAGEWINDOW_LIN, CHECKED
MENUITEM "&Enable Filters", IDM_FILTER_MSGLINOFF, CHECKED
MENUITEM SEPARATOR
MENUITEM "&Configure", ID_CONFIGURE_MESSAGEDISPLAY_LIN, GRAYED
MENUITEM SEPARATOR
Expand All @@ -1332,10 +1351,16 @@ BEGIN
MENUITEM "&Interpret", IDM_DISPLAY_MESSAGEWATCHWINDOW_INTERPRET, CHECKED
MENUITEM "&Reset Columns", IDM_MSGWND_RESET_COLUMNS
END
POPUP "L&ogging"
POPUP "Sign&al Watch"
BEGIN
MENUITEM "&Activate", IDR_TOOL_BUTTON_SIGNAL_WATCH_LIN
MENUITEM SEPARATOR
MENUITEM "&Configure", IDM_SIGNALWATCH_ADDSIGNAL_LIN
END
POPUP "L&ogging"
BEGIN
MENUITEM "&Activate", IDM_LOG_LIN_ON_OFF

MENUITEM "&Enable Filters", IDM_FILTER_LOGLINOFF, CHECKED
MENUITEM SEPARATOR
MENUITEM "&Configure", IDM_CFGN_LIN_LOG
END
Expand Down Expand Up @@ -1368,12 +1393,16 @@ BEGIN
POPUP "&Toolbar"
BEGIN
MENUITEM "Con&figuration", ID_CONFIGURATION_TOOLBAR, CHECKED
MENUITEM "&Main", ID_DISPLAY_MAIN, CHECKED
MENUITEM "&Configure", ID_DISPLAY_CONFIGURE, CHECKED
MENUITEM "CAN &Database", ID_TB_CANDATABASE, CHECKED
MENUITEM "Message &Window", ID_DISPLAY_MSG_WND, CHECKED
MENUITEM "&Node Simulation", ID_DISPLAY_NODE_SIMULATION, CHECKED
MENUITEM "&J1939", ID_TOOLBAR_J1939, CHECKED
MENUITEM "Message &Window", ID_DISPLAY_MSG_WND, CHECKED
MENUITEM SEPARATOR
POPUP "CAN"
BEGIN
MENUITEM "&Main", ID_DISPLAY_MAIN, CHECKED
MENUITEM "&Configure", ID_DISPLAY_CONFIGURE, CHECKED
MENUITEM "CAN &Database", ID_TB_CANDATABASE, CHECKED
MENUITEM "&Node Simulation", ID_DISPLAY_NODE_SIMULATION, CHECKED
MENUITEM "&J1939", ID_TOOLBAR_J1939, CHECKED
END
MENUITEM "Flex&Ray", ID_FLEXRAY_TOOLBAR, CHECKED
MENUITEM "&LIN", ID_TOOLBAR_LIN, CHECKED
END
Expand Down Expand Up @@ -1444,6 +1473,7 @@ IDI_ICON_LOG_ON ICON "res\\LoggingON.ico"
IDI_ICON_LOG_ONLIGHT ICON "res\\LoggingONLIGHT.ico"
IDI_ICON_NETWORKSTAT ICON "res\\Network_Statistics.ico"
ID_CONNECT ICON "Res\\Connect.ico"
IDI_ICON_SMSG ICON "res\\DB Editor.ico"

/////////////////////////////////////////////////////////////////////////////
//
Expand Down Expand Up @@ -1554,7 +1584,7 @@ BEGIN
BUTTON ID_CAN_LOGO
BUTTON IDM_FILE_CONNECT
SEPARATOR
BUTTON 32918
BUTTON IDM_NETWORK_STATISTICS_WND_CAN
BUTTON 32784
SEPARATOR
BUTTON IDM_LOG_ON_OFF
Expand Down Expand Up @@ -1658,8 +1688,20 @@ BEGIN
BUTTON ID_LIN_CLUSTER_CONFIG
SEPARATOR
BUTTON ID_TRANSMIT_CONFIGURE_LIN
BUTTON IDM_LOG_LIN_ON_OFF
BUTTON IDM_CFGN_LIN_LOG
BUTTON IDM_NETWORK_STATISTICS_WND_LIN
SEPARATOR
BUTTON IDM_CFGN_LIN_LOG
BUTTON IDM_LOG_LIN_ON_OFF
SEPARATOR
BUTTON IDM_CONFIGURE_FILTER_LIN
BUTTON IDM_FILTER_LOGLINOFF
BUTTON IDM_FILTER_MSGLINOFF
SEPARATOR
BUTTON IDM_SIGNALWATCH_ADDSIGNAL_LIN
BUTTON IDR_TOOL_BUTTON_SIGNAL_WATCH_LIN
SEPARATOR
BUTTON ID_CONFIGURE_MESSAGEDISPLAY_LIN
BUTTON IDM_CONFIGURE_SIMULATEDSYSTEMS_LIN
END


Expand Down Expand Up @@ -1800,7 +1842,7 @@ BEGIN
IDS_INVALID_DB_PROMPT "Invalid database filename"
ID_ACTIVE_DATABASE_NAME " "
IDS_MESSAGE_NAME "Message Name"
IDS_VERSION "Ver 2.2.0"
IDS_VERSION "Ver 2.3.0"
IDS_HEADER "***NOTE: PLEASE DO NOT EDIT THIS DOCUMENT***\n\n\n***[START LOGGING SESSION]***\n"
IDS_FOOTER "***[END LOGGING SESSION]***"
IDS_CONNECT "&Connect\tF2"
Expand Down Expand Up @@ -1837,13 +1879,24 @@ BEGIN
IDM_LOG_LIN_ON_OFF "Start/Stop LIN Message Logging\nStart/Stop LIN Logging"
IDM_CFGN_LIN_LOG "Configure LIN message logging\nLIN logging"
IDM_LIN_CONNECT "Connect/Disconnect\nConnect/Disconnect"
IDM_FILTER_LOGLINOFF "Enable or Disable LIN Loggiing filter\nEnable or Disable LIN Logging filter"

ID_LIN_CLUSTER_CONFIG "Associate LIN Database(LDF)\nConfigure LIN Network"
IDM_FILTER_MSGLINOFF "Enable or Disable Message Display filter For Lin\nEnable or Disable Message Display filter For LIN"
IDM_CONFIGURE_FILTER_LIN "Select messages for filtering at application level\nSelect messages for filtering at application level"
ID_CONFIGURE_MESSAGEDISPLAY_LIN "ConfigureLIN Message Display Attributes\nConfigure LIN Message Display Attributes"
IDM_CONFIGURE_SIMULATEDSYSTEMS_LIN "Configure LIN Simulated Systems for Multinode Simulation\nConfigure LIN Simulated Systems for Multinode Simulation"
//IDM_NETWORK_STATISTICS_WND "NetWork Statics Window"

END

STRINGTABLE
BEGIN
IDS_MESSAGE_ID "Message ID"
IDM_NETWORK_STATISTICS_WND
"Show/Hide Network Statistics Window\nShow/Hide Network Statistics Window"
IDM_NETWORK_STATISTICS_WND_LIN
"Show Network Statistics Window\nShow Network Statistics Window"
IDM_NETWORK_STATISTICS_WND_CAN
"Show/Hide Network Statistics Window\nShow Network Statistics Window"
IDM_CONFIGURE_PASSIVE "Set Controller To Passive Mode\nPassive Mode"
IDM_CONFIGURE_ACTIVE "Set Controller To Active Mode\nActive Mode"
IDM_TRACE_WND "Show/Hide Trace Window\nShow/Hide Trace Window"
Expand Down Expand Up @@ -1894,6 +1947,9 @@ BEGIN
"Open active database\nOpen active database"
IDM_SIGNALWATCH_ADDSIGNAL
"Add/Delete Signals to Watch window\nAdd/Delete Signals to Watch window"

IDM_SIGNALWATCH_ADDSIGNAL_LIN "Add/Delete Signals to Watch window\nAdd/Delete Signals to Watch window"

IDM_SIGNALWATCH_CLOSE "Show/Hide Signal Watch window\nShow/Hide Signal Watch window"
IDM_FILTER_MESSAGE_SELECTMESSAGES
"Select messages for filtering at application level\nSelect messages for filtering at application level"
Expand All @@ -1910,6 +1966,8 @@ STRINGTABLE
BEGIN
IDR_TOOL_BUTTON_SIGNAL_WATCH
"Show/Hide Signal Watch Window\nShow/Hide Signal Watch Windiow"
IDR_TOOL_BUTTON_SIGNAL_WATCH_LIN
"Show/Hide Signal Watch Window\nShow/Hide Signal Watch Windiow"
IDR_TOOL_BUTTON_SKIP "Skip Message\nSkip Message"
IDR_TOOL_BUTTON_GO "Go\nGo"
IDR_TOOL_BUTTON_MSG_DISP
Expand Down Expand Up @@ -1980,6 +2038,7 @@ BEGIN
IDM_DELETE "Deletes current message"
IDR_TOOL_STOPSENDMSG "Stop sending mutilple messages\nStop sending mutilple messages"
IDM_CFGN_SEND_MSGS "Configure messages to transmit over CAN-bus\nConfigure messages to transmit over CAN-bus"
ID_TRANSMIT_CONFIGURE_LIN "Configure messages to transmit over LIN-bus\nConfigure messages to transmit over LIN-bus"
IDM_DELETE_SEL_MSG "Deletes current message details"
IDM_MSGDISPWND_MSGREP "Show between message name and ID in the message entry"
IDM_MSGDISPWND_DATE "Date is displayed along with time stamp"
Expand All @@ -1992,9 +2051,9 @@ BEGIN
IDM_DELETE_ALL_SEL_MSG "Delete all selected message from the list"
IDM_EXECUTE_KEYHANDLERS "Enable/Disable execution of all key handler(s)\nEnable/Disable all Key handler(s)"
IDM_FLEX_CFGN_SEND_MSGS "FlexRay Message Configuration\nFlexRay Message Configuration"
ID_TRANSMIT_CONFIGURE_LIN "LIN Message Configuration\nLIN Message Configuration"


ID_LIN_CLUSTER_CONFIG "LIN Cluster Configuration\nLIN Cluster Configuration"
//ID_LIN_CLUSTER_CONFIG "LIN Cluster Configuration\nLIN Cluster Configuration"
IDM_CONFIG_NEW "Create new configuration file\nCreate new configuration file"
IDM_CONFIG_LOAD "Load configuration file\nLoad configuration file"
IDM_SAVE_CONFIG "Save configuration file\nSave configuration file"
Expand Down Expand Up @@ -2105,6 +2164,7 @@ STRINGTABLE
BEGIN
ID_CONFIGURE_MESSAGEDISPLAY_FLEXRAY
"Configure Message Display Attributes of FlexRay\nConfigure Message Display Attributes of FlexRay"
ID_LIN_FILTER_CONFIG "LIN Filter Configuration\nLIN Filter Configuration"
END

#endif // English (U.S.) resources
Expand Down
11 changes: 9 additions & 2 deletions Sources/Application/BUSMASTER.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ copy ".\Res\Splsh16.bmp" "$(SolutionDir)\bin\$(OutDir)Splsh16.bmp"
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='busmaster_debug|Win32'">
</BrowseInformation>
</ClCompile>
<ClCompile Include="BusStatisticLIN.cpp" />
<ClCompile Include="BusStatistics.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand Down Expand Up @@ -487,7 +488,7 @@ copy ".\Res\Splsh16.bmp" "$(SolutionDir)\bin\$(OutDir)Splsh16.bmp"
</BrowseInformation>
</ClCompile>
<ClCompile Include="FibexClass.cpp" />
<ClCompile Include="FibexConfigurationDlg.cpp" />
<ClCompile Include="ChannelConfigurationDlg.cpp" />
<ClCompile Include="FIBEX_Structs.cpp" />
<ClCompile Include="Flags.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
Expand Down Expand Up @@ -568,6 +569,7 @@ copy ".\Res\Splsh16.bmp" "$(SolutionDir)\bin\$(OutDir)Splsh16.bmp"
<ClCompile Include="ldfparser.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
</ClCompile>
<ClCompile Include="LINBusStatisticsDlg.cpp" />
<ClCompile Include="MainFrm.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand Down Expand Up @@ -762,6 +764,7 @@ copy ".\Res\Splsh16.bmp" "$(SolutionDir)\bin\$(OutDir)Splsh16.bmp"
</BrowseInformation>
</ClCompile>
<ClCompile Include="MultiLanguage.cpp" />
<ClCompile Include="NetworkStatistics.cpp" />
<ClCompile Include="NodeUtil_Flexray.cpp" />
<ClCompile Include="NotificListbox.cpp" />
<ClCompile Include="NotificWnd.cpp" />
Expand Down Expand Up @@ -992,9 +995,11 @@ copy ".\Res\Splsh16.bmp" "$(SolutionDir)\bin\$(OutDir)Splsh16.bmp"
<ItemGroup>
<ClInclude Include="AppServices_Impl.h" />
<ClInclude Include="BaseBusStatisticCAN.h" />
<ClInclude Include="BaseBusStatisticLIN.h" />
<ClInclude Include="BUSMASTER.h" />
<ClInclude Include="BusmasterDump.h" />
<ClInclude Include="BusStatisticCAN.h" />
<ClInclude Include="BusStatisticLIN.h" />
<ClInclude Include="BusStatistics.h" />
<ClInclude Include="BusStatisticsDlg.h" />
<ClInclude Include="CExcApplication.h" />
Expand All @@ -1015,7 +1020,7 @@ copy ".\Res\Splsh16.bmp" "$(SolutionDir)\bin\$(OutDir)Splsh16.bmp"
<ClInclude Include="ElementSelection.h" />
<ClInclude Include="FibexClass.h" />
<ClInclude Include="FibexClass_extern.h" />
<ClInclude Include="FibexConfigurationDlg.h" />
<ClInclude Include="ChannelConfigurationDlg.h" />
<ClInclude Include="Fibex_Defs.h" />
<ClInclude Include="FIBEX_Structs.h" />
<ClInclude Include="Flags.h" />
Expand All @@ -1031,6 +1036,7 @@ copy ".\Res\Splsh16.bmp" "$(SolutionDir)\bin\$(OutDir)Splsh16.bmp"
<ClInclude Include="InterfaceGetter.h" />
<ClInclude Include="J1939TimeOutCfg.h" />
<ClInclude Include="ldfparser.cpp.h" />
<ClInclude Include="LINBusStatisticsDlg.h" />
<ClInclude Include="MainFrm.h" />
<ClInclude Include="MDIChildBase.h" />
<ClInclude Include="MessageAttrib.h" />
Expand All @@ -1048,6 +1054,7 @@ copy ".\Res\Splsh16.bmp" "$(SolutionDir)\bin\$(OutDir)Splsh16.bmp"
<ClInclude Include="MsgWndHdrInfo.h" />
<ClInclude Include="MsgWndThread.h" />
<ClInclude Include="MultiLanguage.h" />
<ClInclude Include="NetworkStatistics.h" />
<ClInclude Include="NodeUtil_Flexray.h" />
<ClInclude Include="NotificListbox.h" />
<ClInclude Include="NotificWnd.h" />
Expand Down
27 changes: 25 additions & 2 deletions Sources/Application/BusStatisticCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1148,12 +1148,35 @@ void CBusStatisticCAN::vCalculateBusParametres(void)
m_sBusStatistics[ nChannelIndex ].m_unTotalTxMsgCount +
m_sBusStatistics[ nChannelIndex ].m_unTotalRxMsgCount;
//***** Total Message Rate *****//
m_sBusStatistics[ nChannelIndex ].m_unMsgPerSecond =

m_sBusStatistics[ nChannelIndex ].m_unMsgPerSecond =
m_sBusStatistics[ nChannelIndex ].m_unTotalMsgCount -
m_sPrevStatData[ nChannelIndex ].m_unTotalMsgCount;
m_sBusStatistics[ nChannelIndex ].m_unMsgPerSecond =

FLOAT msgPerSec= (m_sBusStatistics[ nChannelIndex ].m_unMsgPerSecond /(FLOAT) m_dDiffTime );
if( msgPerSec > 0.50 && msgPerSec < 1)
{
m_sBusStatistics[ nChannelIndex ].m_unMsgPerSecond =1;

}
else
{
m_sBusStatistics[ nChannelIndex ].m_unMsgPerSecond =
static_cast<UINT>
(m_sBusStatistics[ nChannelIndex ].m_unMsgPerSecond / m_dDiffTime );

}


/* m_sBusStatistics[ nChannelIndex ].m_unMsgPerSecond =
m_sBusStatistics[ nChannelIndex ].m_unTotalMsgCount -
m_sPrevStatData[ nChannelIndex ].m_unTotalMsgCount;
m_sBusStatistics[ nChannelIndex ].m_unMsgPerSecond =
static_cast<UINT>
(m_sBusStatistics[ nChannelIndex ].m_unMsgPerSecond / m_dDiffTime );*/



// Calculate Error Count & Rate
m_sBusStatistics[ nChannelIndex ].m_unErrorTotalCount =
m_sBusStatistics[ nChannelIndex ].m_unErrorRxCount +
Expand Down
18 changes: 18 additions & 0 deletions Sources/Application/BusStatistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
*/
#include "stdafx.h" // Standard include header
#include "BusStatisticCAN.h"
#include "BusStatisticLIN.h"
#include "FlexRayNetworkStats.h"
#include "BusStatistics.h"
static CBusStatisticCAN* sg_pouBS_CAN = NULL;
static CBusStatisticLIN* sg_pouBS_LIN = NULL;
static CFlexRayNetworkStats* sg_pouBS_FlexRay = NULL;
/**
* \param[in] eBus specifies the Type of bus,Either CAN or FRAME
Expand Down Expand Up @@ -72,6 +74,22 @@ HRESULT BS_GetInterface(ETYPE_BUS eBus, void** ppvInterface)
{
ASSERT(FALSE);
}
break;

case LIN:
{
if (NULL == sg_pouBS_LIN)
{
if ((sg_pouBS_LIN = new CBusStatisticLIN) == NULL)
{
ASSERT(FALSE);
hResult = S_FALSE;
}
}

// Else the object has been existing already
*ppvInterface = (void*) sg_pouBS_LIN;
}
break;

default:
Expand Down
Loading

0 comments on commit 1ef5ff2

Please sign in to comment.