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

#ifndef LOGSPLITTERCOMPONENT_H
#define LOGSPLITTERCOMPONENT_H

#include "component/SyncComponent.h"

class UniversalDataWriter;

#define MAX_DOWNLINK_MSG_BYTES 340L
#define MAX_UPLINK_MSG_BYTES 270L

/**
 *  Splits logs whenever data is requested from a Universal::communications reader.
 *
 *  LogSplitterComponent.h should only be included by LogSplitterComponent.cpp
 *  Other classes should include LogSplitterComponentIF.h
 *
 *  \ingroup modules_sensor
 */
class LogSplitterComponent: public SyncLoggerComponent
{
public:

    LogSplitterComponent();

    virtual void run();

private:

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

    // Slate outputs
    UniversalDataWriter* communicationsWriter_;

    // State
    bool anyDataRequested_;

};

#endif /*LOGSPLITTERCOMPONENT_H*/
