Skip to content

File evaCountdownIndicator.h

File List > src > evaCountdownIndicator.h

Go to the documentation of this file

#pragma once

#include "evaBlinkingIndicator.h"

namespace eva
{
    class CountdownIndicator : public BlinkingIndicator
    {
    public:
        using BlinkingIndicator::BlinkingIndicator;
        using BlinkingIndicator::on;

        CountdownIndicator *setListener(IHandler *listener);

        void on(unsigned short period, unsigned char dutycyclePercent, unsigned char count);

        void on(unsigned short period, unsigned char dutycyclePercent, unsigned char count, IHandler *listener);

    private:
        void invoke(void *msgSender, CallbackInfo cbInfo) override;

    private:
        unsigned char countdown;
        IHandler *listener;
    };
}