27 CGpiQueryDlg::CGpiQueryDlg
34 , mFileVersion( _T("") )
52 CDataExchange * aDataExchange
55 CDialog::DoDataExchange( aDataExchange );
69 CDialog::OnInitDialog();
94 TCHAR versionString[33];
98 memset( versionString, 0,
sizeof( versionString ) );
107 memset( versionHex, 0,
sizeof( versionHex ) );
109 MultiByteToWideChar(
mCom.
mClientCodepage, 0, versionHex, -1, versionString,
sizeof( versionString ) );
CString mFileSize
Contents of the File Size text box.
Modal dialog allowing the user to query the file version and size of the FMI GPI file on the client d...
uint8 mFileVersionLength
Number of significant bytes in mFileVersion.
FmiApplicationLayer & mCom
Reference to the FMI communication controller.
virtual ~CGpiQueryDlg()
Destructor.
afx_msg void OnBnClickedUpdate()
Click handler for the Update button.
#define minval(_x, _y)
The smaller of _x and _y.
codepage_type mClientCodepage
Code page used for encoding of text fields when communicating with the client.
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
Serial communication controller for Garmin and FMI packets.
void UTIL_uint8_to_hex(const uint8 *aData, char *aOutput, uint8 aNumBytes)
Convert from binary to a hexadecimal string.
#define IDC_GPIQUERY_TXT_SIZE
uint8 mFileVersion[16]
file version (FMI_GPI_FILE_INFORMATION)
bool UTIL_data_is_printable(const char *aData, int aLength)
Determine whether an array of characters consists only of printable ASCII.
uint32 mFileSize
file size (FMI_GPI_FILE_INFORMATION)
#define IDC_GPIQUERY_TXT_VERSION
unsigned char uint8
8-bit unsigned integer
#define IDC_GPIQUERY_BTN_UPDATE
#define WM_EVENT(_event)
Translation from an application event to the corresponding Windows message.
void sendGpiFileInfoRequest()
Send a GPI File Information Request to the client.
BOOL OnInitDialog()
Initialize the dialog.
CString mFileVersion
Contents of the File Version text box.
afx_msg LRESULT OnGpiInfoReceived(WPARAM, LPARAM)
Handler for the GPI Information Received event.