Garmin Fleet Management Controller  2.19.0
CIftaDlg Class Reference

Form for interacting with IFTA data on the device. More...

#include <CIftaDlg.h>

+ Inheritance diagram for CIftaDlg:

Public Types

enum  { IDD = IDD_IFTA }
 

Public Member Functions

 CIftaDlg (CWnd *pParent, FmiApplicationLayer &aCom)
 Constructor. More...
 
virtual ~CIftaDlg ()
 
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)
 

Private Member Functions

afx_msg void OnBnClickedDataDelete ()
 Attempt to delete IFTA data on the device. More...
 
afx_msg void OnBnClickedDataFetch ()
 Attempt to fetch IFTA data from the device. More...
 
afx_msg LRESULT OnEventIftaFileTransferReceived (WPARAM, LPARAM)
 Attempt to unzip received file and shell open the result. More...
 

Private Attributes

FmiApplicationLayermCom
 Reference to the FMI communication controller. More...
 
COleDateTime mEndDate
 
COleDateTime mEndTime
 
COleDateTime mStartDate
 
COleDateTime mStartTime
 

Detailed Description

Form for interacting with IFTA data on the device.

Download IFTA data or delete IFTA for a specified timeframe

Definition at line 21 of file CIftaDlg.h.

Member Enumeration Documentation

anonymous enum
Enumerator
IDD 

Definition at line 33 of file CIftaDlg.h.

Constructor & Destructor Documentation

CIftaDlg::CIftaDlg ( CWnd *  pParent,
FmiApplicationLayer aCom 
)

Constructor.

Parameters
aParentThe parent window of this dialog
aComThe FmiApplicationLayer used to send commands to device

Definition at line 30 of file CIftaDlg.cpp.

CIftaDlg::~CIftaDlg ( )
virtual

Definition at line 41 of file CIftaDlg.cpp.

Member Function Documentation

void CIftaDlg::OnBnClickedDataDelete ( )
private

Attempt to delete IFTA data on the device.

Validate the selected timeframe and if valid, send delete command.

Definition at line 115 of file CIftaDlg.cpp.

References convertDateTime(), fmi_ifta_data_delete_request_type::end_time, FMI_IFTA_DATA_DELETE_REQUEST, mCom, mEndDate, mEndTime, mStartDate, mStartTime, FmiApplicationLayer::sendFmiPacket(), and fmi_ifta_data_delete_request_type::start_time.

Referenced by DoDataExchange().

void CIftaDlg::OnBnClickedDataFetch ( )
private

Attempt to fetch IFTA data from the device.

Validate the selected timeframe and if valid, send fetch command.

Definition at line 86 of file CIftaDlg.cpp.

References convertDateTime(), fmi_ifta_data_fetch_request_type::end_time, FMI_IFTA_DATA_FETCH_REQUEST, mCom, mEndDate, mEndTime, mStartDate, mStartTime, FmiApplicationLayer::sendFmiPacket(), and fmi_ifta_data_fetch_request_type::start_time.

Referenced by DoDataExchange().

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.

afx_msg LRESULT CIftaDlg::OnEventIftaFileTransferReceived ( WPARAM  ,
LPARAM   
)
private

Attempt to unzip received file and shell open the result.

Attempt to unzip received file and shell open the result.

Definition at line 143 of file CIftaDlg.cpp.

References SAVE_RECEIVED_IFTA_FILE, and unzip().

Referenced by DoDataExchange().

Member Data Documentation

FmiApplicationLayer& CIftaDlg::mCom
private

Reference to the FMI communication controller.

Definition at line 53 of file CIftaDlg.h.

Referenced by OnBnClickedDataDelete(), and OnBnClickedDataFetch().

COleDateTime CIftaDlg::mEndDate
private

Definition at line 49 of file CIftaDlg.h.

Referenced by DoDataExchange(), OnBnClickedDataDelete(), and OnBnClickedDataFetch().

COleDateTime CIftaDlg::mEndTime
private

Definition at line 50 of file CIftaDlg.h.

Referenced by DoDataExchange(), OnBnClickedDataDelete(), and OnBnClickedDataFetch().

COleDateTime CIftaDlg::mStartDate
private

Definition at line 47 of file CIftaDlg.h.

Referenced by DoDataExchange(), OnBnClickedDataDelete(), and OnBnClickedDataFetch().

COleDateTime CIftaDlg::mStartTime
private

Definition at line 48 of file CIftaDlg.h.

Referenced by DoDataExchange(), OnBnClickedDataDelete(), and OnBnClickedDataFetch().


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