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

//! \file lcRecFile.h 
//! \brief Contains DtLgrRecFilePdu

#pragma once

#include "lcPdu.h"
#include <vlutil/vlFilename.h>

//! Instances of DtLgrRecFilePdu are used to switch a remote logger to
//! recording-mode and to set the file into which to store captured 
//! simulation traffic.
//! \ingroup loggerControlToolkit
class DT_DLL_LOGGERCONTROL DtLgrRecFilePdu : public DtLgrControlPdu
{
public:

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

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

   //! constructor (construct and prepare for send)
   DtLgrRecFilePdu( const DtEntityIdentifier& sender,
      const DtEntityIdentifier& receiver, const char* name,
      DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER );

   //! destructor
   virtual ~DtLgrRecFilePdu();

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

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

   //! Get/set the name of file into which traffic will be recorded.
   virtual const char* filename() const;
   virtual void setFilename( const char* path );

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

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

private:
   //! Parameter
   DtFilename myFilename;
};

