Command line interface
[User Interface]

Collaboration diagram for Command line interface:


Classes

class  ui_MsgWriter
class  i_UIMessageServer_i
class  ui_ResultPacker
 Packes output result into i_Result. More...
class  ui_Confirm
class  ui_BitFlag

Defines

#define MAX_CORBA_UIRESULT_BLOCK_LENGTH   (1024*1024)

Functions

IVD_UI_DECL_d i_UIMessageServer_iCliConnectToMIF (i_ManagementInterface_out a_mif, i_UIMessageServer_out a_uims, bool a_detail=false)
IVD_UI_DECL_d void CliConnectToHSM (i_HSM_out a_hsm, const string a_serverName, const string a_partName)

Variables

class IVD_IPC_DECL_d i_Component_i
class _OMNIORB_NTDLL_IMPORT POA_i_UIMessageServer


Define Documentation

#define MAX_CORBA_UIRESULT_BLOCK_LENGTH   (1024*1024)

Definition at line 27 of file ui_helpers.h.

Referenced by ui_ResultPacker::NewRow().


Function Documentation

IVD_UI_DECL_d void CliConnectToHSM ( i_HSM_out  a_hsm,
const string  a_serverName,
const string  a_partName 
)

Definition at line 125 of file ui_helpers.cpp.

References ipc_Corba::ActivatePOA(), CliConnectToHSM(), dbg_NORM, g_cmn, ivd_BaseException::GetDescription(), ie_IPC_ORB, ie_IPC_RESOLVE, ie_NO_HSM, ipc_Corba::Init(), ipc_Corba::InitDebug(), ipc_EXEC_m, iPM, ivd_Error, log_DBG_m, log_FUNC_m, cmn_SysInfo::m_serverHost, ipc_Corba::ResolvePMByPartID(), and cmn_Global::si.

Referenced by CliConnectToHSM().

00128                                  {
00129     log_FUNC_m(CliConnectToHSM);
00130 
00131     i_PartitionManager_var iPM;
00132 
00133     try {
00134         log_DBG_m(dbg_NORM, "Setup CORBA...");
00135 
00136         ipc_Corba::InitDebug();
00137 
00138         ipc_Corba::Init(false);
00139 
00140         log_DBG_m(dbg_NORM, "CORBA is initialized.");
00141 
00142         ipc_Corba::ActivatePOA();
00143 
00144         log_DBG_m(dbg_NORM, "POAManager is activated.");
00145     }
00146     catch (ivd_Exception &e) {
00147         throw ivd_Error(ie_IPC_ORB, e.GetDescription());
00148     }
00149     catch (std::exception &se) {
00150         throw ivd_Error(ie_IPC_ORB, se.what());
00151     }
00152     catch (...) {
00153         throw ivd_Error(ie_IPC_ORB, "Unknown exception.");
00154     }
00155 
00156     try {
00157         ipc_EXEC_m(
00158             log_DBG_m(dbg_NORM, "Getting PM reference...");
00159             CORBA::Object_var obj = ipc_Corba::ResolvePMByPartID(
00160                 g_cmn.si.m_serverHost, a_partName, false);
00161 
00162             iPM = i_PartitionManager::_narrow(obj);
00163             log_DBG_m(dbg_NORM, "Got PM reference.");
00164 
00165             log_DBG_m(dbg_NORM, "Getting HSM reference...");
00166             a_hsm = iPM->GetHSM();
00167             if (CORBA::is_nil(a_hsm)) {
00168                 throw ivd_Error(ie_NO_HSM, "Partition not mounted or no valid HSM reference.");
00169             }
00170             log_DBG_m(dbg_NORM, "Got HSM reference.");
00171         );
00172     }
00173     catch (ivd_Error &ie) {
00174         throw ie;
00175     }
00176     catch (ivd_SysError &ie) {
00177         throw ie;
00178     }
00179     catch (ivd_InternalError &iie) {
00180         throw iie;
00181     }
00182     catch (ivd_Exception &e) {
00183         throw ivd_Error(ie_IPC_RESOLVE, e.GetDescription());
00184     }
00185     catch (std::exception &se) {
00186         throw ivd_Error(ie_IPC_RESOLVE, se.what());
00187     }
00188     catch (...) {
00189         throw ivd_Error(ie_IPC_RESOLVE, "Unknown exception.");
00190     }
00191 }

Here is the call graph for this function:

Here is the caller graph for this function:

IVD_UI_DECL_d i_UIMessageServer_i* CliConnectToMIF ( i_ManagementInterface_out  a_mif,
i_UIMessageServer_out  a_uims,
bool  a_detail = false 
)

Definition at line 41 of file ui_helpers.cpp.

References ipc_Corba::ActivatePOA(), CliConnectToMIF(), dbg_NORM, g_cmn, ivd_BaseException::GetDescription(), ie_IPC_MIF, ie_IPC_ORB, ie_IPC_UIMS, ipc_Corba::Init(), ipc_Corba::InitDebug(), ipc_EXEC_m, ivd_Error, log_DBG_m, log_FUNC_m, cmn_SysInfo::m_serverHost, NULL, ipc_Corba::RegisterMajorServant(), ipc_Corba::ResolveMIF(), and cmn_Global::si.

Referenced by _tmain(), CliConnectToMIF(), and main().

00044                                           {
00045 
00046     log_FUNC_m(CliConnectToMIF);
00047 
00048     try {
00049         log_DBG_m(dbg_NORM, "Setup CORBA...");
00050 
00051         ipc_Corba::InitDebug();
00052 
00053         ipc_Corba::Init(false);
00054 
00055         log_DBG_m(dbg_NORM, "CORBA is initialized.");
00056 
00057         ipc_Corba::ActivatePOA();
00058 
00059         log_DBG_m(dbg_NORM, "POAManager is activated.");
00060     }
00061     catch (ivd_Exception &e) {
00062         throw ivd_Error(ie_IPC_ORB, e.GetDescription());
00063     }
00064     catch (std::exception &se) {
00065         throw ivd_Error(ie_IPC_ORB, se.what());
00066     }
00067     catch (...) {
00068         throw ivd_Error(ie_IPC_ORB, "Unknown exception.");
00069     }
00070 
00071 
00072     try {
00073         log_DBG_m(dbg_NORM, "Get MIF reference...");
00074         ipc_EXEC_m(
00075             CORBA::Object_var obj = ipc_Corba::ResolveMIF(
00076                 g_cmn.si.m_serverHost, false);
00077 
00078             i_ManagementInterface_var mif;
00079             mif = i_ManagementInterface::_narrow(obj);
00080 
00081             a_mif = mif._retn();
00082         );
00083 
00084         log_DBG_m(dbg_NORM, "Got MIF reference.");
00085     }
00086     catch (ivd_Exception &e) {
00087         throw ivd_Error(ie_IPC_MIF, e.GetDescription());
00088     }
00089     catch (std::exception &se) {
00090         throw ivd_Error(ie_IPC_MIF, se.what());
00091     }
00092     catch (...) {
00093         throw ivd_Error(ie_IPC_MIF, "Unknown exception.");
00094     }
00095 
00096     i_UIMessageServer_i* iUIMS(NULL);
00097     try {
00098         log_DBG_m(dbg_NORM, "Create UI message server...");
00099 
00100         ipc_EXEC_m(
00101             iUIMS = new i_UIMessageServer_i(false, a_detail);
00102             ipc_Corba::RegisterMajorServant(iUIMS);
00103 
00104             i_UIMessageServer_var uims;
00105             uims = i_UIMessageServer::_duplicate(iUIMS->_this());
00106             a_uims = uims._retn();
00107             iUIMS->_remove_ref();
00108         );
00109 
00110         log_DBG_m(dbg_NORM, "UIMS registered.");
00111     }
00112     catch (ivd_Exception &e) {
00113         throw ivd_Error(ie_IPC_UIMS, e.GetDescription());
00114     }
00115     catch (std::exception &se) {
00116         throw ivd_Error(ie_IPC_UIMS, se.what());
00117     }
00118     catch (...) {
00119         throw ivd_Error(ie_IPC_UIMS, "Unknown exception.");
00120     }
00121 
00122     return iUIMS;
00123 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

class IVD_IPC_DECL_d i_Component_i

Definition at line 26 of file i_uims_impl.h.

class _OMNIORB_NTDLL_IMPORT POA_i_UIMessageServer

Definition at line 27 of file i_uims_impl.h.


Generated on Mon Feb 27 18:56:27 2012 for OPENARCHIVE by  doxygen 1.5.6