Garmin Fleet Management Controller
2.19.0
|
Browser-based container for listing the Dashcam library. More...
#include <CDashcamDlg.h>
Public Types | |
enum | { IDD = IDD_DASHCAM } |
Public Member Functions | |
CDashcamDlg (CWnd *pParent, FmiApplicationLayer &aCom) | |
Constructor. More... | |
virtual | ~CDashcamDlg () |
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 | OnBnClickedSelectAll () |
Handler for the select all check. More... | |
void | OnBnClickedSet () |
Button handler for the Set button. More... | |
void | OnBnClickedSetLock () |
Button handler for the Set Lock button pressed. More... | |
void | OnClose () |
Handler for the Close action. More... | |
afx_msg LRESULT | OnDashcamConfigReceipt (WPARAM, LPARAM) |
This function handles the dashcam set configuration receipt event from device. More... | |
afx_msg LRESULT | OnDashcamGetSettingsResponse (WPARAM, LPARAM) |
This function handles dashcam get settings receipt event from device. More... | |
afx_msg LRESULT | OnDashcamLockReceipt (WPARAM, LPARAM) |
This function handles the dashcam lock/unlock receipt event from device. More... | |
BOOL | OnInitDialog () |
Initialize the dialog. More... | |
void | OnReevaluate () |
Change handler for editable controls. More... | |
void | OnReevaluateLock () |
Change handler for editable controls. More... | |
void | OnRefreshSettings () |
Button handler for the Refresh Settings button. More... | |
void | postFailure (uint8) |
void | PostNcDestroy () |
Called by MFC after the window has been destroyed; performs final termination activities. More... | |
Protected Attributes | |
int | mCollisionSensitivity |
FmiApplicationLayer & | mCom |
Reference to the FMI communication controller. More... | |
int | mDataOverlayDateTime |
int | mDataOverlayLocationSpeed |
int | mForwardCollision |
int | mIncidentDetection |
int | mLaneDeparture |
int | mLockAssist |
int | mLockDashcam |
int | mRecordAfterPowerLoss |
int | mRecordAudio |
int | mRecordOnStartup |
BOOL | mSelectAll |
BOOL | mSendCollisionSensitivity |
BOOL | mSendCollisionWarning |
BOOL | mSendDataOverlayDateTime |
BOOL | mSendDataOverlayLocationSpeed |
BOOL | mSendIncidentDetection |
BOOL | mSendLaneDeparture |
BOOL | mSendRecordAfterPowerLoss |
BOOL | mSendRecordAudio |
BOOL | mSendRecordOnStartup |
BOOL | mSendVideoResolution |
int | mVideoResolution |
Browser-based container for listing the Dashcam library.
Definition at line 21 of file CDashcamDlg.h.
anonymous enum |
Enumerator | |
---|---|
IDD |
Definition at line 33 of file CDashcamDlg.h.
CDashcamDlg::CDashcamDlg | ( | CWnd * | aParent, |
FmiApplicationLayer & | aCom | ||
) |
Constructor.
aParent | The parent of this dialog |
aCom | Reference to the FMI communication controller |
Definition at line 72 of file CDashcamDlg.cpp.
|
virtual |
Destructor.
Definition at line 107 of file CDashcamDlg.cpp.
|
protectedvirtual |
Perform dialog data exchange and validation.
aDataExchange | The DDX context |
Definition at line 131 of file CDashcamDlg.cpp.
References IDC_DASHCAM_SEND_COLLISION_SENSITIVITY, IDC_DASHCAM_SEND_COLLISION_WARNING, IDC_DASHCAM_SEND_DATA_OVERLAY_DATE_TIME, IDC_DASHCAM_SEND_DATA_OVERLAY_LOCATION_SPEED, IDC_DASHCAM_SEND_INCIDENT_DETECTION, IDC_DASHCAM_SEND_LANE_DEPARTURE, IDC_DASHCAM_SEND_RECORD_AFTER_POWER_LOSS, IDC_DASHCAM_SEND_RECORD_AUDIO, IDC_DASHCAM_SEND_RECORD_ON_STARTUP, IDC_DASHCAM_SEND_SELECT_ALL, IDC_DASHCAM_SEND_VIDEO_RESOLUTION, IDC_DISABLE_DATA_OVERLAY_DATE_TIME, IDC_DISABLE_DATA_OVERLAY_LOCATION_SPEED, IDC_DISABLE_FORWARD_COLLISION, IDC_DISABLE_INCIDENT_DETECTION, IDC_DISABLE_LANE_DEPARTURE_WARNING, IDC_DISABLE_RECORD_AUDIO, IDC_DISABLE_RECORD_ON_STARTUP, IDC_FWD_COLLISION_SENSITIVITY, IDC_HIGH_VIDEO_RESOLUTION, IDC_RECORD_AFTER_POWER_LOSS, IDC_UNLOCK_ASSIST_SETTINGS, IDC_UNLOCK_DASHCAM_SETTINGS, mCollisionSensitivity, mDataOverlayDateTime, mDataOverlayLocationSpeed, mForwardCollision, mIncidentDetection, mLaneDeparture, mLockAssist, mLockDashcam, mRecordAfterPowerLoss, mRecordAudio, mRecordOnStartup, mSelectAll, mSendCollisionSensitivity, mSendCollisionWarning, mSendDataOverlayDateTime, mSendDataOverlayLocationSpeed, mSendIncidentDetection, mSendLaneDeparture, mSendRecordAfterPowerLoss, mSendRecordAudio, mSendRecordOnStartup, mSendVideoResolution, and mVideoResolution.
Referenced by OnInitDialog().
|
protected |
Handler for the select all check.
selects or deselects all send boxes
Definition at line 297 of file CDashcamDlg.cpp.
References FALSE, mSelectAll, mSendCollisionSensitivity, mSendCollisionWarning, mSendDataOverlayDateTime, mSendDataOverlayLocationSpeed, mSendIncidentDetection, mSendLaneDeparture, mSendRecordAfterPowerLoss, mSendRecordAudio, mSendRecordOnStartup, mSendVideoResolution, OnReevaluate(), and TRUE.
|
protected |
Button handler for the Set button.
Retrieves configuration values from user interface and sends dashcam configuraiton request protocol
Definition at line 201 of file CDashcamDlg.cpp.
References fmi_dashcam_set_config_request_data_type::change_id, DASHCAM_COLLISION_SENSITIVITY, DASHCAM_DATA_OVERLAY_DATE_TIME, DASHCAM_DATA_OVERLAY_LOCATION_SPEED, DASHCAM_FORWARD_COLLISION, DASHCAM_INCIDENT_DETECTION, DASHCAM_LANE_DEPARTURE, DASHCAM_RECORD_AFTER_POWER_LOSS, DASHCAM_RECORD_AUDIO, DASHCAM_RECORD_ON_STARTUP, DASHCAM_VIDEO_RESOLUTION, FMI_DASHCAM_CONFIG_REQUEST, mCollisionSensitivity, mCom, mDataOverlayDateTime, mDataOverlayLocationSpeed, mForwardCollision, mIncidentDetection, mLaneDeparture, mRecordAfterPowerLoss, mRecordAudio, mRecordOnStartup, mSendCollisionSensitivity, mSendCollisionWarning, mSendDataOverlayDateTime, mSendDataOverlayLocationSpeed, mSendIncidentDetection, mSendLaneDeparture, mSendRecordAfterPowerLoss, mSendRecordAudio, mSendRecordOnStartup, mSendVideoResolution, mVideoResolution, fmi_dashcam_settings_list::new_value, FmiApplicationLayer::sendFmiPacket(), fmi_dashcam_settings_list::setting_id, fmi_dashcam_set_config_request_data_type::settings_count, and fmi_dashcam_set_config_request_data_type::settings_list.
|
protected |
Button handler for the Set Lock button pressed.
Calls FmiApplicationLayer to initiate the lock settings request protocol
Definition at line 167 of file CDashcamDlg.cpp.
References FMI_DASHCAM_SETTINGS_LOCK_REQUEST, fmi_dashcam_lock_settings_request_data_type::lock_change, fmi_dashcam_lock_settings_request_data_type::lock_change_adas, mCom, mLockAssist, mLockDashcam, fmi_dashcam_lock_settings_request_data_type::origination_time, FmiApplicationLayer::sendFmiPacket(), and UTIL_get_current_garmin_time().
|
protected |
Handler for the Close action.
Closes the window.
Definition at line 319 of file CDashcamDlg.cpp.
References FALSE, mCollisionSensitivity, mDataOverlayDateTime, mDataOverlayLocationSpeed, mForwardCollision, mIncidentDetection, mLaneDeparture, mLockAssist, mLockDashcam, mRecordAfterPowerLoss, mRecordAudio, mRecordOnStartup, mSelectAll, mSendCollisionSensitivity, mSendCollisionWarning, mSendDataOverlayDateTime, mSendDataOverlayLocationSpeed, mSendIncidentDetection, mSendLaneDeparture, mSendRecordAfterPowerLoss, mSendRecordAudio, mSendRecordOnStartup, mSendVideoResolution, mVideoResolution, and TRUE.
|
protected |
This function handles the dashcam set configuration receipt event from device.
Definition at line 381 of file CDashcamDlg.cpp.
References DASHCAM_SUCCESS, and postFailure().
|
protected |
This function handles dashcam get settings receipt event from device.
Definition at line 400 of file CDashcamDlg.cpp.
References DASHCAM_COLLISION_SENSITIVITY, DASHCAM_DATA_OVERLAY_DATE_TIME, DASHCAM_DATA_OVERLAY_LOCATION_SPEED, DASHCAM_FORWARD_COLLISION, DASHCAM_INCIDENT_DETECTION, DASHCAM_LANE_DEPARTURE, DASHCAM_RECORD_AFTER_POWER_LOSS, DASHCAM_RECORD_AUDIO, DASHCAM_RECORD_ON_STARTUP, DASHCAM_SUCCESS, DASHCAM_VIDEO_RESOLUTION, FALSE, mCollisionSensitivity, mDataOverlayDateTime, mDataOverlayLocationSpeed, mForwardCollision, mIncidentDetection, mLaneDeparture, mRecordAfterPowerLoss, mRecordAudio, mRecordOnStartup, mVideoResolution, fmi_dashcam_settings_list::new_value, postFailure(), fmi_dashcam_settings_list::setting_id, fmi_dashcam_get_settings_response_data_type::settings_count, fmi_dashcam_get_settings_response_data_type::settings_list, and TRUE.
|
protected |
This function handles the dashcam lock/unlock receipt event from device.
Definition at line 362 of file CDashcamDlg.cpp.
References DASHCAM_SUCCESS, and postFailure().
|
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 |
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 118 of file CDashcamDlg.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 482 of file CDashcamDlg.cpp.
References FALSE, mCollisionSensitivity, mDataOverlayDateTime, mDataOverlayLocationSpeed, mForwardCollision, mIncidentDetection, mLaneDeparture, mRecordAfterPowerLoss, mRecordAudio, mRecordOnStartup, mSendCollisionSensitivity, mSendCollisionWarning, mSendDataOverlayDateTime, mSendDataOverlayLocationSpeed, mSendIncidentDetection, mSendLaneDeparture, mSendRecordAfterPowerLoss, mSendRecordAudio, mSendRecordOnStartup, mSendVideoResolution, and mVideoResolution.
Referenced by OnBnClickedSelectAll().
|
protected |
Change handler for editable controls.
Make the Set Lock/Unlock button clickable if both locks/unlocks selected
Definition at line 510 of file CDashcamDlg.cpp.
References FALSE, IDC_DASHCAM_SET_LOCK, mLockAssist, and mLockDashcam.
|
protected |
Button handler for the Refresh Settings button.
Calls FmiApplicationLayer to initiate the Get settings request protocol
Definition at line 187 of file CDashcamDlg.cpp.
References fmi_dashcam_get_settings_request_data_type::change_id, FALSE, FMI_DASHCAM_GET_SETTINGS_REQUEST, mCom, FmiApplicationLayer::sendFmiPacket(), and TRUE.
|
protected |
Definition at line 525 of file CDashcamDlg.cpp.
References DASHCAM_ERR_AFTER_POWER_LOSS_SETTINGS_OUT_OF_RANGE, DASHCAM_ERR_FCWS_SENSITIVITY_OUT_OF_RANGE, DASHCAM_ERR_RECORDER_RESOLUTION_OUT_OF_RANGE, and DASHCAM_ERR_SETTING_ID_OUT_OF_RANGE.
Referenced by OnDashcamConfigReceipt(), OnDashcamGetSettingsResponse(), and OnDashcamLockReceipt().
|
protected |
Called by MFC after the window has been destroyed; performs final termination activities.
Definition at line 354 of file CDashcamDlg.cpp.
|
protected |
Definition at line 62 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnDashcamGetSettingsResponse(), and OnReevaluate().
|
protected |
Reference to the FMI communication controller.
Definition at line 55 of file CDashcamDlg.h.
Referenced by OnBnClickedSet(), OnBnClickedSetLock(), and OnRefreshSettings().
|
protected |
Definition at line 67 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnDashcamGetSettingsResponse(), and OnReevaluate().
|
protected |
Definition at line 68 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnDashcamGetSettingsResponse(), and OnReevaluate().
|
protected |
Definition at line 61 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnDashcamGetSettingsResponse(), and OnReevaluate().
|
protected |
Definition at line 65 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnDashcamGetSettingsResponse(), and OnReevaluate().
|
protected |
Definition at line 63 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnDashcamGetSettingsResponse(), and OnReevaluate().
|
protected |
Definition at line 60 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSetLock(), OnClose(), and OnReevaluateLock().
|
protected |
Definition at line 59 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSetLock(), OnClose(), and OnReevaluateLock().
|
protected |
Definition at line 70 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnDashcamGetSettingsResponse(), and OnReevaluate().
|
protected |
Definition at line 66 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnDashcamGetSettingsResponse(), and OnReevaluate().
|
protected |
Definition at line 64 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnDashcamGetSettingsResponse(), and OnReevaluate().
|
protected |
Definition at line 71 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), and OnClose().
|
protected |
Definition at line 73 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), OnBnClickedSet(), OnClose(), and OnReevaluate().
|
protected |
Definition at line 72 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), OnBnClickedSet(), OnClose(), and OnReevaluate().
|
protected |
Definition at line 78 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), OnBnClickedSet(), OnClose(), and OnReevaluate().
|
protected |
Definition at line 79 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), OnBnClickedSet(), OnClose(), and OnReevaluate().
|
protected |
Definition at line 76 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), OnBnClickedSet(), OnClose(), and OnReevaluate().
|
protected |
Definition at line 74 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), OnBnClickedSet(), OnClose(), and OnReevaluate().
|
protected |
Definition at line 81 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), OnBnClickedSet(), OnClose(), and OnReevaluate().
|
protected |
Definition at line 77 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), OnBnClickedSet(), OnClose(), and OnReevaluate().
|
protected |
Definition at line 75 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), OnBnClickedSet(), OnClose(), and OnReevaluate().
|
protected |
Definition at line 80 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSelectAll(), OnBnClickedSet(), OnClose(), and OnReevaluate().
|
protected |
Definition at line 69 of file CDashcamDlg.h.
Referenced by DoDataExchange(), OnBnClickedSet(), OnClose(), OnDashcamGetSettingsResponse(), and OnReevaluate().