DVBCore  20.3.0
DVBCore Documentation
Macros | Typedefs | Enumerations | Functions
stbgc.h File Reference

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

#include "techtype.h"

Go to the source code of this file.

Macros

#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)
 Initialises general control.
 
void STB_GCSetSearchLangCode (U32BIT lang)
 Writes SI search language code into general control store. More...
 
U32BIT STB_GCGetSearchLangCode (void)
 Reads the SI search language code from general control store. More...
 
U8BIT * STB_GCGetLangCodeString (U32BIT lang)
 Converts the given 24bit ISO language code to a null-terminated string. More...
 
void STB_GCSetCIStandby (BOOLEAN standby)
 Enables / disables CI standby state.
 
U8BIT * STB_GCGetFullSerialString (void)
 Retrieves and returns the fulls serial string, incorporating the hardware version box serial number and application version. More...
 
U8BIT * STB_GCGetVersionNumberString (void)
 Retrieves and returns the library version number as a string. More...
 
void STB_GCSetAudioSignal (BOOLEAN state)
 Enables/disables audio signal bleep and writes value into general control store. More...
 
BOOLEAN STB_GCGetAudioSignal (void)
 Reads the current audio signal bleep state from general control store. More...
 
void STB_GCSetLocalTimeOffset (U8BIT ohour, U8BIT omin, BOOLEAN neg)
 Sets local time offset from GMT. More...
 
void STB_GCGetLocalTimeOffset (U8BIT *ohour, U8BIT *omin, BOOLEAN *neg)
 Reads local time offset from GMT. More...
 
void STB_GCSetLocalTimeChange (U16BIT code, U8BIT hour, U8BIT min, U8BIT secs, U8BIT ohour1, U8BIT omin1, U8BIT ohour2, U8BIT omin2, BOOLEAN neg)
 Sets new and old local time offset from GMT. More...
 
void STB_GCGetLocalTimeChange (U16BIT code, U8BIT hour, U8BIT min, U8BIT secs, U8BIT *ohour, U8BIT *omin, BOOLEAN *neg)
 Reads local time offset from GMT. More...
 
void STB_GCSetGMTTime (U8BIT hour, U8BIT min, U8BIT secs)
 Sets current GMT time. More...
 
U8BIT STB_GCGetGMTHour (void)
 Reads the current GMT hour. More...
 
U8BIT STB_GCGetGMTMin (void)
 Reads the current GMT minute. More...
 
U8BIT STB_GCGetGMTSecs (void)
 Reads the current GMT seconds. More...
 
void STB_GCSetGMTDate (U16BIT code)
 Sets current GMT date. More...
 
U16BIT STB_GCGetGMTDate (void)
 Reads the current GMT date code. More...
 
E_STB_GC_WEEKDAY STB_GCGetGMTWeekDay (void)
 Reads the current GMT weekday number. More...
 
U8BIT STB_GCGetGMTDay (void)
 Reads the current GMT day number. More...
 
U8BIT STB_GCGetGMTMonth (void)
 Reads the current GMT month number. More...
 
U16BIT STB_GCGetGMTYear (void)
 Reads the current GMT year number. More...
 
void STB_GCGetGMTDateTime (U16BIT *code, U8BIT *hour, U8BIT *min, U8BIT *secs)
 Reads the current GMT date code and time. More...
 
BOOLEAN STB_GCIsFutureDateTime (U16BIT code, U8BIT hour, U8BIT min, U8BIT secs)
 Tests given date and time against current GMT date and time. More...
 
E_STB_GC_WEEKDAY STB_GCGetDateWeekDay (U16BIT code)
 Returns the weekday number of the specified date code. More...
 
BOOLEAN STB_GCIsDateDayWeek (U16BIT code)
 Tests whether the weekday of the specified date code is during the week. More...
 
BOOLEAN STB_GCIsDateDayWeekend (U16BIT code)
 Tests whether the weekday of the specified date code is during the weekend. More...
 
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)
 Adds or subtracts offset from a date/time. More...
 
void STB_GCConvertDateTime (U16BIT code, U8BIT hour, U8BIT min, U8BIT secs, U16BIT *rcode, U8BIT *rhour, U8BIT *rmin, U8BIT *rsecs, E_STB_GC_CONVTYPE conv)
 Converts specified date / time to another. More...
 
BOOLEAN STB_GCCompareDateTime (U16BIT code1, U8BIT hour1, U8BIT min1, U8BIT secs1, U16BIT code2, U8BIT hour2, U8BIT min2, U8BIT secs2, E_STB_GC_COMPTYPE comp)
 Compares one date/time to another. More...
 
S32BIT STB_GCDateTimeDiff (U16BIT code1, U8BIT hour1, U8BIT min1, U8BIT secs1, U16BIT code2, U8BIT hour2, U8BIT min2, U8BIT secs2)
 Returns the difference in seconds between the two dates/times, as time1 - time2, so the result will be negative if time1 is earlier than time2, and positive otherwise. More...
 
U8BIT * STB_GCGetTimeString (U16BIT code, U8BIT hour, U8BIT min, E_STB_GC_TIMETYPE format)
 Supplies specified time as local time string, in format requested. More...
 
U8BIT * STB_GCGetDateString (U16BIT code, U8BIT hour, U8BIT min, E_STB_GC_DATETYPE format)
 Supplies specifed date as local date string, in format requested. More...
 
U8BIT * STB_GCGetClockString (U8BIT hour, U8BIT min, U8BIT secs, E_STB_GC_CLOCKTYPE format)
 Supplies specified time as clock string, in format requested. More...
 
void STB_GCGetDateInfo (U16BIT code, U8BIT hour, U8BIT min, U8BIT *day, U8BIT *wday, U8BIT *month, U16BIT *year)
 Get the day, weekday, month and the year from a date code and hour / minute offset. More...
 
void STB_GCGetMJDDateInfo (U16BIT code, U8BIT *day, U8BIT *wday, U8BIT *month, U16BIT *year)
 Returns the date info from the given MJD date code. More...
 
void STB_GCGetLocalDateTime (U16BIT *year, U8BIT *month, U8BIT *day, U8BIT *hour, U8BIT *mins)
 Get the local year, month, day, hour and minute. More...
 
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. More...
 
U32DHMS STB_GCCreateDebugDHMS (U32BIT date, U32BIT hour, U32BIT mins, U32BIT secs)
 Makes U32DHMS formated date/time from date code, hour, minutes, seconds. More...
 
U32DHMS STB_GCCreateDHMS (U16BIT date, U8BIT hour, U8BIT mins, U8BIT secs)
 Makes U32DHMS formated date/time from date code, hour, minutes, seconds. More...
 
U32DHMS STB_GCCreateDHMSFromSeconds (U32BIT num_seconds)
 Creates a DHMS value consisting of hours, minutes and seconds from a number of seconds. More...
 
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. More...
 
U32DHMS STB_GCConvertDHMS (U32DHMS dhms, E_STB_GC_CONVTYPE conv)
 Converts the given date/time to local or GMT. More...
 
U32DHMS STB_GCNowDHMSGmt (void)
 Reads the current GMT date code and time. More...
 
U32DHMS STB_GCNowDHMSLocal (void)
 Reads the current Local date code and time. More...
 
U8BIT * STB_GCGetDateStringDHMS (U32DHMS dhms, E_STB_GC_DATETYPE format)
 Supplies specifed date as local date string, in format requested. More...
 
U8BIT * STB_GCGetTimeStringDHMS (U32DHMS dhms, E_STB_GC_TIMETYPE format)
 Supplies specified time as local time string, in format requested. More...
 
U32DHMS STB_GCConvertTimestamp (U32BIT timestamp)
 Converts a timestamp expressed in number of seconds since midnight (UTC) 1 January 1970. More...
 
U32BIT STB_GCConvertToTimestamp (U32DHMS time)
 Returns the number of seconds from midnight (UTC) 1 January 1970 to the specified U32DHMS time. More...
 

Detailed Description

Header file - macros and function prototypes for public use.

Date
13/10/2000

Definition in file stbgc.h.

Function Documentation

◆ STB_GCCalculateDateTime()

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 
)

Adds or subtracts offset from a date/time.

Parameters
U16BITcode - date code.
U8BIThour - hour (0-23).
U8BITmin - minute (0-59).
U8BITsecs - seconds (0-59).
U8BITohour - offset hour (0-23).
U8BITomin - offset minute (0-59).
U8BITosecs - offset seconds (0-59).
U16BIT*rcode - returns result date code.
U8BIT*rhour - returns result hour (0-23).
U8BIT*rmin - returns result minute (0-59).
U8BIT*rsecs - returns result seconds (0-59).

Definition at line 1540 of file stbgc.c.

◆ STB_GCCalculateDHMS()

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

Definition at line 2136 of file stbgc.c.

◆ STB_GCCompareDateTime()

BOOLEAN STB_GCCompareDateTime ( U16BIT  code1,
U8BIT  hour1,
U8BIT  min1,
U8BIT  secs1,
U16BIT  code2,
U8BIT  hour2,
U8BIT  min2,
U8BIT  secs2,
E_STB_GC_COMPTYPE  comp 
)

Compares one date/time to another.

Parameters
U16BITcode1 - first date code.
U8BIThour1 - first hour (0-23).
U8BITmin1 - first minute (0-59).
U8BITsecs1 - first seconds (0-59).
U16BITcode2 - second date code.
U8BIThour2 - second hour (0-23).
U8BITmin2 - second minute (0-59).
U8BITsecs2 - second seconds (0-59).
Returns
TRUE- if comparison is valid, else FALSE.

Definition at line 1647 of file stbgc.c.

◆ STB_GCConvertDateTime()

void STB_GCConvertDateTime ( U16BIT  code,
U8BIT  hour,
U8BIT  min,
U8BIT  secs,
U16BIT *  rcode,
U8BIT *  rhour,
U8BIT *  rmin,
U8BIT *  rsecs,
E_STB_GC_CONVTYPE  conv 
)

Converts specified date / time to another.

Parameters
U16BITcode - date code.
U8BIThour - hour (0-23).
U8BITmin - minute (0-59).
U8BITsecs - seconds (0-59).
U16BIT*rcode - returns result date code.
U8BIT*rhour - returns result hour (0-23).
U8BIT*rmin - returns result minute (0-59).
U8BIT*rsecs - returns result seconds (0-59).

Definition at line 1591 of file stbgc.c.

◆ STB_GCConvertDHMS()

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

Definition at line 2206 of file stbgc.c.

◆ STB_GCConvertTimestamp()

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

Definition at line 2432 of file stbgc.c.

◆ STB_GCConvertToTimestamp()

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

Definition at line 2453 of file stbgc.c.

◆ STB_GCCreateDebugDHMS()

U32DHMS STB_GCCreateDebugDHMS ( U32BIT  date,
U32BIT  hour,
U32BIT  mins,
U32BIT  secs 
)

Makes U32DHMS formated date/time from date code, hour, minutes, seconds.

Note
This function is used when DEBUG_ASSERT is on, and used in place of macro DHMS_CREATE, so that the inputs of the macro can be checked.
Parameters
U32BITdate - date code.
U32BIThour - value of hour (0-23).
U32BITmins - value of minute (0-59).
U32BITsecs - value of seconds (0-59).
Returns
U32DHMS

Definition at line 2049 of file stbgc.c.

◆ STB_GCCreateDHMS()

U32DHMS STB_GCCreateDHMS ( U16BIT  date,
U8BIT  hour,
U8BIT  mins,
U8BIT  secs 
)

Makes U32DHMS formated date/time from date code, hour, minutes, seconds.

Note
This function may be used instead of macro DHMS_CREATE, when it is known that ASSERTs in STB_GCCreateDebugDHMS may fail.
Parameters
U16BITdate
U8BIThour
U8BITmins
U8BITsecs
Returns
U32DHMS

Definition at line 2080 of file stbgc.c.

◆ STB_GCCreateDHMSFromSeconds()

U32DHMS STB_GCCreateDHMSFromSeconds ( U32BIT  num_seconds)

Creates a DHMS value consisting of hours, minutes and seconds from a number of seconds.

Parameters
num_secondsnumber of seconds to be converted
Returns
converted value in hours, minutes and seconds as a U32DHMS value

Definition at line 2110 of file stbgc.c.

◆ STB_GCDateTimeDiff()

S32BIT STB_GCDateTimeDiff ( U16BIT  code1,
U8BIT  hour1,
U8BIT  min1,
U8BIT  secs1,
U16BIT  code2,
U8BIT  hour2,
U8BIT  min2,
U8BIT  secs2 
)

Returns the difference in seconds between the two dates/times, as time1 - time2, so the result will be negative if time1 is earlier than time2, and positive otherwise.


Parameters
code1- MJD date code
hour1- MJD hour
min1- MJD minutes
secs1- MJD seconds
code2- MJD date code
hour2- MJD hour
min2- MJD minutes
secs2- MJD seconds
Returns
number of seconds between the two dates/times

Definition at line 1714 of file stbgc.c.

◆ STB_GCGetAudioSignal()

BOOLEAN STB_GCGetAudioSignal ( void  )

Reads the current audio signal bleep state from general control store.

Returns
BOOLEAN - TRUE if on, else FALSE.

Definition at line 796 of file stbgc.c.

◆ STB_GCGetClockString()

U8BIT* STB_GCGetClockString ( U8BIT  hour,
U8BIT  min,
U8BIT  secs,
E_STB_GC_CLOCKTYPE  format 
)

Supplies specified time as clock string, in format requested.

Parameters
U8BIThour - value of hour (0-23).
U8BITmin - value of minute (0-59).
U8BITsecs - value of secs (0-59).
E_STB_GC_CLOCKTYPEformat - string format required.
Returns
U8BIT* - string pointer.

Definition at line 1925 of file stbgc.c.

◆ STB_GCGetDateInfo()

void STB_GCGetDateInfo ( U16BIT  code,
U8BIT  hour,
U8BIT  min,
U8BIT *  day,
U8BIT *  wday,
U8BIT *  month,
U16BIT *  year 
)

Get the day, weekday, month and the year from a date code and hour / minute offset.

Parameters
U16BITcode - date code.
U8BIThour - value of hour (0-23).
U8BITmin - value of minute (0-59).
U8BIT*day - Day of the month returned value
U8BIT*wday - Week day returned value
U8BIT*month - Month number returned value
U16BIT*year - Year returned value

Definition at line 1867 of file stbgc.c.

◆ STB_GCGetDateString()

U8BIT* STB_GCGetDateString ( U16BIT  code,
U8BIT  hour,
U8BIT  min,
E_STB_GC_DATETYPE  format 
)

Supplies specifed date as local date string, in format requested.

Parameters
U16BITcode - date code.
U8BIThour - value of hour (0-23).
U8BITmin - value of minute (0-59).
E_STB_GC_DATETYPEformat - string format required.
Returns
U8BIT* - string pointer.

Definition at line 1809 of file stbgc.c.

◆ STB_GCGetDateStringDHMS()

U8BIT* STB_GCGetDateStringDHMS ( U32DHMS  dhms,
E_STB_GC_DATETYPE  format 
)

Supplies specifed date as local date string, in format requested.

Parameters
U32DHMSdhms - date time (gmt)
E_STB_GC_DATETYPEformat - string format required.
Returns
U8BIT* - string pointer.

Definition at line 2349 of file stbgc.c.

◆ STB_GCGetDateWeekDay()

E_STB_GC_WEEKDAY STB_GCGetDateWeekDay ( U16BIT  code)

Returns the weekday number of the specified date code.

Parameters
U16BITcode - date code.
Returns
E_STB_GC_WEEKDAY - weekday number (1-7).

Definition at line 1448 of file stbgc.c.

◆ STB_GCGetFullSerialString()

U8BIT* STB_GCGetFullSerialString ( void  )

Retrieves and returns the fulls serial string, incorporating the hardware version box serial number and application version.

Returns
Pointer to the retrieved serial number.

Definition at line 723 of file stbgc.c.

◆ STB_GCGetGMTDate()

U16BIT STB_GCGetGMTDate ( void  )

Reads the current GMT date code.

Returns
U16BIT - value of date code.

Definition at line 1207 of file stbgc.c.

◆ STB_GCGetGMTDateTime()

void STB_GCGetGMTDateTime ( U16BIT *  code,
U8BIT *  hour,
U8BIT *  min,
U8BIT *  secs 
)

Reads the current GMT date code and time.

Parameters
U16BIT*code - returns value of date code.
U8BIT*hour - returns value of hour (0-23).
U8BIT*min - returns value of minute (0-59).
U8BIT*secs - returns value of seconds (0-59).

Definition at line 1372 of file stbgc.c.

◆ STB_GCGetGMTDay()

U8BIT STB_GCGetGMTDay ( void  )

Reads the current GMT day number.

Returns
U8BIT - day number (1-31).

Definition at line 1273 of file stbgc.c.

◆ STB_GCGetGMTHour()

U8BIT STB_GCGetGMTHour ( void  )

Reads the current GMT hour.

Returns
U8BIT - value of hour (0-23).

Definition at line 1081 of file stbgc.c.

◆ STB_GCGetGMTMin()

U8BIT STB_GCGetGMTMin ( void  )

Reads the current GMT minute.

Returns
U8BIT - value of minute (0-59).

Definition at line 1112 of file stbgc.c.

◆ STB_GCGetGMTMonth()

U8BIT STB_GCGetGMTMonth ( void  )

Reads the current GMT month number.

Returns
U8BIT - month number (1-12).

Definition at line 1305 of file stbgc.c.

◆ STB_GCGetGMTSecs()

U8BIT STB_GCGetGMTSecs ( void  )

Reads the current GMT seconds.

Returns
U8BIT - value of seconds (0-59).

Definition at line 1143 of file stbgc.c.

◆ STB_GCGetGMTWeekDay()

E_STB_GC_WEEKDAY STB_GCGetGMTWeekDay ( void  )

Reads the current GMT weekday number.

Returns
E_STB_GC_WEEKDAY - weekday number (1-7).

Definition at line 1238 of file stbgc.c.

◆ STB_GCGetGMTYear()

U16BIT STB_GCGetGMTYear ( void  )

Reads the current GMT year number.

Returns
U16BIT - value of year.

Definition at line 1337 of file stbgc.c.

◆ STB_GCGetLangCodeString()

U8BIT* STB_GCGetLangCodeString ( U32BIT  lang)

Converts the given 24bit ISO language code to a null-terminated string.

Parameters
U32BITlang - ISO language code.
Returns
U8BIT* - string pointer.

Definition at line 665 of file stbgc.c.

◆ STB_GCGetLocalDateTime()

void STB_GCGetLocalDateTime ( U16BIT *  year,
U8BIT *  month,
U8BIT *  day,
U8BIT *  hour,
U8BIT *  min 
)

Get the local year, month, day, hour and minute.

Parameters
U16BIT*year - Year returned value
U8BIT*month - Month number returned value (1-12)
U8BIT*day - Day of the month returned value (1-31)
U8BIT*hour - value of hour (0-23).
U8BIT*min - value of minute (0-59).

Definition at line 1969 of file stbgc.c.

◆ STB_GCGetLocalTimeChange()

void STB_GCGetLocalTimeChange ( U16BIT  code,
U8BIT  hour,
U8BIT  min,
U8BIT  secs,
U8BIT *  ohour,
U8BIT *  omin,
BOOLEAN *  neg 
)

Reads local time offset from GMT.

Parameters
U16BITcode - date of change.
U8BIThour - hour of change (0-23).
U8BITmin - minute of change (0-59).
U8BITsecs - seconds of change (0-59).
U8BIT*ohour - returns hour offset (0-23).
U8BIT*omin - returns minute offset (0-59).
BOOLEAN*neg - returns TRUE if offset is negative, else FALSE.

Definition at line 986 of file stbgc.c.

◆ STB_GCGetLocalTimeOffset()

void STB_GCGetLocalTimeOffset ( U8BIT *  ohour,
U8BIT *  omin,
BOOLEAN *  neg 
)

Reads local time offset from GMT.

Parameters
U8BIT*ohour - returns hour offset (0-23).
U8BIT*omin - returns minute offset (0-59).
BOOLEAN*neg - returns TRUE if offset is negative, else FALSE.

Definition at line 869 of file stbgc.c.

◆ STB_GCGetMJDDateInfo()

void STB_GCGetMJDDateInfo ( U16BIT  code,
U8BIT *  day,
U8BIT *  wday,
U8BIT *  month,
U16BIT *  year 
)

Returns the date info from the given MJD date code.


Parameters
code- date code as a Modified Julian Date value
day- returns with day of the month
wday- returns with day of the week
month- returns with month number
year- returns with the year

Definition at line 1902 of file stbgc.c.

◆ STB_GCGetSearchLangCode()

U32BIT STB_GCGetSearchLangCode ( void  )

Reads the SI search language code from general control store.

Returns
U32BIT - ISO language code.

Definition at line 641 of file stbgc.c.

◆ STB_GCGetTimeString()

U8BIT* STB_GCGetTimeString ( U16BIT  code,
U8BIT  hour,
U8BIT  min,
E_STB_GC_TIMETYPE  format 
)

Supplies specified time as local time string, in format requested.

Parameters
U16BITcode - date code.
U8BIThour - value of hour (0-23).
U8BITmin - value of minute (0-59).
E_STB_GC_TIMETYPEformat - string format required.
Returns
U8BIT* - string pointer.

Definition at line 1743 of file stbgc.c.

◆ STB_GCGetTimeStringDHMS()

U8BIT* STB_GCGetTimeStringDHMS ( U32DHMS  dhms,
E_STB_GC_TIMETYPE  format 
)

Supplies specified time as local time string, in format requested.

Parameters
U32DHMSdhms - date time (gmt)
E_STB_GC_TIMETYPEformat - string format required.
Returns
U8BIT* - string pointer.

Definition at line 2388 of file stbgc.c.

◆ STB_GCGetVersionNumberString()

U8BIT* STB_GCGetVersionNumberString ( void  )

Retrieves and returns the library version number as a string.

Returns
Pointer to the version number.

Definition at line 746 of file stbgc.c.

◆ STB_GCIsDateDayWeek()

BOOLEAN STB_GCIsDateDayWeek ( U16BIT  code)

Tests whether the weekday of the specified date code is during the week.

Parameters
U16BITcode - date code.
Returns
BOOLEAN - TRUE if week day (1-5).

Definition at line 1472 of file stbgc.c.

◆ STB_GCIsDateDayWeekend()

BOOLEAN STB_GCIsDateDayWeekend ( U16BIT  code)

Tests whether the weekday of the specified date code is during the weekend.

Parameters
U16BITcode - date code.
Returns
BOOLEAN - TRUE if week day (6-7).

Definition at line 1501 of file stbgc.c.

◆ STB_GCIsFutureDateTime()

BOOLEAN STB_GCIsFutureDateTime ( U16BIT  code,
U8BIT  hour,
U8BIT  min,
U8BIT  secs 
)

Tests given date and time against current GMT date and time.

Parameters
U16BITcode - value of date code.
U8BIThour - value of hour (0-23).
U8BITmin - value of minute (0-59).
U8BITsecs - value of seconds (0-59).
Returns
BOOLEAN - TRUE of given date/time is in the future (strictly greater than) else FALSE.

Definition at line 1411 of file stbgc.c.

◆ STB_GCNowDHMSGmt()

U32DHMS STB_GCNowDHMSGmt ( void  )

Reads the current GMT date code and time.

Parameters
void
Returns
U32DHMS - now in GMT

Definition at line 2264 of file stbgc.c.

◆ STB_GCNowDHMSLocal()

U32DHMS STB_GCNowDHMSLocal ( void  )

Reads the current Local date code and time.

Parameters
void
Returns
U32DHMS - now in local time

Definition at line 2296 of file stbgc.c.

◆ STB_GCSetAudioSignal()

void STB_GCSetAudioSignal ( BOOLEAN  state)

Enables/disables audio signal bleep and writes value into general control store.

Parameters
BOOLEANstate - TRUE to turn on, else FALSE.

Definition at line 768 of file stbgc.c.

◆ STB_GCSetGMTDate()

void STB_GCSetGMTDate ( U16BIT  code)

Sets current GMT date.

Parameters
U16BITcode - date code in UTC.

Definition at line 1174 of file stbgc.c.

◆ STB_GCSetGMTTime()

void STB_GCSetGMTTime ( U8BIT  hour,
U8BIT  min,
U8BIT  secs 
)

Sets current GMT time.

Parameters
U8BIThour - value of hour (0-23).
U8BITmin - value of minute (0-59).
U8BITsecs - value of seconds (0-59).

Definition at line 1042 of file stbgc.c.

◆ STB_GCSetLocalTimeChange()

void STB_GCSetLocalTimeChange ( U16BIT  code,
U8BIT  hour,
U8BIT  min,
U8BIT  secs,
U8BIT  ohour1,
U8BIT  omin1,
U8BIT  ohour2,
U8BIT  omin2,
BOOLEAN  neg 
)

Sets new and old local time offset from GMT.

Parameters
U16BITcode - date of change.
U8BIThour - hour of change (0-23).
U8BITmin - minute of change (0-59).
U8BITsecs - seconds of change (0-59).
U8BITohour1 - old hour offset (0-23).
U8BITomin1 - old minute offset (0-59).
U8BITohour2 - new hour offset (0-23).
U8BITomin2 - new minute offset (0-59).
BOOLEANneg - TRUE if offsets are negative, else FALSE.

Definition at line 925 of file stbgc.c.

◆ STB_GCSetLocalTimeOffset()

void STB_GCSetLocalTimeOffset ( U8BIT  ohour,
U8BIT  omin,
BOOLEAN  neg 
)

Sets local time offset from GMT.

Parameters
U8BITohour - hour offset (0-23).
U8BITomin - minute offset (0-59).
BOOLEANneg - TRUE if offset is negative, else FALSE.

Definition at line 822 of file stbgc.c.

◆ STB_GCSetSearchLangCode()

void STB_GCSetSearchLangCode ( U32BIT  lang)

Writes SI search language code into general control store.

Parameters
U32BITlang - ISO language code.

Definition at line 621 of file stbgc.c.

◆ STB_GCUseBroadcastTime()

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

Definition at line 2007 of file stbgc.c.