![]() |
DVBCore
20.3.0
DVBCore Documentation
|
Application timer functions and defines. More...
Go to the source code of this file.
Classes | |
struct | S_ALARM_INFO |
struct | S_PVR_RECORD_INFO |
struct | s_timer |
struct | s_avrec_settings |
Macros | |
#define | INVALID_TIMER_HANDLE 0 |
#define | TMR_MAX_NAME_LENGTH 128 |
#define | TMR_PVR_CRID_LEN_MAX 65 |
#define | TMR_PVR_ADDINFO_LEN_MAX 255 |
Typedefs | |
typedef struct s_timer | S_TIMER_INFO |
typedef struct s_avrec_settings | S_AVREC_SETTINGS |
Functions | |
void | ATMR_Initialise (void) |
Performs initialisation of the timers, reading existing entries from the database. More... | |
U32BIT | ATMR_AddTimer (S_TIMER_INFO *info) |
Creates a new timer based on the information supplied. More... | |
U32BIT | ATMR_AddTimerForEvent (void *event_ptr, void *serv_ptr, BOOLEAN record, BOOLEAN event_triggered) |
Creates a timer based on the given event. If a recording timer is created, it will be set to record on the default disk, which can be changed afterwards using ATMR_SetDiskId. More... | |
BOOLEAN | ATMR_UpdateTimerDuration (U32BIT handle, U32DHMS duration) |
Updates the duration for an existing PVR recording timer. More... | |
BOOLEAN | ATMR_UpdateTimer (U32BIT handle, S_TIMER_INFO *info) |
Updates all the timer fields. More... | |
BOOLEAN | ATMR_DeleteTimer (U32BIT handle) |
Deletes the timer with the given handle. More... | |
BOOLEAN | ATMR_GetTimerList (U32BIT **timer_list, U16BIT *list_size, E_TIMER_TYPE list_type, BOOLEAN date_time_order) |
Returns a list of all the timer handles and the number of items in the list. More... | |
void | ATMR_ReleaseTimerList (U32BIT *timer_list, U16BIT list_size) |
Release the given array of timer handles. More... | |
BOOLEAN | ATMR_InitialiseTimer (S_TIMER_INFO *timer_info, E_TIMER_TYPE timer_type, void *serv_ptr, void *event_ptr) |
Sets up the given timer info structure with default values for the given timer type using the service and event depending on timer type. More... | |
BOOLEAN | ATMR_GetTimerInfo (U32BIT handle, S_TIMER_INFO *timer_info) |
Copies timer data for the given timer info the info structure provided. More... | |
BOOLEAN | ATMR_StartRecord (U8BIT path) |
Finds the timer using the given decode path and if it's a recording timer the recording will be started. More... | |
void | ATMR_RecordingFailed (U8BIT path) |
Handles the timer when a recording fails to start for some reason. This may result in the timer being deleted. More... | |
void * | ATMR_GetRecordService (U8BIT path) |
Returns the service for the recording timer on the given path. More... | |
U8BIT * | ATMR_GetName (U32BIT handle) |
Get the name of the timer with the given handle. More... | |
void | ATMR_SetName (U32BIT handle, U8BIT *name) |
Sets the name of the timer with the given handle. More... | |
U32DHMS | ATMR_GetStartDateTime (U32BIT handle) |
Get the start date & time of the timer with the given handle. The date/time returned will be in UTC. More... | |
U32DHMS | ATMR_GetDuration (U32BIT handle) |
Returns the duration of the timert with the given handle. More... | |
U32DHMS | ATMR_GetEndDateTime (U32BIT handle) |
Get the end date & time of the timer with the given handle. The date/time returned will be in UTC. More... | |
E_TIMER_TYPE | ATMR_GetType (U32BIT handle) |
Returns the type of the given timer. More... | |
E_TIMER_FREQ | ATMR_GetFrequency (U32BIT handle) |
Returns the frequency setting for the given timer. More... | |
BOOLEAN | ATMR_GetChangeService (U32BIT handle) |
Returns the change service setting for an alarm timer. More... | |
BOOLEAN | ATMR_GetRampVolume (U32BIT handle) |
Returns the ramp volume setting for an alarm timer. More... | |
U16BIT | ATMR_GetEventId (U32BIT handle) |
Returns the event ID for a PVR recording timer. More... | |
U16BIT | ATMR_GetServiceId (U32BIT handle) |
Returns the service ID for an alarm or PVR recording timer. More... | |
U16BIT | ATMR_GetTransportId (U32BIT handle) |
Returns the transport ID for an alarm or PVR recording timer. More... | |
U16BIT | ATMR_GetOriginalNetworkId (U32BIT handle) |
Returns the original network ID for an alarm or PVR recording timer. More... | |
BOOLEAN | ATMR_GetMissed (U32BIT handle) |
Gets the timer's missed flag. More... | |
U8BIT * | ATMR_GetProgrammeCrid (U32BIT handle) |
Returns a pointer to the programme CRID string from a recording timer. The returned value shouldn't be changed or freed. More... | |
BOOLEAN | ATMR_HasSeriesCrid (U32BIT handle) |
Does the timer have a series crid? More... | |
BOOLEAN | ATMR_HasRecommendationCrid (U32BIT handle) |
Does the timer have a recommendation crid? More... | |
U8BIT * | ATMR_GetOtherCrid (U32BIT handle) |
Returns a pointer to the other CRID string from a recording timer. This will either be a series or recommendation CRID depending on the recommendation flag setting. The returned value shouldn't be changed or freed. More... | |
U16BIT | ATMR_GetDiskId (U32BIT handle) |
Returns the disk id for the given timer if the timer is a PVR recording timer. More... | |
void | ATMR_SetDiskId (U32BIT handle, U16BIT disk_id) |
Set the disk for the given timer if the timer is a recording timer. More... | |
U32BIT | ATMR_GetRecordingHandle (U32BIT handle) |
Returns the recording handle associated with a PVR recording timer. More... | |
void | ATMR_HandleTimerEvent (U32BIT timer_handle) |
Used by the DVB stack to handle an event for the given timer. If the timer requires the app to deal with it, such as for sleep or alarm timers, then another event will be sent to the app with an S_TIMER_INFO structure as the event data containing the timer's details to allow the app deal with it. The timer itself will have been updated or deleted. More... | |
BOOLEAN | ATMR_CheckRecordStatus (BOOLEAN recordings_can_start, void *service) |
Checks all timers to see whether any recordings should be started or stopped as a result of the now event being changed. More... | |
void | ATMR_EitUpdated (void) |
Checks each recording timer that's linked to an event to see whether the event is still in the schedule and whether the time has changed, and if it has changed then the timer is updated. | |
U32BIT | ATMR_FindRecordingTimer (U32BIT recording_handle) |
Finds the timer for the given recording handle. More... | |
void | ATMR_DeleteRecordingTimer (U32BIT recording_handle) |
Delete the PVR record timer with the given recording handle. More... | |
U8BIT | ATMR_GetNumSimultaneousRecordings (U8BIT max_recordings, U32DHMS start_date_time, U32DHMS end_date_time, U32BIT **conflicting_timers) |
Counts the number of simultaneous recordings (EXT and PVR) between the given start and end dates/times. More... | |
void * | ATMR_RecordEvent (void *serv_ptr, void *event_ptr, U8BIT *prog_crid, U8BIT *series_crid, BOOLEAN is_series, BOOLEAN check_alternatives, BOOLEAN do_not_delete) |
Adds a timer to perform a recording based on the given event and service. Conflicts are checked and a search is made for an alternative event if necessary. More... | |
BOOLEAN | ATMR_RecordSplitEvent (void *serv_ptr, U8BIT *prog_crid, U32DHMS start_date_time, BOOLEAN do_not_delete, BOOLEAN search_forward) |
Searches for events within 3 hours of the given start date/time for an event with the given programme CRID and creates a timer to record any found. The search is performed forward or backward from the given start date/time as defined by the search direction argument. More... | |
U32BIT | ATMR_GetFirstWakeupTime (U32DHMS *rec_date_time, U16BIT *onet_id, U16BIT *trans_id, U16BIT *service_id) |
Searches the timers for the first timer that will cause the DVB to wakeup that hasn't been missed. This will be an alarm or PVR recording timer. More... | |
U32BIT | ATMR_FindTimerFromEvent (U16BIT onet_id, U16BIT trans_id, U16BIT serv_id, U16BIT event_id) |
Searches the timers for a recording timer with the given event and service IDs. More... | |
U32BIT | ATMR_FindTimerFromCrid (U8BIT *prog_crid) |
Searches the timers for a recording timer with the given programme CRID. More... | |
U32BIT | ATMR_FindTimerFromCridAndEvent (U8BIT *prog_crid, U16BIT service_id, U16BIT event_id) |
Searches the timers for a recording timer with the given programme CRID and event ID. More... | |
void | ATMR_DeleteTimersForSeriesRecommendations (U8BIT *crid, BOOLEAN is_recommendation) |
Deletes any PVR record timers with the given series CRID. More... | |
void | ATMR_SetAdditionalInfo (U32BIT handle, U8BIT *info, U32BIT size) |
Sets the additioinal information string for the specified timer and commits the change to the database. More... | |
U8BIT * | ATMR_GetAdditionalInfo (U32BIT handle, U32BIT *size) |
Gets the additional information string associated with a timer. The name is allocated in UI temp memory. More... | |
S32BIT | ATMR_GetStartPadding (U32BIT handle) |
Returns the value of start_padding associated with the specified timer The start padding is the number of seconds before (after, if negative) the actual timer start time the timer will be triggered. More... | |
BOOLEAN | ATMR_SetStartPadding (U32BIT handle, S32BIT start_padding) |
Sets the value of start_padding associated with the specified timer The start padding is the number of seconds before (after, if negative) the actual timer start time the timer will be triggered. More... | |
S32BIT | ATMR_GetEndPadding (U32BIT handle) |
Returns the value of end_padding associated with the specified timer The end padding is the number of seconds after (before, if negative) the actual timer end time the timer will expire. More... | |
BOOLEAN | ATMR_SetEndPadding (U32BIT handle, S32BIT end_padding) |
Sets the value of end_padding associated with the specified timer The end padding is the number of seconds after (before, if negative) the actual timer end time the timer will expire. More... | |
BOOLEAN | ATMR_SetDoNotDelete (U32BIT handle, BOOLEAN do_not_delete) |
Sets the do_not_delete flag in a recording timer, which if set to TRUE, will lock any recordings that are started by the timer, to prevent them being deleted. More... | |
BOOLEAN | ATMR_GetDoNotDelete (U32BIT handle) |
Returns the setting of the do not delete flag for the given timer. More... | |
void | ATMR_DumpAllTimers (void) |
Prints details of all existing timers. More... | |
U32BIT ATMR_AddTimer | ( | S_TIMER_INFO * | info | ) |
U32BIT ATMR_AddTimerForEvent | ( | void * | event_ptr, |
void * | serv_ptr, | ||
BOOLEAN | record, | ||
BOOLEAN | event_triggered | ||
) |
Creates a timer based on the given event. If a recording timer is created, it will be set to record on the default disk, which can be changed afterwards using ATMR_SetDiskId.
event_ptr | - pointer to the event to be recorded |
serv_ptr | service the event is on |
record | TRUE if a recording timer is to be created, FALSE for an alarm timer |
event_triggered | TRUE if the timer should be triggered by the change of event rather than the time |
BOOLEAN ATMR_CheckRecordStatus | ( | BOOLEAN | recordings_can_start, |
void * | service | ||
) |
Checks all timers to see whether any recordings should be started or stopped as a result of the now event being changed.
recordings_can_start | TRUE if the event should be checked to start a recording |
service | check recording status on this service only. If NULL then all services are checked |
void ATMR_DeleteRecordingTimer | ( | U32BIT | recording_handle | ) |
BOOLEAN ATMR_DeleteTimer | ( | U32BIT | handle | ) |
Deletes the timer with the given handle.
handle | handle of timer to be deleted |
Deletes the timer with the given handle.
handle | handle of timer to be deleted |
void ATMR_DeleteTimersForSeriesRecommendations | ( | U8BIT * | crid, |
BOOLEAN | is_recommendation | ||
) |
void ATMR_DumpAllTimers | ( | void | ) |
U32BIT ATMR_FindRecordingTimer | ( | U32BIT | recording_handle | ) |
U32BIT ATMR_FindTimerFromCrid | ( | U8BIT * | prog_crid | ) |
U32BIT ATMR_FindTimerFromCridAndEvent | ( | U8BIT * | prog_crid, |
U16BIT | service_id, | ||
U16BIT | event_id | ||
) |
Searches the timers for a recording timer with the given programme CRID and event ID.
prog_crid | the programme CRID to search for |
service_id | service ID of the event |
event_id | ID of the event |
U32BIT ATMR_FindTimerFromEvent | ( | U16BIT | onet_id, |
U16BIT | trans_id, | ||
U16BIT | serv_id, | ||
U16BIT | event_id | ||
) |
Searches the timers for a recording timer with the given event and service IDs.
onet_id | original network ID or the service |
trans_id | transport ID of the service |
serv_id | service ID |
event_id | event ID |
U8BIT* ATMR_GetAdditionalInfo | ( | U32BIT | handle, |
U32BIT * | size | ||
) |
BOOLEAN ATMR_GetChangeService | ( | U32BIT | handle | ) |
U16BIT ATMR_GetDiskId | ( | U32BIT | handle | ) |
BOOLEAN ATMR_GetDoNotDelete | ( | U32BIT | handle | ) |
U32DHMS ATMR_GetDuration | ( | U32BIT | handle | ) |
Returns the duration of the timert with the given handle.
handle | timer handle |
Returns the duration of the timert with the given handle.
handle | timer handle |
U32DHMS ATMR_GetEndDateTime | ( | U32BIT | handle | ) |
S32BIT ATMR_GetEndPadding | ( | U32BIT | handle | ) |
Returns the value of end_padding associated with the specified timer The end padding is the number of seconds after (before, if negative) the actual timer end time the timer will expire.
handle | Timer handle |
Returns the value of end_padding associated with the specified timer The end padding is the number of seconds after (before, if negative) the actual timer end time the timer will expire.
handle | Timer handle |
U16BIT ATMR_GetEventId | ( | U32BIT | handle | ) |
U32BIT ATMR_GetFirstWakeupTime | ( | U32DHMS * | date_time, |
U16BIT * | onet_id, | ||
U16BIT * | trans_id, | ||
U16BIT * | service_id | ||
) |
Searches the timers for the first timer that will cause the DVB to wakeup that hasn't been missed. This will be an alarm or PVR recording timer.
rec_date_time | pointer to return the date/time of the first timer found |
onet_id | returns the original network ID of the service associated with the timer |
trans_id | returns the transport ID of the service associated with the timer |
service_id | returns the service ID of the service associated with the timer |
date_time | pointer to return the date/time of the first timer found |
onet_id | returns the original network ID of the service associated with the timer |
trans_id | returns the transport ID of the service associated with the timer |
service_id | returns the service ID of the service associated with the timer |
E_TIMER_FREQ ATMR_GetFrequency | ( | U32BIT | handle | ) |
BOOLEAN ATMR_GetMissed | ( | U32BIT | handle | ) |
U8BIT* ATMR_GetName | ( | U32BIT | handle | ) |
U8BIT ATMR_GetNumSimultaneousRecordings | ( | U8BIT | max_recordings, |
U32DHMS | start_date_time, | ||
U32DHMS | end_date_time, | ||
U32BIT ** | conflicting_timers | ||
) |
Counts the number of simultaneous recordings (EXT and PVR) between the given start and end dates/times.
max_recordings | the max recordings that can take place at the same time |
start_date_time | start date and time of the period to be checked |
end_date_time | end date and time of the period to be checked |
conflicting_timers | pointer to the list of conflicting timers, the list must to be freed by the caller. If NULL it's ignored. |
U16BIT ATMR_GetOriginalNetworkId | ( | U32BIT | handle | ) |
U8BIT* ATMR_GetOtherCrid | ( | U32BIT | handle | ) |
Returns a pointer to the other CRID string from a recording timer. This will either be a series or recommendation CRID depending on the recommendation flag setting. The returned value shouldn't be changed or freed.
handle | timer handle |
U8BIT* ATMR_GetProgrammeCrid | ( | U32BIT | handle | ) |
BOOLEAN ATMR_GetRampVolume | ( | U32BIT | handle | ) |
U32BIT ATMR_GetRecordingHandle | ( | U32BIT | handle | ) |
void* ATMR_GetRecordService | ( | U8BIT | path | ) |
U16BIT ATMR_GetServiceId | ( | U32BIT | handle | ) |
U32DHMS ATMR_GetStartDateTime | ( | U32BIT | handle | ) |
S32BIT ATMR_GetStartPadding | ( | U32BIT | handle | ) |
Returns the value of start_padding associated with the specified timer The start padding is the number of seconds before (after, if negative) the actual timer start time the timer will be triggered.
handle | Timer handle |
Returns the value of start_padding associated with the specified timer The start padding is the number of seconds before (after, if negative) the actual timer start time the timer will be triggered.
handle | Timer handle |
BOOLEAN ATMR_GetTimerInfo | ( | U32BIT | handle, |
S_TIMER_INFO * | timer_info | ||
) |
BOOLEAN ATMR_GetTimerList | ( | U32BIT ** | timer_list, |
U16BIT * | list_size_ptr, | ||
E_TIMER_TYPE | list_type, | ||
BOOLEAN | date_time_order | ||
) |
Returns a list of all the timer handles and the number of items in the list.
timer_list | pointer to an array of timer handles, the array is allocated by this function |
list_size | pointer to the number of items in the returned list |
list_type | type of timers to put in the list |
date_time_order | TRUE if the list is to be returned in date/time order, FALSE returns the list in alphabetical name order |
timer_list | pointer to an array of timer handles, the array is allocated by this function |
list_size_ptr | pointer to the number of items in the returned list |
list_type | type of timers to put in the list |
date_time_order | TRUE if the list is to be returned in date/time order, FALSE returns the list in alphabetical name order |
U16BIT ATMR_GetTransportId | ( | U32BIT | handle | ) |
E_TIMER_TYPE ATMR_GetType | ( | U32BIT | handle | ) |
void ATMR_HandleTimerEvent | ( | U32BIT | handle | ) |
Used by the DVB stack to handle an event for the given timer. If the timer requires the app to deal with it, such as for sleep or alarm timers, then another event will be sent to the app with an S_TIMER_INFO structure as the event data containing the timer's details to allow the app deal with it. The timer itself will have been updated or deleted.
handle | timer handle |
BOOLEAN ATMR_HasRecommendationCrid | ( | U32BIT | handle | ) |
BOOLEAN ATMR_HasSeriesCrid | ( | U32BIT | handle | ) |
void ATMR_Initialise | ( | void | ) |
BOOLEAN ATMR_InitialiseTimer | ( | S_TIMER_INFO * | timer_info, |
E_TIMER_TYPE | timer_type, | ||
void * | serv_ptr, | ||
void * | event_ptr | ||
) |
Sets up the given timer info structure with default values for the given timer type using the service and event depending on timer type.
timer_info | pointer to timer info structure to be initialised |
timer_type | type of timer to initialise the structure for |
serv_ptr | service that will be used for alarm and PVR recording timers. It can be NULL, if not, it is used to initialise the service IDs in the alarm and PVR timers and to initialise the programme CRID field in PVR timers. |
event_ptr | event that will be used for alarm and PVR recording timers. It can be NULL, if not, it is used to initialise start time and name in alarm and PVR timers and other event related fields in PVR timers. When event_ptr is specified for a PVR timer, it will be initialised as 'event triggered'; |
void* ATMR_RecordEvent | ( | void * | serv_ptr, |
void * | event_ptr, | ||
U8BIT * | prog_crid, | ||
U8BIT * | other_crid, | ||
BOOLEAN | is_recommendation, | ||
BOOLEAN | check_alternatives, | ||
BOOLEAN | do_not_delete | ||
) |
Adds a timer to perform a recording based on the given event and service. Conflicts are checked and a search is made for an alternative event if necessary.
serv_ptr | pointer to service on which recording is to take place |
event_ptr | event to be recorded |
prog_crid | programme CRID or NULL |
other_crid | series or recommendation CRID, or NULL |
is_recommendation | TRUE if the above crid is a recommendation crid, FALSE for series |
check_alternatives | TRUE if alternative events are to be searched for if the specified event can't be recorded |
do_not_delete | flag that defines whether the recording should be marked as locked |
void ATMR_RecordingFailed | ( | U8BIT | path | ) |
BOOLEAN ATMR_RecordSplitEvent | ( | void * | serv_ptr, |
U8BIT * | prog_crid, | ||
U32DHMS | start_date_time, | ||
BOOLEAN | do_not_delete, | ||
BOOLEAN | search_forward | ||
) |
Searches for events within 3 hours of the given start date/time for an event with the given programme CRID and creates a timer to record any found. The search is performed forward or backward from the given start date/time as defined by the search direction argument.
serv_ptr | pointer to service on which search is to take place |
prog_crid | programme CRID to be searched for |
start_date_time | date and time to start searching from |
do_not_delete | flag that defines whether the recording should be marked as locked |
search_forward | TRUE if the search is to be made for events following the given date/time |
void ATMR_ReleaseTimerList | ( | U32BIT * | timer_list, |
U16BIT | list_size | ||
) |
void ATMR_SetAdditionalInfo | ( | U32BIT | handle, |
U8BIT * | info, | ||
U32BIT | size | ||
) |
void ATMR_SetDiskId | ( | U32BIT | handle, |
U16BIT | disk_id | ||
) |
BOOLEAN ATMR_SetDoNotDelete | ( | U32BIT | handle, |
BOOLEAN | do_not_delete | ||
) |
Sets the do_not_delete flag in a recording timer, which if set to TRUE, will lock any recordings that are started by the timer, to prevent them being deleted.
handle | timer handle |
do_not_delete | new setting for the do not delete flag |
BOOLEAN ATMR_SetEndPadding | ( | U32BIT | handle, |
S32BIT | end_padding | ||
) |
Sets the value of end_padding associated with the specified timer The end padding is the number of seconds after (before, if negative) the actual timer end time the timer will expire.
handle | Timer handle |
end_padding | new value for the timer end_padding |
Sets the value of end_padding associated with the specified timer The end padding is the number of seconds after (before, if negative) the actual timer end time the timer will expire.
handle | Timer handle |
end_padding | new value for the timer end_padding |
void ATMR_SetName | ( | U32BIT | handle, |
U8BIT * | name | ||
) |
BOOLEAN ATMR_SetStartPadding | ( | U32BIT | handle, |
S32BIT | start_padding | ||
) |
Sets the value of start_padding associated with the specified timer The start padding is the number of seconds before (after, if negative) the actual timer start time the timer will be triggered.
handle | Timer handle |
start_padding | new value for the timer start_padding |
Sets the value of start_padding associated with the specified timer The start padding is the number of seconds before (after, if negative) the actual timer start time the timer will be triggered.
handle | Timer handle |
start_padding | new value for the timer start padding |
BOOLEAN ATMR_StartRecord | ( | U8BIT | path | ) |
BOOLEAN ATMR_UpdateTimer | ( | U32BIT | handle, |
S_TIMER_INFO * | info | ||
) |
BOOLEAN ATMR_UpdateTimerDuration | ( | U32BIT | handle, |
U32DHMS | duration | ||
) |