System

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
system -ORBIfaceRepoAddr inet:localhost:8888 -ORBImplRepoAddr inet:localhost:9999 -ORBBindAddr local:

Fichier source

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

using namespace std;

static const CORBA::UShort CO_DroitLecture=1;
static const CORBA::UShort CO_DroitEcriture=2;
static const CORBA::UShort CO_DroitExecution=3;
static const CORBA::UShort CO_DroitLectureEcriture=4;
static const CORBA::UShort CO_DroitLectureExecution=5;
static const CORBA::UShort CO_DroitEcritureExecution=6;
static const CORBA::UShort CO_DroitLectureEcritureExecution=7;

static CORBA::ORB *pOrb;
static CORBA::BOA *pBoa;
static CORBA::Object *pObjet;
static IUpsKrn *pIUpsKrn;
static IUpsSys *pIUpsSys;
static IUpsSec *pIUpsSec;
static CORBA::Long NbAlarmes;

/****************************************************************/
static CORBA::Boolean MonAlarme(void)
/****************************************************************/
{
try catch (UpsCrbException *E) catch (CORBA::Exception &e) return(FALSE);
}

/****************************************************************/
static IUpsKrnCaractere *EcrireEntree(void)
/****************************************************************/
{
try catch (UpsCrbException *E) catch (CORBA::Exception &e) return(NULL);
}

/****************************************************************/
static void LireSortie(IUpsKrnCaractere *M)
/****************************************************************/
{
try catch (UpsCrbException *E) catch (CORBA::Exception &e) }