Logo Search packages:      
Sourcecode: sanduhr version File versions  Download package

ex-simple2.py

#! /usr/bin/env python

"""ex-simple2.py - Customising timer objects with CORBA

The following Python script creates a pink timer which beeps
five times when the alarm time is reached."""

import CORBA, oaf, SandUhr

oaf.init()
factory = oaf.activate("repo_ids.has('IDL:SandUhr/TimerFactory:1.0')",[])
timer = factory.CreateTimer ("+20s", "pink timer expired")

timer.SandColor=SandUhr.Timer.Color(Red=212,Green=78,Blue=222)

alarm = factory.CreateAlarmBeep (5)
timer.Alarm = alarm

Generated by  Doxygen 1.6.0   Back to index