|
|
ms_bool_t pfxrtodc(ms_daytime_t *cur_time) ms_bool_t pfxwtodc(ms_daytime_t *cur_time)
The ms_daytime_t structure is defined as follows:
typedef struct( unsigned long dt_day /* absolute Julian day */ unsigned long dt_centisec /* 100ths of seconds into the day */ ) ms_daytime_t;For the convenience of the PSM, the time of day can also be represented in another form, ms_xdate_t:
typedef struct( unsigned short xd_year /* full year (e.g. 1997) */ unsigned short xd_month /* 1=JAN */ unsigned short xd_day /* day in month, from 1*/ unsigned short xd_hour /* 0 - 23 */ unsigned short xd_min /* 0 - 59 */ unsigned short xd_sec /* 0 - 59 */ unsigned long xd_centisec /* 100ths of seconds into second */ ) ms_xdate_t;MSOP_RTODC must return the time in ms_daytime_t form. If the hardware format is closer to ms_xdate_t, it may be easier to convert it first to ms_xdate_t then convert it to ms_daytime_t.
MSOP_WTODC returns the following values: