Garmin Fleet Management Controller  2.19.0
CDashcamNtfctnDlg Class Reference

Browser-based container for listing the Dashcam library. More...

#include <CDashcamNtfctnDlg.h>

+ Inheritance diagram for CDashcamNtfctnDlg:

Public Types

enum  { IDD = IDD_DASHCAM_NTFCTN }
 

Public Member Functions

 CDashcamNtfctnDlg (CWnd *pParent, FmiApplicationLayer &aCom)
 Constructor. More...
 
virtual ~CDashcamNtfctnDlg ()
 Destructor. More...
 
void onEvent (EventId aEventId, uint32 aEventData, void *aEventDataPtr, BOOL handleNow)
 Handles event callbacks by translating an EventId into a windows message. More...
 

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
 Perform dialog data exchange and validation. More...
 
void OnBnClickedSet ()
 Button handler for the Set button. More...
 
void OnClose ()
 Handler for the Close action. More...
 
afx_msg LRESULT OnDashcamSetNtfctnReceipt (WPARAM, LPARAM)
 This function handles the dashcam set notification receipt event from device. More...
 
afx_msg LRESULT OnGetNtfctnSettingsResponse (WPARAM, LPARAM)
 This function handles the dashcam set notification receipt event from device. More...
 
BOOL OnInitDialog ()
 Initialize the dialog. More...
 
void OnReevaluate ()
 Change handler for editable controls. More...
 
void OnRefreshNtfctnSettings ()
 Button handler for the Retrieve Settings button. More...
 
void PostNcDestroy ()
 Called by MFC after the window has been destroyed; performs final termination activities. More...
 

Protected Attributes

FmiApplicationLayermCom
 Reference to the FMI communication controller. More...
 
int mForwardCollisionNtfctn
 
int mIncidentDetectionNtfctn
 
int mLaneDepartureNtfctn
 

Detailed Description

Browser-based container for listing the Dashcam library.

Definition at line 21 of file CDashcamNtfctnDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator
IDD 

Definition at line 33 of file CDashcamNtfctnDlg.h.

Constructor & Destructor Documentation

CDashcamNtfctnDlg::CDashcamNtfctnDlg ( CWnd *  aParent,
FmiApplicationLayer aCom 
)

Constructor.

Parameters
aParentThe parent of this dialog
aComReference to the FMI communication controller

Definition at line 40 of file CDashcamNtfctnDlg.cpp.

CDashcamNtfctnDlg::~CDashcamNtfctnDlg ( )
virtual

Destructor.

Definition at line 55 of file CDashcamNtfctnDlg.cpp.

Member Function Documentation

void CDashcamNtfctnDlg::DoDataExchange ( CDataExchange *  aDataExchange)
protectedvirtual

Perform dialog data exchange and validation.

Parameters
aDataExchangeThe DDX context

Definition at line 79 of file CDashcamNtfctnDlg.cpp.

References IDC_DISABLE_FORWARD_COLLISION_NTFCTN, IDC_DISABLE_INCIDENT_DETECTION_NTFCTN, IDC_DISABLE_LANE_DEPARTURE_WARNING_NTFCTN, mForwardCollisionNtfctn, mIncidentDetectionNtfctn, and mLaneDepartureNtfctn.

Referenced by OnInitDialog().

void CDashcamNtfctnDlg::OnClose ( )
protected

Handler for the Close action.

Closes the window.

Definition at line 126 of file CDashcamNtfctnDlg.cpp.

References FALSE, mForwardCollisionNtfctn, mIncidentDetectionNtfctn, mLaneDepartureNtfctn, and TRUE.

LRESULT CDashcamNtfctnDlg::OnDashcamSetNtfctnReceipt ( WPARAM  return_code,
LPARAM   
)
protected

This function handles the dashcam set notification receipt event from device.

Definition at line 150 of file CDashcamNtfctnDlg.cpp.

References DASHCAM_ERR_FCW_LDW_NTFCTN_NOT_SUPPORT, DASHCAM_ERR_FCW_NOT_ENABLED, DASHCAM_ERR_INCIDENT_NOT_ENABLED, DASHCAM_ERR_LDW_NOT_ENABLED, and DASHCAM_SUCCESS.

void CWndEventListener::onEvent ( EventId  aEventId,
uint32  aEventData,
void *  aEventDataPtr,
BOOL  handleNow 
)
virtualinherited

Handles event callbacks by translating an EventId into a windows message.

Casts this to a CWnd then posts a Windows message to it. The use of dynamic_cast is used as an alternative to the "dreaded diamond" caused by C++ multiple inheritance.

Parameters
aEventIdThe event ID
aEventDataThe event data
aEventDataPtrPointer to more event data
Note
Interested parties receive these events as Windows messages, i.e., ON_MESSAGE( aEventId, CallbackFunction ). aEventData is the WPARAM, and aEventDataPtr is the LPARAM.

Implements EventListener.

Definition at line 29 of file CWndEventListener.cpp.

References EVENT_ID_CNT, and WM_EVENT.

LRESULT CDashcamNtfctnDlg::OnGetNtfctnSettingsResponse ( WPARAM  return_code,
LPARAM  receipt_data 
)
protected
BOOL CDashcamNtfctnDlg::OnInitDialog ( )
protected

Initialize the dialog.

This function is called when the window is created. It sets up the parent, so it can get info from and send a message to FmiApplicationLayer.

Returns
TRUE, since this function does not set focus to a control

Definition at line 66 of file CDashcamNtfctnDlg.cpp.

References DoDataExchange(), FALSE, and TRUE.

void CDashcamNtfctnDlg::OnReevaluate ( )
protected

Change handler for editable controls.

Make the SET button clickable if the data is valid for sending

Definition at line 238 of file CDashcamNtfctnDlg.cpp.

References FALSE, mForwardCollisionNtfctn, mIncidentDetectionNtfctn, and mLaneDepartureNtfctn.

void CDashcamNtfctnDlg::OnRefreshNtfctnSettings ( )
protected

Button handler for the Retrieve Settings button.

Calls FmiApplicationLayer to initiate the Get Ntfctn settings request protocol

Definition at line 95 of file CDashcamNtfctnDlg.cpp.

References fmi_dashcam_get_settings_request_data_type::change_id, FALSE, FMI_DASHCAM_GET_NTFCTN_SETTINGS_REQUEST, mCom, FmiApplicationLayer::sendFmiPacket(), and TRUE.

void CDashcamNtfctnDlg::PostNcDestroy ( )
protected

Called by MFC after the window has been destroyed; performs final termination activities.

Definition at line 141 of file CDashcamNtfctnDlg.cpp.

Member Data Documentation

FmiApplicationLayer& CDashcamNtfctnDlg::mCom
protected

Reference to the FMI communication controller.

Definition at line 50 of file CDashcamNtfctnDlg.h.

Referenced by OnBnClickedSet(), and OnRefreshNtfctnSettings().

int CDashcamNtfctnDlg::mForwardCollisionNtfctn
protected
int CDashcamNtfctnDlg::mIncidentDetectionNtfctn
protected
int CDashcamNtfctnDlg::mLaneDepartureNtfctn
protected

The documentation for this class was generated from the following files: