Garmin Fleet Management Controller  2.19.0
CDashcamDlg Class Reference

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

#include <CDashcamDlg.h>

+ Inheritance diagram for CDashcamDlg:

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
 
FmiApplicationLayermCom
 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
 

Detailed Description

Browser-based container for listing the Dashcam library.

Definition at line 21 of file CDashcamDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator
IDD 

Definition at line 33 of file CDashcamDlg.h.

Constructor & Destructor Documentation

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

Constructor.

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

Definition at line 72 of file CDashcamDlg.cpp.

CDashcamDlg::~CDashcamDlg ( )
virtual

Destructor.

Definition at line 107 of file CDashcamDlg.cpp.

Member Function Documentation

void CDashcamDlg::DoDataExchange ( CDataExchange *  aDataExchange)
protectedvirtual
void CDashcamDlg::OnBnClickedSelectAll ( )
protected
LRESULT CDashcamDlg::OnDashcamConfigReceipt ( WPARAM  return_code,
LPARAM   
)
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().

LRESULT CDashcamDlg::OnDashcamLockReceipt ( WPARAM  return_code,
LPARAM   
)
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().

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.

BOOL CDashcamDlg::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 118 of file CDashcamDlg.cpp.

References DoDataExchange(), FALSE, and TRUE.

void CDashcamDlg::OnReevaluateLock ( )
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.

void CDashcamDlg::OnRefreshSettings ( )
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.

void CDashcamDlg::PostNcDestroy ( )
protected

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

Definition at line 354 of file CDashcamDlg.cpp.

Member Data Documentation

int CDashcamDlg::mCollisionSensitivity
protected
FmiApplicationLayer& CDashcamDlg::mCom
protected

Reference to the FMI communication controller.

Definition at line 55 of file CDashcamDlg.h.

Referenced by OnBnClickedSet(), OnBnClickedSetLock(), and OnRefreshSettings().

int CDashcamDlg::mDataOverlayDateTime
protected
int CDashcamDlg::mDataOverlayLocationSpeed
protected
int CDashcamDlg::mForwardCollision
protected
int CDashcamDlg::mIncidentDetection
protected
int CDashcamDlg::mLaneDeparture
protected
int CDashcamDlg::mLockAssist
protected

Definition at line 60 of file CDashcamDlg.h.

Referenced by DoDataExchange(), OnBnClickedSetLock(), OnClose(), and OnReevaluateLock().

int CDashcamDlg::mLockDashcam
protected

Definition at line 59 of file CDashcamDlg.h.

Referenced by DoDataExchange(), OnBnClickedSetLock(), OnClose(), and OnReevaluateLock().

int CDashcamDlg::mRecordAfterPowerLoss
protected
int CDashcamDlg::mRecordAudio
protected
int CDashcamDlg::mRecordOnStartup
protected
BOOL CDashcamDlg::mSelectAll
protected

Definition at line 71 of file CDashcamDlg.h.

Referenced by DoDataExchange(), OnBnClickedSelectAll(), and OnClose().

BOOL CDashcamDlg::mSendCollisionSensitivity
protected
BOOL CDashcamDlg::mSendCollisionWarning
protected
BOOL CDashcamDlg::mSendDataOverlayDateTime
protected
BOOL CDashcamDlg::mSendDataOverlayLocationSpeed
protected
BOOL CDashcamDlg::mSendIncidentDetection
protected
BOOL CDashcamDlg::mSendLaneDeparture
protected
BOOL CDashcamDlg::mSendRecordAfterPowerLoss
protected
BOOL CDashcamDlg::mSendRecordAudio
protected
BOOL CDashcamDlg::mSendRecordOnStartup
protected
BOOL CDashcamDlg::mSendVideoResolution
protected
int CDashcamDlg::mVideoResolution
protected

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