Garmin Fleet Management Controller
2.19.0
|
Modal dialog allowing the user to select a file to transfer to the client. More...
#include <CFileTransferDlg.h>
Classes | |
struct | file_type |
Defines file type for a supported file type. More... | |
Public Member Functions | |
CFileTransferDlg (CWnd *aParent, FmiApplicationLayer &aCom) | |
Constructor. More... | |
virtual | ~CFileTransferDlg () |
Destructor. More... | |
Private Member Functions | |
void | AddPSRtoStopList (char *file, uint32 &itemId) |
Adds the transferred PSR to the stop list. More... | |
virtual void | DoDataExchange (CDataExchange *aDataExchange) |
Perform dialog data exchange and validation. More... | |
afx_msg void | OnBnClickedFind () |
Click handler for Find (file to send) button. More... | |
afx_msg void | OnBnClickedOk () |
Click handler for OK button. More... | |
afx_msg void | OnEnChangeFile () |
Edit Change handler for all text boxes. More... | |
BOOL | OnInitDialog () |
Initialize the dialog. More... | |
Private Attributes | |
FmiApplicationLayer & | mCom |
Reference to the FMI communication controller. More... | |
CString | mFilePath |
Path and file name of the file to transfer, as specified by the user. More... | |
int | mFileType |
File type to be transferred, as specified by the user. More... | |
int | mFileTypeIndex |
Index into the file_types array. More... | |
StopListItem | mOldListItem |
CString | mVersion |
File string specified by the user. More... | |
Modal dialog allowing the user to select a file to transfer to the client.
Definition at line 20 of file CFileTransferDlg.h.
CFileTransferDlg::CFileTransferDlg | ( | CWnd * | aParent, |
FmiApplicationLayer & | aCom | ||
) |
Constructor.
aParent | The parent of this dialog |
aCom | Reference to the FMI communication controller |
Definition at line 53 of file CFileTransferDlg.cpp.
References FALSE.
|
virtual |
|
private |
Adds the transferred PSR to the stop list.
This allows the route to be managed from the stop list.
Definition at line 286 of file CFileTransferDlg.cpp.
References FALSE, INVALID32, ClientListItem::isValid(), StopListItem::setCurrentName(), StopListItem::setStopStatus(), ClientListItem::setValid(), and STOP_STATUS_UNREAD.
|
privatevirtual |
Perform dialog data exchange and validation.
aDataExchange | The DDX context |
Definition at line 81 of file CFileTransferDlg.cpp.
References file_types, IDC_FILE_XFER_CBO_FILE_TYPE, IDC_FILE_XFER_EDIT_FILE_VERSION, IDC_FILE_XFER_EDIT_FILENAME, and CFileTransferDlg::file_type::index.
Referenced by ~CFileTransferDlg().
|
private |
Click handler for Find (file to send) button.
Displays a File..Open dialog allowing the user to select the file to send.
Definition at line 160 of file CFileTransferDlg.cpp.
References FALSE, file_types, FMI_FILE_TYPE_PATH_SPECIFIC_ROUTE, and TRUE.
|
private |
Click handler for OK button.
Initiates the file transfer process. Actual packets are sent by the mCom itself, but the file entered is checked before sending the message. If the file exists, a File Progress dialog box will appear that will not let the user continue until the file transfer completes or the user cancels it. If the file doesn't exist, an error dialog will appear.
Definition at line 214 of file CFileTransferDlg.cpp.
References FMI_FILE_TYPE_PATH_SPECIFIC_ROUTE, INVALID32, minval, TRUE, and UTIL_hex_to_uint8().
|
private |
Edit Change handler for all text boxes.
Enables the OK button if both a file name and mVersion are specified, and the mVersion is of the appropriate length
Definition at line 123 of file CFileTransferDlg.cpp.
|
private |
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 102 of file CFileTransferDlg.cpp.
References cnt_of_array, file_types, IDC_FILE_XFER_CBO_FILE_TYPE, and TRUE.
|
private |
Reference to the FMI communication controller.
Definition at line 59 of file CFileTransferDlg.h.
|
private |
Path and file name of the file to transfer, as specified by the user.
Definition at line 63 of file CFileTransferDlg.h.
|
private |
File type to be transferred, as specified by the user.
Definition at line 66 of file CFileTransferDlg.h.
|
private |
Index into the file_types array.
Definition at line 69 of file CFileTransferDlg.h.
|
private |
Definition at line 55 of file CFileTransferDlg.h.
|
private |
File string specified by the user.
Definition at line 72 of file CFileTransferDlg.h.