16 #if( FMI_SUPPORT_A622 ) 29 CDashcamNtfctnFromClient::CDashcamNtfctnFromClient
37 , mOriginationTime( _T("") )
39 , mLongitude( _T("") )
41 , mIncidentFilename( _T("") )
44 init( aEvent.origination_time, aEvent.scposn, aEvent.ntfctn_type );
61 , mOriginationTime( _T(
"") )
63 , mLongitude( _T(
"") )
65 , mIncidentFilename( _T(
"") )
86 CDataExchange * aDataExchange
89 CDialog::DoDataExchange( aDataExchange );
107 TCHAR stringBuffer[200];
110 char localTimeString[13];
117 stringBuffer[13] =
'\0';
120 switch( ntfctn_type )
124 mType = _T(
" Incident");
129 mType = _T(
" Fwd Collision Warning");
134 mType = _T(
" Lane Departure Warning");
139 mType = _T(
" Unrecognized" );
149 if( latitudeDegrees < 0 )
151 mLatitude.Format( _T(
"%08.6f °S" ), latitudeDegrees * -1 );
155 mLatitude.Format( _T(
"%08.6f °N" ), latitudeDegrees );
158 if( longitudeDegrees < 0 )
160 mLongitude.Format( _T(
"%08.6f °W" ), longitudeDegrees * -1 );
164 mLongitude.Format( _T(
"%08.6f °E" ), longitudeDegrees );
#define IDC_DASHCAM_NTFCTN_TIMESTAMP
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
Data type for Dashcam Notification Packet ID (0X160C) from client to server (request) ...
#define IDC_DASHCAM_NTFCTN_INCIDENT_FNAME
Data type for Dashcam Notification Packet ID (0X1606) from client to server (request) ...
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.
FmiApplicationLayer & mCom
Reference to the FMI communication controller.
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...
double UTIL_convert_semicircles_to_degrees(sint32 aSemicircles)
Converts a latitude/longitude from semicircles to degrees.
CString mIncidentFilename
void init(time_type origination_time, sc_position_type scposn, uint8 ntfctn_type)
Initialize the field data.
sint32 lat
latitude in semicircles
#define IDC_DASHCAM_NTFCTN_TYPE
codepage_type mClientCodepage
Code page used for encoding of text fields when communicating with the client.
virtual ~CDashcamNtfctnFromClient()
Destructor.
Serial communication controller for Garmin and FMI packets.
#define INVALID_LAT
placeholder for invalid latitude value
#define IDC_DASHCAM_NTFCTN_LON
CDashcamNtfctnFromClient(CWnd *aParent, FmiApplicationLayer &aCom, const fmi_dashcam_ntfctn_req_data_type &aEvent)
Constructor.
#define IDD_DASHCAM_NTFCTN_FROM_CLIENT
Indicates a latitude and longitude in semicircles.
unsigned char uint8
8-bit unsigned integer
#define IDC_DASHCAM_NTFCTN_LAT
Modal pop up dialog displaying a client to server dashcam notification.
void UTIL_convert_UTC_to_local(const time_type *aUtcTime, time_type *aLocalTime)
Converts a time_type from UTC to local time.
sint32 lon
longitude in semicircles
uint32 time_type
Absolute time (number of seconds since 12/31/1989 12:00 am UTC)
time_type origination_time