DVBCore  1.0
Open source DVB engine
midware/stb/inc/stbgc.h File Reference

Header file - macros and function prototypes for public use. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define D_DSHFT   17
#define D_HSHFT   12
#define D_MSHFT   6
#define DHMS_CREATE(dy, hr, mn, sc)   ((U32DHMS)dy << D_DSHFT | (U32DHMS)hr << D_HSHFT | (U32DHMS)mn << D_MSHFT | (sc))
#define DHMS_DAYS(dhms)   (dhms >> D_DSHFT)
#define DHMS_DATE32(dhms)   ((dhms >> D_DSHFT) | 0x8000)
#define DHMS_HOUR32(dhms)   ((dhms >> D_HSHFT) & 0x1f)
#define DHMS_MINS32(dhms)   ((dhms >> D_MSHFT) & 0x3f)
#define DHMS_SECS32(dhms)   (dhms & 0x3f)
#define DHMS_DATE(dhms)   (U16BIT)DHMS_DATE32(dhms)
#define DHMS_HOUR(dhms)   (U8BIT) DHMS_HOUR32(dhms)
#define DHMS_MINS(dhms)   (U8BIT) DHMS_MINS32(dhms)
#define DHMS_SECS(dhms)   (U8BIT) DHMS_SECS32(dhms)

Typedefs

typedef U32BIT U32DHMS

Enumerations

enum  E_STB_GC_WEEKDAY {
  WEEKDAY_MONDAY = 1, WEEKDAY_TUESDAY = 2, WEEKDAY_WEDNESDAY = 3, WEEKDAY_THURSDAY = 4,
  WEEKDAY_FRIDAY = 5, WEEKDAY_SATURDAY = 6, WEEKDAY_SUNDAY = 7
}
enum  E_STB_GC_CALCTYPE { CALC_ADD = 0, CALC_SUB = 1 }
enum  E_STB_GC_CONVTYPE { CONV_LOCAL = 0, CONV_GMT = 1 }
enum  E_STB_GC_COMPTYPE {
  COMP_MATCH = 0, COMP_1GT2 = 1, COMP_1GE2 = 2, COMP_1LT2 = 3,
  COMP_1LE2 = 4, COMP_2GT1 = 5, COMP_2GE1 = 6, COMP_2LT1 = 7,
  COMP_2LE1 = 8
}
enum  E_STB_GC_TIMETYPE { TIME_12H = 0, TIME_24H = 1 }
enum  E_STB_GC_DATETYPE { DATE_DMY = 0, DATE_YMD = 1 }
enum  E_STB_GC_CLOCKTYPE { CLOCK_HMS = 0, CLOCK_SMH = 1, CLOCK_HM = 2, CLOCK_MH = 3 }

Functions

void STB_GCInitialise (void)
void STB_GCSetSearchLangCode (U32BIT lang)
U32BIT STB_GCGetSearchLangCode (void)
U8BIT * STB_GCGetLangCodeString (U32BIT lang)
void STB_GCSetCIStandby (BOOLEAN standby)
U8BIT * STB_GCGetFullSerialString (void)
U8BIT * STB_GCGetVersionNumberString (void)
void STB_GCSetAudioSignal (BOOLEAN state)
BOOLEAN STB_GCGetAudioSignal (void)
void STB_GCSetLocalTimeOffset (U8BIT ohour, U8BIT omin, BOOLEAN neg)
void STB_GCGetLocalTimeOffset (U8BIT *ohour, U8BIT *omin, BOOLEAN *neg)
void STB_GCSetLocalTimeChange (U16BIT code, U8BIT hour, U8BIT min, U8BIT secs, U8BIT ohour1, U8BIT omin1, U8BIT ohour2, U8BIT omin2, BOOLEAN neg)
void STB_GCGetLocalTimeChange (U16BIT code, U8BIT hour, U8BIT min, U8BIT secs, U8BIT *ohour, U8BIT *omin, BOOLEAN *neg)
void STB_GCSetGMTTime (U8BIT hour, U8BIT min, U8BIT secs)
U8BIT STB_GCGetGMTHour (void)
U8BIT STB_GCGetGMTMin (void)
U8BIT STB_GCGetGMTSecs (void)
void STB_GCSetGMTDate (U16BIT code)
U16BIT STB_GCGetGMTDate (void)
E_STB_GC_WEEKDAY STB_GCGetGMTWeekDay (void)
U8BIT STB_GCGetGMTDay (void)
U8BIT STB_GCGetGMTMonth (void)
U16BIT STB_GCGetGMTYear (void)
void STB_GCGetGMTDateTime (U16BIT *code, U8BIT *hour, U8BIT *min, U8BIT *secs)
BOOLEAN STB_GCIsFutureDateTime (U16BIT code, U8BIT hour, U8BIT min, U8BIT secs)
E_STB_GC_WEEKDAY STB_GCGetDateWeekDay (U16BIT code)
BOOLEAN STB_GCIsDateDayWeek (U16BIT code)
BOOLEAN STB_GCIsDateDayWeekend (U16BIT code)
void STB_GCCalculateDateTime (U16BIT code, U8BIT hour, U8BIT min, U8BIT secs, U8BIT ohour, U8BIT omin, U8BIT osecs, U16BIT *rcode, U8BIT *rhour, U8BIT *rmin, U8BIT *rsecs, E_STB_GC_CALCTYPE calc)
void STB_GCConvertDateTime (U16BIT code, U8BIT hour, U8BIT min, U8BIT secs, U16BIT *rcode, U8BIT *rhour, U8BIT *rmin, U8BIT *rsecs, E_STB_GC_CONVTYPE conv)
BOOLEAN STB_GCCompareDateTime (U16BIT code1, U8BIT hour1, U8BIT min1, U8BIT secs1, U16BIT code2, U8BIT hour2, U8BIT min2, U8BIT secs2, E_STB_GC_COMPTYPE comp)
S32BIT STB_GCDateTimeDiff (U16BIT code1, U8BIT hour1, U8BIT min1, U8BIT secs1, U16BIT code2, U8BIT hour2, U8BIT min2, U8BIT secs2)
U8BIT * STB_GCGetTimeString (U16BIT code, U8BIT hour, U8BIT min, E_STB_GC_TIMETYPE format)
U8BIT * STB_GCGetDateString (U16BIT code, U8BIT hour, U8BIT min, E_STB_GC_DATETYPE format)
U8BIT * STB_GCGetClockString (U8BIT hour, U8BIT min, U8BIT secs, E_STB_GC_CLOCKTYPE format)
void STB_GCGetDateInfo (U16BIT code, U8BIT hour, U8BIT min, U8BIT *day, U8BIT *wday, U8BIT *month, U16BIT *year)
void STB_GCGetMJDDateInfo (U16BIT code, U8BIT *day, U8BIT *wday, U8BIT *month, U16BIT *year)
void STB_GCGetLocalDateTime (U16BIT *year, U8BIT *month, U8BIT *day, U8BIT *hour, U8BIT *mins)
void STB_GCUseBroadcastTime (BOOLEAN state)
 Sets whether the date/time are taken from the broadcast or the system. The default is to use the broadcast for date/time.
U32DHMS STB_GCCreateDebugDHMS (U32BIT date, U32BIT hour, U32BIT mins, U32BIT secs)
U32DHMS STB_GCCreateDHMS (U16BIT date, U8BIT hour, U8BIT mins, U8BIT secs)
U32DHMS STB_GCCalculateDHMS (U32DHMS dhms, U32DHMS period, E_STB_GC_CALCTYPE calc)
 Calculates the date/time when the period is added/subtracted to/from dhms.
U32DHMS STB_GCConvertDHMS (U32DHMS dhms, E_STB_GC_CONVTYPE conv)
 Converts the given date/time to local or GMT.
U32DHMS STB_GCNowDHMSGmt (void)
U32DHMS STB_GCNowDHMSLocal (void)
U8BIT * STB_GCGetDateStringDHMS (U32DHMS dhms, E_STB_GC_DATETYPE format)
U8BIT * STB_GCGetTimeStringDHMS (U32DHMS dhms, E_STB_GC_TIMETYPE format)
U32DHMS STB_GCConvertTimestamp (U32BIT timestamp)
 Converts a timestamp expressed in number of seconds since midnight (UTC) 1 January 1970.
U32BIT STB_GCConvertToTimestamp (U32DHMS time)
 Returns the number of seconds from midnight (UTC) 1 January 1970 to the specified U32DHMS time.

Detailed Description

Header file - macros and function prototypes for public use.

Date:
13/10/2000

Function Documentation

U32DHMS STB_GCCalculateDHMS ( U32DHMS  dhms,
U32DHMS  period,
E_STB_GC_CALCTYPE  calc 
)

Calculates the date/time when the period is added/subtracted to/from dhms.

Parameters:
dhmsbase date/time
perioddays/hours/mins/secs to be added or subtracted
calccalculation to be performed CALC_ADD adds period to dhms CALC_SUB subtracts period from dhms
Returns:
resulting date/time following the calculation
U32DHMS STB_GCConvertDHMS ( U32DHMS  dhms,
E_STB_GC_CONVTYPE  conv 
)

Converts the given date/time to local or GMT.

Parameters:
dhmsdate/time to be converted
convconversion to be performed CONV_LOCAL = convert to local CONV_GMT = convert to GMT
Returns:
converted date/time
U32DHMS STB_GCConvertTimestamp ( U32BIT  timestamp)

Converts a timestamp expressed in number of seconds since midnight (UTC) 1 January 1970.

Parameters:
timestampnumber of seconds since midnight (UTC) 1 January 1970
Returns:
time expressed as U32DHMS
U32BIT STB_GCConvertToTimestamp ( U32DHMS  time)

Returns the number of seconds from midnight (UTC) 1 January 1970 to the specified U32DHMS time.

Parameters:
timetime in U32DHMS format
void STB_GCUseBroadcastTime ( BOOLEAN  state)

Sets whether the date/time are taken from the broadcast or the system. The default is to use the broadcast for date/time.

**************************************************************************

Parameters:
state- FALSE to use date/time from the system
 All Data Structures Files Functions Typedefs Defines