GeoCOM Reference Manual
Central Services – CSV
Leica TPS1200 – Version 1.50
107
11.4.5
CSV_GetDateTime – getting the date and time.
CSV_GetDateTime.............................................................................................................................................................................................................................................................................
me
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 5008
5008 ................................................................................................................................................................................................................................................................CSV_GetDateTi
C-Declaration
CSV_GetDateTime(DATIME &DateAndTime)
VB-Declaration
VB_CSV_GetDateTime (DateAndTime As DATIME)
ASCII-Request
%R1Q,5008:
ASCII-Response
%R1P,0,0:
RC,Year[short],Month,Day,Hour,Minute,Second[all byte]
Remarks
Gets the current date and time of the instrument. The ASCII response is formatted corresponding to the data type
DATIME
. A possible response can look like this
: %R1P,0,0:0,1996,'07', '19','10','13','2f'
(see
chapter ASCII data type declaration for further information)
Parameters
DateAndTime
Out
Encoded date and time.
Return-Code Names and Return-Code Values
GRC_OK
0 Execution
successful.
See Also
CSV_SetDateTime
CSV_GetDateTimeCentiSec
Example
GRC_TYPE rc;
DATIME DateAndTime;
rc = CSV_GetDateTime(DateAndTime);
if (rc == GRC_OK)
{
// use Date and time
}
else
{
// time and/or date is not set (yet)
// use CSV_SetDateTime to set date and time
// (March 25 1997, 10:20)
DateAndTime.Date.Year = 1997;
DateAndTime.Date.Month = 3;
DateAndTime.Date.Day = 25;
DateAndTime.Time.Hour = 10;
DateAndTime.Time.Minute = 20;
DateAndTime.Time.Second = 0;
rc = CSV_SetDateTime(DateAndTime);
}