21 #if( FMI_SUPPORT_A602 ) 25 #if( FMI_SUPPORT_A603 ) 31 #if( FMI_SUPPORT_A604 ) 44 #if( FMI_SUPPORT_A606 ) 48 #if( FMI_SUPPORT_A607 ) 53 #if( FMI_SUPPORT_A608 ) 57 #if( FMI_SUPPORT_A610 ) 63 #if( FMI_SUPPORT_A615 ) 68 #if( FMI_SUPPORT_A616 ) 73 #if( FMI_SUPPORT_A617 ) 77 #if( FMI_SUPPORT_A623 ) 86 #define MAIN_RX_TIMER_INTERVAL ( 150 ) 89 #define MAIN_ETA_TIMER_INTERVAL ( 60 * 1000 ) 92 #define BAUD_RATE_SYNC_TIMER_INTERVAL ( 300 ) 96 #define BAUD_RATE_SYNC_RETRY_COUNT ( 5 ) 121 ON_WM_QUERYDRAGICON()
130 ON_COMMAND( ID_FILE_CLOSE, OnFileClose )
133 ON_UPDATE_COMMAND_UI( ID_FILE_VIEWLOG, OnUpdateFileViewlog )
143 #if( FMI_SUPPORT_A602 ) 147 #if( FMI_SUPPORT_A603 ) 156 #if( FMI_SUPPORT_A604 ) 176 #if( FMI_SUPPORT_A606 ) 180 #if( FMI_SUPPORT_A607 ) 186 #if( FMI_SUPPORT_A608 ) 189 #if( FMI_SUPPORT_A609 ) 193 #if( FMI_SUPPORT_A610 ) 199 #if( FMI_SUPPORT_A611 ) 202 #if( FMI_SUPPORT_A612 ) 205 #if( FMI_SUPPORT_A613 ) 208 #if( FMI_SUPPORT_A615 ) 214 #if( FMI_SUPPORT_A616 ) 219 #if( FMI_SUPPORT_A617 ) 223 #if( FMI_SUPPORT_A619 ) 227 ON_MESSAGE(
WM_EVENT( EVENT_CDT_PING_RECEIVED ), OnCDTPingReceived )
228 ON_MESSAGE(
WM_EVENT( EVENT_CDT_PACKET_RECEIVED ), OnCDTPacketReceived )
233 #if( FMI_SUPPORT_A620 ) 236 #if( FMI_SUPPORT_A622 ) 243 #if( FMI_SUPPORT_A623 ) 262 , mPvtChecked(
FALSE )
267 , mPvtLatitude( _T(
"") )
268 , mPvtLongitude( _T(
"") )
269 , mAltitude( _T(
"") )
270 , mEastWestVelocity( _T(
"") )
271 , mNorthSouthVelocity( _T(
"") )
272 , mUpDownVelocity( _T(
"") )
273 , m2DVelocity( _T(
"") )
274 , mCommErrorDlg( NULL )
275 , mLogViewerDlg( NULL )
276 , mSupportedProtocols( _T(
"") )
277 , mProductId( _T(
"") )
278 , mSoftwareVersion( _T(
"") )
279 , mStopListDlg( NULL )
281 , mPacketId( _T(
"") )
282 , mPacketData( _T(
"") )
283 , mCom( freeformFmiPacketId )
286 , mAutoEtaChecked(
FALSE )
287 , mEtaTimerEnabled(
FALSE )
289 , mEtaDistance( _T(
"") )
290 , mEtaLatitude( _T(
"") )
291 , mEtaLongitude( _T(
"") )
294 , mCannedResponseDlg( NULL )
295 , mCannedTxtMsgDlg( NULL )
296 , mDriverIdAndStatusDlg( NULL )
297 , mTxtMsgStatusDlg( NULL )
300 , mWaypointDlg( NULL )
303 , mCustomFormsDlg( NULL )
306 , mMapViewerDlg( NULL )
312 , mResolvingCommRate(
FALSE )
313 , mBaudRateSyncRetries( 0 )
316 , mSendAlertDlg( NULL )
317 , mSendSensorDlg( NULL)
320 , mCdtChatDlg( NULL )
321 , mCdtPingDlg( NULL )
324 , mDashcamDlg( NULL )
325 , mDashcamNtfctnDlg( NULL )
326 , mFileConverterDlg( NULL )
342 delete mCommErrorDlg;
343 delete mLogViewerDlg;
347 delete mCannedResponseDlg;
348 delete mDriverIdAndStatusDlg;
349 delete mCannedTxtMsgDlg;
356 delete mCustomFormsDlg;
359 delete mMapViewerDlg;
365 delete mSendAlertDlg;
366 delete mSendSensorDlg;
374 delete mDashcamNtfctnDlg;
375 delete mFileConverterDlg;
385 CDataExchange * aDataExchange
388 CDialog::DoDataExchange( aDataExchange );
389 DDX_Check( aDataExchange, IDC_MAIN_CHK_PVT_ENABLE, mPvtChecked );
403 #if( FMI_SUPPORT_A602 ) 407 #if( FMI_SUPPORT_A603 ) 408 DDX_Check( aDataExchange, IDC_MAIN_CHK_ETA_AUTO_UPDATE, mAutoEtaChecked );
414 #if( FMI_SUPPORT_A623 ) 436 CDialog::OnInitDialog();
443 CMenu * pSysMenu = GetSystemMenu(
FALSE );
444 if( pSysMenu != NULL )
446 CString strAboutMenu;
448 if( !strAboutMenu.IsEmpty() )
450 pSysMenu->AppendMenu( MF_SEPARATOR );
451 pSysMenu->AppendMenu( MF_STRING,
IDM_ABOUTBOX, strAboutMenu );
457 SetIcon( mIconHandle,
TRUE );
458 SetIcon( mIconHandle,
FALSE );
463 mComPortSelected =
FALSE;
465 mIgnoreTimer =
FALSE;
471 SetWindowPos( NULL, 120, 175, 0, 0, SWP_NOSIZE | SWP_NOZORDER );
473 #if( !FMI_SUPPORT_A602 ) 474 CButton * enableButton = (CButton *)GetDlgItem( IDC_MAIN_BTN_SEND_ENABLE );
475 enableButton->SetWindowText( _T(
"Request PID/ESN") );
481 GetDlgItem( IDC_MAIN_BTN_FMI_SEND )->EnableWindow(
FALSE );
484 #if( !FMI_SUPPORT_A603 ) 485 GetDlgItem( IDC_MAIN_BTN_DEL_DATA )->EnableWindow(
FALSE );
486 GetDlgItem( IDC_MAIN_BTN_REQ_ETA )->EnableWindow(
FALSE );
487 GetDlgItem( IDC_MAIN_BTN_CHG_AUTO_ARVL )->EnableWindow(
FALSE );
488 GetDlgItem( IDC_MAIN_CHK_ETA_AUTO_UPDATE )->EnableWindow(
FALSE );
496 #if( !FMI_SUPPORT_A604 ) 498 GetDlgItem( IDC_MAIN_BTN_FILE_TRANS )->EnableWindow(
FALSE );
499 GetDlgItem( IDC_MAIN_BTN_CANNED_RESPONSES )->EnableWindow(
FALSE );
500 GetDlgItem( IDC_MAIN_BTN_PING )->EnableWindow(
FALSE );
501 GetDlgItem( IDC_MAIN_BTN_GPI_QUERY )->EnableWindow(
FALSE );
502 GetDlgItem( IDC_MAIN_BTN_DRIVER_INFO )->EnableWindow(
FALSE );
503 GetDlgItem( IDC_MAIN_BTN_CANNED_MESSAGES )->EnableWindow(
FALSE );
504 GetDlgItem( IDC_MAIN_BTN_MSG_STATUS )->EnableWindow(
FALSE );
505 GetDlgItem( IDC_MAIN_BTN_UI_TXT_CHG )->EnableWindow(
FALSE );
506 GetDlgItem( IDC_MAIN_BTN_MSG_THROTTLING )->EnableWindow(
FALSE );
509 #if( !FMI_SUPPORT_A606 ) 511 GetDlgItem( IDC_MAIN_BTN_SET_SAFE_MODE )->EnableWindow(
FALSE );
514 #if( !FMI_SUPPORT_A607 ) 516 GetDlgItem( IDC_MAIN_BTN_WAYPOINTS )->EnableWindow(
FALSE );
519 #if( !FMI_SUPPORT_A608 ) 523 #if( !FMI_SUPPORT_A610 ) 524 GetDlgItem( IDC_MAIN_BTN_SET_AOBRD_ODOMETER )->EnableWindow(
FALSE );
525 GetMenu()->GetSubMenu(0)->EnableMenuItem( ID_FILE_AOBRDDRIVERS, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
526 GetMenu()->GetSubMenu(0)->EnableMenuItem( ID_FILE_REBOOTDEVICE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
529 #if( !FMI_SUPPORT_A615 ) 530 GetDlgItem( IDC_MAIN_BTN_AUTO_STATUS_UPDATES )->EnableWindow(
FALSE );
531 GetMenu()->GetSubMenu( 1 )->GetSubMenu( 5 )->EnableMenuItem( 0 , MF_BYPOSITION | MF_DISABLED | MF_GRAYED );
534 #if( !FMI_SUPPORT_A616 ) 538 #if( !FMI_SUPPORT_A617 ) 540 GetDlgItem( IDC_MAIN_BTN_SEND_SENSOR )->EnableWindow(
FALSE );
543 #if( !FMI_SUPPORT_A619 ) 544 GetMenu()->GetSubMenu( 1 )->GetSubMenu( 5 )->EnableMenuItem( 1 , MF_BYPOSITION | MF_DISABLED | MF_GRAYED );
549 GetMenu()->GetSubMenu( 1 )->GetSubMenu( 7 )->EnableMenuItem( 0, MF_BYPOSITION | MF_DISABLED | MF_GRAYED );
551 GetMenu()->GetSubMenu( 1 )->EnableMenuItem( 7 , MF_BYPOSITION | MF_DISABLED | MF_GRAYED );
554 #if( !FMI_SUPPORT_A620 ) 556 GetMenu()->GetSubMenu( 1 )->GetSubMenu( 5 )->EnableMenuItem( 2 , MF_BYPOSITION | MF_DISABLED | MF_GRAYED );
559 #if( !FMI_SUPPORT_A622 ) 560 GetMenu()->GetSubMenu( 1 )->EnableMenuItem( 9 , MF_BYPOSITION | MF_DISABLED | MF_GRAYED );
563 #if( !FMI_SUPPORT_A623 ) 570 this->SetWindowText( _T(
"Fleet Management Controller - Legacy Support Mode") );
573 this->SetWindowText( _T(
"Fleet Management Controller - A602 Support Mode") );
576 this->SetWindowText( _T(
"Fleet Management Controller - A603 Support Mode") );
579 this->SetWindowText( _T(
"Fleet Management Controller - A604 Support Mode") );
582 this->SetWindowText( _T(
"Fleet Management Controller - A605 Support Mode") );
585 this->SetWindowText( _T(
"Fleet Management Controller - A607 Support Mode") );
588 this->SetWindowText( _T(
"Fleet Management Controller - A608 Support Mode") );
591 this->SetWindowText( _T(
"Fleet Management Controller - A610 Support Mode") );
594 this->SetWindowText( _T(
"Fleet Management Controller - A611 Support Mode") );
597 this->SetWindowText( _T(
"Fleet Management Controller - A612 Support Mode") );
600 this->SetWindowText( _T(
"Fleet Management Controller - A613 Support Mode") );
603 this->SetWindowText( _T(
"Fleet Management Controller - A614 Support Mode") );
606 this->SetWindowText( _T(
"Fleet Management Controller - A615 Support Mode") );
609 this->SetWindowText( _T(
"Fleet Management Controller - A616 Support Mode") );
612 this->SetWindowText( _T(
"Fleet Management Controller - A617 Support Mode") );
615 this->SetWindowText( _T(
"Fleet Management Controller - A618 Support Mode") );
618 this->SetWindowText( _T(
"Fleet Management Controller - A619 Support Mode") );
621 this->SetWindowText( _T(
"Fleet Management Controller - A620 Support Mode") );
624 this->SetWindowText( _T(
"Fleet Management Controller - A621 Support Mode") );
627 this->SetWindowText( _T(
"Fleet Management Controller - A622 Support Mode") );
630 this->SetWindowText( _T(
"Fleet Management Controller - A623 Support Mode") );
633 this->SetWindowText( _T(
"Fleet Management Controller - Unknown Protocol Support Level") );
652 mCom.sendEnablePvtCommand(
TRUE );
656 mCom.sendEnablePvtCommand(
FALSE );
658 mGpsFix.Format( _T(
"") );
659 mPvtDate.Format( _T(
"") );
660 mPvtTime.Format( _T(
"") );
661 mPvtLatitude.Format( _T(
"") );
662 mPvtLongitude.Format( _T(
"") );
663 mAltitude.Format( _T(
"") );
664 mNorthSouthVelocity.Format( _T(
"") );
665 mEastWestVelocity.Format( _T(
"") );
666 mUpDownVelocity.Format( _T(
"") );
667 m2DVelocity.Format( _T(
"") );
697 #if( FMI_SUPPORT_A607 ) 699 if( IDOK != featureDlg.DoModal() )
703 #elif( FMI_SUPPORT_A602 ) 707 #if( !( MINIMAL_ENABLE ) ) 709 #if( FMI_SUPPORT_A602 ) 710 mCom.sendProductRequest();
712 mCom.sendLegacyProductRequest();
715 mCom.sendUnitIdRequest();
717 #if( FMI_SUPPORT_A603 ) 722 for( ; iter != mCom.mA603Stops.
end(); iter++ )
726 mAutoEtaChecked =
TRUE;
727 OnBnClickedAutoETA();
728 #endif // FMI_SUPPORT_A603 733 #if( FMI_SUPPORT_A612 ) 734 if ( NULL == mCustomFormsDlg )
741 #if( FMI_SUPPORT_A615 ) 742 if ( NULL == mIftaDlg )
744 mIftaDlg =
new CIftaDlg(
this, mCom );
749 #if( FMI_SUPPORT_A617 ) 750 if ( NULL == mSendAlertDlg )
755 if ( NULL == mSendSensorDlg )
764 mCom.txCdt( CDT_PING_REQUEST, NULL, 0 );
767 #endif // !( MINIMAL_ENABLE ) 783 if( !mCom.mStopListInitialized )
789 mStopListDlg->ShowWindow( SW_SHOW );
790 GetDlgItem( IDC_MAIN_BTN_VIEW_STOPS )->EnableWindow(
FALSE );
806 mWaypointDlg->ShowWindow( SW_SHOW );
807 GetDlgItem( IDC_MAIN_BTN_WAYPOINTS )->EnableWindow(
FALSE );
851 #if( FMI_SUPPORT_A616 ) 852 if( mResolvingCommRate &&
859 delete mCommErrorDlg;
860 mCommErrorDlg =
new CCommErrorDlg( _T(
"Communication Time Out! Please check all connections."),
TRUE,
this, mCom );
862 mCommErrorDlg->ShowWindow( SW_SHOW );
873 delete mCommErrorDlg;
874 mCommErrorDlg = NULL;
889 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mClientUnitId, -1, unitId, 11 );
891 mUnitId.Format( _T(
" %s"), unitId );
905 GetDlgItem( IDC_MAIN_BTN_VIEW_LOG )->EnableWindow(
TRUE );
906 delete mLogViewerDlg;
907 mLogViewerDlg = NULL;
910 if( !mComPortSelected )
925 doOpenLogFileQuestion();
938 mProductId = getProductName( mCom.mClientProductId );
939 mSoftwareVersion.Format( _T(
"%1.2f"), (
float)mCom.mClientSoftwareVersion / 100 );
952 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mProtocols, -1, protocols,
PROTOCOL_SIZE );
954 mSupportedProtocols.Format( _T(
"%s"), protocols );
957 #if( FMI_SUPPORT_A616 ) 959 mResolvingCommRate =
FALSE;
975 memset( str, 0,
sizeof( str ) );
976 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mPVTFixType, -1, str, 9 );
977 mGpsFix.Format( _T(
" %s"), str );
978 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mPvtDate, -1, str, 11 );
979 mPvtDate.Format( _T(
" %s"), str );
980 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mPvtTime, -1, str, 13 );
981 mPvtTime.Format( _T(
" %s"), str );
982 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mPvtLatitude, -1, str, 14 );
983 mPvtLatitude.Format( _T(
" %s"), str );
984 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mPvtLongitude, -1, str, 14 );
985 mPvtLongitude.Format( _T(
" %s"), str );
986 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mPvtAltitude, -1, str, 13 );
987 mAltitude.Format( _T(
" %s"), str );
988 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mPvtNorthSouthVelocity, -1, str, 15 );
989 mNorthSouthVelocity.Format( _T(
" %s"), str );
990 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mPvtEastWestVelocity, -1, str, 15 );
991 mEastWestVelocity.Format( _T(
" %s"), str );
992 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mPvtUpDownVelocity, -1, str, 15 );
993 mUpDownVelocity.Format( _T(
" %s"), str );
994 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mHorizontalVelocity, -1, str, 15 );
995 m2DVelocity.Format( _T(
" %s"), str );
1009 GetDlgItem( IDC_MAIN_BTN_VIEW_STOPS )->EnableWindow(
TRUE );
1010 delete mStopListDlg;
1011 mStopListDlg = NULL;
1016 #if FMI_SUPPORT_A607 1025 GetDlgItem( IDC_MAIN_BTN_WAYPOINTS )->EnableWindow(
TRUE );
1026 delete mWaypointDlg;
1027 mWaypointDlg = NULL;
1048 bool logWasOpen =
false;
1050 if( mLogViewerDlg != NULL )
1053 mLogViewerDlg->DestroyWindow();
1064 #if( FMI_SUPPORT_A609 ) 1077 aCmdUI->Enable(
TRUE );
1086 mCom.rebootDevice();
1089 #if( FMI_SUPPORT_A610 ) 1102 aCmdUI->Enable( mCom.mUseAOBRD );
1128 #if( FMI_SUPPORT_A615 ) 1135 mIftaDlg->ShowWindow( SW_SHOW );
1157 CPaintDC dc(
this );
1159 SendMessage( WM_ICONERASEBKGND, reinterpret_cast<WPARAM>( dc.GetSafeHdc() ), 0 );
1162 int cxIcon = GetSystemMetrics( SM_CXICON );
1163 int cyIcon = GetSystemMetrics( SM_CYICON );
1165 GetClientRect( &rect );
1166 int x = ( rect.Width() - cxIcon + 1 ) / 2;
1167 int y = ( rect.Height() - cyIcon + 1 ) / 2;
1170 dc.DrawIcon( x, y, mIconHandle );
1185 return static_cast<HCURSOR
>( mIconHandle );
1199 UINT aSystemCommandId,
1210 CDialog::OnSysCommand( aSystemCommandId, aParam );
1238 #if FMI_SUPPORT_A603 1241 mCom.sendEtaRequest();
1245 #if FMI_SUPPORT_A616 1248 if( 0 < mBaudRateSyncRetries-- )
1250 mCom.retryBaudRateSync();
1279 if( mLogViewerDlg != NULL )
1281 aCmdUI->Enable(
FALSE );
1285 aCmdUI->Enable(
TRUE );
1301 delete mLogViewerDlg;
1303 mLogViewerDlg =
new CLogViewerDlg( mLogParser,
this, aOpenOther );
1304 mLogViewerDlg->Create(
IDD_LOG );
1305 mLogViewerDlg->ShowWindow( SW_SHOW );
1308 GetDlgItem( IDC_MAIN_BTN_VIEW_LOG )->EnableWindow(
FALSE );
1330 map<uint16, CString>::iterator iter = mProductNames.find( aProductId );
1331 if( iter == mProductNames.end() )
1333 result.Format( _T(
"Unknown (%u)"), aProductId );
1337 result = iter->second;
1348 mProductNames.clear();
1349 mProductNames[ 404 ] = CString(
"StreetPilot 2720");
1350 mProductNames[ 412 ] = CString(
"StreetPilot 7000 Series");
1351 mProductNames[ 481 ] = CString(
"StreetPilot c340");
1352 mProductNames[ 520 ] = CString(
"StreetPilot 2820");
1353 mProductNames[ 539 ] = CString(
"StreetPilot c500 Series");
1354 mProductNames[ 566 ] = CString(
"nuvi 310/360/370");
1355 mProductNames[ 580 ] = CString(
"zumo 500 Series");
1356 mProductNames[ 596 ] = CString(
"nuvi 600 Series");
1357 mProductNames[ 640 ] = CString(
"nuvi 300/350 Chinese");
1358 mProductNames[ 641 ] = CString(
"nuvi 300/350 Japanese");
1359 mProductNames[ 642 ] = CString(
"nuvi 300/350 Thai");
1360 mProductNames[ 643 ] = CString(
"nuvi 310/360 Chinese");
1361 mProductNames[ 644 ] = CString(
"nuvi 310/360 Japanese");
1362 mProductNames[ 645 ] = CString(
"nuvi 310/360 Thai");
1363 mProductNames[ 655 ] = CString(
"nuvi 310/360 Taiwanese");
1364 mProductNames[ 656 ] = CString(
"nuvi 310/360 Russian");
1365 mProductNames[ 657 ] = CString(
"nuvi 310/360 Arabic");
1366 mProductNames[ 706 ] = CString(
"zumo 500 Series Taiwanese");
1367 mProductNames[ 722 ] = CString(
"zumo 500 Series Japanese");
1368 mProductNames[ 723 ] = CString(
"nuvi 500 Series");
1369 mProductNames[ 726 ] = CString(
"nuvi 800 Series");
1370 mProductNames[ 743 ] = CString(
"nuvi 5000 Series");
1371 mProductNames[ 754 ] = CString(
"nuvi 700 Series");
1372 mProductNames[ 827 ] = CString(
"nuvi 205W Series");
1373 mProductNames[ 836 ] = CString(
"nuvi 700 Series Taiwanese");
1374 mProductNames[ 844 ] = CString(
"nuvi 700 Series Chinese");
1375 mProductNames[ 851 ] = CString(
"nuvi 205 Series");
1376 mProductNames[ 855 ] = CString(
"nuvi 300/350");
1377 mProductNames[ 856 ] = CString(
"nuvi 310/360/370");
1378 mProductNames[ 870 ] = CString(
"nuvi 705 Series");
1379 mProductNames[ 905 ] = CString(
"nuvi 700 Series Sing/Malay");
1380 mProductNames[ 906 ] = CString(
"nuvi 700 Series Thai");
1381 mProductNames[ 925 ] = CString(
"nuvi 700 Series Indonesian");
1382 mProductNames[ 926 ] = CString(
"nuvi 205 Series Indonesian");
1383 mProductNames[ 927 ] = CString(
"nuvi 205 Series Sing/Malay");
1384 mProductNames[ 928 ] = CString(
"nuvi 205 Series Chinese");
1385 mProductNames[ 929 ] = CString(
"nuvi 205W Series Indonesian");
1386 mProductNames[ 930 ] = CString(
"nuvi 205W Series Sing/Malay");
1387 mProductNames[ 931 ] = CString(
"nuvi 205W Series Chinese");
1388 mProductNames[ 932 ] = CString(
"nuvi 205W Series Taiwanese");
1389 mProductNames[ 933 ] = CString(
"nuvi 205W Series Japanese");
1390 mProductNames[ 943 ] = CString(
"nuvi 465T");
1391 mProductNames[ 958 ] = CString(
"nuvi 5000 Taiwanese");
1392 mProductNames[ 959 ] = CString(
"nuvi 5000 Chinese");
1393 mProductNames[ 971 ] = CString(
"nuvi 1200 Series");
1394 mProductNames[ 972 ] = CString(
"nuvi 1300/1400 Series");
1395 mProductNames[ 1001 ] = CString(
"nuvi 205W Series Thai");
1396 mProductNames[ 1002 ] = CString(
"nuvi 205 Series India");
1397 mProductNames[ 1007 ] = CString(
"nuvi 705 Series Taiwanese");
1398 mProductNames[ 1074 ] = CString(
"nuvi 205 Series MT");
1399 mProductNames[ 1077 ] = CString(
"nuvi 1480 Series Japanese");
1400 mProductNames[ 1091 ] = CString(
"nuvi 205W Series MT");
1401 mProductNames[ 1104 ] = CString(
"nuvi 1300 Series MT");
1402 mProductNames[ 1106 ] = CString(
"nuvi 1100/1200 Series MT");
1403 mProductNames[ 1186 ] = CString(
"nuvi 2200 Series");
1404 mProductNames[ 1187 ] = CString(
"nuvi 2300 Series");
1405 mProductNames[ 1269 ] = CString(
"dezl 560 Series");
1406 mProductNames[ 1273 ] = CString(
"nuvi 2400 Series");
1407 mProductNames[ 1371 ] = CString(
"nuvi 2555");
1408 mProductNames[ 1389 ] = CString(
"nuvi 2585TV");
1409 mProductNames[ 1516 ] = CString(
"dezl 760 Series");
1410 mProductNames[ 1517 ] = CString(
"nuvi 27x7 Series");
1411 mProductNames[ 1582 ] = CString(
"nuvi 2xx7 Series");
1412 mProductNames[ 1758 ] = CString(
"nuvi 2xx9 Series");
1413 mProductNames[ 1932 ] = CString(
"nuvi 27x9 Series");
1414 mProductNames[ 1947 ] = CString(
"nuvi 2xx9 Series");
1415 mProductNames[ 1948 ] = CString(
"nuvi 2xx9 Series");
1416 mProductNames[ 2002 ] = CString(
"dezl 770 Series");
1417 mProductNames[ 2003 ] = CString(
"dezl 570 Series");
1418 mProductNames[ 2043 ] = CString(
"nuviCam");
1419 mProductNames[ 2062 ] = CString(
"fleet 660");
1420 mProductNames[ 2063 ] = CString(
"fleet 670");
1421 mProductNames[ 2077 ] = CString(
"nuvi 2xx7 Series");
1422 mProductNames[ 2141 ] = CString(
"dezlCam");
1423 mProductNames[ 2267 ] = CString(
"driveSmart 50");
1424 mProductNames[ 2268 ] = CString(
"driveSmart 60/70");
1425 mProductNames[ 2270 ] = CString(
"driveAssist");
1426 mProductNames[ 2569 ] = CString(
"fleet 660 8GB");
1427 mProductNames[ 2570 ] = CString(
"fleet 670 8GB");
1428 mProductNames[ 2586 ] = CString(
"driveSmart 51");
1429 mProductNames[ 2588 ] = CString(
"driveSmart 61");
1430 mProductNames[ 2590 ] = CString(
"driveAssist 51");
1431 mProductNames[ 2735 ] = CString(
"fleet 770");
1432 mProductNames[ 2736 ] = CString(
"fleet 780");
1433 mProductNames[ 2738 ] = CString(
"fleet 790, NA");
1434 mProductNames[ 2739 ] = CString(
"fleet 790, EU");
1435 mProductNames[ 2826 ] = CString(
"dezl 580 Series");
1436 mProductNames[ 2910 ] = CString(
"dezl 780 Series");
1437 mProductNames[ 2911 ] = CString(
"dezlCam 785 Series");
1438 mProductNames[ 2952 ] = CString(
"fleet 790, AU-NZ");
1439 mProductNames[ 2996 ] = CString(
"driveSmart 61 APAC");
1440 mProductNames[ 3062 ] = CString(
"driveSmart 55");
1441 mProductNames[ 3064 ] = CString(
"driveSmart 65");
1442 mProductNames[ 3109 ] = CString(
"driveAssist 51 APAC");
1453 mCom.mStopListInitialized =
TRUE;
1455 #if( FMI_SUPPORT_A603 ) 1457 for( iter = mCom.mA603Stops.
begin(); iter != mCom.mA603Stops.
end(); iter++ )
1471 if( dlg.DoModal() == IDOK )
1473 mComPortSelected =
TRUE;
1475 #if( FMI_SUPPORT_A616 ) 1477 mRemainingRates.RemoveAll();
1483 mResolvingCommRate =
TRUE;
1485 OnBnClickedEnable();
1486 mIgnoreTimer =
FALSE;
1504 if( MessageBox( _T(
"Would you like to open a log file without connecting to a unit first?"), _T(
"Question?"), MB_YESNO ) == IDYES )
1507 mIgnoreTimer =
FALSE;
1511 doComPortQuestion();
1523 mIgnoreTimer =
TRUE;
1524 if( !selectComPort() )
1526 AfxGetMainWnd()->SendMessage( WM_CLOSE );
1530 #if( FMI_SUPPORT_A602 ) 1544 uint8 fmiPayloadSize = 0;
1545 char fmiPacketIdHex[6];
1550 WideCharToMultiByte( mCom.mClientCodepage, 0, mPacketData, -1, fmiPayloadHex,
sizeof( fmiPayloadHex ), NULL, NULL );
1551 WideCharToMultiByte( mCom.mClientCodepage, 0, mPacketId, -1, fmiPacketIdHex,
sizeof( fmiPacketIdHex ), NULL, NULL );
1553 fmiPayload[0] =
'\0';
1555 if( !strncmp( fmiPacketIdHex,
"0x", 2 ) )
1559 if( fmiPayloadSize == 0 )
1561 MessageBox( _T(
" Invalid Hex String in ID field!"), _T(
"Error!") );
1566 if( mPacketData !=
"" )
1568 if( !strncmp( fmiPayloadHex,
"0x", 2 ) )
1576 if( fmiPayloadSize == 0 )
1578 MessageBox( _T(
" Invalid Hex String in Data Field!"), _T(
"Error!") );
1583 mCom.sendFreeformFmiPacket( fmiPacketId, fmiPayload, fmiPayloadSize );
1596 LPARAM aEventDataPtr
1608 #if( FMI_SUPPORT_A603 ) 1616 if( mAutoEtaChecked )
1618 if( !mEtaTimerEnabled )
1623 mEtaTimerEnabled =
true;
1627 ::MessageBox( m_hWnd, _T(
"Failed to set periodic ETA timer!"), _T(
"Error"), MB_OK );
1628 mAutoEtaChecked =
FALSE;
1629 UpdateData(
FALSE );
1635 if( mEtaTimerEnabled )
1637 KillTimer( mEtaTimer );
1638 mEtaTimerEnabled =
false;
1676 mCom.sendEtaRequest();
1692 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mEtaTime, -1, str, 13 );
1694 mEtaTime.Format( _T(
" %s"), str );
1695 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mEtaLatitude, -1, str, 14 );
1697 mEtaLatitude.Format( _T(
" %s"), str );
1698 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mEtaLongitude, -1, str, 14 );
1700 mEtaLongitude.Format( _T(
" %s"), str );
1701 MultiByteToWideChar( mCom.mClientCodepage, 0, mCom.mEtaDistance, -1, str, 14 );
1703 mEtaDistance.Format( _T(
" %s"), str );
1704 UpdateData(
FALSE );
1715 if( !mCom.mActiveRoute )
1718 mEtaTime.Format( _T(
"") );
1719 mEtaLatitude.Format( _T(
"") );
1720 mEtaLongitude.Format( _T(
"") );
1721 mEtaDistance.Format( _T(
"") );
1722 UpdateData(
FALSE );
1737 LPARAM aEventDataPtr
1745 delete messageEvent;
1751 #if( FMI_SUPPORT_A604 ) 1761 delete mCannedResponseDlg;
1764 mCannedResponseDlg->ShowWindow( SW_SHOW );
1766 GetDlgItem( IDC_MAIN_BTN_CANNED_RESPONSES )->EnableWindow(
FALSE );
1802 delete mDriverIdAndStatusDlg;
1806 mDriverIdAndStatusDlg->ShowWindow( SW_SHOW );
1808 GetDlgItem( IDC_MAIN_BTN_DRIVER_INFO )->EnableWindow(
FALSE );
1820 delete mCannedTxtMsgDlg;
1824 mCannedTxtMsgDlg->ShowWindow( SW_SHOW );
1826 GetDlgItem( IDC_MAIN_BTN_CANNED_MESSAGES )->EnableWindow(
FALSE );
1886 GetDlgItem( IDC_MAIN_BTN_CANNED_MESSAGES )->EnableWindow(
TRUE );
1887 delete mCannedTxtMsgDlg;
1888 mCannedTxtMsgDlg = NULL;
1908 AfxGetMainWnd()->MessageBox
1910 _T(
"Invalid Response Count! Retry with a Canned Response List packet with 1-50 Response IDs."),
1911 _T(
"Canned Response Text Message Failure")
1916 AfxGetMainWnd()->MessageBox
1918 _T(
"Invalid Response ID! Retry after ensuring all canned responses are on the client."),
1919 _T(
"Canned Response Text Message Failure")
1924 AfxGetMainWnd()->MessageBox
1926 _T(
"Duplicate Message ID! Retry using a message ID that is not on the client."),
1927 _T(
"Canned Response Text Message Failure")
1932 AfxGetMainWnd()->MessageBox
1934 _T(
"Canned Response List Database Full! Retry after receiving an acknowledgment for a previous message."),
1935 _T(
"Canned Response Text Message Failure")
1940 AfxGetMainWnd()->MessageBox
1942 _T(
"Unknown error. Please retry."),
1943 _T(
"Canned Response Text Message Failure")
1958 GetDlgItem( IDC_MAIN_BTN_CANNED_RESPONSES )->EnableWindow(
TRUE );
1959 delete mCannedResponseDlg;
1960 mCannedResponseDlg = NULL;
1973 GetDlgItem( IDC_MAIN_BTN_DRIVER_INFO )->EnableWindow(
TRUE );
1974 delete mDriverIdAndStatusDlg;
1975 mDriverIdAndStatusDlg = NULL;
1988 AfxGetMainWnd()->MessageBox
1990 _T(
"Unable to delete driver status item."),
1991 _T(
"Delete Driver Status Error")
2019 AfxGetMainWnd()->MessageBox
2021 _T(
"Invalid protocol ID or state."),
2022 _T(
"Message Throttling Error")
2038 LPARAM aEventDataPtr
2041 CString errorString;
2045 errorString.Format( _T(
"Text Message with id %s already exists!"), messageId->
toCString( mCom.mClientCodepage ) );
2046 AfxGetMainWnd()->MessageBox( errorString, _T(
"Open Text Message Failure" ) );
2061 LPARAM aEventDataPtr
2065 if( mTxtMsgStatusDlg != NULL )
2067 mTxtMsgStatusDlg->EndDialog( IDCANCEL );
2068 mTxtMsgStatusDlg = NULL;
2071 mTxtMsgStatusDlg = &dlg;
2073 mTxtMsgStatusDlg = NULL;
2088 AfxGetMainWnd()->MessageBox( _T(
"Updating UI Text Failed!"), _T(
"Error!") );
2093 #if (FMI_SUPPORT_A606) 2114 CString *errorString =
new CString(
"Error setting FMI Safe Mode!" );
2116 AfxGetMainWnd()->MessageBox( *errorString, _T(
"FMI Safe Mode Failure" ) );
2122 #if( FMI_SUPPORT_A607 ) 2148 boolean deleteSuccessful = (
boolean)aEventData;
2150 if( deleteSuccessful )
2152 AfxGetMainWnd()->MessageBox( _T(
"Text Message Deleted"), _T(
"Error!") );
2156 AfxGetMainWnd()->MessageBox( _T(
"Text Message Delete failed. Check Message ID and try again"), _T(
"Error!") );
2164 #if( FMI_SUPPORT_A608 ) 2178 #if( FMI_SUPPORT_A610 ) 2192 #if( FMI_SUPPORT_A611 ) 2204 LPARAM aEventDataPtr
2207 CString errorString;
2211 switch( aResultCode )
2214 errorString.Format( _T(
"Text Message id %s is an invalid size!"), messageId->
toCString( mCom.mClientCodepage ) );
2217 errorString.Format( _T(
"Text Message with id %s did not start its sequence numbers at zero!"), messageId->
toCString( mCom.mClientCodepage ) );
2220 errorString.Format( _T(
"Text Message with id %s already exists!"), messageId->
toCString( mCom.mClientCodepage ) );
2223 errorString.Format( _T(
"Text Message with id %s already exists!"), messageId->
toCString( mCom.mClientCodepage ) );
2226 errorString.Format( _T(
"Text Message with id %s could not be allocated memory!"), messageId->
toCString( mCom.mClientCodepage ) );
2229 errorString.Format( _T(
"Text Message id %s is an invalid size!"), messageId->
toCString( mCom.mClientCodepage ) );
2232 errorString.Format( _T(
"Text Message with id %s is the wrong id for long message continuation!"), messageId->
toCString( mCom.mClientCodepage ) );
2235 errorString.Format( _T(
"Text Message with id %s did not increment its sequence numbers!"), messageId->
toCString( mCom.mClientCodepage ) );
2238 errorString.Format( _T(
"Text Message with id %s did not have a matching origination time!"), messageId->
toCString( mCom.mClientCodepage ) );
2241 errorString.Format( _T(
"Text Message with id %s did not have a matching message type!"), messageId->
toCString( mCom.mClientCodepage ) );
2244 errorString.Format( _T(
"Text Message with id %s exceeds the maximum length!"), messageId->
toCString( mCom.mClientCodepage ) );
2247 errorString.Format( _T(
"Text Message with id %s had an early null terminator!"), messageId->
toCString( mCom.mClientCodepage ) );
2250 errorString.Format( _T(
"Text Message with id %s had an early null terminator!"), messageId->
toCString( mCom.mClientCodepage ) );
2253 errorString.Format( _T(
"Text Message with id %s could not be allocated memory!"), messageId->
toCString( mCom.mClientCodepage ) );
2256 errorString.Format( _T(
"Text Message with id %s could not be saved on the device's database!"), messageId->
toCString( mCom.mClientCodepage ) );
2260 AfxGetMainWnd()->MessageBox( errorString, _T(
"Long Text Message Failure" ) );
2267 #if( FMI_SUPPORT_A612 ) 2274 mCustomFormsDlg->ShowWindow( SW_SHOW );
2279 #if( FMI_SUPPORT_A613 ) 2286 if ( mMapViewerDlg == NULL )
2291 mMapViewerDlg->ShowWindow( SW_SHOW );
2295 #if( FMI_SUPPORT_A615 ) 2302 BOOL enabled =
FALSE;
2309 enabled, settingValue );
2310 if( IDOK == result )
2312 #if( FMI_SUPPORT_A619 ) 2314 memset( &setThreshold, 0,
sizeof( setThreshold ) );
2316 setThreshold.
enable = enabled;
2321 memset( &message, 0,
sizeof( message ) );
2322 message.
enable = enabled;
2333 #if( FMI_SUPPORT_A619 ) 2340 BOOL enabled =
FALSE;
2347 enabled, settingValue );
2348 if( IDOK == result )
2351 memset( &setThreshold, 0,
sizeof( setThreshold ) );
2353 setThreshold.
enable = enabled;
2365 GetMenu()->GetSubMenu( 1 )->GetSubMenu( 5 )->CheckMenuRadioItem( ID_8HOURRULE_ENABLE, ID_8HOURRULE_DISABLE, ID_8HOURRULE_ENABLE, 0 );
2366 #if( FMI_SUPPORT_A619 ) 2368 memset( &request, 0,
sizeof( request ) );
2374 boolean hos8HourRuleEnabled =
true;
2384 GetMenu()->GetSubMenu( 1 )->GetSubMenu( 5 )->CheckMenuRadioItem( ID_8HOURRULE_ENABLE, ID_8HOURRULE_DISABLE, ID_8HOURRULE_DISABLE, 0 );
2385 #if( FMI_SUPPORT_A619 ) 2387 memset( &request, 0,
sizeof( request ) );
2393 boolean hos8HourRuleEnabled =
false;
2399 #if( FMI_SUPPORT_A616 ) 2418 if( 0 == mRemainingRates.GetCount() )
2420 mResolvingCommRate =
FALSE;
2422 ::MessageBox( m_hWnd, _T(
"Unable to establish communication with any of the supported BAUD rates" ), _T(
"Error"), MB_OK | MB_ICONERROR );
2423 if( !selectComPort())
2425 AfxGetMainWnd()->SendMessage( WM_CLOSE );
2432 switch( mRemainingRates[ 0 ] )
2450 mRemainingRates.RemoveAt( 0 );
2470 mBaudRateSyncRetries = 0;
2477 #if( FMI_SUPPORT_A617 ) 2484 mSendAlertDlg->reset();
2485 mSendAlertDlg->ShowWindow( SW_SHOW );
2493 mSendSensorDlg->reset();
2494 mSendSensorDlg->ShowWindow( SW_SHOW );
2499 LRESULT CFmiPcAppDlg::OnCDTPingReceived( WPARAM, LPARAM )
2501 GetMenu()->GetSubMenu( 1 )->GetSubMenu( 7 )->EnableMenuItem( 0, MF_BYPOSITION | MF_ENABLED );
2505 LRESULT CFmiPcAppDlg::OnCDTPacketReceived( WPARAM wParam, LPARAM lParam )
2516 void CFmiPcAppDlg::OnToolsCDTChat()
2518 if ( mCdtChatDlg == NULL )
2520 mCdtChatDlg =
new CCdtChatDlg(
this, mCom );
2521 mCdtChatDlg->Create( CCdtChatDlg::IDD );
2523 mCdtChatDlg->ShowWindow( SW_SHOW );
2530 void CFmiPcAppDlg::OnToolsCDTPingOnce()
2532 mCom.txCdt( CDT_PING_REQUEST, NULL, 0 );
2539 void CFmiPcAppDlg::OnToolsCDTPingTool()
2541 if ( mCdtPingDlg == NULL )
2543 mCdtPingDlg =
new CCdtPingDlg(
this, mCom );
2544 mCdtPingDlg->Create( CCdtPingDlg::IDD );
2546 mCdtPingDlg->ShowWindow( SW_SHOW );
2551 #if( FMI_SUPPORT_A620 ) 2554 COleDateTime settingValue = COleDateTime::GetCurrentTime();
2555 settingValue.SetTime( 0, 0, 0 );
2560 if( IDOK == result )
2563 memset( &setThreshold, 0,
sizeof( setThreshold ) );
2566 setThreshold.
settings_value = ( settingValue.GetHour() * 60 ) + settingValue.GetMinute();
2572 #if( FMI_SUPPORT_A622 ) 2582 mDashcamDlg->ShowWindow( SW_SHOW );
2591 delete mDashcamNtfctnDlg;
2594 mDashcamNtfctnDlg->ShowWindow( SW_SHOW );
2603 delete mFileConverterDlg;
2606 mFileConverterDlg->ShowWindow( SW_SHOW );
2619 LPARAM aEventDataPtr
2627 delete messageEvent;
2642 LPARAM aEventDataPtr
2650 delete messageEvent;
2656 #if( FMI_SUPPORT_A623 ) 2678 uint8 mode = mCom.mEtaMode;
2683 mEtaMode = _T(
"0 - None");
2686 mEtaMode = _T(
"1 - Dispatch Stops");
2689 mEtaMode = _T(
"2 - Driver Initiated Stops");
2692 mEtaMode = _T(
"3 - Dispatch or Driver Initiated Stops");
2697 UpdateData(
FALSE );
afx_msg void OnBnClickedMsgThrottling()
Click handler for the Message Throttling button.
#define IDC_MAIN_TXT_PVT_TIME
#define ID_TOOLS_CAMERA_NOTIFICATIONS
afx_msg LRESULT OnEventCommErrorDlgClosed(WPARAM, LPARAM)
Handle the Comm Error Dlg Closed event.
#define IDC_MAIN_EDIT_FMI_ID
#define ID_FILE_CLEARPACKETLOG
afx_msg void OnUpdateFileViewlog(CCmdUI *aCmdUI)
ON_UPDATE_COMMAND_UI handler for File > View Log menu item.
afx_msg void OnBnClickedSpeedLimit()
Click handler for the FMI Speed Limit Alerts button.
#define ID_HOS_SETSTARTTIMEOFDAY
afx_msg LRESULT OnEventStopDone(WPARAM, LPARAM)
Handler for the Stop Done event from Com.
afx_msg void OnToolsFileConverter()
Handler for the Tools > File Converter action.
#define IDC_MAIN_TXT_PVT_2D_VEL
afx_msg LRESULT OnEventStopListDlgClosed(WPARAM, LPARAM)
Handler for Stop List Dialog Closed event.
#define ID_8HOURRULE_DISABLE
const_iterator begin()
Iterator positioned at the first element in the map.
afx_msg LRESULT OnEventCannedMessageDlgClosed(WPARAM, LPARAM)
Handler for Canned Text Message Dialog Closed event.
afx_msg LRESULT OnEventMainDlgInit(WPARAM, LPARAM)
Handler for Main Dialog Init question.
afx_msg HCURSOR OnQueryDragIcon()
The system calls this function to obtain the cursor to display while the user drags the minimized win...
virtual bool setBaudRate(uint32 aBaudRate)
Set the baud rate.
Browser-based container for listing the Dashcam library.
#define BAUD_RATE_SYNC_TIMER_INTERVAL
Interval between Baud Rate Sync retries, in milliseconds.
afx_msg void OnToolsConfigureHosPeriodicUpdates()
Handler for the HOS Periodic Updates configuration button.
#define IDC_MAIN_BTN_UI_TXT_CHG
afx_msg LRESULT OnEventWaypointDlgClosed(WPARAM, LPARAM)
Handler for Stop List Dialog Closed event.
Modal dialog allowing the user to query the file version and size of the FMI GPI file on the client d...
#define IDC_MAIN_TXT_PVT_UD_VEL
afx_msg void OnTimer(UINT aTimerId)
WM_TIMER event handler.
Browser-based container for listing the Custom Avoidances library.
afx_msg void OnBnClickedDelData()
Click handler for the Delete Data button.
Dialog allowing the user to manage canned responses.
afx_msg void OnBnClickedManageCannedMsg()
Click handler for the Canned Messages button.
#define IDC_MAIN_BTN_FMI_SEND
Data type for HOS Settings Request Packet ID (0x1500) from server to client.
Modeless dialog allowing the user to manage the A603 stops on the client device.
afx_msg LRESULT OnEventTextMsgAck(WPARAM, LPARAM aEventDataPtr)
Handler for the Text Message Ack Received event from Com.
Data type for Dashcam Notification Packet ID (0X160C) from client to server (request) ...
#define IDC_MAIN_TXT_ETA_MODE
#define IDC_MAIN_BTN_SEND_ALERT
#define IDC_MAIN_BTN_MSG_DELETE
afx_msg void OnToolsHOS8HourRuleDisable()
Disable the HOS 8 Hour Rule on the device.
Dialog allowing the user to change speed limit alerts settings.
afx_msg void OnToolsCameraNtfctn()
Handler for the Tools > Camera > Notifications action.
afx_msg LRESULT OnEventFmiSafeModeError(WPARAM, LPARAM)
Handler for the FMI Safe Mode event from Com.
afx_msg void OnViewlog(BOOL aOpenOther=FALSE)
Display the log viewer.
#define IDS_HOS_START_TIME_OF_DAY_TITLE
Modal pop-up dialog displaying the status of a server to client text message.
Modal pop up dialog displaying a client to server open text message.
static void clearLog()
Empties the packet log.
#define IDC_MAIN_LBL_ETA_LAT
void doOpenLogFileQuestion()
Ask the user whether to open a log file.
afx_msg void OnFileAOBRDDrivers()
Handler for the File > AOBRD Drivers.
afx_msg void OnBnClickedIdStatus()
Click handler for the Driver ID and Status button.
afx_msg void OnBnClickedCheckPVT()
Click handler for the Enable PVT check box.
Dialog allowing the user to delete specified FMI data from the client.
Modal dialog allowing the user to request the status of a server to client text message.
uint16 stop_moving_threshold
uint8 id_type
Garmin packet ID.
Form for sending A617 alerts to the device.
Dialog allowing the user to manage the list of canned messages on the client.
Data type for Dashcam Notification Packet ID (0X1606) from client to server (request) ...
#define FMI_PROTOCOL_LEVEL
afx_msg LRESULT OnEventEtaModeReceived(WPARAM, LPARAM)
Handler for the ETA Mode Received event from Com.
#define BAUD_RATE_SYNC_RETRY_COUNT
Number of times to retry Baud Rate Sync.
Modal dialog allowing the user to select the port to use to communicate with the client.
Dialog allowing the user to manage AOBRD drivers.
static UINT CaptureSetting(CWnd *pParent, UINT titleStringId, UINT valueLabelStringId, COleDateTime &value)
#define IDC_MAIN_GRP_FMI_PACKET
Modeless log viewer dialog.
static UINT CaptureSetting(CWnd *pParent, UINT titleStringId, UINT valueLabelStringId, UINT valueUnitStringId, long valueLowerLimit, long valueUpperLimit, BOOL &enabled, uint16 &value)
uint8 UTIL_hex_to_uint16(const char *aHexString, uint16 *aBinaryData, uint8 aMaxWords)
Converts a null-terminated string in hexadecimal format to an array of uint16 numbers, assuming natural byte ordering in the hex. No prefix should be present in the hex string.
const_iterator end()
Iterator positioned after the last element in the map.
afx_msg LRESULT OnEventAobrdFileTransferReceived(WPARAM, LPARAM)
Attempt to convert received file into human-readable CSV.
Modal dialog allowing the user to throttle (disable) or un-throttle (enable) certain client-initiated...
afx_msg void OnBnClickedManageStops()
Click handler for the Manage Stops button.
CString getProductName(uint16 aProductId)
Translate a product ID into a display name.
afx_msg void OnToolsHOS8HourRuleEnable()
Enable the HOS 8 Hour Rule on the device.
#define IDC_MAIN_TXT_PVT_DATE
Utility for converting between raw AOBRD data to human- readable CSV file. Used to attempt to auto-co...
#define PROTOCOL_SIZE
Size of the formatted "supported protocols" string.
virtual BOOL OnInitDialog()
Initialize the dialog.
afx_msg void OnBnClickedChgAutoArvl()
Click handler for the Change Auto-Arrival button.
#define IDS_HOS_REPORT_STATUS_UPDATES_TITLE
void doComPortQuestion()
Ask the user to select a mCom port.
#define IDC_MAIN_TXT_PVT_EW_VEL
Browser-based container for listing the Dashcam library.
afx_msg void OnBnClickedSendAlert()
Handler for the Send Alert button.
#define IDC_MAIN_BTN_CHG_AUTO_ARVL
unsigned char boolean
8-bit value representing FALSE (0) or TRUE (nonzero)
#define IDS_HOS_REPORT_STATUS_UPDATES_VALUE_UNIT
afx_msg LRESULT OnEventDashcamNtfctnFromClient(WPARAM, LPARAM)
Handler for the Dashcam Notification Received event from Com.
#define IDC_MAIN_BTN_VIEW_STOPS
afx_msg LRESULT OnEventMsgThrottleFailed(WPARAM, LPARAM)
Handler for the Message Throttle Failed event from Com.
#define IDC_MAIN_TXT_PRODUCT_ID
#define IDS_HOS_REPORT_STATUS_UPDATES_VALUE_LABEL
#define IDC_MAIN_TXT_ETA_DISTANCE
#define IDC_MAIN_CHK_PVT_ENABLE
#define IDC_MAIN_BTN_DEL_DATA
FMI Feature (enable) modal dialog.
#define IDC_MAIN_TXT_ETA_LAT
#define ID_CONFIGURE_HOS_PERIODIC_UPDATES
#define IDC_MAIN_BTN_SEND_SENSOR
About box for this application.
CString toCString(codepage_type aCodePage) const
CString representation of the message ID.
Modeless dialog allowing the user to manage waypoints.
#define IDC_MAIN_BTN_AUTO_STATUS_UPDATES
#define IDS_HOS_AUTO_STATUS_UPDATES_VALUE_LABEL
afx_msg void OnUpdateFileRebootDevice(CCmdUI *aCmdUI)
ON_UPDATE_COMMAND_UI handler for File > Reboot Device menu item.
#define IDC_MAIN_LBL_ETA_TIME
afx_msg void OnBnClickedAobrdOdometer()
Click handler for the AOBRD Set Odometer button.
afx_msg LRESULT OnEventLogViewerClosed(WPARAM, LPARAM)
Handler for Log Viewer Closed event.
#define IDC_MAIN_BTN_SEND_ENABLE
#define IDC_MAIN_LBL_FMI_DATA
#define IDC_MAIN_LBL_FMI_ID
#define IDC_MAIN_BTN_MSG_STATUS
afx_msg LRESULT OnEventCannedResponseDlgClosed(WPARAM, LPARAM)
Handler for Canned Response Dialog Closed event.
Data type for the HOS Auto Status Update Enable Packet ID (0X1300) from server to client...
#define IDC_MAIN_BTN_VIEW_LOG
#define IDD_CANNED_RESPONSE
afx_msg void OnToolsCustomForms()
Handler for the Tools > Custom Forms action.
#define IDC_MAIN_BTN_CHANGE_BAUD_RATE
afx_msg void OnFileClearPacketLog()
Handler for the File > Clear Packet Log action.
afx_msg void OnToolsCameraSettings()
Handler for the Tools > Camera > Settings action.
afx_msg void OnBnClickedMsgDelete()
Click handler for the Message Delete button.
#define ID_TOOLS_MAP_VIEWER
uint16 UTIL_hex_to_uint8(const char *aHexString, uint8 *aBinaryData, uint16 aMaxBytes)
Convert a hexadecimal ASCII string to an array of uint8.
#define IDC_MAIN_BTN_CHG_COM_PORT
Modal dialog allowing the user to set FMI Safe Mode and the threshold speed.
Form for interacting with IFTA data on the device.
afx_msg void OnBnClickedCannedResponses()
Click handler for the Canned Responses button.
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
afx_msg LRESULT OnEventUserInterfaceTextChangeFailed(WPARAM, LPARAM)
Handler for the UI Text Change Failed event from Com.
afx_msg LRESULT OnEventCannedRespListReceiptError(WPARAM aResultCode, LPARAM)
Handler for the Canned Response List Rcpt Error event.
#define MAIN_RX_TIMER_INTERVAL
RX polling interval, in milliseconds.
afx_msg void OnPaint()
Handler for WM_PAINT message. If the dialog is minimized, draw the icon centered in the client rectan...
afx_msg LRESULT OnEventDriverIdAndStatusDlgClosed(WPARAM, LPARAM)
Handler for Driver ID and Status Dialog Closed event.
#define IDC_MAIN_BTN_MSG_THROTTLING
afx_msg void OnBnClickedAutoStatusUpdates()
Handler for the Auto Status Updates button.
Modal dialog allowing the user to set AOBRD Odometer value.
#define SAVE_RECEIVED_AOBRD_LOG
afx_msg void OnBnClickedViewlog()
Click handler for the View Packet Log button.
#define IDC_MAIN_BTN_GPI_QUERY
bool tryNextCommRate()
Used in conjunction with mRemainingRates to cycle through available rates when initializing communica...
static SerialPort * getInstance()
Get the one and only serial port object.
#define ID_FILE_REBOOTDEVICE
afx_msg LRESULT OnEventLongTextMsgError(WPARAM, LPARAM)
Handler for the Server to Client Long Text Message Error event from Com.
afx_msg LRESULT OnEventProductIdReceived(WPARAM, LPARAM)
Handler for the Product ID Received event from Com.
afx_msg void OnBnClickedUiTxtChg()
Click handler for the Change UI Text button.
#define IDC_MAIN_BTN_DRIVER_INFO
afx_msg void OnBnClickedChgComPort()
Click handler for the Change Com Port button.
afx_msg LRESULT OnEventCommTimeout(WPARAM, LPARAM)
Display the Com Time Out error dialog.
File conversion tool to support various GPS file formats.
#define IDC_MAIN_GRP_ETA_DATA
#define ID_FILE_AOBRDDRIVERS
#define IDC_MAIN_TXT_PROTOCOLS
#define IDC_MAIN_TXT_PVT_LAT
#define IDC_MAIN_BTN_CANNED_RESPONSES
#define IDC_MAIN_TXT_PVT_ALTITUDE
Modeless dialog allowing the user to query and update Driver ID and Status on the client...
void convertToCsv(const char *source, const char *destFormat)
Convert raw file to CSV.
unsigned short int uint16
16-bit unsigned integer
#define IDC_MAIN_TXT_PVT_NS_VEL
afx_msg void OnFileClose()
Handler for the File > Close action. Close the app.
afx_msg void OnBnClickedSend()
Click handler for the Send (FMI Packet) button.
#define IDC_MAIN_BTN_REQ_ETA
#define IDC_MAIN_TXT_PVT_GPS_FIX
afx_msg LRESULT OnEventEsnReceived(WPARAM, LPARAM)
Handler for the Unit ID (ESN) Received event from Com.
afx_msg LRESULT OnEventProtocolsReceived(WPARAM, LPARAM)
Handler for the Protocols Received event from Com.
afx_msg void OnBnClickedReqETA()
Click handler for the Request ETA button.
afx_msg void OnBnClickedSendSensor()
Handler for the Add/Delete Sensor button.
#define ID_TOOLS_CUSTOMFORMS
afx_msg void OnUpdateFileAOBRDDrivers(CCmdUI *aCmdUI)
ON_UPDATE_COMMAND_UI handler for File > AOBRD Drivers menu item.
#define IDC_MAIN_BTN_SET_SAFE_MODE
LogParser for packets sent/received by the FmiApplicationLayer.
#define IDC_MAIN_BTN_SET_AOBRD_ODOMETER
Structure containing details for a client to server text message.
afx_msg void OnBnClickedWaypoints()
Click handler for the Waypoints button.
Modal dialog displaying a communication error.
#define ID_TOOLS_CAMERA_SETTINGS
Modal dialog allowing the user to select an ETA mode for the device to operate in.
afx_msg LRESULT OnEventDriverStatusListDeleteFailed(WPARAM, LPARAM)
Handler for the Delete Driver Status Failed event from Com.
#define IDC_MAIN_CHK_ETA_AUTO_UPDATE
Modal pop up which displays a text message ack received from the client.
afx_msg void OnBnClickedFileTrans()
Click handler for the Transfer File button.
#define IDC_MAIN_TXT_PVT_LON
#define IDC_MAIN_BTN_CANNED_MESSAGES
Map whose contents are also saved to a file.
Dialog allowing the user to change certain UI text elements on the client.
afx_msg void OnBnClickedPing()
Click handler for the Ping button.
afx_msg LRESULT OnEventFmiDisabled(WPARAM, LPARAM)
Set FMI as disabled.
Modal dialog allowing the user to select a file to transfer to the client.
afx_msg void OnToolsIfta()
Handler for the Tools > IFTA.
#define IDC_MAIN_BTN_ETA_MODE
afx_msg void OnBnClickedChangeBaudRate()
Handler for the Change Baud Rate button.
unsigned char uint8
8-bit unsigned integer
afx_msg void OnHelpAbout()
Opens the About Dialog box.
afx_msg LRESULT OnEventOpenTextMsgError(WPARAM, LPARAM aEventDataPtr)
Handler for the Server to Client Text Message Error event from Com.
BOOL selectComPort()
Show the Select Comm Port dialog.
afx_msg LRESULT OnEventBaudRateSynchronizing(WPARAM, LPARAM)
Structure containing details for a text message status from the client.
#define ID_8HOURRULE_ENABLE
#define IDC_MAIN_TXT_ETA_LON
Modeless dialog allowing the user to view ping status and send a ping.
#define IDC_MAIN_BTN_SPEED_LIMIT_ALERTS
void initProductNames()
Initialize the list of product names.
Modal pop up dialog displaying a client to server dashcam notification.
afx_msg LRESULT OnEventTxtMsgFromClient(WPARAM, LPARAM aEventDataPtr)
Handler for the Text Message Received event from Com.
afx_msg LRESULT OnEventDeleteTextMessageStatus(WPARAM aEventData, LPARAM)
Handler for the Delete Text Message Status event from Com.
#define IDC_MAIN_BTN_FILE_TRANS
afx_msg void OnBnClickedMsgStatus()
Click handler for the Message Status button.
Form for sending A617 sensor popups to the device.
#define IDC_MAIN_TXT_SW_VERSION
#define IDS_HOS_AUTO_STATUS_UPDATES_TITLE
afx_msg LRESULT OnEventBaudRateSynchronized(WPARAM, LPARAM)
afx_msg void OnToolsMapViewer()
Handler for the Tools > Map Viewer action.
#define WM_EVENT(_event)
Translation from an application event to the corresponding Windows message.
afx_msg void OnBnClickedEnable()
Click handler for the Send Enable button.
afx_msg void OnBnClickedETAMode()
Click handler for the ETA Mode button.
TimerIdType
Timer ID values used in the application.
#define IDD_CANNED_TXT_MSG
#define IDD_FMI_PC_APP_DIALOG
Structure containing details for a text message ACK from the client.
afx_msg LRESULT OnEventPvtReceived(WPARAM, LPARAM)
Handler for the PVT Data Received event from Com.
#define MAIN_ETA_TIMER_INTERVAL
Interval between automatic ETA requests, in milliseconds.
afx_msg void OnBnClickedAutoETA()
Event handler for Auto ETA Request check box.
static void tick()
Timer tick.
afx_msg void OnFileRebootDevice()
Handler for the File > Reboot Device.
#define ID_TOOLS_FILECONVERTER
afx_msg void OnBnClickedOk()
Click handler for the OK button. Close the app.
#define IDC_MAIN_EDIT_FMI_DATA
void initStopList()
Initialize the stop list.
#define IDC_MAIN_BTN_WAYPOINTS
#define IDC_MAIN_BTN_SEND_TXT_MSG
afx_msg void OnBnClickedGpiQuery()
Click handler for the GPI Query button.
#define IDC_MAIN_LBL_ETA_DISTANCE
~CFmiPcAppDlg()
Destructor.
afx_msg void OnBnClickedSafeMode()
Click handler for the FMI Safe Mode button.
afx_msg LRESULT OnEventDashcamIncidentFileNtfctnFromClient(WPARAM, LPARAM)
Handler for the Dashcam Incident File Notification Received event from Com.
Modal dialog allowing the user to request the status of a server to client text message.
#define IDC_MAIN_LBL_ETA_LON
Dialog allowing the user to change the auto-arrival options.
afx_msg void OnBnClickedTxt()
Click handler for the Send Text Message button.
afx_msg void OnSysCommand(UINT nID, LPARAM lParam)
Called when the user selects a command from the Control menu, or when the user selects the Maximize o...
Encapsulation of a message ID.
#define MAX_PAYLOAD_SIZE
Maximum payload size, before DLE stuffing.
#define IDS_HOS_START_TIME_OF_DAY_VALUE_LABEL
#define SAVE_CONVERTED_AOBRD_LOG
File name of the saved AOBRD driver event log.
Modal dialog allowing the user to send a text message to the client.
afx_msg LRESULT OnEventEtaReceived(WPARAM, LPARAM)
Handler for the ETA Received event from Com.
#define IDS_HOS_AUTO_STATUS_UPDATES_VALUE_UNIT
afx_msg void OnToolsHOSSetStartTimeOfDay()
#define IDD_DRIVER_ID_STATUS
#define IDC_MAIN_BTN_PING
static void post(EventId aEventId, uint32 aEventData=0, void *aEventDataPtr=NULL, BOOL handleNow=FALSE)
Posts a message to all windows that have registered to get events.
afx_msg LRESULT OnEventTxtMsgStatus(WPARAM, LPARAM)
Handler for the Text Message Status Received event from Com.
#define IDC_MAIN_TXT_ETA_TIME