18 #if( FMI_SUPPORT_A612 ) 45 initGarminPacketNames();
48 initGarminCommandNames();
50 #if( FMI_SUPPORT_A602 ) 55 #if( FMI_SUPPORT_A607 ) 57 initFmiFeatureNames();
83 int filenameLength = WideCharToMultiByte( CP_ACP, 0, mLogFilename, -1, NULL, 0, NULL, NULL );
84 char *filenameAnsi =
new char[filenameLength];
85 WideCharToMultiByte( CP_ACP, 0, mLogFilename, -1, filenameAnsi, filenameLength, NULL, NULL );
87 ifstream logFile( filenameAnsi, ios_base::in );
88 delete[] filenameAnsi;
93 std::string logLineString;
94 logFile.seekg( mLineOffset[aPacketNumber], ios_base::beg );
96 getline( logFile, logLineString );
97 logLine = logLineString.c_str();
102 if( logLine[0] ==
'T' )
103 packetTitle.Format( _T(
"TX: ") );
105 packetTitle.Format( _T(
"RX: ") );
108 while( logLine[i++] !=
'-' );
111 ASSERT( strlen( logLine+i ) > 0 );
112 ASSERT( strlen( logLine+i ) % 2 == 0 );
121 uint8 commandIdByte[2];
132 commandId = commandIdByte[0] + commandIdByte[1] * 256;
133 packetTitle.Append( getGarminCommandName( commandId ) );
140 uint8 packetIdByte[2];
154 cdtPacketId = packetIdByte[0];
155 packetTitle.Append( getCdtPacketName( cdtPacketId ) );
159 #if( FMI_SUPPORT_A602 ) 163 uint8 packetIdByte[2];
178 fmiPacketId = packetIdByte[0] + packetIdByte[1] * 256;
179 packetTitle.Append( getFmiPacketName( fmiPacketId ) );
182 #if( FMI_SUPPORT_A615 ) 186 uint8 packetIdByte[2];
201 hosartPacketId = packetIdByte[0] + packetIdByte[1] * 256;
202 packetTitle.Append( getHosartPacketName( hosartPacketId ) );
207 packetTitle.Append( _T(
"SET_TIME" ) );
210 #endif //end FMI_SUPPORT_A615 211 #endif //end FMI_SUPPORT_A602 214 packetTitle.Append( getGarminPacketName( packetId ) );
238 int filenameLength = WideCharToMultiByte( CP_ACP, 0, mLogFilename, -1, NULL, 0, NULL, NULL );
240 char *filenameAnsi =
new char[filenameLength];
241 WideCharToMultiByte( CP_ACP, 0, mLogFilename, -1, filenameAnsi, filenameLength, NULL, NULL );
242 ifstream logFile( filenameAnsi, ios_base::in );
243 delete[] filenameAnsi;
248 std::string logLineString;
254 uint8 packetChecksum;
257 int packetTimeOffset = 0;
258 logFile.seekg( mLineOffset[aPacketNumber] );
259 getline( logFile, logLineString );
260 logLine = logLineString.c_str();
261 while( logLine[i] !=
'-' )
263 packetTimeOffset = packetTimeOffset * 10 + ( logLine[i++] - 0x30 );
266 BOOL packetTimeIsMorning = mIsMorning;
267 int packetTimeHour = mLogStartHr;
268 int packetTimeMinute = mLogStartMin;
269 int packetTimeSecond = mLogStartSec;
270 int packetTimeMillis = mLogStartMillis;
271 packetTimeMillis += packetTimeOffset % 1000;
272 if( packetTimeMillis > 999 )
274 packetTimeMillis -= 1000;
277 packetTimeSecond += ( packetTimeOffset % 60000 ) / 1000;
278 if( packetTimeSecond > 59 )
280 packetTimeSecond -= 60;
283 packetTimeMinute += ( packetTimeOffset % 3600000 ) / 60000;
284 if( packetTimeMinute > 59 )
286 packetTimeMinute -= 60;
289 packetTimeHour += ( packetTimeOffset % 43200000 ) / 3600000;
290 if( packetTimeHour >= 12 )
292 if( packetTimeHour != 12 ) packetTimeHour -= 12;
293 packetTimeIsMorning = !mIsMorning;
308 _T(
" Time:\t\t %02d:%02d:%02d.%03d "),
314 if( packetTimeIsMorning )
315 packet.Append( _T(
"AM\r\n") );
317 packet.Append( _T(
"PM\r\n") );
319 packetId = rawBytes[i++];
320 packet.AppendFormat( _T(
" Packet ID:\t 0x%02x\r\n"), packetId );
322 payloadSize = rawBytes[i++];
327 packet.AppendFormat( _T(
" Payload Size:\t %d\t(dec)\r\n"), payloadSize );
331 for(
int j = 0; j < payloadSize; j++ )
333 rawData[j] = rawBytes[i++];
336 uint8 stuffing = rawBytes[i++];
347 packetChecksum = rawBytes[i++];
370 rawByteCount =
minval( rawByteCount, i );
372 switch( packetStatus )
375 packet.Append( _T(
" WARNING: DLE stuffing error in application payload\r\n") );
378 packet.Append( _T(
" WARNING: Packet too short (truncated or bad payload size?)\r\n") );
381 packet.Append( _T(
" WARNING: Framing error at start of packet\r\n") );
384 packet.Append( _T(
" WARNING: Framing error at end of packet\r\n") );
393 uint8 forPacketId = rawData[0];
394 packet.AppendFormat( _T(
" For packet:\t 0x%02x\t%s\r\n"), forPacketId, getGarminPacketName( forPacketId ) );
400 uint8 cdtPacketId = rawData[0];
401 map<uint16, CString>::iterator it = mCdtPacketNames.find( cdtPacketId );
402 if( it != mCdtPacketNames.end() )
404 packet.AppendFormat( _T(
" CDT Packet ID:\t 0x%04x\r\n\t\t %s\r\n"), cdtPacketId, it->second );
405 packet.Append( formatCdtPacket( logLine[0] ==
'T', cdtPacketId, rawData + 1, payloadSize - 1 ) );
409 packet.AppendFormat( _T(
" CDT Packet ID:\t 0x%04x\r\n\t\t (Unknown)\r\n"), cdtPacketId );
414 #if( FMI_SUPPORT_A602 ) 417 uint16 fmiPacketId = rawData[0] + 256 * rawData[1];
418 map<uint16, CString>::iterator it = mFmiPacketNames.find( fmiPacketId );
419 if( it != mFmiPacketNames.end() )
421 packet.AppendFormat( _T(
" FMI Packet ID:\t 0x%04x\r\n\t\t %s\r\n"), fmiPacketId, it->second );
422 packet.Append( formatFmiPacket( logLine[0] ==
'T', fmiPacketId, rawData + 2, payloadSize - 2 ) );
426 packet.AppendFormat( _T(
" FMI Packet ID:\t 0x%04x\r\n\t\t (Unknown)\r\n"), fmiPacketId );
430 #if( FMI_SUPPORT_A615 ) 433 uint16 hosartPacketId = rawData[0] + 256 * rawData[1];
434 map<uint16, CString>::iterator it = mHosartPacketNames.find( hosartPacketId );
435 if( it != mHosartPacketNames.end() )
437 packet.AppendFormat( _T(
" HOSART Packet ID:\t 0x%04x\r\n\t\t %s\r\n"), hosartPacketId, it->second );
438 packet.Append( formatHosartPacket( logLine[0] ==
'T', hosartPacketId, rawData + 2, payloadSize - 2 ) );
442 packet.AppendFormat( _T(
" HOSART Packet ID:\t 0x%04x\r\n\t\t (Unknown)\r\n"), hosartPacketId );
449 memset( &time, 0,
sizeof( time ) );
450 memcpy( &time, rawData + 2,
sizeof( time ) );
451 packet.AppendFormat( _T(
" SET_TIME:\t 0x%08x - %s\r\n"), time, formatTime( time ) );
455 #endif //FMI_SUPPORT_A615 456 #endif //FMI_SUPPORT_A602 459 uint16 command = rawData[0] + 256 * rawData[1];
460 packet.AppendFormat( _T(
" Command ID:\t 0x%04x\r\n\t\t %s\r\n"), command, getGarminCommandName( command ) );
466 memset( &unitIdData, 0,
sizeof( unitIdData ) );
467 memcpy( &unitIdData, rawData,
minval( payloadSize,
sizeof( unitIdData ) ) );
468 packet.AppendFormat( _T(
" Unit ID:\t 0x%08x\r\n"), unitIdData.
unit_id );
474 memset( &dateTimeData, 0,
sizeof( dateTimeData ) );
475 memcpy( &dateTimeData, rawData,
minval( payloadSize,
sizeof( dateTimeData ) ) );
476 packet.AppendFormat( _T(
" Month:\t %d\r\n"), dateTimeData.
date.
month );
477 packet.AppendFormat( _T(
" Day:\t\t %d\r\n"), dateTimeData.
date.
day );
478 packet.AppendFormat( _T(
" Year:\t %d\r\n"), dateTimeData.
date.
year );
479 packet.AppendFormat( _T(
" Hour:\t %d\r\n"), dateTimeData.
time.
hour );
480 packet.AppendFormat( _T(
" Minute:\t %d\r\n"), dateTimeData.
time.
minute );
481 packet.AppendFormat( _T(
" Second:\t %d\r\n"), dateTimeData.
time.
second );
488 memset( &pvtData, 0,
sizeof( pvtData ) );
489 memcpy( &pvtData, rawData,
minval( payloadSize,
sizeof( pvtData ) ) );
491 packet.AppendFormat( _T(
" Altitude:\t %05.3f\r\n"), pvtData.
altitude );
492 packet.AppendFormat( _T(
" EPE:\t\t %f\r\n"), pvtData.
epe );
493 packet.AppendFormat( _T(
" EPV:\t\t %f\r\n"), pvtData.
epv );
494 packet.AppendFormat( _T(
" EPH:\t\t %f\r\n"), pvtData.
eph );
495 packet.AppendFormat( _T(
" GPS Fix:\t %d\r\n"), pvtData.
type_of_gps_fix );
496 packet.AppendFormat( _T(
" Time of Wk:\t %lf\r\n"), pvtData.
time_of_week );
499 packet.AppendFormat( _T(
" East Vel:\t %05.3f\r\n"), pvtData.
east_velocity );
500 packet.AppendFormat( _T(
" North Vel:\t %05.3f\r\n"), pvtData.
north_velocity );
501 packet.AppendFormat( _T(
" Up Vel:\t\t %05.3f\r\n"), pvtData.
up_velocity );
503 packet.AppendFormat( _T(
" Leap Secs:\t %u\r\n"), pvtData.
leap_seconds );
504 packet.AppendFormat( _T(
" Wk # days:\t %u\r\n"), pvtData.
week_number_days );
507 #if( FMI_SUPPORT_LEGACY ) 508 case ID_LEGACY_STOP_MSG:
510 legacy_stop_data_type legacyStopData;
512 memset( &legacyStopData, 0,
sizeof( legacyStopData ) );
513 memcpy( &legacyStopData, rawData,
minval( payloadSize,
sizeof( legacyStopData ) ) );
517 packet.AppendFormat( _T(
" Message:\t %s\r\n"), formatText( legacyStopData.text,
sizeof( legacyStopData.text ) ) );
520 case ID_LEGACY_TEXT_MSG:
524 memset( &message, 0,
sizeof( message ) );
525 memcpy( &message, rawData,
minval( payloadSize,
sizeof( message ) ) );
527 packet.AppendFormat( _T(
" Message:\t %s\r\n"), formatText( message,
sizeof( message ) ) );
535 char * currentString = strings +
sizeof( productIdData );
538 memset( &productIdData, 0,
sizeof( productIdData ) );
539 memset( &strings, 0,
sizeof( strings ) );
540 memcpy( &productIdData, rawData,
minval( payloadSize,
sizeof( productIdData ) ) );
543 packet.AppendFormat( _T(
" Product ID:\t 0x%04x\r\n"), productIdData.
product_id );
544 packet.AppendFormat( _T(
" SW Version:\t 0x%04x\r\n"), productIdData.
software_version );
545 while( currentString < end )
547 packet.AppendFormat( _T(
" String:\t\t %s\r\n"), CString( currentString ) );
548 currentString += strlen( currentString );
558 #if( LOG_SHOW_RAW_ASCII ) 559 packet.Append( _T(
" Raw Text:\t ") );
560 for(
int k = 0; k < rawByteCount; k++ )
562 if( k != 0 && k % 32 == 0 )
563 packet.Append( _T(
"\r\n\t\t ") );
569 isprint( rawBytes[k] ) ? rawBytes[k] :
'.' 572 packet.Append( _T(
"\r\n") );
575 packet.Append( _T(
" Raw Hex:\t") );
576 packet.Append( formatMultiLineHex( rawByteCount, rawBytes ) );
594 return aBool ? _T(
"TRUE") : _T(
"FALSE");
607 double latitudeDegrees;
611 if( latitudeDegrees < 0 )
613 text.Format( _T(
"%08.6f °S" ), latitudeDegrees * -1 );
617 text.Format( _T(
"%08.6f °N" ), latitudeDegrees );
633 double longitudeDegrees;
637 if( longitudeDegrees < 0 )
639 text.Format( _T(
"%08.6f °W" ), longitudeDegrees * -1 );
643 text.Format( _T(
" %08.6f °E" ), longitudeDegrees );
658 const uint8 * aMessageId,
665 for( i = 0; i <
minval( aMessageIdSize, 16 ); i++ )
669 text.Append( _T(
"\r\n\t\t") );
671 text.AppendFormat( _T(
" %02x"), aMessageId[i] );
693 #if( FMI_SUPPORT_A604 ) 694 memset( source, 0,
sizeof( source ) );
697 for( i = 0; i < 256 && source[i] !=
'\0'; i++ )
699 if( i != 0 && ( i % 29 ) == 0 )
701 text.Append( _T(
"\r\n\t\t ") );
703 text.AppendFormat( _T(
"%c"), source[i] );
706 for( i = 0; i < aMaxLength && aText[i] !=
'\0'; i++ )
708 if( i != 0 && ( i % 29 ) == 0 )
710 text.Append( _T(
"\r\n\t\t ") );
712 text.AppendFormat( _T(
"%c"), aText[i] );
742 CString dateString = CString( date,
sizeof( date ) );
743 CString timeString = CString( time,
sizeof( time ) );
745 text.Format( _T(
"%s %s"), dateString, timeString );
750 #if( FMI_SUPPORT_A602 ) 766 uint8 aFmiPayloadSize
771 switch( aFmiPacketId )
775 #if( FMI_SUPPORT_A607 ) 780 memset( &features, 0,
sizeof( features ) );
781 memcpy( &features, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( features ) ) );
783 packet.AppendFormat( _T(
" Feature Count:\t %u\r\n"), features.
feature_count );
792 _T(
" Feature:\t %s is %s\r\n"),
793 mFmiFeatureNames[
id],
803 memset( &productIdData, 0,
sizeof( productIdData ) );
804 memcpy( &productIdData, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( productIdData ) ) );
805 packet.AppendFormat( _T(
" Prod ID:\t 0x%04x\r\n"), productIdData.
product_id );
806 packet.AppendFormat( _T(
" Soft Ver:\t 0x%04x\r\n"), productIdData.
software_version );
815 packet.Append( _T(
" Protocols:\t") );
816 for( i = 0; i < ( aFmiPayloadSize -
sizeof( protocol ) ); i +=
sizeof( protocol ) )
818 if( i != 0 && ( i /
sizeof( protocol ) ) % 5 == 0 )
820 packet.Append( _T(
"\r\n\t\t") );
822 memset( &protocol, 0,
sizeof( protocol ) );
825 memcpy( &protocol, &aFmiPayload[i],
sizeof( protocol ) );
827 packet.AppendFormat( _T(
" %c%03d"), (
char)protocol.
tag, protocol.
data );
829 packet.Append( _T(
"\r\n") );
836 memset( &textMessageAck, 0,
sizeof( textMessageAck ) );
837 memcpy( &textMessageAck, aFmiPayload,
minval(
sizeof( textMessageAck ), aFmiPayloadSize ) );
839 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), textMessageAck.
id_size );
840 packet.AppendFormat( _T(
" ID(hex):\t%s\r\n"), formatMessageId( textMessageAck.
id, textMessageAck.
id_size ) );
841 packet.AppendFormat( _T(
" Ack Type:\t 0x%08x\r\n"), textMessageAck.
msg_ack_type );
849 memset( &textMessage, 0,
sizeof( textMessage ) );
850 memcpy( &textMessage, aFmiPayload,
minval(
sizeof( textMessage ), aFmiPayloadSize ) );
853 packet.AppendFormat( _T(
" Msg:\t\t %s\r\n"), formatText( textMessage.
text_message,
sizeof( textMessage.
text_message ) ) );
862 memset( &textMessage, 0,
sizeof( textMessage ) );
863 memcpy( &textMessage, aFmiPayload,
minval(
sizeof( textMessage ), aFmiPayloadSize ) );
866 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), textMessage.
id_size );
867 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( textMessage.
id, textMessage.
id_size ) );
868 packet.AppendFormat( _T(
" Message:\t %s\r\n"), formatText( textMessage.
text_message,
sizeof( textMessage.
text_message ) ) );
872 #if( FMI_SUPPORT_A603 ) 877 memset( &textMessage, 0,
sizeof( textMessage ) );
878 memcpy( &textMessage, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( textMessage ) ) );
881 packet.AppendFormat( _T(
" Unique ID:\t 0x%08x\r\n"), textMessage.
unique_id );
882 packet.AppendFormat( _T(
" Message:\t %s\r\n"), formatText( textMessage.
text_message,
sizeof( textMessage.
text_message ) ) );
891 memset( &receipt, 0,
sizeof( receipt ) );
892 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
894 packet.AppendFormat( _T(
" Unique ID:\t 0x%08x\r\n"), receipt.
unique_id );
899 #if( FMI_SUPPORT_A607 ) 904 memset( &textMessage, 0,
sizeof( textMessage ) );
905 memcpy( &textMessage, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( textMessage ) ) );
908 packet.AppendFormat( _T(
" Lat:\t\t 0x%08x\r\n"), textMessage.
scposn.
lat );
909 packet.AppendFormat( _T(
" Lon:\t\t 0x%08x\r\n"), textMessage.
scposn.
lon );
910 packet.AppendFormat( _T(
" Unique ID:\t 0x%08x\r\n"), textMessage.
unique_id );
911 packet.AppendFormat( _T(
" Link ID size:\t %u\r\n"), textMessage.
id_size );
912 packet.AppendFormat( _T(
" Link ID (hex):\t%s\r\n"), formatMessageId( textMessage.
id, textMessage.
id_size ) );
913 packet.AppendFormat( _T(
" Message:\t %s\r\n"), formatText( textMessage.
text_message,
sizeof( textMessage.
text_message ) ) );
918 #if( FMI_SUPPORT_A604 ) 923 memset( &cannedResponseList, 0,
sizeof( cannedResponseList ) );
924 memcpy( &cannedResponseList, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( cannedResponseList ) ) );
926 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), cannedResponseList.
id_size );
927 packet.AppendFormat( _T(
" Resp Count:\t %u\r\n"), cannedResponseList.
response_count );
928 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( cannedResponseList.
id, cannedResponseList.
id_size ) );
930 packet.Append( _T(
"\r\n Responses:\t") );
934 if( i != 0 && ( i % 2 ) == 0 )
935 packet.Append( _T(
"\r\n\t\t") );
936 packet.AppendFormat( _T(
" 0x%08x"), cannedResponseList.
response_id[i++] );
938 packet.Append( _T(
"\r\n") );
946 memset( &receipt, 0,
sizeof( receipt ) );
947 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
949 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), receipt.
id_size );
950 packet.AppendFormat( _T(
" Result code:\t %u\r\n"), receipt.
result_code );
951 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( receipt.
id, receipt.
id_size ) );
959 memset( &textMessage, 0,
sizeof( textMessage ) );
960 memcpy( &textMessage, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( textMessage ) ) );
963 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), textMessage.
id_size );
964 packet.AppendFormat( _T(
" Msg Type:\t %u\r\n"), textMessage.
message_type );
965 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( textMessage.
id, textMessage.
id_size ) );
966 packet.AppendFormat( _T(
" Message:\t %s\r\n"), formatText( textMessage.
text_message,
sizeof( textMessage.
text_message ) ) );
974 memset( &receipt, 0,
sizeof( receipt ) );
975 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
978 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), receipt.
id_size );
979 packet.AppendFormat( _T(
" Success:\t %s\r\n"), formatBoolean( receipt.
result_code ) );
980 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( receipt.
id, receipt.
id_size ) );
988 memset( &receipt, 0,
sizeof( receipt ) );
989 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
991 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), receipt.
id_size );
992 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( receipt.
id, receipt.
id_size ) );
1001 memset( &messageDeleteRequest, 0,
sizeof( messageDeleteRequest ) );
1002 memcpy( &messageDeleteRequest, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( messageDeleteRequest ) ) );
1004 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), messageDeleteRequest.
id_size );
1005 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( messageDeleteRequest.
id, messageDeleteRequest.
id_size ) );
1013 memset( &deleteResponse, 0,
sizeof( deleteResponse ) );
1014 memcpy( &deleteResponse, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( deleteResponse ) ) );
1016 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), deleteResponse.
id_size );
1017 packet.AppendFormat( _T(
" Result Code:\t %u\r\n"), deleteResponse.
result_code );
1018 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( deleteResponse.
id, deleteResponse.
id_size ) );
1027 memset( &cannedResponse, 0,
sizeof( cannedResponse ) );
1028 memcpy( &cannedResponse, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( cannedResponse ) ) );
1030 packet.AppendFormat( _T(
" Response ID:\t 0x%08x\r\n"), cannedResponse.
response_id );
1031 packet.AppendFormat( _T(
" Response Text:\t%s\r\n"), formatText( cannedResponse.
response_text,
sizeof( cannedResponse.
response_text ) ) );
1039 memset( &cannedResponseDelete, 0,
sizeof( cannedResponseDelete ) );
1040 memcpy( &cannedResponseDelete, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( cannedResponseDelete ) ) );
1042 packet.AppendFormat( _T(
" Response ID:\t 0x%08x\r\n"), cannedResponseDelete.
response_id );
1051 memset( &receipt, 0,
sizeof( receipt ) );
1052 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1054 packet.AppendFormat( _T(
" Response ID:\t 0x%08x\r\n"), receipt.
response_id );
1055 packet.AppendFormat( _T(
" Success:\t %s\r\n"), formatBoolean(receipt.
result_code) );
1063 memset( &refresh, 0,
sizeof( refresh ) );
1064 memcpy( &refresh, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( refresh ) ) );
1066 packet.AppendFormat( _T(
" Resp Count:\t %u\r\n"), refresh.
response_count );
1068 packet.AppendFormat( _T(
" Response:\t") );
1072 if( i != 0 && i % 2 == 0 ) packet.Append( _T(
"\r\n") );
1073 packet.AppendFormat( _T(
" 0x%08x") );
1075 packet.Append( _T(
"\r\n") );
1083 memset( &statusRequest, 0,
sizeof( statusRequest ) );
1084 memcpy( &statusRequest, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( statusRequest ) ) );
1086 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), statusRequest.
id_size );
1087 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( statusRequest.
id, statusRequest.
id_size ) );
1095 memset( &messageStatus, 0,
sizeof( messageStatus ) );
1096 memcpy( &messageStatus, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( messageStatus ) ) );
1098 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), messageStatus.
id_size );
1099 packet.AppendFormat( _T(
" Status Code:\t %u\r\n"), messageStatus.
status_code );
1100 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( messageStatus.
id, messageStatus.
id_size ) );
1108 memset( &message, 0,
sizeof( message ) );
1109 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
1111 packet.AppendFormat( _T(
" Msg ID:\t 0x%08x\r\n"), message.
message_id );
1112 packet.AppendFormat( _T(
" Message:\t %s\r\n"), formatText( message.
message ,
sizeof( message.
message ) ) );
1121 memset( &receipt, 0,
sizeof( receipt ) );
1122 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1124 packet.AppendFormat( _T(
" Msg ID:\t 0x%08x\r\n"), receipt.
message_id );
1125 packet.AppendFormat( _T(
" Success:\t %s\r\n"), formatBoolean( receipt.
result_code ) );
1133 memset( &deleteRequest, 0,
sizeof( deleteRequest ) );
1134 memcpy( &deleteRequest, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( deleteRequest ) ) );
1136 packet.AppendFormat( _T(
" Msg ID:\t 0x%08x\r\n"), deleteRequest.
message_id );
1145 #if( FMI_SUPPORT_A611 ) 1150 memset( &textMessage, 0,
sizeof( textMessage ) );
1151 memcpy( &textMessage, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( textMessage ) ) );
1154 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), textMessage.
id_size );
1155 packet.AppendFormat( _T(
" Msg Type:\t %u\r\n"), textMessage.
type );
1156 packet.AppendFormat( _T(
" Finished:\t%s\r\n"), formatBoolean( textMessage.
finished_flag ) );
1157 packet.AppendFormat( _T(
" Seq Num:\t%u\r\n"), textMessage.
sequence_number );
1158 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( textMessage.
id, textMessage.
id_size ) );
1159 packet.AppendFormat( _T(
" Msg Data:\t %s\r\n"), formatText( textMessage.
text_message,
sizeof( textMessage.
text_message ) ) );
1167 memset( &receipt, 0,
sizeof( receipt ) );
1168 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1171 packet.AppendFormat( _T(
" ID Size:\t %u\r\n"), receipt.
id_size );
1172 packet.AppendFormat( _T(
" Result Code:\t %u\r\n"), receipt.
result_code );
1173 packet.AppendFormat( _T(
" Finished:\t%s\r\n"), formatBoolean( receipt.
finished_flag ) );
1174 packet.AppendFormat( _T(
" Seq Num:\t%u\r\n"), receipt.
sequence_number );
1175 packet.AppendFormat( _T(
" ID (hex):\t%s\r\n"), formatMessageId( receipt.
id, receipt.
id_size ) );
1184 memset( &stop, 0,
sizeof( stop ) );
1185 memcpy( &stop, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( stop ) ) );
1190 packet.AppendFormat( _T(
" Text:\t\t %s\r\n"), formatText( stop.
text,
sizeof( stop.
text ) ) );
1194 #if( FMI_SUPPORT_A603 ) 1199 memset( &stop, 0,
sizeof( stop ) );
1200 memcpy( &stop, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( stop ) ) );
1205 packet.AppendFormat( _T(
" Unique ID:\t 0x%08x\r\n"), stop.
unique_id );
1206 packet.AppendFormat( _T(
" Text:\t\t %s\r\n"), formatText( stop.
text,
sizeof( stop.
text ) ) );
1211 #if( FMI_SUPPORT_A604 ) 1221 #if( FMI_SUPPORT_A607 ) 1226 memset( &waypointData, 0,
sizeof( waypointData ) );
1227 memcpy( &waypointData, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( waypointData ) ) );
1229 packet.AppendFormat( _T(
" Unique ID:\t 0x%04x\r\n"), waypointData.
unique_id );
1230 packet.AppendFormat( _T(
" Symbol:\t 0x%04x\r\n"), waypointData.
symbol );
1231 packet.AppendFormat( _T(
" Lat:\t\t 0x%08x\r\n"), waypointData.
posn.
lat );
1232 packet.AppendFormat( _T(
" Lon:\t\t 0x%08x\r\n"), waypointData.
posn.
lon );
1233 packet.AppendFormat( _T(
" Cat:\t\t 0x%04x\r\n"), waypointData.
cat );
1234 packet.AppendFormat( _T(
" Name:\t\t %s\r\n"), formatText( waypointData.
name,
sizeof( waypointData.
name ) ) );
1235 packet.AppendFormat( _T(
" Comment: \t %s\r\n"), formatText( waypointData.
comment,
sizeof( waypointData.
comment ) ) );
1243 memset( &waypointReceipt, 0,
sizeof( waypointReceipt ) );
1244 memcpy( &waypointReceipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( waypointReceipt ) ) );
1246 packet.AppendFormat( _T(
" Unique ID:\t 0x%04x\r\n"), waypointReceipt.
unique_id );
1247 packet.AppendFormat( _T(
" Result Code:\t %u\r\n"), waypointReceipt.
result_code );
1256 memset( &waypointId, 0,
sizeof( waypointId ) );
1257 memcpy( &waypointId, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( waypointId ) ) );
1259 packet.AppendFormat( _T(
" Unique ID:\t 0x%04x\r\n"), waypointId );
1267 memset( &waypointDeleted, 0,
sizeof( waypointDeleted ) );
1268 memcpy( &waypointDeleted, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( waypointDeleted ) ) );
1270 packet.AppendFormat( _T(
" Unique ID:\t 0x%04x\r\n"), waypointDeleted.
unique_id );
1271 packet.AppendFormat( _T(
" Result Code:\t %u\r\n"), waypointDeleted.
result_code );
1278 uint16 waypointCategories;
1280 memset( &waypointCategories, 0,
sizeof( waypointCategories ) );
1281 memcpy( &waypointCategories, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( waypointCategories ) ) );
1283 packet.AppendFormat( _T(
" Category:\t 0x%04x\r\n"), waypointCategories );
1291 memset( &receipt, 0,
sizeof( receipt ) );
1292 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1294 packet.AppendFormat( _T(
" Category:\t 0x%04x\r\n"), receipt.
cat_id );
1295 packet.AppendFormat( _T(
" Count:\t\t %u\r\n"), receipt.
count );
1303 memset( &receipt, 0,
sizeof( receipt ) );
1304 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1306 packet.AppendFormat( _T(
" Category:\t %u\r\n"), receipt.
id );
1307 packet.AppendFormat( _T(
" Name: \t\t %s\r\n"), formatText( receipt.
name,
sizeof( receipt.
name ) ) );
1315 memset( &receipt, 0,
sizeof( receipt ) );
1316 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1318 packet.AppendFormat( _T(
" Category:\t %u\r\n"), receipt.
id );
1319 packet.AppendFormat( _T(
" Result Code:\t %u\r\n"), receipt.
result_code );
1325 #if( FMI_SUPPORT_A603 ) 1334 memset( &etaData, 0,
sizeof( etaData ) );
1335 memcpy( &etaData, aFmiPayload,
minval(
sizeof( etaData ), aFmiPayloadSize ) );
1337 packet.AppendFormat( _T(
" Unique ID:\t 0x%08x\r\n"), etaData.
unique_id );
1338 packet.AppendFormat( _T(
" ETA time:\t 0x%08x\r\n"), etaData.
eta_time );
1349 memset( &receipt, 0,
sizeof( receipt ) );
1350 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1352 packet.AppendFormat( _T(
" Unique ID:\t 0x%08x\r\n"), receipt.
unique_id );
1361 memset( &stopData, 0,
sizeof( stopData ) );
1362 memcpy( &stopData, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( stopData ) ) );
1364 packet.AppendFormat( _T(
" Unique ID:\t 0x%08x\r\n"), stopData.
unique_id );
1365 packet.AppendFormat( _T(
" Status:\t\t %u\r\n"), stopData.
stop_status );
1373 memset( &receipt, 0,
sizeof( receipt ) );
1374 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1375 packet.AppendFormat( _T(
" Unique ID:\t 0x%08x\r\n"), receipt.
unique_id );
1383 memset( &autoArrival, 0,
sizeof( autoArrival ) );
1384 memcpy( &autoArrival, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( autoArrival ) ) );
1386 packet.AppendFormat( _T(
" Stop Time:\t 0x%08x\r\n"), autoArrival.
stop_time );
1387 packet.AppendFormat( _T(
" Stop Dist:\t 0x%08x\r\n"), autoArrival.
stop_distance );
1395 memset( &delData, 0,
sizeof( delData ) );
1396 memcpy( &delData, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( delData ) ) );
1398 packet.AppendFormat( _T(
" Data Type:\t %u\r\n"), delData.
data_type );
1403 #if( FMI_SUPPORT_A604 ) 1408 memset( &uiText, 0,
sizeof( uiText ) );
1409 memcpy( &uiText, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( uiText ) ) );
1411 packet.AppendFormat( _T(
" Element ID:\t %u\r\n"), uiText.
text_element_id );
1412 packet.AppendFormat( _T(
" New Text:\t %s\r\n"), formatText( uiText.
new_text,
sizeof( uiText.
new_text ) ) );
1419 memset( &receipt, 0,
sizeof( receipt ) );
1420 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1421 packet.AppendFormat( _T(
" Element ID:\t %u\r\n"), receipt.
text_element_id );
1422 packet.AppendFormat( _T(
" Success:\t %s\r\n"), receipt.
result_code ? _T(
"TRUE") : _T(
"FALSE") );
1431 memset( &throttle, 0,
sizeof( throttle ) );
1432 memcpy( &throttle, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( throttle ) ) );
1436 _T(
" Throttle ID:\t 0x%04x (%s)\r\n"),
1438 ( mFmiPacketNames.find( throttle.
packet_id ) != mFmiPacketNames.end() )
1440 : _T(
"Unknown FMI Protocol")
1443 packet.Append( _T(
" New State:\t ") );
1447 packet.Append( _T(
"Enabled\r\n") );
1450 packet.Append( _T(
"Disabled\r\n") );
1453 packet.Append( _T(
"Error\r\n") );
1456 packet.Append( _T(
"Unknown\r\n") );
1463 #if( FMI_SUPPORT_A605 ) 1473 memset( &list, 0,
sizeof( list ) );
1474 memcpy( &list, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( list ) ) );
1476 packet.AppendFormat( _T(
" Count:\t\t %u\r\n"), list.
response_count );
1482 _T(
" Protocol:\t %s is %s\r\n"),
1485 : _T(
"Unknown FMI protocol"),
1493 #if( FMI_SUPPORT_A604 ) 1507 memset( &fileInfo, 0,
sizeof( fileInfo ) );
1508 memcpy( &fileInfo, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( fileInfo ) ) );
1510 packet.AppendFormat( _T(
" File Size:\t %u\r\n"), fileInfo.
file_size );
1512 packet.AppendFormat( _T(
" Type:\t\t %u\r\n"), fileInfo.
file_type );
1521 memset( &fileData, 0,
sizeof( fileData ) );
1522 memcpy( &fileData, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( fileData ) ) );
1523 packet.AppendFormat( _T(
" Offset:\t\t %u\r\n"), fileData.
offset );
1524 packet.AppendFormat( _T(
" Data Length:\t %u\r\n"), fileData.
data_length );
1527 packet.Append( _T(
" Data (hex):\t") );
1528 packet.Append( formatMultiLineHex( length, fileData.
file_data ) );
1529 packet.Append( _T(
"\r\n") );
1537 memset( &fileEndData, 0,
sizeof( fileEndData ) );
1538 memcpy( &fileEndData, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( fileEndData ) ) );
1539 packet.AppendFormat( _T(
" CRC:\t\t 0x%08x\r\n"), fileEndData.
crc );
1546 uint8 result_code = 0;
1551 memset( &receipt, 0,
sizeof( receipt ) );
1552 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1554 packet.AppendFormat( _T(
" File Type:\t %u\r\n"), receipt.
file_type );
1562 memset( &receipt, 0,
sizeof( receipt ) );
1563 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1570 switch( result_code )
1574 packet.AppendFormat( _T(
" Result Code:\t %u - Success\r\n"), result_code );
1579 packet.AppendFormat( _T(
" Result Code:\t %u - CRC Error\r\n"), result_code );
1584 packet.AppendFormat( _T(
" Result Code:\t %u - Low Memory\r\n"), result_code );
1589 packet.AppendFormat( _T(
" Result Code:\t %u - Invalid File\r\n"), result_code );
1594 packet.AppendFormat( _T(
" Result Code:\t %u - No Transfer\r\n"), result_code );
1599 packet.AppendFormat( _T(
" Result Code:\t %u - Severe Error\r\n"), result_code );
1604 packet.AppendFormat( _T(
" Result Code:\t %u - Invalid File Type\r\n"), result_code );
1609 packet.AppendFormat( _T(
" Result Code:\t %u - Invalid GPI File\r\n"), result_code );
1614 packet.AppendFormat( _T(
" Result Code:\t %u - Error on Opening\r\n"), result_code );
1619 packet.AppendFormat( _T(
" Result Code:\t %u - Error on Closing\r\n"), result_code );
1624 packet.AppendFormat( _T(
" Result Code:\t %u - Finalizing Error\r\n"), result_code );
1629 packet.AppendFormat( _T(
" Result Code:\t %u - Result Not Processed\r\n"), result_code );
1634 packet.AppendFormat( _T(
" Result Code:\t %u - GZIP Error\r\n"), result_code );
1639 packet.AppendFormat( _T(
" Result Code:\t %u - Busy\r\n"), result_code );
1644 packet.AppendFormat( _T(
"Result Code:\t %u - Unrecognized\r\n"), result_code );
1653 memset( &receipt, 0,
sizeof( receipt ) );
1654 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1655 packet.AppendFormat( _T(
" Offset:\t\t %u\r\n"), receipt.
offset );
1656 packet.AppendFormat( _T(
" Next Offset:\t %u\r\n"), receipt.
next_offset );
1668 memset( &item, 0,
sizeof( item ) );
1669 memcpy( &item, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( item ) ) );
1671 packet.AppendFormat( _T(
" ID:\t\t 0x%08x\r\n"), item.
status_id );
1672 packet.AppendFormat( _T(
" Status:\t\t %s\r\n"), formatText( item.
status,
sizeof( item.
status ) ) );
1680 memset( &item, 0,
sizeof( item ) );
1681 memcpy( &item, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( item ) ) );
1683 packet.AppendFormat( _T(
" ID:\t\t 0x%08x\r\n"), item.
status_id );
1692 memset( &receipt, 0,
sizeof( receipt ) );
1693 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1695 packet.AppendFormat( _T(
" ID:\t\t 0x%08x\r\n"), receipt.
status_id );
1696 packet.AppendFormat( _T(
" Success:\t %s\r\n"), formatBoolean( receipt.
result_code ) );
1706 #if( FMI_SUPPORT_A607 ) 1710 memset( &request, 0,
sizeof( request ) );
1711 memcpy( &request, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( request ) ) );
1713 packet.AppendFormat( _T(
" Driver Index:\t %u\r\n"), request.
driver_idx );
1722 memset( &driverId, 0,
sizeof( driverId ) );
1723 memcpy( &driverId, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( driverId ) ) );
1725 packet.AppendFormat( _T(
" Change ID:\t 0x%08x\r\n"), driverId.
status_change_id );
1726 packet.AppendFormat( _T(
" Change Time:\t 0x%08x\r\n"), driverId.
status_change_time );
1727 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n"), formatText( driverId.
driver_id,
sizeof( driverId.
driver_id ) ) );
1735 memset( &receipt, 0,
sizeof( receipt ) );
1736 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1738 packet.AppendFormat( _T(
" Change ID:\t 0x%08x\r\n"), receipt.
status_change_id );
1739 packet.AppendFormat( _T(
" Success:\t %s\r\n"), formatBoolean( receipt.
result_code ) );
1740 packet.AppendFormat( _T(
" Driver Index:\t %u\r\n"), receipt.
driver_idx );
1744 #if( FMI_SUPPORT_A607 ) 1749 memset( &driverId, 0,
sizeof( driverId ) );
1750 memcpy( &driverId, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( driverId ) ) );
1752 packet.AppendFormat( _T(
" Change ID:\t 0x%08x\r\n"), driverId.
status_change_id );
1753 packet.AppendFormat( _T(
" Change Time:\t 0x%08x\r\n"), driverId.
status_change_time );
1754 packet.AppendFormat( _T(
" Driver Index:\t %u\r\n"), driverId.
driver_idx );
1755 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n"), formatText( driverId.
driver_id,
sizeof( driverId.
driver_id ) ) );
1759 packet.AppendFormat( _T(
" Password:\t %s\r\n"), formatText( driverId.
password,
sizeof( driverId.
password ) ) );
1767 #if( FMI_SUPPORT_A607 ) 1771 memset( &request, 0,
sizeof( request ) );
1772 memcpy( &request, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( request ) ) );
1774 packet.AppendFormat( _T(
" Driver Index:\t %u\r\n"), request.
driver_idx );
1783 memset( &status, 0,
sizeof( status ) );
1784 memcpy( &status, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( status ) ) );
1786 packet.AppendFormat( _T(
" Change ID:\t 0x%08x\r\n"), status.
status_change_id );
1788 packet.AppendFormat( _T(
" Status ID:\t 0x%08x\r\n"), status.
driver_status );
1796 memset( &receipt, 0,
sizeof( receipt ) );
1797 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1799 packet.AppendFormat( _T(
" Change ID:\t 0x%08x\r\n"), receipt.
status_change_id );
1800 packet.AppendFormat( _T(
" Success:\t %s\r\n"), formatBoolean( receipt.
result_code ) );
1801 packet.AppendFormat( _T(
" Driver Index:\t %u\r\n"), receipt.
driver_idx );
1804 #endif //FMI_SUPPORT_A604 1806 #if( FMI_SUPPORT_A607 ) 1811 memset( &status, 0,
sizeof( status ) );
1812 memcpy( &status, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( status ) ) );
1814 packet.AppendFormat( _T(
" Change ID:\t 0x%08x\r\n"), status.
status_change_id );
1816 packet.AppendFormat( _T(
" Driver Index:\t %u\r\n"), status.
driver_idx );
1817 packet.AppendFormat( _T(
" Status ID:\t 0x%08x\r\n"), status.
driver_status );
1822 #if( FMI_SUPPORT_A606 ) 1827 memset( &request, 0,
sizeof( request ) );
1828 memcpy( &request, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( request ) ) );
1830 if( request.
speed < 0 )
1832 packet.AppendFormat( _T(
" FMI Safe Mode:\tTurn Off\r\n") );
1836 packet.AppendFormat( _T(
" Speed(m/s):\tTurn On\r\n") );
1838 packet.AppendFormat( _T(
" Speed(m/s):\t%f\r\n"),request.
speed );
1845 memset( &receipt, 0,
sizeof( receipt ) );
1846 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1848 packet.AppendFormat( _T(
" Success:\t %s\r\n"), formatBoolean( receipt.
result_code ) );
1853 #if( FMI_SUPPORT_A608 ) 1858 memset( &data, 0,
sizeof( data ) );
1859 memcpy( &data, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( data ) ) );
1865 mode.Format( _T(
"Car" ) );
1868 mode.Format( _T(
"Off") );
1871 mode.Format( _T(
"Truck") );
1874 mode.Format( _T(
"Unknown") );
1878 packet.AppendFormat( _T(
" Mode:\t\t %d - %s\r\n"), data.
mode, mode );
1879 packet.AppendFormat( _T(
" Time Over:\t%d(secs)\r\n"), data.
time_over );
1880 packet.AppendFormat( _T(
" Time Under:\t%d(secs)\r\n"), data.
time_under );
1881 packet.AppendFormat( _T(
" Alert User:\t%s\r\n"), formatBoolean( data.
alert_user ) );
1890 memset( &receipt, 0,
sizeof( receipt ) );
1891 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1893 CString result_code;
1897 result_code.Format( _T(
"Success") );
1900 result_code.Format( _T(
"Error") );
1903 result_code.Format( _T(
"Unsupported" ) );
1906 result_code.Format( _T(
"Unknown") );
1910 packet.AppendFormat( _T(
" Result Code:\t %d - %s\r\n"), receipt.
result_code, result_code );
1918 memset( &alert, 0,
sizeof( alert ) );
1919 memcpy( &alert, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( alert ) ) );
1925 category.Format( _T(
"Begin") );
1928 category.Format( _T(
"Change") );
1931 category.Format( _T(
"End") );
1934 category.Format( _T(
"Error") );
1937 category.Format( _T(
"Invalid") );
1940 category.Format( _T(
"Unknown") );
1944 packet.AppendFormat( _T(
" Category:\t %d - %s\r\n"), alert.
category, category );
1945 packet.AppendFormat( _T(
" Lat:\t\t 0x%08x - %s\r\n"), alert.
posn.
lat, formatLatitude( alert.
posn.
lat ) );
1946 packet.AppendFormat( _T(
" Lon:\t\t 0x%08x - %s\r\n"), alert.
posn.
lon, formatLongitude( alert.
posn.
lon ) );
1947 packet.AppendFormat( _T(
" Timestamp:\t 0x%08x - %s\r\n"), alert.
timestamp, formatTime( alert.
timestamp ) );
1957 memset( &receipt, 0,
sizeof( receipt ) );
1958 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
1960 packet.AppendFormat( _T(
" Timestamp:\t 0x%08x - %s\r\n"), receipt.
timestamp, formatTime( receipt.
timestamp ) );
1965 #if( FMI_SUPPORT_A610 ) 1969 memset( &data, 0,
sizeof( data) );
1970 memcpy( &data, aFmiPayload,
minval(
sizeof( data), aFmiPayloadSize ) );
1972 packet.AppendFormat( _T(
" Odometer Value:\t%d(mi)\r\n"), data.
odometer_value );
1978 memset( &data, 0,
sizeof( data ) );
1979 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
1981 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n"), CString( data.
driver_id ) );
1982 packet.AppendFormat( _T(
" Driver Password:%s\r\n"), CString( data.
driver_password ) );
1989 memset( &receipt, 0,
sizeof( receipt ) );
1990 memcpy( &receipt, aFmiPayload,
minval(
sizeof( receipt ), aFmiPayloadSize ) );
1992 packet.AppendFormat( _T(
" UI Timestamp:\t 0x%08x - %s\r\n"), receipt.
ui_timestamp, formatTime( receipt.
ui_timestamp ) );
1993 packet.AppendFormat( _T(
" Result Code:\t %d\r\n"), receipt.
result_code );
1999 memset( &data, 0,
sizeof( data ) );
2000 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2002 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n"), CString( data.
driver_id ) );
2009 memset( &receipt, 0,
sizeof( receipt ) );
2010 memcpy( &receipt, aFmiPayload,
minval(
sizeof( receipt ), aFmiPayloadSize ) );
2012 packet.AppendFormat( _T(
" PIN:\t\t %d\r\n"), receipt.
pin );
2013 packet.AppendFormat( _T(
" First Name:\t %s\r\n"), CString( receipt.
first_name ) );
2014 packet.AppendFormat( _T(
" Last Name:\t %s\r\n"), CString( receipt.
last_name ) );
2015 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n"), CString( receipt.
driver_id ) );
2016 packet.AppendFormat( _T(
" Carrier Name:\t %s\r\n"), CString( receipt.
carrier_name ) );
2017 packet.AppendFormat( _T(
" Carrier ID:\t %s\r\n"), CString( receipt.
carrier_id ) );
2018 packet.AppendFormat( _T(
" Long Term Rule Set:\t %d\r\n"), receipt.
long_term_rule_set );
2019 packet.AppendFormat( _T(
" Time Zone:\t %d\r\n"), receipt.
time_zone );
2020 packet.AppendFormat( _T(
" Status:\t\t %d\r\n"), receipt.
status );
2021 packet.AppendFormat( _T(
" Result Code:\t %d\r\n"), receipt.
result_code );
2027 memset( &receipt, 0,
sizeof( receipt ) );
2028 memcpy( &receipt, aFmiPayload,
minval(
sizeof( receipt ), aFmiPayloadSize ) );
2030 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( receipt.
driver_id ) );
2034 packet.AppendFormat( _T(
" Result Code:\t %d - Accepted\r\n"), receipt.
result_code );
2037 packet.AppendFormat( _T(
" Result Code:\t %d - Failed\r\n"), receipt.
result_code );
2040 packet.AppendFormat( _T(
" Result Code:\t %d - Declined\r\n"), receipt.
result_code );
2043 packet.AppendFormat( _T(
" Result Code:\t %d - Not Ready\r\n"), receipt.
result_code );
2046 packet.AppendFormat( _T(
" Result Code:\t %d - No Data\r\n"), receipt.
result_code );
2049 packet.AppendFormat( _T(
" Result Code:\t %d - Storage Error\r\n"), receipt.
result_code );
2052 packet.AppendFormat( _T(
" Result Code:\t %d - Result Error\r\n"), receipt.
result_code );
2055 packet.AppendFormat( _T(
" Result Code:\t %d - Interface Error\r\n"), receipt.
result_code );
2063 memset( &data, 0,
sizeof( data ) );
2064 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2066 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( data.
driver_id ) );
2072 memset( &receipt, 0,
sizeof( receipt ) );
2073 memcpy( &receipt, aFmiPayload,
minval(
sizeof( receipt ), aFmiPayloadSize ) );
2075 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( receipt.
driver_id ) );
2076 packet.AppendFormat( _T(
" Result Code:\t %d\r\n"), receipt.
result_code );
2083 memset( &data, 0,
sizeof( data ) );
2084 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2086 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( data.
driver_id ) );
2092 packet.AppendFormat( _T(
" Result Code:\t %d - No Errors\r\n" ), data.
result_code );
2097 packet.AppendFormat( _T(
" Result Code:\t %d - Wrong ID Server Response\r\n" ), data.
result_code );
2102 packet.AppendFormat( _T(
" Result Code:\t %d - Invalid ID Server Response\r\n" ), data.
result_code );
2107 packet.AppendFormat( _T(
" Result Code:\t %d - Unexpected Response Packet\r\n" ), data.
result_code );
2112 packet.AppendFormat( _T(
" Result Code:\t %d - Shipment DB Error\r\n" ), data.
result_code );
2121 memset( &data, 0,
sizeof( data ) );
2122 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2124 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( data.
driver_id ) );
2130 memset( &data, 0,
sizeof( data ) );
2131 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2133 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( data.
driver_id ) );
2139 packet.AppendFormat( _T(
" Result Code:\t %d - Next Shipment\r\n" ), data.
server_result_code );
2143 packet.AppendFormat( _T(
" Shipper Name:\t %s\r\n" ), CString( data.
server_shipper_name ) );
2144 packet.AppendFormat( _T(
" Document Num:\t %s\r\n" ), CString( data.
server_doc_number ) );
2145 packet.AppendFormat( _T(
" Commodity:\t %s\r\n" ), CString( data.
server_commodity ) );
2150 packet.AppendFormat( _T(
" Result Code:\t %d - No Shipments\r\n" ), data.
server_result_code );
2155 packet.AppendFormat( _T(
" Result Code:\t %d - Unknown Driver\r\n" ), data.
server_result_code );
2160 packet.AppendFormat( _T(
" Result Code:\t %d - Unsupported\r\n" ), data.
server_result_code );
2169 memset( &data, 0,
sizeof( data ) );
2170 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2172 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( data.
driver_id ) );
2178 packet.AppendFormat( _T(
" Result Code:\t %d - No Errors\r\n" ), data.
result_code );
2183 packet.AppendFormat( _T(
" Result Code:\t %d - Wrong ID Server Response\r\n" ), data.
result_code );
2188 packet.AppendFormat( _T(
" Result Code:\t %d - Invalid ID Server Response\r\n" ), data.
result_code );
2193 packet.AppendFormat( _T(
" Result Code:\t %d - Unexpected Response Packet\r\n" ), data.
result_code );
2198 packet.AppendFormat( _T(
" Result Code:\t %d - Shipment DB Error\r\n" ), data.
result_code );
2207 memset( &data, 0,
sizeof( data ) );
2208 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2210 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( data.
driver_id ) );
2216 memset( &data, 0,
sizeof( data ) );
2217 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2219 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( data.
driver_id ) );
2225 packet.AppendFormat( _T(
" Result Code:\t %d - Next Annotation\r\n" ), data.
server_result_code );
2234 packet.AppendFormat( _T(
" Result Code:\t %d - No Annotations\r\n" ), data.
server_result_code );
2239 packet.AppendFormat( _T(
" Result Code:\t %d - Unknown Driver\r\n" ), data.
server_result_code );
2244 packet.AppendFormat( _T(
" Result Code:\t %d - Unsupported\r\n" ), data.
server_result_code );
2253 memset( &data, 0,
sizeof( data ) );
2254 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2256 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( data.
driver_id ) );
2262 packet.AppendFormat( _T(
" Result Code:\t %d - No Errors\r\n" ), data.
result_code );
2267 packet.AppendFormat( _T(
" Result Code:\t %d - Wrong ID Server Response\r\n" ), data.
result_code );
2272 packet.AppendFormat( _T(
" Result Code:\t %d - Invalid ID Server Response\r\n" ), data.
result_code );
2277 packet.AppendFormat( _T(
" Result Code:\t %d - Unexpected Response Packet\r\n" ), data.
result_code );
2282 packet.AppendFormat( _T(
" Result Code:\t %d - Annotation DB Error\r\n" ), data.
result_code );
2290 #if( FMI_SUPPORT_A615 ) 2294 memset( &data, 0,
sizeof( data ) );
2295 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2297 packet.AppendFormat( _T(
" Start Time:\t 0x%08x - %s\r\n" ), data.
start_time, formatTime( data.
start_time ) );
2298 packet.AppendFormat( _T(
" End Time:\t 0x%08x - %s\r\n" ), data.
end_time, formatTime( data.
end_time ) );
2305 memset( &data, 0,
sizeof( data ) );
2306 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2308 appendIFTADataModResultCode( packet, data.
result_code );
2315 memset( &data, 0,
sizeof( data ) );
2316 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2318 packet.AppendFormat( _T(
" Start Time:\t 0x%08x - %s\r\n" ), data.
start_time, formatTime( data.
start_time ) );
2319 packet.AppendFormat( _T(
" End Time:\t 0x%08x - %s\r\n" ), data.
end_time, formatTime( data.
end_time ) );
2326 memset( &data, 0,
sizeof( data ) );
2327 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2329 appendIFTADataModResultCode( packet, data.
result_code );
2337 memset( &receipt, 0,
sizeof( receipt ) );
2338 memcpy( &receipt, aFmiPayload,
minval(
sizeof( receipt ), aFmiPayloadSize ) );
2340 packet.AppendFormat( _T(
" First Name:\t %s\r\n" ), CString( receipt.
first_name ) );
2341 packet.AppendFormat( _T(
" Last Name:\t %s\r\n" ), CString( receipt.
last_name ) );
2342 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( receipt.
driver_id ) );
2343 packet.AppendFormat( _T(
" Carrier Name:\t %s\r\n" ), CString( receipt.
carrier_name ) );
2344 packet.AppendFormat( _T(
" Carrier ID:\t %s\r\n" ), CString( receipt.
carrier_id ) );
2345 packet.AppendFormat( _T(
" Long Term Rule Set:\t %d\r\n" ), receipt.
long_term_rule_set );
2346 packet.AppendFormat( _T(
" Load Type Rule Set:\t %d\r\n" ), receipt.
load_type_rule_set );
2347 packet.AppendFormat( _T(
" Time Zone:\t %d\r\n" ), receipt.
time_zone );
2349 packet.AppendFormat( _T(
" Status:\t\t %d\r\n" ), receipt.
status );
2350 packet.AppendFormat( _T(
" Result Code:\t %d\r\n" ), receipt.
result_code );
2356 memset( &data, 0,
sizeof( data ) );
2357 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2359 packet.AppendFormat( _T(
" Enable:\t\t %d\r\n" ), data.
enable );
2366 memset( &data, 0,
sizeof( data ) );
2367 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2369 packet.AppendFormat( _T(
" Enable:\t\t %d\r\n" ), data.
enable );
2375 packet.Append( _T(
" Result Type:\t OK\r\n" ) );
2380 packet.Append( _T(
" Result Type:\t Threshold set to Minimum\r\n" ) );
2385 packet.Append( _T(
" Result Type:\t Threshold set to Maximum\r\n" ) );
2390 packet.Append( _T(
" Result Type:\t Failure\r\n" ) );
2400 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2402 packet.AppendFormat( _T(
" Enable:\t\t %s\r\n" ), data ? _T(
"true" ) : _T(
"false" ) );
2405 #endif // end FMI_SUPPORT_A615 2407 #if( FMI_SUPPORT_A612 ) 2413 memcpy( &form_id, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( form_id ) ) );
2415 packet.AppendFormat( _T(
" Form ID:\t %d\r\n" ), form_id );
2423 memset( &message, 0,
sizeof( message ) );
2424 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2426 packet.AppendFormat( _T(
" Form ID:\t %d\r\n" ), message.
form_id );
2435 memset( &message, 0,
sizeof( message ) );
2436 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2438 packet.AppendFormat( _T(
" Form ID:\t %d\r\n" ), message.
form_id );
2439 packet.AppendFormat( _T(
" To Position:\t %d\r\n" ), message.
new_position );
2448 memset( &message, 0,
sizeof( message ) );
2449 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2451 packet.AppendFormat( _T(
" Form ID:\t %d\r\n" ), message.
form_id );
2452 packet.AppendFormat( _T(
" Position:\t %d\r\n" ), message.
current_position );
2459 #if( FMI_SUPPORT_A621 ) 2464 memcpy( &form_id, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( form_id ) ) );
2466 packet.AppendFormat( _T(
" Form ID:\t %d\r\n" ), form_id );
2474 memset( &message, 0,
sizeof( message ) );
2475 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2477 packet.AppendFormat( _T(
" Form ID:\t %d\r\n" ), message.
form_id );
2485 #if( FMI_SUPPORT_A614 ) 2490 memset( &message, 0,
sizeof( message ) );
2491 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2493 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), message.
unique_id );
2494 packet.AppendFormat( _T(
" Distance:\t 0x%08x\r\n" ), message.
distance );
2499 packet.AppendFormat( _T(
" Result:\t\t %d - Success\r\n" ), message.
result_code );
2504 packet.AppendFormat( _T(
" Result:\t\t %d - Failure\r\n" ), message.
result_code );
2514 memset( &message, 0,
sizeof( message ) );
2515 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2517 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), message.
unique_id );
2521 #if( FMI_SUPPORT_A613 ) 2526 memset( &message, 0,
sizeof( message ) );
2527 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2529 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), message.
unique_id );
2534 packet.AppendFormat( _T(
" Enabled:\t %s\r\n" ), message.
enable ? _T(
"true" ) : _T(
"false" ) );
2535 packet.AppendFormat( _T(
" Name:\t\t %s\r\n" ), formatText( message.
name,
sizeof( message.
name ) ) );
2542 memset( &message, 0,
sizeof( message ) );
2543 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2545 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), message.
unique_id );
2552 memset( &message, 0,
sizeof( message ) );
2553 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2555 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), message.
unique_id );
2556 packet.AppendFormat( _T(
" Enabled:\t %s\r\n" ), message.
enable == 1 ? _T(
"true" ) : _T(
"false" ) );
2564 memset( &message, 0,
sizeof( message ) );
2565 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2567 packet.AppendFormat( _T(
" Orig Time:\t 0x%08x\r\n" ), message.
origination_time );
2569 packet.AppendFormat( _T(
" Enabled:\t %s\r\n" ), message.
enable == 1 ? _T(
"true" ) : _T(
"false" ) );
2578 memset( &receipt, 0,
sizeof( receipt ) );
2579 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
2581 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), receipt.
unique_id );
2585 packet.AppendFormat( _T(
" Result:\t\t %d - %s\r\n" ), receipt.
result_code, _T(
"Success") );
2590 packet.AppendFormat( _T(
" Result:\t\t %d - %s\r\n" ), receipt.
result_code, _T(
"Error - ID not found") );
2595 packet.AppendFormat( _T(
" Result:\t\t %d - %s\r\n" ), receipt.
result_code, _T(
"Error - Full") );
2600 packet.AppendFormat( _T(
" Result:\t\t %d - %s\r\n" ), receipt.
result_code, _T(
"Error - NV") );
2605 packet.AppendFormat( _T(
" Result:\t\t %d - %s\r\n" ), receipt.
result_code, _T(
"Error - NM in use") );
2610 packet.AppendFormat( _T(
" Result:\t\t %d - %s\r\n" ), receipt.
result_code, _T(
"Error - ID out of range") );
2615 packet.AppendFormat( _T(
" Result:\t\t %d - %s\r\n" ), receipt.
result_code, _T(
"Error - Custom Avoidance feature is not enabled") );
2623 #if( FMI_SUPPORT_A615 ) 2628 memset( &message, 0,
sizeof( message ) );
2629 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
2631 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( message.
driver_id ) );
2638 memset( &receipt, 0,
sizeof( receipt ) );
2639 memcpy( &receipt, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( receipt ) ) );
2641 packet.AppendFormat( _T(
" Driver ID:\t %s\r\n" ), CString( receipt.
driver_id ) );
2642 packet.AppendFormat( _T(
" Status:\t\t %u\r\n" ), receipt.
status );
2643 packet.AppendFormat( _T(
" Result code:\t %u\r\n" ), receipt.
result_code );
2648 #if( FMI_SUPPORT_A616 ) 2653 memset( &data, 0,
sizeof( data ) );
2654 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2660 packet.Append( _T(
" Request Type:\t New Rate\r\n" ) );
2665 packet.Append( _T(
" Request Type:\t Rate Sync\r\n" ) );
2673 packet.Append( _T(
" Baud Rate:\t 9600\r\n" ) );
2678 packet.Append( _T(
" Baud Rate:\t 38400\r\n" ) );
2683 packet.Append( _T(
" Baud Rate:\t 57600\r\n" ) );
2692 memset( &data, 0,
sizeof( data ) );
2693 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2699 packet.Append( _T(
" Request Type:\t New Rate\r\n" ) );
2704 packet.Append( _T(
" Request Type:\t Rate Sync\r\n" ) );
2712 packet.Append( _T(
" Baud Rate:\t 9600\r\n" ) );
2717 packet.Append( _T(
" Baud Rate:\t 38400\r\n" ) );
2722 packet.Append( _T(
" Baud Rate:\t 57600\r\n" ) );
2730 packet.Append( _T(
" Result Code:\t Ok\r\n" ) );
2735 packet.Append( _T(
" Result Code:\t Server Error (Request Type)\r\n" ) );
2740 packet.Append( _T(
" Result Code:\t Server Error (Rate)\r\n" ) );
2745 packet.Append( _T(
" Result Code:\t Feature Disabled\r\n" ) );
2750 packet.Append( _T(
" Result Code:\t Client Error\r\n" ) );
2755 packet.Append( _T(
" Result Code:\t Baud Set Error\r\n" ) );
2760 packet.Append( _T(
" Result Code:\t Plug ID Error\r\n" ) );
2767 #if( FMI_SUPPORT_A617 ) 2771 memset( &data, 0,
sizeof( data ) );
2772 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2774 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), data.
unique_id );
2780 packet.Append( _T(
" Icon:\t\t none\r\n" ) );
2785 packet.Append( _T(
" Icon:\t\t Driver Behavior\r\n" ) );
2790 packet.Append( _T(
" Icon:\t\t Tier Pressure\r\n" ) );
2795 packet.Append( _T(
" Icon:\t\t Temperature\r\n" ) );
2800 packet.Append( _T(
" Icon:\t\t Door Sensor\r\n" ) );
2805 packet.Append( _T(
" Icon:\t\t Vehicle Maintenance\r\n" ) );
2810 packet.Append( _T(
" Icon:\t\t OBD-II Generic Sensor\r\n" ) );
2815 packet.Append( _T(
" Icon:\t\t Generic Sensor 1\r\n" ) );
2820 packet.Append( _T(
" Icon:\t\t Generic Sensor 2\r\n" ) );
2825 packet.Append( _T(
" Icon:\t\t Generic Sensor 3\r\n" ) );
2830 packet.Append( _T(
" Icon:\t\t General Connectivity\r\n" ) );
2835 packet.Append( _T(
" Icon:\t\t Daily Hours Counter\r\n" ) );
2840 packet.Append( _T(
" Icon:\t\t Weekly Hours Counter\r\n" ) );
2845 packet.Append( _T(
" Icon:\t\t Rest Hours Counter\r\n" ) );
2850 packet.Append( _T(
" Icon:\t\t Break Hours Counter\r\n" ) );
2855 packet.Append( _T(
" Icon:\t\t Tasks\r\n" ) );
2860 packet.Append( _T(
" Icon:\t\t Weight\r\n" ) );
2865 packet.Append( _T(
" Icon:\t\t Information\r\n" ) );
2870 packet.Append( _T(
" Icon:\t\t Fuel\r\n" ) );
2875 packet.Append( _T(
" Icon:\t\t EU Available\r\n" ) );
2880 packet.Append( _T(
" Icon:\t\t EU Driving\r\n" ) );
2885 packet.Append( _T(
" Icon:\t\t EU Rest\r\n" ) );
2890 packet.Append( _T(
" Icon:\t\t EU Work\r\n" ) );
2895 packet.Append( _T(
" Icon:\t\t RESERVED\r\n" ) );
2900 packet.AppendFormat( _T(
" Timeout:\t %d\r\n" ), data.
timeout );
2901 packet.AppendFormat( _T(
" Severity:\t %d\r\n" ), data.
severity );
2902 packet.AppendFormat( _T(
" Play sound:\t %s\r\n" ), data.
play_sound ? _T(
"true" ) : _T(
"false" ) );
2903 packet.AppendFormat( _T(
" Text:\t\t %s\r\n" ), CString( data.
alert_text ) );
2910 memset( &data, 0,
sizeof( data ) );
2911 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2913 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), data.
unique_id );
2919 packet.Append( _T(
" Result:\t Success\r\n" ) );
2924 packet.Append( _T(
" Result:\t Text too long\r\n" ) );
2929 packet.Append( _T(
" Result:\t Icon number out of range (alert will be displayed with no icon)\r\n" ) );
2934 packet.Append( _T(
" Result:\t No text or icon (at least one is required)\r\n" ) );
2939 packet.Append( _T(
" Result:\t Severity out of range\r\n" ) );
2944 packet.Append( _T(
" Result:\t Timeout out of range\r\n" ) );
2953 memset( &data, 0,
sizeof( data ) );
2954 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
2956 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), data.
change_id );
2957 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), data.
unique_id );
2958 packet.AppendFormat( _T(
" Name:\t\t %s\r\n" ), CString( data.
name ) );
2964 packet.Append( _T(
" Icon:\t\t none\r\n" ) );
2969 packet.Append( _T(
" Icon:\t\t Driver Behavior\r\n" ) );
2974 packet.Append( _T(
" Icon:\t\t Tier Pressure\r\n" ) );
2979 packet.Append( _T(
" Icon:\t\t Temperature\r\n" ) );
2984 packet.Append( _T(
" Icon:\t\t Door Sensor\r\n" ) );
2989 packet.Append( _T(
" Icon:\t\t Vehicle Maintenance\r\n" ) );
2994 packet.Append( _T(
" Icon:\t\t OBD-II Generic Sensor\r\n" ) );
2999 packet.Append( _T(
" Icon:\t\t Generic Sensor 1\r\n" ) );
3004 packet.Append( _T(
" Icon:\t\t Generic Sensor 2\r\n" ) );
3009 packet.Append( _T(
" Icon:\t\t Generic Sensor 3\r\n" ) );
3014 packet.Append( _T(
" Icon:\t\t General Connectivity\r\n" ) );
3019 packet.Append( _T(
" Icon:\t\t Daily Hours Counter\r\n" ) );
3024 packet.Append( _T(
" Icon:\t\t Weekly Hours Counter\r\n" ) );
3029 packet.Append( _T(
" Icon:\t\t Rest Hours Counter\r\n" ) );
3034 packet.Append( _T(
" Icon:\t\t Break Hours Counter\r\n" ) );
3039 packet.Append( _T(
" Icon:\t\t Tasks\r\n" ) );
3044 packet.Append( _T(
" Icon:\t\t Weight\r\n" ) );
3049 packet.Append( _T(
" Icon:\t\t Information\r\n" ) );
3054 packet.Append( _T(
" Icon:\t\t Fuel\r\n" ) );
3059 packet.Append( _T(
" Icon:\t\t EU Available\r\n" ) );
3064 packet.Append( _T(
" Icon:\t\t EU Driving\r\n" ) );
3069 packet.Append( _T(
" Icon:\t\t EU Rest\r\n" ) );
3074 packet.Append( _T(
" Icon:\t\t EU Work\r\n" ) );
3079 packet.Append( _T(
" Icon:\t\t RESERVED\r\n" ) );
3084 packet.AppendFormat( _T(
" Display index:\t %d\r\n" ), data.
display_index );
3091 memset( &data, 0,
sizeof( data ) );
3092 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
3094 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), data.
change_id );
3100 packet.Append( _T(
" Result:\t\t Success\r\n" ) );
3105 packet.Append( _T(
" Result:\t\t Name too long\r\n" ) );
3110 packet.Append( _T(
" Result:\t\t Icon number out of range (alert will be displayed with no icon)\r\n" ) );
3115 packet.Append( _T(
" Result:\t\t Sensor name must be specified\r\n" ) );
3120 packet.Append( _T(
" Result:\t\t Severity out of range\r\n" ) );
3125 packet.Append( _T(
" Result:\t\t Status too long\r\n" ) );
3130 packet.Append( _T(
" Result:\t\t Description too long\r\n" ) );
3135 packet.Append( _T(
" Result:\t\t Too many sensors\r\n" ) );
3140 packet.Append( _T(
" Result:\t\t Unique ID not found\r\n" ) );
3145 packet.Append( _T(
" Result:\t\t Error saving to database\r\n" ) );
3153 packet.Append( _T(
" Operation:\t delete\r\n" ) );
3158 packet.Append( _T(
" Operation:\t add\r\n" ) );
3163 packet.Append( _T(
" Operation:\t modify\r\n" ) );
3172 memset( &data, 0,
sizeof( data ) );
3173 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
3175 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), data.
change_id );
3176 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), data.
unique_id );
3182 memset( &data, 0,
sizeof( data ) );
3183 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
3185 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), data.
change_id );
3186 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), data.
unique_id );
3187 packet.AppendFormat( _T(
" Severity:\t %d\r\n" ), data.
severity );
3188 packet.AppendFormat( _T(
" Play sound:\t %s\r\n" ), data.
play_sound ? _T(
"true" ) : _T(
"false" ) );
3189 packet.AppendFormat( _T(
" Record:\t %s\r\n" ), data.
record_sensor ? _T(
"true" ) : _T(
"false" ) );
3190 packet.AppendFormat( _T(
" Status:\t\t %s\r\n" ), CString( data.
status ) );
3191 packet.AppendFormat( _T(
" Description:\t %s\r\n" ), CString( data.
description ) );
3197 memset( &data, 0,
sizeof( data ) );
3198 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
3200 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), data.
change_id );
3201 packet.AppendFormat( _T(
" Unique ID:\t %d\r\n" ), data.
unique_id );
3207 memset( &data, 0,
sizeof( data ) );
3208 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
3210 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), data.
change_id );
3216 packet.Append( _T(
" Result:\t\t Success\r\n" ) );
3221 packet.Append( _T(
" Result:\t\t Name too long\r\n" ) );
3226 packet.Append( _T(
" Result:\t\t Icon number out of range (alert will be displayed with no icon)\r\n" ) );
3231 packet.Append( _T(
" Result:\t\t Sensor name must be specified\r\n" ) );
3236 packet.Append( _T(
" Result:\t\t Severity out of range\r\n" ) );
3241 packet.Append( _T(
" Result:\t\t Status too long\r\n" ) );
3246 packet.Append( _T(
" Result:\t\t Description too long\r\n" ) );
3251 packet.Append( _T(
" Result:\t\t Too many sensors\r\n" ) );
3256 packet.Append( _T(
" Result:\t\t Unique ID not found\r\n" ) );
3261 packet.Append( _T(
" Result:\t\t Error saving to database\r\n" ) );
3265 packet.AppendFormat( _T(
" Display Index:\t %d\r\n" ), data.
display_index );
3269 #if( FMI_SUPPORT_A619 ) 3273 memset( &data, 0,
sizeof( data ) );
3274 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
3280 packet.Append( _T(
" Tag:\t\t Stop Moving Threshold\r\n" ) );
3285 packet.Append( _T(
" Tag:\t\t 8 Hour Rule\r\n" ) );
3290 packet.Append( _T(
" Tag:\t\t Periodic Status Interval\r\n" ) );
3295 packet.Append( _T(
" Tag:\t\t Start Time of Day\r\n" ) );
3299 packet.AppendFormat( _T(
" Value:\t\t %d\r\n" ), data.
settings_value );
3300 packet.AppendFormat( _T(
" Enabled:\t %s\r\n" ), data.
enable ? _T(
"true" ) : _T(
"false" ) );
3306 memset( &data, 0,
sizeof( data ) );
3307 memcpy( &data, aFmiPayload,
minval(
sizeof( data ), aFmiPayloadSize ) );
3313 packet.Append( _T(
" Tag:\t\t Stop Moving Threshold\r\n" ) );
3318 packet.Append( _T(
" Tag:\t\t 8 Hour Rule\r\n" ) );
3323 packet.Append( _T(
" Tag:\t\t Periodic Status Interval\r\n" ) );
3328 packet.Append( _T(
" Tag:\t\t Start Time of Day\r\n" ) );
3332 packet.AppendFormat( _T(
" Value:\t\t %d\r\n" ), data.
settings_value );
3333 packet.AppendFormat( _T(
" Enabled:\t %s\r\n" ), data.
enabled ? _T(
"true" ) : _T(
"false" ) );
3338 packet.Append( _T(
" Result Code:\t OK\r\n" ) );
3343 packet.Append( _T(
" Result Code:\t Threshold set to Minimum\r\n" ) );
3348 packet.Append( _T(
" Result Code:\t Threshold set to Maximum\r\n" ) );
3353 packet.Append( _T(
" Result Code:\t Failure\r\n" ) );
3360 #if( FMI_SUPPORT_A622 ) 3365 memset( &message, 0,
sizeof( message ) );
3366 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
3369 packet.AppendFormat( _T(
" Lock Settings:\t %s\r\n" ), message.
lock_change ? _T(
"true" ) : _T(
"false" ) );
3370 packet.AppendFormat( _T(
" Lock Advanced Driver Assistance Settings:\t %s\r\n" ), message.
lock_change_adas ? _T(
"true" ) : _T(
"false" ) );
3377 memset( &message, 0,
sizeof( message ) );
3378 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
3380 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), message.
change_id );
3381 packet.AppendFormat( _T(
" Settings Count:\t %d\r\n" ), message.
settings_count );
3389 packet.AppendFormat( _T(
" Forward Collision:\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enable" ) : _T(
"Disable" ) );
3396 packet.AppendFormat( _T(
" Collision Sensitivity:\t\t Low\r\n" ) );
3400 packet.AppendFormat( _T(
" Collision Sensitivity:\t\t Medium\r\n" ) );
3404 packet.AppendFormat( _T(
" Collision Sensitivity:\t\t High\r\n" ) );
3410 packet.AppendFormat( _T(
" Lane Departure:\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enable" ) : _T(
"Disable" ) );
3415 packet.AppendFormat( _T(
" Record on Startup:\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enable" ) : _T(
"Disable" ) );
3420 packet.AppendFormat( _T(
" Incident Detection:\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enable" ) : _T(
"Disable" ) );
3425 packet.AppendFormat( _T(
" Record Audio:\t\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enable" ) : _T(
"Disable" ) );
3430 packet.AppendFormat( _T(
" Data Overlay Date/Time:\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enable" ) : _T(
"Disable" ) );
3435 packet.AppendFormat( _T(
" Data Overlay Location/Speed:\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enable" ) : _T(
"Disable" ) );
3440 packet.AppendFormat( _T(
" Video Resolution:\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Medium" ) : _T(
"High" ) );
3447 packet.AppendFormat( _T(
" Record After Power Loss:\t 5 Min\r\n" ) );
3451 packet.AppendFormat( _T(
" Record After Power Loss:\t 3 Min\r\n" ) );
3455 packet.AppendFormat( _T(
" Record After Power Loss:\t 1 Min\r\n" ) );
3459 packet.AppendFormat( _T(
" Record After Power Loss:\t 30 Sec\r\n" ) );
3463 packet.AppendFormat( _T(
" Record After Power Loss:\t 15 Sec\r\n" ) );
3477 memset( &message, 0,
sizeof( message ) );
3478 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
3480 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), message.
change_id );
3481 packet.AppendFormat( _T(
" Result Code:\t %d\r\n" ), message.
result_code );
3489 memset( &message, 0,
sizeof( message ) );
3490 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
3492 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), message.
change_id );
3499 memset( &message, 0,
sizeof( message ) );
3500 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
3502 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), message.
change_id );
3503 packet.AppendFormat( _T(
" Result Code:\t %d\r\n" ), message.
result_code );
3504 packet.AppendFormat( _T(
" Settings Count:\t %d\r\n" ), message.
settings_count );
3512 packet.AppendFormat( _T(
" Forward Collision:\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enabled" ) : _T(
"Disabled" ) );
3519 packet.AppendFormat( _T(
" Collision Sensitivity:\t\t Low\r\n" ) );
3523 packet.AppendFormat( _T(
" Collision Sensitivity:\t\t Medium\r\n" ) );
3527 packet.AppendFormat( _T(
" Collision Sensitivity:\t\t High\r\n" ) );
3533 packet.AppendFormat( _T(
" Lane Departure:\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enabled" ) : _T(
"Disabled" ) );
3538 packet.AppendFormat( _T(
" Record on Startup:\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enabled" ) : _T(
"Disabled" ) );
3543 packet.AppendFormat( _T(
" Incident Detection:\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enabled" ) : _T(
"Disabled" ) );
3548 packet.AppendFormat( _T(
" Record Audio:\t\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enabled" ) : _T(
"Disabled" ) );
3553 packet.AppendFormat( _T(
" Data Overley Date/Time:\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enabled" ) : _T(
"Disabled" ) );
3558 packet.AppendFormat( _T(
" Data Overaly Location/Speed:\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Enabled" ) : _T(
"Disabled" ) );
3563 packet.AppendFormat( _T(
" Video Resolution:\t\t %s\r\n" ), message.
settings_list[i].
new_value ? _T(
"Medium" ) : _T(
"High" ) );
3570 packet.AppendFormat( _T(
" Record After Power Loss:\t 5 Min\r\n" ) );
3574 packet.AppendFormat( _T(
" Record After Power Loss:\t 3 Min\r\n" ) );
3578 packet.AppendFormat( _T(
" Record After Power Loss:\t 1 Min\r\n" ) );
3582 packet.AppendFormat( _T(
" Record After Power Loss:\t 30 Sec\r\n" ) );
3586 packet.AppendFormat( _T(
" Record After Power Loss:\t 15 Sec\r\n" ) );
3598 memset( &message, 0,
sizeof( message ) );
3599 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
3601 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), message.
change_id );
3602 packet.AppendFormat( _T(
" FWD Collision Ntfctn:\t %s\r\n" ), message.
enable_fcw_ntfctn ? _T(
"Enable" ) : _T(
"Disable" ) );
3603 packet.AppendFormat( _T(
" Lane Departure Ntfctn:\t %s\r\n" ), message.
enable_lane_departure_ntfctn ? _T(
"Enable" ) : _T(
"Disable" ) );
3604 packet.AppendFormat( _T(
" Incident Ntfctn:\t\t %s\r\n" ), message.
enable_incident_ntfctn ? _T(
"Enable" ) : _T(
"Disable" ) );
3611 memset( &message, 0,
sizeof( message ) );
3612 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
3614 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), message.
change_id );
3615 packet.AppendFormat( _T(
" Result Code:\t %d\r\n" ), message.
result_code);
3616 packet.AppendFormat( _T(
" FWD Collision Ntfctn:\t %s\r\n" ), message.
enable_fcw_ntfctn ? _T(
"Enable" ) : _T(
"Disable" ) );
3617 packet.AppendFormat( _T(
" Lane Departure Ntfctn:\t %s\r\n" ), message.
enable_lane_departure_ntfctn ? _T(
"Enable" ) : _T(
"Disable" ) );
3618 packet.AppendFormat( _T(
" Incident Ntfctn:\t\t %s\r\n" ), message.
enable_incident_ntfctn ? _T(
"Enable" ) : _T(
"Disable" ) );
3625 memset( &message, 0,
sizeof( message ) );
3626 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
3629 packet.AppendFormat( _T(
" Ntfctn Type:\t %d\r\n" ), message.
ntfctn_type );
3630 packet.AppendFormat( _T(
" Lat:\t\t 0x%08x - %s\r\n"), message.
scposn.
lat, formatLatitude( message.
scposn.
lat ) );
3631 packet.AppendFormat( _T(
" Lon:\t\t 0x%08x - %s\r\n"), message.
scposn.
lon, formatLongitude( message.
scposn.
lon ) );
3639 memset( &message, 0,
sizeof( message ) );
3640 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
3642 packet.AppendFormat( _T(
" Change ID:\t %d\r\n" ), message.
change_id );
3649 memset( &message, 0,
sizeof( message ) );
3650 memcpy( &message, aFmiPayload,
minval( aFmiPayloadSize,
sizeof( message ) ) );
3653 packet.AppendFormat( _T(
" Ntfctn Type:\t %d\r\n" ), message.
ntfctn_type );
3654 packet.AppendFormat( _T(
" Lat:\t\t 0x%08x - %s\r\n" ), message.
scposn.
lat, formatLatitude( message.
scposn.
lat ) );
3655 packet.AppendFormat( _T(
" Lon:\t\t 0x%08x - %s\r\n" ), message.
scposn.
lon, formatLongitude( message.
scposn.
lon ) );
3656 packet.AppendFormat( _T(
" Incident File:\t %s\r\n" ), CString( message.
incident_fname ) );
3683 if( mFmiPacketNames.find( aPacketId ) == mFmiPacketNames.end() )
3685 packetName.Format( _T(
"Unknown FMI packet 0x%04x"), aPacketId );
3689 packetName = mFmiPacketNames[aPacketId];
3694 #endif //FMI_SUPPORT_A602 3696 #if( FMI_SUPPORT_A615 ) 3704 if( mHosartPacketNames.find( aPacketId ) == mHosartPacketNames.end() )
3706 packetName.Format( _T(
"Unknown HOSART packet 0x%04x"), aPacketId );
3710 packetName = mHosartPacketNames[aPacketId];
3741 memset( &data, 0,
sizeof( data ) );
3742 memcpy( &data, aPayload,
minval( aPayloadSize,
sizeof( data ) ) );
3744 packet.AppendFormat( _T(
" Driver ID:\t %d\r\n" ), data.
driver_id );
3745 packet.AppendFormat( _T(
" New Status:\t %d\r\n" ), data.
new_status );
3755 memset( &data, 0,
sizeof( data ) );
3756 memcpy( &data, aPayload,
minval( aPayloadSize,
sizeof( data ) ) );
3758 packet.AppendFormat( _T(
" Warning Type:\t %d\r\n" ), data.
warning_type );
3759 packet.AppendFormat( _T(
" Violation Type:\t %d\r\n" ), data.
violation_type );
3760 packet.AppendFormat( _T(
" Driver ID:\t %d\r\n" ), data.
driver_id );
3761 packet.AppendFormat( _T(
" Violation Time:\t 0x%08x - %s\r\n"), data.
timestamp, formatTime( data.
timestamp ) );
3767 memset( &data, 0,
sizeof( data ) );
3768 memcpy( &data, aPayload,
minval( aPayloadSize,
sizeof( data ) ) );
3770 packet.AppendFormat( _T(
" Violation Type:\t %d\r\n" ), data.
violation_type );
3771 packet.AppendFormat( _T(
" Driver ID:\t %d\r\n" ), data.
driver_id );
3772 packet.AppendFormat( _T(
" Violation Time:\t 0x%08x - %s\r\n"), data.
timestamp, formatTime( data.
timestamp ) );
3778 memset( &data, 0,
sizeof( data ) );
3779 memcpy( &data, aPayload,
minval( aPayloadSize,
sizeof( data ) ) );
3780 packet.AppendFormat( _T(
" Seconds Moved:\t 0x%08x - %s\r\n"), data, formatTime( data ) );
3790 CString FmiLogParser::getCdtPacketName
3797 if( mCdtPacketNames.find( aPacketId ) == mCdtPacketNames.end() )
3799 packetName.Format( _T(
"Unknown CDT packet 0x%04x"), aPacketId );
3803 packetName = mCdtPacketNames[aPacketId];
3821 CString FmiLogParser::formatCdtPacket
3833 case CDT_DATA_TRANSFER:
3836 case CDT_PING_REQUEST:
3839 case CDT_PING_RECEIPT:
3864 if( mGarminPacketNames.find( aPacketId ) == mGarminPacketNames.end() )
3866 packetName.Format( _T(
"Unknown Garmin packet 0x%02x"), aPacketId );
3870 packetName = mGarminPacketNames[aPacketId];
3890 CString commandName;
3892 if( mGarminCommandNames.find( aCommandId ) == mGarminCommandNames.end() )
3894 commandName.Format( _T(
"Unknown Garmin command 0x%04x"), aCommandId );
3898 commandName = mGarminCommandNames[aCommandId];
3904 #if( FMI_SUPPORT_A615 ) 3911 switch( result_code )
3915 packet.AppendFormat( _T(
" Result Code:\t %d - OK\r\n" ), result_code );
3920 packet.AppendFormat( _T(
" Result Code:\t %d - No Data Found\r\n" ), result_code );
3925 packet.AppendFormat( _T(
" Result Code:\t %d - Busy\r\n" ), result_code );
3930 packet.AppendFormat( _T(
" Result Code:\t %d - NULL Input Pointer\r\n" ), result_code );
3935 packet.AppendFormat( _T(
" Result Code:\t %d - State error\r\n" ), result_code );
3940 packet.AppendFormat( _T(
" Result Code:\t %d - Minimum Data Size error\r\n" ), result_code );
3945 packet.AppendFormat( _T(
" Result Code:\t %d - Maximum Data Size error\r\n" ), result_code );
3950 packet.AppendFormat( _T(
" Result Code:\t %d - Malloc error\r\n" ), result_code );
3955 packet.AppendFormat( _T(
" Result Code:\t %d - GZip error\r\n" ), result_code );
3960 packet.AppendFormat( _T(
" Result Code:\t %d - GFS Open error\r\n" ), result_code );
3965 packet.AppendFormat( _T(
" Result Code:\t %d - GFS Dir Open error\r\n" ), result_code );
3970 packet.AppendFormat( _T(
" Result Code:\t %d - GFS FSTAT error\r\n" ), result_code );
3975 packet.AppendFormat( _T(
" Result Code:\t %d - GFS Read error\r\n" ), result_code );
3980 packet.AppendFormat( _T(
" Result Code:\t %d - GFS Remove error\r\n" ), result_code );
3985 packet.AppendFormat( _T(
" Result Code:\t %d - Export Data error\r\n" ), result_code );
3990 packet.AppendFormat( _T(
" Result Code:\t %d - GFS Write error\r\n" ), result_code );
3995 packet.AppendFormat( _T(
" Result Code:\t %d - Transmission error\r\n" ), result_code );
4002 #if( FMI_SUPPORT_A602 ) 4009 mFmiPacketNames.clear();
4021 #if( FMI_SUPPORT_A603 ) 4035 #if( FMI_SUPPORT_A604 ) 4061 mFmiPacketNames[
FMI_ID_PING ] = _T(
"Ping Request");
4084 #if( FMI_SUPPORT_A605 ) 4089 #if (FMI_SUPPORT_A606) 4090 mFmiPacketNames[
FMI_SAFE_MODE ] = _T(
"Set Safe Mode Speed");
4094 #if( FMI_SUPPORT_A607 ) 4111 #if( FMI_SUPPORT_A608 ) 4118 #if( FMI_SUPPORT_A609 ) 4122 #if( FMI_SUPPORT_A610 ) 4141 #if( FMI_SUPPORT_A611 ) 4146 #if( FMI_SUPPORT_A612 ) 4154 #if( FMI_SUPPORT_A614 ) 4158 #if( FMI_SUPPORT_A613 ) 4168 #if( FMI_SUPPORT_A615 ) 4187 #if( FMI_SUPPORT_A616 ) 4191 #if( FMI_SUPPORT_A617 ) 4202 #if( FMI_SUPPORT_A619 ) 4207 mCdtPacketNames[ CDT_DATA_TRANSFER ] = _T(
"CDT Data Transfer");
4208 mCdtPacketNames[ CDT_PING_REQUEST ] = _T(
"CDT Ping Request");
4209 mCdtPacketNames[ CDT_PING_RECEIPT ] = _T(
"CDT Ping Receipt");
4211 #if( FMI_SUPPORT_A621 ) 4215 #if( FMI_SUPPORT_A622 ) 4231 #if( FMI_SUPPORT_A623 ) 4238 #if( FMI_SUPPORT_A607 ) 4245 mFmiFeatureNames.clear();
4260 mGarminPacketNames.clear();
4263 mGarminPacketNames[
ID_PVT_DATA ] = _T(
"PVT Data");
4264 mGarminPacketNames[
ID_UNIT_ID ] = _T(
"Unit ID Data");
4270 #if( FMI_SUPPORT_LEGACY ) 4271 mGarminPacketNames[ ID_LEGACY_STOP_MSG ] = _T(
"Legacy Stop Message");
4272 mGarminPacketNames[ ID_LEGACY_TEXT_MSG ] = _T(
"Legacy Text Message");
4275 #if( FMI_SUPPORT_A602 ) 4279 #if( FMI_SUPPORT_A615 ) 4290 mGarminCommandNames.clear();
4306 int filenameLength = WideCharToMultiByte( CP_ACP, 0, mLogFilename, -1, NULL, 0, NULL, NULL );
4307 char *filenameAnsi =
new char[filenameLength];
4308 WideCharToMultiByte( CP_ACP, 0, mLogFilename, -1, filenameAnsi, filenameLength, NULL, NULL );
4309 ifstream logFile( filenameAnsi, ios_base::in );
4310 delete[] filenameAnsi;
4312 if( logFile.good() )
4314 std::string lineString;
4322 logFile.seekg( mLineOffset[aLineNumber] );
4323 getline( logFile, lineString );
4324 line = lineString.c_str();
4326 while( line[i++] !=
'-' );
4331 packetId = packet[i++];
4332 payloadSize = packet[i++];
4339 for( payloadIdx = 0; payloadIdx < payloadSize; payloadIdx++ )
4341 payload[payloadIdx] = packet[i++];
char text_message[200]
Message text (variable length, null-terminated string)
time_type origination_time
Time when the message was created by the client.
uint32 status_change_id
unique identifier
char text_message[LONG_TEXT_MSG_CHUNK_SIZE]
boolean result_code
TRUE if the operation was successful, FALSE otherwise.
uint32 msg_ack_type
The response selected by the user.
Data type for the Server to Client Open Text Message Receipt Packet ID.
uint8 id[16]
The message ID.
virtual void tx(Packet *aPacket, bool aSendImmediate)
Transmit a Packet.
Data type for the Set Odometer Request Packed ID (0X1100) from server to client.
struct date_time_data_type::_date date
virtual CString getPacketTitle(int aLineNumber)
Construct a packet title for the given log logLine.
Payload of FMI_ID_SERVER_OPEN_TXT_MSG packet.
uint32 response_id[50]
List of responses that are allowed.
Data type for Get Dashcam Notification Settings Packet ID (0X1609) from client to server...
Payload for FMI_ID_ENABLE.
uint8 id[16]
The message ID.
uint8 second
second (0-59)
uint8 id_size
Number of significant bytes in the message ID.
Data type for the Annotation Download Receipt Packet ID (0X110E) from client to server.
uint16 response_count
Number of protocols in the response_list.
Data type for Custom Avoidance Enable/Disable (0X1234) from server to client.
boolean enable_incident_ntfctn
#define MAX_PACKET_SIZE
Maximum packet size that can be transmitted.
char name[16+1]
Category name, null terminated.
uint8 file_type
File type.
char name[30+1]
Waypoint name, null-terminated.
Data type for Configure/Update/Delete Sensor Receipt Packet IDs (0x1403,0x1405) from client to server...
sc_position_type stop_position
Location of the stop.
char server_shipper_name[40]
char text_message[200]
Message text, variable length, null-terminated string, 200 bytes max.
uint8 id_size
id_size from the canned_response_list_data_type
Element of the array returned in Garmin ID_PROTOCOL_ARRAY (A001) or FMI_ID_PROTOCOL_DATA (A602) packe...
Data type for the Delete Message Status Packet ID.
char tag
Type of protocol (e.g., 'A', D')
char server_commodity[40]
sc_position_type posn
Waypoint position.
Data type for Driver ID Update Packet ID.
time_type timestamp
Time the alert was generated.
Data type for the Message Status Packet ID.
uint8 result_code
Result code, a valid speed_limit_alert_result_data_type.
boolean result_code
True if the update was successful.
CString formatLatitude(sint32 aSemicircles)
Format latitude.
uint8 id[16]
Message ID from the canned_response_list_data_type.
Data type for File Transfer End.
CString formatLongitude(sint32 aSemicircles)
Format longitude.
aobrd_download_receipt_result_code result_code
Payload of FMI_ID_A602_STOP packet.
uint8 id_size
Number of significant bytes in the message ID.
uint8 minute
minute (0-59)
char text[51]
Text/description of the stop. Variable length, null-terminated string.
uint32 status_change_id
unique identifier
Data type for HOS Settings Request Packet ID (0x1500) from server to client.
uint16 unique_id
Server-assigned unique ID from the FMI_ID_WAYPOINT packet.
Data type for the Driver Profile Data Packet ID (0X1103) from client to server.
Data type for Dashcam Notification Packet ID (0X160C) from client to server (request) ...
void initGarminCommandNames()
Initialize the map of Garmin command IDs to text strings.
uint32 status_id
status_id from the driver_status_list_item_data_type or driver_status_list_item_delete_data_type ...
double_position_type position
Current position of the client.
Data type for the FMI Safe Mode setup Packet ID.
Data type for the IFTA Data Delete Request Packet ID (0X0008) from server to client.
time_type origination_time
Origination time of the response.
Data type for Update Sensor Request Packet ID (0x1406) from server to client.
uint32 crc
CRC of entire file as computed by UTL_calc_crc32.
void UTIL_format_date_string(const date_time_data_type *aDateTime, char *aResultString, int aResultStringSize)
Format a date as a string.
uint32 unique_id
Unique ID of the A603 stop.
char driver_id[50]
New driver ID (null terminated string)
uint8 response_count
Number of elements in response_id array.
Data type for HOS Settings Receipt Packet ID (0x1501) from client to server.
char new_text[50]
Text to display.
uint8 message_type
Message type, a valid a604_message_type.
uint32 status_change_id
status_change_id from the driver_status_data_type
uint16 cat_id
Category that was deleted (0-15)
#define SIZE_OF_FOOTER
Size of packet footer (after payload and checksum)
uint8 time_over
Seconds until speeding event begins.
Data type for the Driver Profile Update Response Data Packet ID (?) from client to server...
Payload of FMI_ID_CLIENT_TXT_MSG_RCPT packet.
uint16 features[126]
Array of feature IDs.
char driver_id[50]
New driver ID (null terminated string, 50 bytes max)
Payload of FMI_ID_A607_CLIENT_OPEN_TXT_MSG packet.
boolean result_code
True if the update was successful.
boolean result_code
True if the update was successful.
uint16 stop_moving_threshold
uint8 id_type
Garmin packet ID.
void initFmiPacketNames()
Initialize the map of FMI packet IDs to text strings.
uint8 driver_idx
Index of driver changed.
Data type for Change to Driving Warning HOSART Packet ID (0X0001)
char message[50]
Message text, variable length, null terminated (50 bytes max)
uint16 symbol
Waypoint symbol.
Data type for Dashcam Notification Packet ID (0X1606) from client to server (request) ...
char comment[50+1]
Waypoint comment, null-terminated.
uint32 next_offset
offset of next data the server should send, or 0xFFFFFFFF for an error
Data type for Route Calculation ACK Receipt Packet ID (0X1221) from server to client.
uint32 status_change_id
Unique ID for this driver ID change.
Payload for Garmin ID_UNIT_ID packet.
Data type for File Data Packet ID.
void UTIL_format_time_string(const date_time_data_type *aDateTime, char *aResultString, int aResultStringSize)
Converts a time structure (date_time_data_type) to a time string representation.
boolean enable_lane_departure_ntfctn
Data type for the IFTA Data Fetch Receipt Packet ID (0X0007) from client to server.
uint8 result_code
Result of operation.
uint8 id[16]
Message ID that this list is for.
uint8 file_version_length
Number of significant bytes in file_version.
uint16 product_id
Product ID of the client.
uint8 category
Alert category, a valid speed_limit_alert_category_type.
Data type for Dashcam Lock Settings Packet ID (0X1600) from server to client.
uint16 stop_index_in_list
The stop index in list.
boolean enable_incident_ntfctn
Data type for the User Interface Text Packet ID.
uint8 id_size
ID size of message being responded to.
Data type for Dashcam Get Settings Packet ID (0X1604, 0X1608) from server to client.
CString formatText(const char *aText, int aMaxLength)
Format a text string, with up to 29 characters per line.
uint16 new_state
New state, see message_throttling_state_type for valid values.
#define cnt_of_array(_a)
The number of elements in _a.
CString formatBoolean(boolean aBool)
Translate a boolean to an equivalent string.
time_type status_change_time
timestamp of status change
time_type origination_time
uint32 unique_id
unique_id from client_to_server_open_text_msg_data_type
Packet receipt for Packet Receipt Packet ID.
#define offset_of(_s, _m)
The offset of _m from the beginning of _s.
uint32 status_id
ID for the driver status list item to delete.
boolean enable_fcw_ntfctn
Data type for the IFTA Data Delete Receipt Packet ID (0X0009) from client to server.
Data type for the User Interface Text Receipt Packet ID.
Data type for the A604 Server to Client Open Text Message Packet ID.
double UTIL_convert_radians_to_degrees(double aRadians)
Converts a latitude/longitude from radians to degrees.
Data type for the Shipment Download Receipt Packet ID (0X110B) from client to server.
struct date_time_data_type::_time time
boolean result_code
Result code. TRUE if success, FALSE otherwise.
uint8 id_size
Number of significant bytes in the message ID.
uint32 unique_id
Unique ID of the stop for use with the Stop Status protocol.
uint8 status_code
Message status, see fmi_A604_message_status for valid values.
float32 altitude
Altitude above the WGS84 ellipsoid, in meters.
uint16 record_count_or_reserved_when_gpi
Useful for locating cause of errors.
Data type for the Driver Status Update Receipt packet.
Data type for the Text Message Ack Receipt Packet ID.
Data type for the Delete Canned Message Packet ID.
Data type for Driver ID Update Packet ID.
message_throttling_data_type response_list[60]
One element for each protocol with ID and state.
uint32 unit_id
Unit ID (ESN) of the client.
Data type for the ETA Data Receipt Packet ID.
uint32 status_change_id
Unique ID for this driver ID change.
Data type for Custom Avoidance Delete (0X1232) from server to client.
List of canned responses that the client requests updated text for.
time_type origination_time
Time when the stop was originated by the server.
Payload of FMI_ID_STOP_STATUS and FMI_ID_STOP_STATUS_REQUEST packets.
Data type for the Driver Login Data Packet ID (0X1101) from client to server.
Data type for Driver ID Request Packet ID.
void UTIL_convert_seconds_to_time_type(const time_type *aSeconds, date_time_data_type *aDateTime)
Converts from a Garmin time to a structure containing separate members for hour, minute, and second (time_type).
Date & time data type with separate fields for month, day, year, hour, minute, and second...
float32 up_velocity
Up velocity in m/s, negative is down.
double UTIL_convert_semicircles_to_degrees(sint32 aSemicircles)
Converts a latitude/longitude from semicircles to degrees.
Data type for the User Interface Text Receipt Packet ID.
Data type for Custom Avoidance Receipt ID (0X1231) from client to server.
uint8 error_code_or_file_type_when_gpi
Set if result code is 5.
uint32 response_id
Unique ID of this canned response.
sint32 lat
latitude in semicircles
time_type status_change_time
Time when the driver ID changed.
uint16 stop_moving_threshold
uint8 id[16]
The message ID from the server to client open text message.
time_type status_change_time
timestamp of status change
float64 lat
latitude in radians, positive is north
void initFmiFeatureNames()
Initialize the map of FMI packet IDs to text strings.
uint16 packet_id
First packet ID in the protocol to throttle.
Data type for the Message Status Request Packet ID.
CString getGarminCommandName(uint16 aCommandId)
Translate a Garmin command ID into a string describing the command name.
Data type for the HOS Auto Status Update Enable Packet ID (0X1300) from server to client...
Payload of server to client messages requiring a response (A602)
time_type origination_time
Time when the message was sent by the client.
char text_message[200]
The message text (variable length, null terminated, 200 bytes max)
Payload of FMI_ID_TEXT_MSG_ACK packet.
#define minval(_x, _y)
The smaller of _x and _y.
uint8 id_size
Number of significant bytes in the message ID.
uint8 time_under
Seconds until speeding event ends.
time_type adverse_condition_time
time_type timestamp
Timestamp of the alert that is being acknowledged.
uint16 UTIL_hex_to_uint8(const char *aHexString, uint8 *aBinaryData, uint16 aMaxBytes)
Convert a hexadecimal ASCII string to an array of uint8.
char server_doc_number[40]
uint8 data_length
length of file_data (0..245)
uint8 id_size
Number of significant bytes of the message ID.
uint32 stop_time
Minimum stop time before auto-arrival is activated, in seconds.
Data type for Dashcam Get Settings Packet ID (0X1605) from client to server.
uint32 unique_id
Unique ID generated by client.
Data type for the Set Canned Message Packet ID.
uint32 driver_status
ID corresponding to the new driver status.
Data type for the Message Status Request Packet ID.
Data type for Delete Sensor Request Packet ID (0x1404) from server to client.
Data type for FMI_ID_WAYPOINT packet.
CString formatMessageId(const uint8 *aMessageId, uint8 aMessageIdSize)
Format a message ID in hex, with up to 8 bytes per line.
Payload of FMI_ID_CLIENT_OPEN_TXT_MSG packet.
float32 east_velocity
East velocity in m/s, negative is west.
Data type for Long Text Message Request Packet ID (0X0055) from server to client. ...
float32 mean_sea_level_height
Height of WGS84 ellipsoid above MSL at current position, in meters.
uint8 driver_idx
Driver index to change.
Payload of FMI_ID_A603_STOP packet.
Data type for the Driver Status Log Receipt Packet ID (0X1108) from client to server.
char text[200]
Text (description) of stop. Variable length, null-terminated string.
boolean enable_fcw_ntfctn
sc_position_type position_of_destination
Location of destination.
time_type origination_time
Data type for AOBRD Driver Logoff Receipt Packet ID (0X1311) from client to server.
Data type for Query Sensor Display Index Request Packet ID (0x1407) from server to client...
Data type for Baud Rate Change Receipt Packet ID (0x0012) from client to server.
Data type for Custom Avoidance Packet ID (0X1230) from server to client.
uint32 text_element_id
text_element_id from the user_interface_text_data_type
void UTIL_convert_seconds_to_date_type(const time_type *aSeconds, date_time_data_type *aDateTime)
Converts a Garmin date to a structure containing year, month, and day.
uint8 driver_idx
Index of the driver to update.
time_type server_timestamp
signed long int sint32
32-bit signed integer
Data type for Query Sensor Display Index Receipt Packet ID (0x1408) from client to server...
uint8 file_version[16]
Server-defined version string.
Data type for the Shipment Download Response Packet ID (0X110A) from server to client.
uint8 result_code
Enum indicating result code, see canned_response_list_result for valid values.
void initGarminPacketNames()
Initialize the map of Garmin packet IDs to text strings.
Data type for the Speed Limit Alert Receipt Packet ID.
uint8 id[16]
ID of message being responded to.
Data type for the Annotation Download Response Packet ID (0X110D) from server to client.
virtual ~FmiLogParser()
Destructor.
Data type for AOBRD Driver Logoff Request Packet ID (0X1310) from server to client.
Data type for Delete Driver Status List Item Receipt.
Data type for Driver ID Receipt packet.
char status[50]
Text displayed for the item (variable length, null terminated, 50 bytes max)
Data type for the Speed Limit Alert Packet ID.
uint32 offset
offset of data received
unsigned short int uint16
16-bit unsigned integer
boolean alert_user
Audibly alert the driver.
Data type for the A607 Driver Status Update packet.
PacketStatusType
Enumeration for packet status values.
time_type server_timestamp
Data type for Baud Rate Change Request Packet ID (0x0011) from server to client.
float32 speed
FMI safe mode speed.
boolean result_code
True if the update was successful.
Payload for Garmin ID_PVT_DATA packet.
time_type origination_time
uint8 id_size
Number of significant bytes of the message ID.
uint16 stop_status
The stop status.
float max_speed
Maximum speed since last alert.
sc_position_type scposn
Position when the text message was created by the client.
uint32 offset
offset of this data from the beginning of the file
Data type for the Set Driver Status List Item and Delete Driver Status List Item Receipt packets...
__packed struct fmi_dashcam_settings_list settings_list[30]
CString formatFmiPacket(BOOL transmitted, uint16 aFmiPacketId, uint8 *aFmiPayload, uint8 aFmiPayloadSize)
Interpret an FMI packet; appending the information to the text in the packet window.
Data type for the Set Driver Status List Item packet.
Data type for the Driver Profile Data Packet ID (0X1104) from server to client.
Data type for Warning Found and Violation Found HOSART Packet IDs (0X0002,0X0003) ...
time_type status_change_time
Time when the driver ID changed.
Data type for the Message Throttling Command Packet ID and Message Throttling Response Packet ID...
Data type for the FMI_ID_WAYPOINT_RCPT packet.
virtual CString getPacketDetail(int aLineNumber)
Print a particular packet to the packet view.
uint32 data_type
Type of data to delete, see del_data for valid values.
Data type for the File Transfer Start Packet ID.
sint16 software_version
Software version * 100 (312 means version 3.12)
uint32 distance_to_destination
Distance to destination, in meters, or 0xFFFFFFFF if no active destination.
Data type for Dashcam Notifictation Packet ID (0X160A) from server to client (receipt) ...
Data type for Driver Status Request Packet ID.
sc_position_type posn
Position at the time of alert.
uint32 unique_id
Uniquely identifies the ETA message.
uint32 unique_id
Unique ID from eta_data_type.
sc_position_type stop_position
Location of the stop.
boolean result_code
TRUE if the operation was successful, FALSE otherwise.
Data type for the Annotation Download Request Packet ID (0X110C) from client to server.
uint16 year
Real year (1990 means 1990!)
Data type for Long Test Message Receipt Packet ID (0X0056) from client to server. ...
Data type for the Speed Limit Alerts setup Receipt Packet ID.
time_type origination_time
Origination time of the message being acknowledged.
Data type for the ETA Data Packet ID.
uint8 id_size
Size of the message ID.
uint16 count
Number of items deleted.
Data type for Dashcam Configure Settings Packet ID (0X1602) from server to client.
Data type for the Set Canned Response Packet ID.
char password[20]
Driver password (null terminated string). Optional if driver password support is not enabled...
CString formatTime(time_type aTimestamp)
Format Garmin UTC timestamp.
uint8 id_size
Size of the message ID.
CString getGarminPacketName(uint8 aPacketId)
Translate a Garmin packet ID into a string describing the packet name.
time_type origination_time
Origination time of the message.
char server_annotation[60]
uint32 text_element_id
ID of the user interface element being changed.
Data type for Change Status HOSART Packet ID (0X0000)
Data type for the Driver Profile Data Packet ID (0X1110) from server to client and Driver Profile Dat...
float speed
Speed at the time of alert.
uint8 id[16]
The message ID.
unsigned char uint8
8-bit unsigned integer
void appendIFTADataModResultCode(CString &packet, uint8 result_code)
Data type for Route Calculation ACK Packet ID (0X1220) from client to server.
time_type origination_time
Origination time when the server sent the stop to the client.
uint32 message_id
ID of the canned message.
Data type for the FMI_ID_CREATE_WAYPOINT_CAT packet.
time_type origination_time
Payload for Garmin ID_PRODUCT_DATA (A000) and FMI FMI_ID_PRODUCT_ID_DATA (A602) packet.
sint16 leap_seconds
Number of leap seconds as of the current time.
uint32 message_id
ID of the canned message to delete.
uint16 unique_id
Server-assigned unique ID for the waypoint.
uint32 message_id
Unique identifier and sort key for this canned message.
Data type for the Driver Status Log response Packet ID (0X1107) from server to client.
uint8 id
Waypoint category (0-15)
time_type eta_time
Estimated time of arrival, or 0xFFFFFFFF if no active destination.
boolean result_code
Result (true if successful, false otherwise)
uint32 unique_id
unique_id from the stop_status_data_type.
boolean result_code
True if the update was successful.
sint16 data
Protocol number.
Data type for the Message Throttling Query Response Packet ID.
Data type for the HOS Auto Status Update Receipt Packet ID (0X1301) from client to server...
uint32 status_id
Unique identifier and sort key for the status item.
uint8 id_size
Size of the message ID.
Data type for the Driver Status Log Update Data Packet ID (0X1106) from client to server...
char response_text[50]
Response text to display on client (variable length, null terminated string)
uint32 file_size
Size of the file, in bytes.
Data type for the Set Canned Message Receipt Packet ID and Delete Canned Message Receipt Packet ID...
boolean result_code
TRUE if message was deleted, FALSE if message was not found.
Data type for the Delete Canned Response Packet ID.
time_type origination_time
Time the message was sent from the server.
virtual void resendPacket(int aLineNumber)
Resend a packet to the client.
CString getFmiPacketName(uint16 aPacketId)
Translate an FMI packet ID into a string describing the packet name.
time_type server_start_time
Data type for the FMI_ID_CREATE_WAYPOINT_CAT_RCPT packet.
uint8 driver_idx
Driver index to change.
Data type for the IFTA Data Fetch Request Packet ID (0X0006) from server to client.
CString getHosartPacketName(uint16 aPacketId)
FmiLogParser()
Constructor.
uint32 status_change_id
status_change_id from the driver_id_data_type
Data type for File Start Receipt Packet ID and File End Receipt Packet ID.
float64 lon
longitude in radians, positive is east
boolean result_code
True if the operation was successful.
time_type server_start_time
Data type for Configure Sensor Request Packet ID (0x1402) from server to client.
time_type server_end_time
uint8 id[16]
The message ID.
Data type for Custom Avoidance Feature Enable Packet ID (0X1236, 0X1235)
uint8 file_type
File type.
time_type server_end_time
void UTIL_convert_UTC_to_local(const time_type *aUtcTime, time_type *aLocalTime)
Converts a time_type from UTC to local time.
uint32 response_id
The canned response ID from the set or delete.
Payload of FMI_ID_AUTO_ARRIVAL packet.
time_type origination_time
Time when the client sent the message.
unsigned long int uint32
32-bit unsigned integer
char text_message[200]
Message text (variable length, null-terminated string)
Data type for the Driver Status Update packet.
float32 epe
Estimated position error, 2 sigma, in meters.
sint32 lon
longitude in semicircles
uint8 result_code
Result of operation.
Data type for the FMI_ID_DELETE_WAYPOINT_CAT_RCPT packet.
uint32 time_type
Absolute time (number of seconds since 12/31/1989 12:00 am UTC)
Data type for the Driver Login Data Packet ID (0X1102) from server to client.
uint8 id_size
Number of significant bytes in the message ID.
Data type for the Canned Response List Packet ID.
uint32 response_count
Number of responses in the array; if 0, all responses need refresh.
float32 epv
Estimated vertical position error, 2 sigma, in meters.
boolean enable_lane_departure_ntfctn
uint32 response_id
The canned response ID to delete.
uint8 feature_count
Number of feature IDs in features[].
time_type origination_time
Data type for Canned Response List Packet ID.
float32 eph
Estimated horizontal position error, 2 sigma, in meters.
Data type for the Data Deletion Packet ID.
__packed struct fmi_dashcam_settings_list settings_list[30]
uint8 driver_idx
Index of driver to change.
time_type origination_time
#define MAX_PAYLOAD_SIZE
Maximum payload size, before DLE stuffing.
Payload of FMI_ID_STOP_STATUS_RCPT packet.
Data type for Set Dashcam Notification Settings Packet ID (0X1606) from server to client...
uint8 driver_idx
Driver index requested.
float speed_limit
Speed limit at the time of alert.
uint16 type_of_gps_fix
Enum for type of GPS fix, see gps_fix_type.
float32 north_velocity
North velocity in m/s, negative is south.
uint8 file_data[245]
file data, variable length
sint16 hour
hour (0-65535), range required for correct ETE conversion
static GarminTransportLayer * getInstance()
Get the one and only GarminTransportLayer.
uint32 week_number_days
Days from UTC December 31st, 1989 to beginning of current week.
CString formatHosartPacket(BOOL transmitted, uint16 aPacketId, uint8 *aPayload, uint8 aPayloadSize)
Interpret an HOSART packet; appending the information to the text in the packet window.
Data type for the Set Canned Response Receipt Packet ID and Delete Canned Response Receipt Packet ID...
float64 time_of_week
Seconds since Sunday 12:00 AM (excludes leap seconds)
char text_message[200]
Text message (variable length, null-terminated string, 200 bytes max)
Data type for Dashcam Settings Packet ID (0X1601, 0X1603, 0x1607) from client to server.
uint32 driver_status
ID corresponding to the new driver status.
uint32 unique_id
Unique ID generated by client.
uint32 stop_distance
Minimum distance to destination before auto-arrival is activated, in meters.
uint8 id
Waypoint category.
Data type for File Start Receipt Packet ID and File End Receipt Packet ID when sent from Server...
uint16 cat
Waypoint categories, bit-mapped.
float threshold
Speed over speed limit when speeding event begins.
uint8 mode
Mode, a valid speed_limit_alert_mode_type.
Data type for the Speed Limit Alerts setup Packet ID.