/** \file
 *
 *  Contains the LoopControl class definition.
 *
 *  LoopControl.h should only be included by LoopControl.cpp
 *  Other classes should include LoopControlIF.h
 *
 *  Copyright (c) 2007,2008,2009 MBARI
 *  MBARI Proprietary Information.  All Rights Reserved
 */

#ifndef LOOPCONTROL_H_
#define LOOPCONTROL_H_

#include "component/SyncComponent.h"

class Timestamp;

/**
 *  This is the primary "control" for the vehicle's computation loop.
 *  It accepts an input that
 *  specifies the period of the vehicle's computation loop.
 *
 *  LoopControl.h should only be included by LoopControl.cpp
 *  Other classes should include LoopControlIF.h
 *
 *  Addresses requirement: \ref req_timing_adjustablePeriod
 *
 *  \ingroup modules_control
 */
class LoopControl : public SyncControlComponent
{
public:

    LoopControl( const Module* module );

    virtual ~LoopControl();

    /// Initialize function
    void initialize( void );

    /// The actual "payload" of the component
    void run();

    /// Uninit function
    void uninitialize( void );

protected:

private:

    // Note that the copy constructor below is private and not given a body.
    // Any attempt to call it will return a compiler error.
    LoopControl( const LoopControl& old ); // disallow copy constructor

    /// Desired period of the computation loop
    DataReader *periodCmdReader_;

};

#endif /*SAMPLECOMPONENT_H_*/
