Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

Class «core::TimerInterrupt»

Hardware timer interrupt resource.

public:


                         TimerInterrupt(::api::Task& handler);

                         TimerInterrupt(::api::Task& handler, int32 number);

 virtual                ~TimerInterrupt();

 virtual void            clear();

 virtual bool            disable();

 virtual void            enable(bool status);

 Type                    enable(bool status, Type ret);

 virtual int64           getCount() const;

 virtual int64           getPeriod() const;

 static ::api::Toggle&   global();

 virtual bool            isConstructed() const;

 static bool             isObject(const Type* obj);

 virtual void            jump();

 virtual int32           number() const;

 void                    operator delete(void* ptr);

 void*                   operator new(size_t size);

 void*                   operator new(size_t size, void* ptr);

 virtual void            set();

 virtual void            setCount(int64 count);

 virtual void            setPeriod(int64 us=0);

 virtual void            start();

 virtual void            stop();


protected:


                         TimerInterrupt();

 static Type             alloc(size_t size);

 static void             free(void* ptr);

 virtual void            setConstruct(bool flag);

public: TimerInterrupt(::api::Task& handler);

Constructor.

Parameters:
handler — user class which implements an interrupt handler interface.

public: TimerInterrupt(::api::Task& handler, int32 number);

Constructor.

Parameters:
handler — user class which implements an interrupt handler interface.
number — available timer number for interrupting.

public: virtual ~TimerInterrupt();

Destructor.

public: virtual void clear();

Clears an interrupt status of this source.

public: virtual bool disable();

Disables a controller.

Returns:
an enable source bit value of a controller before method was called.

public: virtual void enable(bool status);

Enables a controller.

Parameters:
status — returned status by disable method.

public: Type enable(bool status, Type ret);

Enables a controller.

Parameters:
status — returned status by disable method.
ret — value which will be returned.

Returns:
given value.

public: virtual int64 getCount() const;

Gets this timer counter.

Returns:
timer counter register value.

public: virtual int64 getPeriod() const;

Gets this timer period.

Returns:
timer period register value.

public: static ::api::Toggle& global();

Returns the toggle interface for controlling global interrupts.

Returns:
toggle interface.

public: virtual bool isConstructed() const;

Tests if this object has been constructed.

Returns:
true if object has been constructed successfully.

public: static bool isObject(const Type* obj);

Tests if given object has been constructed object.

Parameters:
obj — pointer to object.

Returns:
true if object has been constructed successfully.

public: virtual void jump();

Jumps to interrupt hardware vector.

public: virtual int32 number() const;

Returns this timer number.

Returns:
number of this timer, or -1 if error has been occurred.

public: void operator delete(void* ptr);

Operator delete.

Parameters:
ptr — address of allocated memory block or a null pointer.

public: void* operator new(size_t size);

Operator new.

Parameters:
size — number of bytes to allocate.

Returns:
allocated memory address or a null pointer.

public: void* operator new(size_t size, void* ptr);

Operator new.

Parameters:
size — unused.
ptr — pointer to reserved memory area

Returns:
given pointer.

public: virtual void set();

Sets an interrupt status of this source.

public: virtual void setCount(int64 count);

Sets this timer counter.

Parameters:
count — timer counter value.

public: virtual void setPeriod(int64 us=0);

Sets this timer period.

Parameters:
us — timer period in microseconds, zero value sets a period to maximum value.

public: virtual void start();

Starts this timer count.

public: virtual void stop();

Stops this timer count.

protected: TimerInterrupt();

Constructor.

protected: static Type alloc(size_t size);

Allocates memory.

Parameters:
size — number of bytes to allocate.

Returns:
allocated memory address or a null pointer.

protected: static void free(void* ptr);

Frees an allocated memory.

Parameters:
ptr — address of allocated memory block or a null pointer.

protected: virtual void setConstruct(bool flag);

Sets the object constructed flag.

Parameters:
flag — constructed flag.

Back to class list