Garmin Fleet Management Controller
2.19.0
|
Modal dialog allowing the user to query the file version and size of the FMI GPI file on the client device. More...
#include <CGpiQueryDlg.h>
Public Member Functions | |
CGpiQueryDlg (CWnd *aParent, FmiApplicationLayer &aCom) | |
Constructor. More... | |
virtual | ~CGpiQueryDlg () |
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 *aDataExchange) |
Perform dialog data exchange and validation. More... | |
afx_msg void | OnBnClickedUpdate () |
Click handler for the Update button. More... | |
afx_msg LRESULT | OnGpiInfoReceived (WPARAM, LPARAM) |
Handler for the GPI Information Received event. More... | |
BOOL | OnInitDialog () |
Initialize the dialog. More... | |
Protected Attributes | |
FmiApplicationLayer & | mCom |
Reference to the FMI communication controller. More... | |
CString | mFileSize |
Contents of the File Size text box. More... | |
CString | mFileVersion |
Contents of the File Version text box. More... | |
Modal dialog allowing the user to query the file version and size of the FMI GPI file on the client device.
When the dialog is displayed, and when the Refresh button is clicked, the dialog initiates the GPI File Information Protocol. When the response is received from the client, FmiApplicationLayer sends an event; this dialog then displays the details received from the client.
Definition at line 25 of file CGpiQueryDlg.h.
CGpiQueryDlg::CGpiQueryDlg | ( | CWnd * | aParent, |
FmiApplicationLayer & | aCom | ||
) |
Constructor.
aParent | The parent of this dialog |
aCom | Reference to the FMI communication controller |
Definition at line 28 of file CGpiQueryDlg.cpp.
|
virtual |
|
protectedvirtual |
Perform dialog data exchange and validation.
aDataExchange | The DDX context |
Definition at line 51 of file CGpiQueryDlg.cpp.
References IDC_GPIQUERY_TXT_SIZE, IDC_GPIQUERY_TXT_VERSION, mFileSize, and mFileVersion.
Referenced by ~CGpiQueryDlg().
|
protected |
Click handler for the Update button.
Initiate the GPI File Information Request protocol to get the current information from the client.
Definition at line 80 of file CGpiQueryDlg.cpp.
References mCom, and FmiApplicationLayer::sendGpiFileInfoRequest().
Referenced by OnInitDialog().
|
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 |
Handler for the GPI Information Received event.
Updates the fields in this dialog with the information received. If the file version is printable, it is interpreted as a string; otherwise, it is displayed in hexadecimal.
Definition at line 92 of file CGpiQueryDlg.cpp.
References FALSE, FmiApplicationLayer::mClientCodepage, mCom, mFileSize, FmiApplicationLayer::mFileSize, mFileVersion, FmiApplicationLayer::mFileVersion, FmiApplicationLayer::mFileVersionLength, minval, UTIL_data_is_printable(), and UTIL_uint8_to_hex().
|
protected |
Initialize the dialog.
This function is called when the window is created. It initiates a GPI File Information Request to get the current information from the client.
Definition at line 67 of file CGpiQueryDlg.cpp.
References OnBnClickedUpdate(), and TRUE.
|
protected |
Reference to the FMI communication controller.
Definition at line 50 of file CGpiQueryDlg.h.
Referenced by OnBnClickedUpdate(), and OnGpiInfoReceived().
|
protected |
Contents of the File Size text box.
Definition at line 56 of file CGpiQueryDlg.h.
Referenced by DoDataExchange(), and OnGpiInfoReceived().
|
protected |
Contents of the File Version text box.
Definition at line 53 of file CGpiQueryDlg.h.
Referenced by DoDataExchange(), and OnGpiInfoReceived().