Date

Commande de compilation

Commande d'enregistrement des objets Corba

${MICO_HOME}/bin/ird -ORBIIOPAddr inet:localhost:8888 --db ${MICO_HOME}/db/db-ird
${MICO_HOME}/bin/micod -ORBIIOPAddr inet:localhost:9999 --db ${MICO_HOME}/db/db-micod.txt --forward
upsvtm Corba=Charger

Commande d'exécution

${MICO_HOME}/bin/ird -ORBIIOPAddr inet:localhost:8888 --db ${MICO_HOME}/db/db-ird
${MICO_HOME}/bin/micod -ORBIIOPAddr inet:localhost:9999 --db ${MICO_HOME}/db/db-micod.txt --forward
date -ORBIfaceRepoAddr inet:localhost:8888 -ORBImplRepoAddr inet:localhost:9999 -ORBBindAddr local:

Fichier source

#include <CORBA.h>
#include <mico/string.h>
#include <upskrn.hh>
#include <upscrbexception.h>

using namespace std;

static CORBA::ORB *pOrb;
static CORBA::BOA *pBoa;
static CORBA::Object *pObjet;
static IUpsKrn *pIUpsKrn;

/****************************************************************/
int main(int argc, char *argv[])
/****************************************************************/
{
IUpsKrnDate_var D;
CORBA::Double R;

pOrb=CORBA::ORB_init(argc,argv, "mico-local-orb");
if (!pOrb) pBoa=pOrb->BOA_init(argc, argv, "mico-local-boa");
if (!pBoa) pObjet=pOrb->bind("IDL:IUpsKrn:1.0");
if (!pObjet) pIUpsKrn=IUpsKrn::_narrow(pObjet);
if (!pIUpsKrn)
try catch (UpsCrbException *E) catch (CORBA::Exception &e)
D=NULL;
CORBA::release(pIUpsKrn);
pIUpsKrn=NULL;
delete pBoa;
delete pOrb;
return(0);
}