Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes

ipc_Corba Class Reference
[IPC (CORBA) helpersCORBA Interface Definitions]

CORBA helper class. More...

#include <ipc.h>

Collaboration diagram for ipc_Corba:
Collaboration graph
[legend]

List of all members.

Public Member Functions

CORBA::Object_ptr ResolveTargetPM (const string &a_serverHost, const string &a_partName)

Static Public Member Functions

static ipc_CorbaSingleton ()
static void Init (bool a_waitNamingSvc=true, bool a_shutdownOnSignal=true, int a_argc=0, char *a_argv[]=NULL)
 Initializes ORB and root naming context from Naming service.
static void InitDebug ()
 Sets pointers to functions that are called at each dbg_On() and dbg_Off().
static void ActivatePOA ()
static void Run ()
static void RegisterMajorServant (i_Component_i *a_majServant)
static void RemoveMajorServant ()
static void Shutdown ()
 This function must be called by the destructor of the major servant to shut down the ORB (exit from its run() function).
static void Destroy ()
static void RegisterRM (const CORBA::Object_ptr a_objref)
static CORBA::Object_ptr ResolveRM (bool a_wait=true)
static void RegisterMIF (const CORBA::Object_ptr a_objref)
static CORBA::Object_ptr ResolveMIF (const string &a_serverHost, bool a_wait=true)
static void RegisterPMByPMID (const CORBA::Object_ptr a_objref, const string &a_partID)
static void RegisterPMByFSID (const CORBA::Object_ptr a_objref, const string &a_clientHost, const string &a_fsID)
static void RegisterPMByDeviceName (const CORBA::Object_ptr a_objref, const string &a_clientHost, const string &a_fsDevName)
static CORBA::Object_ptr ResolvePMByPartID (const string &a_serverHost, const string &a_partID, bool a_wait=true)
static CORBA::Object_ptr ResolvePMByFSID (const string &a_clientHost, const string &a_fsID, bool a_wait=true)
static CORBA::Object_ptr ResolvePMByDeviceName (const string &a_clientHost, const string &a_fsDevName, bool a_wait=true)
static void RegisterFSEvtMgr (const CORBA::Object_ptr a_objref)
static CORBA::Object_ptr ResolveFSEvtMgr (const string &a_serverHost, bool a_wait=true)
static void RegisterSvc (const CORBA::Object_ptr a_objref)
static CORBA::Object_ptr ResolveSvc (const string &a_serverHost, bool a_wait=true)
static void RegisterLA (const CORBA::Object_ptr a_objref, const string &a_libraryName)
static CORBA::Object_ptr ResolveLA (const string &a_serverHost, const string &a_libraryName, bool a_wait=true)
static void RegisterUT (const CORBA::Object_ptr a_objref, const string &a_objectName)
static CORBA::Object_ptr ResolveUT (const string &a_objectName, bool a_wait=true)
static bool IsInShutdown ()
static bool IsMajorServant (const i_Component_i *a_obj)
static void ResetMajorServant ()

Public Attributes

CORBA::ORB_var m_orb
CosNaming::NamingContext_var m_rootContext
PortableServer::POA_var m_poa

Static Public Attributes

static const CORBA::ULong m_dbgLow
static const CORBA::ULong m_dbgNorm
static const CORBA::ULong m_dbgDetail
static const CORBA::ULong m_dbgVerbose
 Verbose level of debugging: up to 128 bytes of GIOP messages are displayed.

Protected Member Functions

void Register (const CORBA::Object_ptr a_objref, const string &a_objectName)
CORBA::Object_ptr Resolve (const string &a_objectName, bool a_wait=true)

Static Protected Member Functions

static const string MangledHostName (const string &a_hostName)
 CORBA Naming service treats '.
static const string MangledDeviceName (const string &a_devName)
 CORBA Naming service treats '/' as a special character.
static const string GetRM_NSEntry ()
static const string GetMIF_NSEntry (const string &a_serverHost)
static const string GetPMID_NSEntry (const string &a_serverHost, const string &a_partID)
static const string GetPMFSID_NSEntry (const string &a_serverHost, const string &a_fsID)
static const string GetPMFSName_NSEntry (const string &a_serverHost, const string &a_fsID)
static const string GetFSEvtMgr_NSEntry (const string &a_serverHost)
static const string GetSvc_NSEntry (const string &a_serverHost)
static const string GetLA_NSEntry (const string &a_serverHost, const string &a_libName)

Static Protected Attributes

static const string m_nsIvdPrefix_c = g_cmn.prod.m_nameShort
static const string m_nsIvdRM_c = string("rm")
static const string m_nsIvdLib_c = string("lib")
static const string m_nsIvdMgr_c = string("mgr")
static const string m_nsIvdMIF_c = string("mif")
static const string m_nsIvdPart_c = string("part")
static const string m_nsIvdClt_c = string("clt")
static const string m_nsIvdEvtMgr_c = string("fsevtmgr")
static const string m_nsIvdFS_c = string("fs")
static const string m_nsIvdSvc_c = string("svc")

Private Member Functions

 ipc_Corba ()
virtual ~ipc_Corba ()
 ipc_Corba (const ipc_Corba &)
ipc_Corbaoperator= (const ipc_Corba &)
void StopSignalHandler ()

Private Attributes

 log_CLASSID_m
bool m_inShutdown
 Flag to guarantee singleton.
bool m_destroyed
cmn_Threadm_shutdownThread
i_Component_im_majorServant
cmn_Mutex m_majorServantRemoveLock

Detailed Description

CORBA helper class.

It helps starting up, shutting down ORB and Naming Service registration and resolving.

Naming service hierarchy:

    IVD/
       rm
       lib/
          <host>/
             <lib_name>
       mgr/
          <host>/
             mif
             pm/
                <partID1>
                <partID2>
       clt/
          <host>/
             fsevtmgr
             fs/
                <fsID1>
                <fsID2>
       svc/
          <host>
    
Author:
Matej Kenda, HERMES SoftLab
See also:
CORBA IPC implementation hints

Definition at line 49 of file ipc.h.


Constructor & Destructor Documentation

ipc_Corba::ipc_Corba ( const ipc_Corba  )  [private]

Member Function Documentation

static bool ipc_Corba::IsInShutdown (  )  [inline, static]

Definition at line 153 of file ipc.h.

References m_inShutdown, and Singleton().

Referenced by ui_Confirm::Confirm(), Run(), and Shutdown().

Here is the call graph for this function:

Here is the caller graph for this function:

ipc_Corba& ipc_Corba::operator= ( const ipc_Corba  )  [private]
static void ipc_Corba::RegisterUT ( const CORBA::Object_ptr  a_objref,
const string &  a_objectName 
) [inline, static]

Definition at line 139 of file ipc.h.

References Register(), and Singleton().

Referenced by ServerLoop(), and VerifyNS().

                                    {

        ipc_Corba::Singleton().Register(a_objref, a_objectName);
    };

Here is the call graph for this function:

Here is the caller graph for this function:

static CORBA::Object_ptr ipc_Corba::ResolveUT ( const string &  a_objectName,
bool  a_wait = true 
) [inline, static]

Definition at line 146 of file ipc.h.

References Resolve(), and Singleton().

Referenced by ClientLoop(), and VerifyNS().

                            {

        return ipc_Corba::Singleton().Resolve(a_objectName, a_wait);
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 196 of file ipc.h.

bool ipc_Corba::m_destroyed [private]

Definition at line 209 of file ipc.h.

Referenced by Destroy(), and ~ipc_Corba().

bool ipc_Corba::m_inShutdown [private]

Flag to guarantee singleton.

Definition at line 208 of file ipc.h.

Referenced by IsInShutdown(), and Shutdown().

Definition at line 211 of file ipc.h.

Referenced by IsMajorServant(), RegisterMajorServant(), RemoveMajorServant(), and ResetMajorServant().

Definition at line 212 of file ipc.h.

Referenced by RemoveMajorServant().

CORBA::ORB_var ipc_Corba::m_orb

Definition at line 215 of file ipc.h.

Referenced by Destroy(), Init(), InitializeIPC(), Register(), Resolve(), ResolveTargetPM(), Run(), and Shutdown().

PortableServer::POA_var ipc_Corba::m_poa

Definition at line 218 of file ipc.h.

Referenced by ActivatePOA(), Init(), and InitializeIPC().

CosNaming::NamingContext_var ipc_Corba::m_rootContext

Definition at line 216 of file ipc.h.

Referenced by ClientLoop(), Init(), InitializeIPC(), Register(), Resolve(), and VerifyNS().

Definition at line 210 of file ipc.h.

Referenced by Destroy(), and Init().


The documentation for this class was generated from the following files: