Garmin Fleet Management Controller
2.19.0
|
Browser-based container for listing the Dashcam library. More...
#include <CDashcamNtfctnDlg.h>
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 | |
FmiApplicationLayer & | mCom |
Reference to the FMI communication controller. More... | |
int | mForwardCollisionNtfctn |
int | mIncidentDetectionNtfctn |
int | mLaneDepartureNtfctn |
Browser-based container for listing the Dashcam library.
Definition at line 21 of file CDashcamNtfctnDlg.h.
anonymous enum |
Enumerator | |
---|---|
IDD |
Definition at line 33 of file CDashcamNtfctnDlg.h.
CDashcamNtfctnDlg::CDashcamNtfctnDlg | ( | CWnd * | aParent, |
FmiApplicationLayer & | aCom | ||
) |
Constructor.
aParent | The parent of this dialog |
aCom | Reference to the FMI communication controller |
Definition at line 40 of file CDashcamNtfctnDlg.cpp.
|
virtual |
Destructor.
Definition at line 55 of file CDashcamNtfctnDlg.cpp.
|
protectedvirtual |
Perform dialog data exchange and validation.
aDataExchange | The 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().
|
protected |
Button handler for the Set button.
Retrieves configuration values from user interface and sends dashcam notification request protocol
Definition at line 109 of file CDashcamNtfctnDlg.cpp.
References fmi_dashcam_set_ntfctn_settings_data_type::change_id, fmi_dashcam_set_ntfctn_settings_data_type::enable_fcw_ntfctn, fmi_dashcam_set_ntfctn_settings_data_type::enable_incident_ntfctn, fmi_dashcam_set_ntfctn_settings_data_type::enable_lane_departure_ntfctn, FMI_DASHCAM_SET_NTFCTN_REQUEST, mCom, mForwardCollisionNtfctn, mIncidentDetectionNtfctn, mLaneDepartureNtfctn, and FmiApplicationLayer::sendFmiPacket().
|
protected |
Handler for the Close action.
Closes the window.
Definition at line 126 of file CDashcamNtfctnDlg.cpp.
References FALSE, mForwardCollisionNtfctn, mIncidentDetectionNtfctn, mLaneDepartureNtfctn, and TRUE.
|
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.
|
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.
aEventId | The event ID |
aEventData | The event data |
aEventDataPtr | Pointer to more event data |
Implements EventListener.
Definition at line 29 of file CWndEventListener.cpp.
References EVENT_ID_CNT, and WM_EVENT.
|
protected |
This function handles the dashcam set notification receipt event from device.
Definition at line 199 of file CDashcamNtfctnDlg.cpp.
References DASHCAM_ERR_INTERNAL, DASHCAM_SUCCESS, fmi_dashcam_get_ntfctn_settings_data_type::enable_fcw_ntfctn, fmi_dashcam_get_ntfctn_settings_data_type::enable_incident_ntfctn, fmi_dashcam_get_ntfctn_settings_data_type::enable_lane_departure_ntfctn, FALSE, mForwardCollisionNtfctn, mIncidentDetectionNtfctn, mLaneDepartureNtfctn, and TRUE.
|
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.
Definition at line 66 of file CDashcamNtfctnDlg.cpp.
References DoDataExchange(), FALSE, and TRUE.
|
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.
|
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.
|
protected |
Called by MFC after the window has been destroyed; performs final termination activities.
Definition at line 141 of file CDashcamNtfctnDlg.cpp.
|
protected |
Reference to the FMI communication controller.
Definition at line 50 of file CDashcamNtfctnDlg.h.
Referenced by OnBnClickedSet(), and OnRefreshNtfctnSettings().
|
protected |
Definition at line 54 of file CDashcamNtfctnDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnGetNtfctnSettingsResponse(), and OnReevaluate().
|
protected |
Definition at line 56 of file CDashcamNtfctnDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnGetNtfctnSettingsResponse(), and OnReevaluate().
|
protected |
Definition at line 55 of file CDashcamNtfctnDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnGetNtfctnSettingsResponse(), and OnReevaluate().