/*
 * TRF7970A.h
 *
 *  Created on: Nov 27, 2019
 *      Author: jmelnychuk
 */

#ifndef DRIVER_TRF7970A_H_
#define DRIVER_TRF7970A_H_

#include <xdc/runtime/Diags.h>

#define TASKSTACKSIZE   512

/*
 * Extern "C" block to prevent name mangling
 * of functions called within the Configuration
 * Tool
 */
//extern "C" {

/* Wrapper function to terminate the example */
void clockTerminate(UArg arg);

/* Wrapper functions to call Clock::tick() */
void clockTask(UArg arg);
void clockPrd(UArg arg);
void clockIdle(void);

//} // end extern "C"

class Clock {
    private:
         // data
         int id;
         double ticks;
         int microsecond;
         int millisecond;
         int second;
         int minute;
         int hour;
         int day;
         int month;
         int year;
         int century;
         int millenium;
         Diags_Mask clockLog;

    public:
        // methods
        Clock(int newId);  // Constructor
        ~Clock();          // Destructor
        void tick();
        long getTicks();
        int getId();
        int getMicrosecond();
        int getMillisecond();
        int getSecond();
        int getMinute();
        int getHour();
        int getDay();
        int getMonth();
        int getYear();
        int getCentury();
        int getMillenium();
        void setMicrosecond();
        void setMillisecond();
        void setMillisecond(int nMilliseconds);
        void setSecond();
        void setMinute();
        void setHour();
        void setDay();
        void setMonth();
        void setYear();
        void setCentury();
        void setMillenium();
};

#endif /* DRIVER_TRF7970A_H_ */
