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

📄 federationslist.hh

📁 分布式仿真 开放源码
💻 HH
📖 第 1 页 / 共 2 页
字号:
// ----------------------------------------------------------------------------// CERTI - HLA RunTime Infrastructure// Copyright (C) 2002, 2003, 2004  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: FederationsList.hh,v 3.23 2004/01/09 16:29:50 breholee Exp $// ----------------------------------------------------------------------------#ifndef _CERTI_RTIG_FEDERATIONS_LIST_HH#define _CERTI_RTIG_FEDERATIONS_LIST_HH#include "Federation.hh"#include "SocketMC.hh"#include "SocketServer.hh"#include "AuditFile.hh"#include "PrettyDebug.hh"#include <list>namespace certi {namespace rtig {/*! FederationsList keep track on federation operations. */class FederationsList : private std::list<Federation *>{    // ATTRIBUTES --------------------------------------------------------------private:    SocketServer *socketServer ;    AuditFile *auditFile ;    // METHODS -----------------------------------------------------------------public:    // constructor/destructor    FederationsList(SocketServer*, AuditFile*);    ~FederationsList();    // ---------------------------    // -- Federation Management --    // ---------------------------    // MAX_FEDERATION is the maximum number of federations.#ifdef FEDERATION_USES_MULTICAST    void createFederation(const char *, FederationHandle, SocketMC*)#else        void createFederation(const char *, Handle)#endif        throw (FederationExecutionAlreadyExists,               CouldNotOpenRID,               ErrorReadingRID,               MemoryExhausted,               SecurityError,               RTIinternalError);    void exists(const char *name, Handle &handle)        throw (FederationExecutionDoesNotExist, RTIinternalError);    void destroyFederation(Handle)        throw (FederatesCurrentlyJoined, FederationExecutionDoesNotExist,               RTIinternalError);#ifdef FEDERATION_USES_MULTICAST    void info(FederationHandle theHandle,              int &nb_federes,              int &nb_regulateurs,              bool &is_syncing,              SocketMC* &comm_mc)#else        void info(Handle theHandle,                  int &nb_federes,                  int &nb_regulateurs,                  bool &is_syncing)#endif        throw (FederationExecutionDoesNotExist, RTIinternalError);    // Synchronization Management    void manageSynchronization(Handle theHandle,                               FederateHandle theFederate,                               bool state,                               const char *the_label,                               const char *the_tag)        throw (FederationAlreadyPaused,               FederationNotPaused,               FederateNotExecutionMember,               SaveInProgress,               RestoreInProgress,               RTIinternalError);    void broadcastSynchronization(Handle handle,                                  FederateHandle federate,                                  const char *label,                                  const char *tag)        throw (FederationExecutionDoesNotExist,               RTIinternalError);    void requestFederationSave(Handle, FederateHandle, const char *,                               FederationTime);    void federateSaveBegun(Handle, FederateHandle);    void federateSaveStatus(Handle, FederateHandle, bool);    void requestFederationRestore(Handle the_federation,                                  FederateHandle the_federate,                                  const char *the_label);    void federateRestoreStatus(Handle the_federation,                               FederateHandle the_federate,                               bool the_status);    // -------------------------    // -- Federate Management --    // -------------------------    FederateHandle addFederate(Handle theHandle,                               const char *theFederateName,                               SocketTCP *theTCPLink)        throw (FederationExecutionDoesNotExist,               FederateAlreadyExecutionMember,               MemoryExhausted,               RTIinternalError);    void remove(Handle, FederateHandle)        throw (FederationExecutionDoesNotExist,               FederateOwnsAttributes,               FederateNotExecutionMember,               RTIinternalError);    void killFederate(Handle, FederateHandle)        throw ();    // ---------------------    // -- Time Management --    // ---------------------    void createRegulator(Handle theHandle,                         FederateHandle theFederateHandle,                         FederationTime theTime)        throw (FederationExecutionDoesNotExist,               FederateNotExecutionMember,               SaveInProgress,               RestoreInProgress,               RTIinternalError);    void updateRegulator(Handle theHandle,                         FederateHandle theFederateHandle,                         FederationTime heure_logique)        throw (FederationExecutionDoesNotExist,               FederateNotExecutionMember,               RTIinternalError);    void removeRegulator(Handle theHandle,                         FederateHandle theFederateHandle)        throw (FederationExecutionDoesNotExist,               FederateNotExecutionMember,               SaveInProgress,               RestoreInProgress,               RTIinternalError);    void addConstrained(Handle theHandle,                        FederateHandle theFederateHandle)        throw (FederationExecutionDoesNotExist,               FederateNotExecutionMember,               SaveInProgress,               RestoreInProgress,               RTIinternalError);    void removeConstrained(Handle theHandle,                           FederateHandle theFederateHandle)        throw (FederationExecutionDoesNotExist,               FederateNotExecutionMember,               SaveInProgress,               RestoreInProgress,               RTIinternalError);    // -------------------------------------------    // -- Object Classes & Instances Management --    // -------------------------------------------    void publishObject(Handle theHandle,                       FederateHandle theFederateHandle,                       ObjectClassHandle theObjectHandle,                       AttributeHandle *theAttributeList,                       UShort theListSize,                       bool pub)        throw (ObjectClassNotDefined,               AttributeNotDefined,               FederationExecutionDoesNotExist,               FederateNotExecutionMember,               SaveInProgress,               RestoreInProgress,               SecurityError,               RTIinternalError);    void subscribeObject(Handle theHandle,                         FederateHandle theFederateHandle,                         ObjectClassHandle theObjectHandle,                         AttributeHandle *theAttributeList,                         UShort theListSize,                         bool subscribe_or_unsubscribe)        throw (ObjectClassNotDefined,               AttributeNotDefined,               FederationExecutionDoesNotExist,               FederateNotExecutionMember,               SaveInProgress,               RestoreInProgress,               SecurityError,               RTIinternalError);    ObjectHandle registerObject(Handle theHandle,                                FederateHandle theFederateHandle,                                ObjectClassHandle theClass,                                ObjectName theName)        throw (FederateNotExecutionMember,               FederateNotPublishing,               ObjectAlreadyRegistered,               ObjectClassNotDefined,               ObjectClassNotPublished,               SaveInProgress,               RestoreInProgress,               RTIinternalError);    void destroyObject(Handle theHandle,                       FederateHandle theFederateHandle,                       ObjectHandle theObjectHandle,                       const char *theUserTag)        throw (FederateNotExecutionMember,               FederationExecutionDoesNotExist,               DeletePrivilegeNotHeld,               ObjectNotKnown,               SaveInProgress,               RestoreInProgress,               RTIinternalError);    void updateAttribute(Handle theHandle,                         FederateHandle theFederateHandle,

⌨️ 快捷键说明

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