CARMA C++
carma::corba::Client Class Reference

Class to encapsulate CORBA client functionality in CARMA. More...

#include <carma/corba/Client.h>

Public Member Functions

 Client (int argc, char *argv[], int rrtt=60)
 Initialize CORBA client runtime. More...
 
template<typename T >
T::_var_type resolveName (const ::std::string &name, bool initialRef=false)
 Resolve specified name to a CORBA object of the templatized output type. More...
 
template<typename N >
bool sendNotification (const ::std::string &channelName, const ::std::string &proxyName, const N &notification)
 Send a notification of type N to specified notification server channel. More...
 
 ~Client ()
 Destructor Note: doesn't cleanup remote resources allocated with this class. More...
 

Static Public Member Functions

static void applyTimeoutPolicies (CORBA::ORB_ptr orb, int rrtt=60)
 Apply client timeout policies. More...
 

Friends

class Server
 

Detailed Description

Class to encapsulate CORBA client functionality in CARMA.

For examples see the Test directory.

Author: Andrew Beard

Definition at line 26 of file Client.h.

Constructor & Destructor Documentation

carma::corba::Client::Client ( int  argc,
char *  argv[],
int  rrtt = 60 
)

Initialize CORBA client runtime.

Parameters
argcCommand line arguments to initialize ORB from.
argvCommand line arguments to initialized ORB from.
rrttRelative round-trip timeout for commands in seconds.
See Also
carma::util::Program::getCorbaClient()
carma::corba::Client::~Client ( )

Destructor Note: doesn't cleanup remote resources allocated with this class.

This is NOT a shortcoming of this class, but a fundamental limitation of the ownership concept in distributed environments in general.

Member Function Documentation

static void carma::corba::Client::applyTimeoutPolicies ( CORBA::ORB_ptr  orb,
int  rrtt = 60 
)
static

Apply client timeout policies.

This is only exposed here so that we apply the same timeout policies to util::CorbaUtils and util::Orb (both call this).

Parameters
rrttRelative round-trip timeout for commands.
template<typename T >
T::_var_type carma::corba::Client::resolveName ( const ::std::string &  name,
bool  initialRef = false 
)

Resolve specified name to a CORBA object of the templatized output type.

Nameserver names have the format "context.name" where a context contains multiple contexts and/or objects.

Parameters
nameHierarchical nameserver name OR initial service name.
initialRefTrue if name is an initial service name.
Returns
Templatized CORBA var type from generated proxy class.
template<typename N >
bool carma::corba::Client::sendNotification ( const ::std::string &  channelName,
const ::std::string &  proxyName,
const N &  notification 
)

Send a notification of type N to specified notification server channel.

Parameters
channelNameName of notification channel.
proxyNameName of notification proxy connection.
notificationIDL defined structure of notification.

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