/** \file
 *
 *  Contains the CycleStarter class declaration.
 *
 *  Copyright (c) 2007,2008,2009 MBARI
 *  MBARI Proprietary Information.  All Rights Reserved
 */

#ifndef CYCLESTARTER_H_
#define CYCLESTARTER_H_

#include "component/SyncComponent.h"

class EventEntry;

/**
 *  The CycleStarter's only purpose is to send its CycleStartEntry_
 *  to its logger_ at the start of every computation cycle.
 *
 *  \ingroup supervisor
 */
class CycleStarter : public SyncStarterComponent
{
public:
    CycleStarter();

    virtual ~CycleStarter();

    virtual void run();

    // static EventEntry const* GetCycleStartEntry();

    static const Timestamp& GetCycleStartTime()
    {
        return CycleStartTime_;
    }

    static int GetCycle()
    {
        return Cycle_;
    }

protected:
    /// Event Entry posted at the start of every cycle
    // static EventEntry CycleStartEntry_;

    static Timestamp CycleStartTime_;

    static int Cycle_;

    UniversalDataWriter* timeWriter_;

    //DataWriter* loadAvgWriter_;

    static const Str NAME;
    static const DataURI LOAD_AVG;

};

#endif /*CYCLESTARTER_H_*/
