Erlang -- CosTimerEvent_TimerEventHandler

User's Guide
Reference Manual
Release Notes
PDF
Top

cosTime
Reference Manual
Version 1.1.11

Expand All
Contract All

Table of Contents

- cosTime
  - Top of manual page
  - install_time/0
  - uninstall_time/0
  - install_timerevent/0
  - uninstall_timerevent/0
  - start/0
  - stop/0
  - start_time_service/2
  - stop_time_service/1
  - start_timerevent_service/1
  - stop_timerevent_service/1
- CosTime_TIO
  - Top of manual page
  - '_get_time_interval'/1
  - spans/2
  - overlaps/2
  - time/1
- CosTime_TimeService
  - Top of manual page
  - universal_time/1
  - new_universal_time/4
  - uto_from_utc/2
  - new_interval/3
- CosTime_UTO
  - Top of manual page
  - '_get_time'/1
  - '_get_inaccuracy'/1
  - '_get_tdf'/1
  - '_get_utc_time'/1
  - absolute_time/1
  - compare_time/3
  - time_to_interval/2
  - interval/1
- CosTimerEvent_TimerEventHandler
  - Top of manual page
  - '_get_status'/1
  - time_set/1
  - set_timer/3
  - cancel_timer/1
  - set_data/2
- CosTimerEvent_TimerEventService
  - Top of manual page
  - register/3
  - unregister/2
  - event_time/2

# CosTimerEvent_TimerEventHandler

### MODULE

CosTimerEvent_TimerEventHandler

### MODULE SUMMARY

This module implements the OMG CosTimerEvent::TimerEventHandler interface.

### DESCRIPTION

To get access to the record definitions for the structures use:
-include_lib("cosTime/include/*.hrl").

### EXPORTS

'_get_status'(TimerEventHandler) -> Reply

Types:

TimerEventHandler = #objref
Reply = 'ESTimeSet' | 'ESTimeCleared' | 'ESTriggered' | 'ESFailedTrigger'

This operation returns the status of the target object.

- 'ESTimeSet' - timer is set to trigger event(s).
- 'ESTimeCleared' - no time set or the timer have been reset.
- 'ESTriggered' - event has already been sent.
- 'ESFailedTrigger' - tried to, but failed, sending the event.

If the target object is of type 'TTPeriodic' the status value 'ESTriggered' is not valid.

time_set(TimerEventHandler) -> Reply

Types:

TimerEventHandler = #objref
Reply = {boolean(), UTO}
UTO = #objref

This operation returns true if the time has been set for an event that is yet to be triggered, false otherwise. The outparameter represents the current time value of the target object.

set_timer(TimerEventHandler, TimeType, TriggerTime) -> void()

Types:

TimerEventHandler = #objref
TimeType = 'TTAbsolute' | 'TTRelative' | 'TTPeriodic'
TriggerTime = UTO
UTO = #objref

This operation terminates any previous set trigger, and set a new trigger specified by the TimeType and UTO objects.

The relation between the UTO object and the TimeTypes are:

- 'TTAbsolute' - the UTO object must represent absolute time, i.e., number of 100 nanoseconds passed since 15 october 1582 00:00.
- 'TTRelative' - the UTO object must represent the from now until when the event should be triggered, e.g., within 30*10^7 nanoseconds.
- 'TTPeriodic' - the same as for 'TTRelative', but this option will trigger an event periodically until timer cancelled.

cancel_timer(TimerEventHandler) -> boolean()

Types:

TimerEventHandler = #objref

This operation cancel, if possible, the triggering of event(s). Returns true if an event is actually cancelled, false otherwise.

set_data(TimerEventHandler, EventData) -> ok

Types:

TimerEventHandler = #objref
EventData = #any

This operation changes the event data sent when triggered.