Files.hh

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // CERTI - HLA RunTime Infrastructure
00003 // Copyright (C) 2002-2005  ONERA
00004 //
00005 // This file is part of CERTI
00006 //
00007 // CERTI is free software ; you can redistribute it and/or modify
00008 // it under the terms of the GNU General Public License as published by
00009 // the Free Software Foundation ; either version 2 of the License, or
00010 // (at your option) any later version.
00011 //
00012 // CERTI is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY ; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with this program ; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00020 //
00021 // $Id: Files.hh,v 3.8 2009/04/08 10:47:17 approx Exp $
00022 // ----------------------------------------------------------------------------
00023 
00024 #ifndef CERTI_RTIA_FILES_HH
00025 #define CERTI_RTIA_FILES_HH
00026 
00027 #include "FederationManagement.hh"
00028 #include "DeclarationManagement.hh"
00029 #include "ObjectManagement.hh"
00030 #include "NetworkMessage.hh"
00031 
00032 #include <list>
00033 #include <stdlib.h>
00034 
00035 namespace certi {
00036 namespace rtia {
00037 
00038 class FederationManagement ;
00039 class DeclarationManagement ;
00040 class ObjectManagement ;
00041 
00042 class Queues
00043 {
00044 public:
00045     // File FIFO(First In First Out, or Receive Order)
00046     void insertFifoMessage(NetworkMessage *msg);
00047     NetworkMessage *giveFifoMessage(bool &, bool &);
00048 
00049     // File TSO(Time Stamp Order)
00050     void insertTsoMessage(NetworkMessage *msg);
00051     NetworkMessage *giveTsoMessage(FederationTime heure_logique,
00052                                    bool &msg_donne,
00053                                    bool &msg_restant);
00054     void nextTsoDate(bool &trouve, FederationTime &heure_logique);
00055 
00056     // File Commandes(ex: requestPause)
00057     void insertBeginCommand(NetworkMessage *msg);
00058     void insertLastCommand(NetworkMessage *msg);
00059     NetworkMessage *giveCommandMessage(bool &msg_donne, bool &msg_restant);
00060 
00061     FederationManagement *fm ;
00062     DeclarationManagement *dm ;
00063     ObjectManagement *om ;
00064 
00065 private:
00066     // Attributes
00067     std::list<NetworkMessage *> fifos ; 
00068     std::list<NetworkMessage *> tsos ; 
00069     std::list<NetworkMessage *> commands ; 
00070 
00071     // Call a service on the federate.
00072     void executeFederateService(NetworkMessage *);
00073 };
00074 
00075 }} // namespace certi/rtia
00076 
00077 #endif // CERTI_RTIA_FILES_HH
00078 
00079 // $Id: Files.hh,v 3.8 2009/04/08 10:47:17 approx Exp $

Generated on Thu Apr 30 15:53:49 2009 for CERTIDeveloperDocumentation by doxygen 1.5.5