aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cosTime/src/CosTimerEvent.idl
blob: b845862f98dd6ab245fc67463d2f283cf973fecd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _COS_TIMEREVENT_IDL_
#define _COS_TIMEREVENT_IDL_

#pragma prefix "omg.org"

#include"CosEventComm.idl"
#include<CosTime.idl>
#include<TimeBase.idl>

module CosTimerEvent{ 

  enum TimeType { 
    TTAbsolute, 
    TTRelative, 
    TTPeriodic 
  }; 
  enum EventStatus { 
    ESTimeSet, 
    ESTimeCleared, 
    ESTriggered, 
    ESFailedTrigger 
  }; 

  struct TimerEventT { 
    TimeBase::UtcT utc; 
    any event_data; 
  }; 

  interface TimerEventHandler { 
    readonly attribute EventStatus status; 
    boolean time_set( out CosTime::UTO uto ); 
    void set_timer( in TimeType time_type, in CosTime::UTO trigger_time ); 
    boolean cancel_timer(); 
    void set_data( in any event_data ); 
  }; 

  interface TimerEventService { 
    
    TimerEventHandler register( in CosEventComm::PushConsumer event_interface, in any data ); 
    void unregister( in TimerEventHandler timer_event_handler ); 
    CosTime::UTO event_time( in TimerEventT timer_event ); 
  }; 
};

#endif