/*******************************************************************************
** Copyright (c) 1998 MaK Technologies, Inc.
** All rights reserved.
*******************************************************************************/

//! \file lcTimeout.h 
//! \brief Contains DtLgrTimeoutPdu

#pragma once

#include "lcPdu.h"


//! Instances of DtLgrTimeoutPdu are to tell a remote logger how long to generate
//! interim packets for an entity before assuming no more packets in file.
//! Useful during slow-motion playback.
//! \ingroup loggerControlToolkit
class DT_DLL_LOGGERCONTROL DtLgrTimeoutPdu : public DtLgrControlPdu
{
public:

   //! (default) constructor
   DtLgrTimeoutPdu( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER );

   //! constructor (construct from network representation)
   DtLgrTimeoutPdu( const DtNetLgrControlPdu* initial,
      DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0 );

   //! constructor (construct and prepare for send)
   DtLgrTimeoutPdu( const DtEntityIdentifier& sender,
      const DtEntityIdentifier& receiver, DtReal val,
      DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER );

   //! destructor
   virtual ~DtLgrTimeoutPdu();

   //! copy constructor
   DtLgrTimeoutPdu( const DtLgrTimeoutPdu& src );

   //! assignment operator
   DtLgrTimeoutPdu& operator=( const DtLgrTimeoutPdu& src );

   //! Get/set timeout.  See class description.
   virtual DtReal timeout() const;
   virtual void setTimeout( DtReal val );

   //! Return correctly casted parameters pointer. See lgrControlP.h.
   virtual DtLgrRealParams* params() const;

   //! Diagnostic output.
   virtual void printData() const;

private:
   //! Parameter
   DtReal myTimeout;
};

