⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timemanagement.hh

📁 certi-SHM-3.0.tar 不错的开源的分布式方针软件 大家多多支持 他是linux
💻 HH
字号:
// -*- mode:C++ ; tab-width:4 ; c-basic-offset:4 ; indent-tabs-mode:nil -*-// ----------------------------------------------------------------------------// CERTI - HLA RunTime Infrastructure// Copyright (C) 2002, 2003  ONERA//// This file is part of CERTI//// CERTI is free software ; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation ; either version 2 of the License, or// (at your option) any later version.//// CERTI is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY ; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program ; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA//// $Id: TimeManagement.hh,v 3.4 2003/02/19 15:45:23 breholee Exp $// ----------------------------------------------------------------------------#ifndef _CERTI_RTIA_TIME_MANAGEMENT_HH#define _CERTI_RTIA_TIME_MANAGEMENT_HH// Project#include <config.h>#include "baseTypes.hh"#include "RTItypes.hh"#include "Communications.hh"#include "FederationManagement.hh"#include "ObjectManagement.hh"#include "OwnershipManagement.hh"#include "Files.hh"#include "LBTS.hh"#include "Message.hh"#include "Communications.hh"#include "PrettyDebug.hh"// Standard libraries#include <iostream>#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include <stdlib.h>using std::cout ;using std::endl ;namespace certi {namespace rtia {class OwnershipManagement ;typedef enum {    PAS_D_AVANCEE=1,    TAR, // TimeAdvanceRequest    NER // NextEventRequest} TypeAvancee ;class TimeManagement : public LBTS{public:    TimeManagement(Communications *,                   Queues*,                   FederationManagement *,                   ObjectManagement *,                   OwnershipManagement *);    // Advance Time Methods    void nextEventRequest(FederationTime heure_logique, TypeException &e);    Boolean tick(TypeException &e);    void timeAdvanceRequest(FederationTime heure_logique, TypeException &e);    // Change Federate Time State    void setLookahead(FederationTimeDelta lookahead, TypeException &e);    void setTimeConstrained(Boolean etat, TypeException &e);    void setTimeRegulating(Boolean etat, TypeException &e);    void StopperAvanceTemps(void) {        _avancee_en_cours = PAS_D_AVANCEE ;    };    // Request Attribute Methods    FederationTime requestFederationTime(void);    FederationTime requestFederateTime(void) { return(_heure_courante); };    FederationTimeDelta requestLookahead(void);    FederationTime requestLBTS(void) { return _LBTS ; };    Boolean requestContraintState(void) { return _est_contraint ; };    Boolean requestRegulateurState(void) { return _est_regulateur ; };private:    // Other RTIA Objects    Communications *comm ;    Queues *queues ;    FederationManagement *fm ;    ObjectManagement *om ;    OwnershipManagement *owm ;    // Federate State    FederationTime lastNullMessageDate ;    // Type/date from last request (timeAdvance, nextEvent, flushQueue)    TypeAvancee _avancee_en_cours ;    FederationTime date_avancee ;    // Federate Data    FederationTime _heure_courante ;    FederationTimeDelta _lookahead_courant ;    Boolean _est_regulateur ;    Boolean _est_contraint ;    // Methods    void advance(Boolean &msg_restant, TypeException &e);    void timeAdvance(Boolean &msg_restant, TypeException &e);    void nextEventAdvance(Boolean &msg_restant, TypeException &e);    void timeAdvanceGrant(FederationTime, TypeException &);    void flushQueueRequest(FederationTime, TypeException &);    Boolean executeFederateService(NetworkMessage &msg);    void sendNullMessage(FederationTime heure_logique);};}} // namespace certi/rtia#endif // _CERTI_RTIA_TIME_MANAGEMENT_HH// $Id: TimeManagement.hh,v 3.4 2003/02/19 15:45:23 breholee Exp $

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -