codaObject::SessionObject Class Reference

Extends CodaObject to allow for session ownership and control. More...

#include <SessionObject.hxx>

Inheritance diagram for codaObject::SessionObject:
codaObject::CodaObject codaObject::RunObject codaObject::InterruptibleObject

List of all members.

Public Member Functions

 SessionObject (const string &UDL, const string &name, const string &descr, const string &codaClass="USER", const cMsgSubscriptionConfig *scfg=NULL) throw (CodaException)
 SessionObject constructor, invokes CodaObject constructor.
virtual ~SessionObject (void) throw ()
 SessionObject destructor.
string getSession (void) const throw ()
 Returns current session.
string getConfig (void) const throw ()
 Returns object config.

Protected Member Functions

virtual void handleSetSession (const string &newSession) throw (CodaException)
 Handles set session request.
virtual void handleSetSession (const cMsgMessage *msg) throw (CodaException)
 Handles set session request.
virtual void handleSessionConfigure (const cMsgMessage *msg) throw (CodaException)
 Handles configure request.
virtual void handleExit (const cMsgMessage *msg) throw (CodaException)
 Handles exit request.
virtual void handleSessionReset (const cMsgMessage *msg) throw (CodaException)
 Handles reset request.
virtual void handleStartReporting (const cMsgMessage *msg) throw (CodaException)
 Handles start reporting request.
virtual void handleStopReporting (const cMsgMessage *msg) throw ()
 Handles stop reporting request.
virtual void fillReport (cMsgMessage *msg) throw ()
 fills rc/report/status message
virtual bool setSession (const string &newSession) throw (CodaException)
 Sets session.
virtual bool sessionConfigure (const string &fileName, const string &fileContent) throw (CodaException)
 Performs configure.
virtual void exit (const string &s) throw (CodaException)
 Performs exit.
virtual void sessionReset (const string &s) throw (CodaException)
 Default probably should be overriden by user.
virtual void daLogMsgFill (cMsgMessage &msg) const throw (CodaException)
 Fills daLogMsg with session-specific information.

Protected Attributes

string session
 Current session.

Detailed Description

Extends CodaObject to allow for session ownership and control.

A SessionObject is owned by a session and unavailable to other sessions until released.

User customizes SessionObject via override of configure, start, stop, and/or exit methods.

Definition at line 45 of file SessionObject.hxx.


Constructor & Destructor Documentation

SessionObject::SessionObject ( const string &  udl,
const string &  Name,
const string &  Descr,
const string &  cClass = "USER",
const cMsgSubscriptionConfig *  scfg = NULL 
) throw (CodaException)

SessionObject constructor, invokes CodaObject constructor.

Subscribes to additional session-specific subjects.

Parameters:
udl Main cMsg connection udl
name Object name
descr Object description
cClass Coda class of object
scfg cMsg subscription config

Definition at line 49 of file SessionObject.cc.

References DALOG_ERROR.

SessionObject::~SessionObject ( void   )  throw () [virtual]

SessionObject destructor.

Stops reporting, deletes session callback dispatcher.

Definition at line 90 of file SessionObject.cc.

References codaObject::CodaObject::debug, and handleStopReporting().


Member Function Documentation

void SessionObject::daLogMsgFill ( cMsgMessage &  m  )  const throw (CodaException) [protected, virtual]

Fills daLogMsg with session-specific information.

Parameters:
msg Message

Reimplemented from codaObject::CodaObject.

Reimplemented in codaObject::RunObject.

Definition at line 456 of file SessionObject.cc.

References codaObject::CodaObject::daLogMsgFill().

Referenced by codaObject::RunObject::daLogMsgFill().

void SessionObject::exit ( const string &  s  )  throw (CodaException) [protected, virtual]

Performs exit.

Default just exits, probably should be overridden by user.

Parameters:
s String supplied with exit request.

Definition at line 514 of file SessionObject.cc.

void SessionObject::fillReport ( cMsgMessage *  m  )  throw () [protected, virtual]

fills rc/report/status message

Parameters:
m message

Reimplemented in codaObject::RunObject.

Definition at line 442 of file SessionObject.cc.

Referenced by codaObject::RunObject::fillReport().

string codaObject::SessionObject::getConfig ( void   )  const throw ()

Returns object config.

Returns:
Object config

Reimplemented from codaObject::CodaObject.

string SessionObject::getSession ( void   )  const throw ()

Returns current session.

Returns:
Current session

Definition at line 470 of file SessionObject.cc.

References session.

void SessionObject::handleExit ( const cMsgMessage *  msg  )  throw (CodaException) [protected, virtual]

Handles exit request.

Parameters:
msg Request message

Definition at line 307 of file SessionObject.cc.

void SessionObject::handleSessionConfigure ( const cMsgMessage *  msg  )  throw (CodaException) [protected, virtual]

Handles configure request.

Parameters:
msg Request message

Definition at line 270 of file SessionObject.cc.

void SessionObject::handleSessionReset ( const cMsgMessage *  msg  )  throw (CodaException) [protected, virtual]

Handles reset request.

Parameters:
msg Request message

Definition at line 168 of file SessionObject.cc.

void SessionObject::handleSetSession ( const cMsgMessage *  msg  )  throw (CodaException) [protected, virtual]

Handles set session request.

Parameters:
msg cMsg request message

Reimplemented in codaObject::RunObject.

Definition at line 257 of file SessionObject.cc.

void SessionObject::handleSetSession ( const string &  newSession  )  throw (CodaException) [protected, virtual]

Handles set session request.

Parameters:
newSession New session name

Reimplemented in codaObject::RunObject.

Definition at line 183 of file SessionObject.cc.

References DALOG_ERROR, and DALOG_INFO.

Referenced by codaObject::RunObject::handleSetSession().

void SessionObject::handleStartReporting ( const cMsgMessage *  msg  )  throw (CodaException) [protected, virtual]

Handles start reporting request.

Parameters:
msg Request message

Definition at line 320 of file SessionObject.cc.

References DALOG_ERROR, and DALOG_WARN.

void SessionObject::handleStopReporting ( const cMsgMessage *  msg  )  throw () [protected, virtual]

Handles stop reporting request.

Parameters:
msg Request message

Definition at line 356 of file SessionObject.cc.

Referenced by ~SessionObject().

bool SessionObject::sessionConfigure ( const string &  fileName,
const string &  fileContent 
) throw (CodaException) [protected, virtual]

Performs configure.

Dummy should be overridden by user.

Parameters:
s String supplied with configure request.
Returns:
True on success

Definition at line 500 of file SessionObject.cc.

void SessionObject::sessionReset ( const string &  s  )  throw (CodaException) [protected, virtual]

Default probably should be overriden by user.

Parameters:
s String supplied with reset request.

Definition at line 527 of file SessionObject.cc.

bool SessionObject::setSession ( const string &  newSession  )  throw (CodaException) [protected, virtual]

Sets session.

Dummy does nothing.

Parameters:
newSession New session
Returns:
True if successful

Definition at line 485 of file SessionObject.cc.


Member Data Documentation

Current session.

Definition at line 92 of file SessionObject.hxx.

Referenced by getSession().


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

Generated on 4 Feb 2014 for CodaObject by  doxygen 1.6.1