ot_lib::ot_socketManager Class Reference

#include <ot_lib.h>

Inheritance diagram for ot_lib::ot_socketManager:

ot_lib::ot_manager

List of all members.

Public Member Functions

 ot_socketManager (const string &hostname, int port, int timeout=0, const ot_messageCodec *codec=ot_codecRepository::getInstance()->getStdCodec())
 ~ot_socketManager (void)
void setTimeout (int timeout)
void callFunction (const ot_path &fPath, const ot_obj &input, auto_ptr< ot_obj > &output)
void dumpInterface (auto_ptr< ot_obj > &output)
void pingInterface (void)
 Check interface presence.
void getAttribute (const ot_path &aPath, auto_ptr< ot_obj > &output)
void setAttribute (const ot_path &aPath, const ot_obj &newValue)
void addAttribute (const ot_path &ePath, const string &name, const ot_obj &o)
void removeElement (const ot_path &ePath)
void lockAttribute (const ot_path &aPath)
void unlockAttribute (const ot_path &aPath)
void setInterfaceAccess (const ot_path &iPath, OT_IE_ACCESS a)
OT_IE_STATUS getAttributeStatus (const ot_path &aPath)
void addInterface (const ot_path &iPath, OT_IE_ACCESS access=IE_PRIVATE)
void removeInterface (const ot_path &iPath)
void addFunction (const ot_path &iPath, ot_functionImplementation *fImpl, OT_IE_ACCESS a=IE_PRIVATE)
void removeFunction (const ot_path &iPath)

Private Member Functions

void checkException (ot_messageBase *msg) const

Private Attributes

string m_hostname
int m_port
const ot_messageCodecm_codec
ost::TCPStream * m_cSocket


Constructor & Destructor Documentation

ot_lib::ot_socketManager::ot_socketManager ( const string &  hostname,
int  port,
int  timeout = 0,
const ot_messageCodec codec = ot_codecRepository::getInstance()->getStdCodec() 
)

ot_lib::ot_socketManager::~ot_socketManager ( void   ) 


Member Function Documentation

void ot_lib::ot_socketManager::checkException ( ot_messageBase msg  )  const [private]

void ot_lib::ot_socketManager::setTimeout ( int  timeout  ) 

Set read/write timeout

Parameters:
timeout Timeout in milliseconds

void ot_lib::ot_socketManager::callFunction ( const ot_path fPath,
const ot_obj input,
auto_ptr< ot_obj > &  output 
) [virtual]

Call a function (in corrent process)

Parameters:
fPath Path to the function
input Input data
output Output filled by the function

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::dumpInterface ( auto_ptr< ot_obj > &  output  )  [virtual]

Get a interface description

Parameters:
output Output filled by the function

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::pingInterface ( void   )  [virtual]

Check interface presence.

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::getAttribute ( const ot_path aPath,
auto_ptr< ot_obj > &  output 
) [virtual]

Get an attribute

Parameters:
aPath Attribute path
attrName Attribute name
output Output filled by the attribute value

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::setAttribute ( const ot_path aPath,
const ot_obj newValue 
) [virtual]

Set an attribute

Parameters:
aPath Attribute path
attrName Attribute name
newValue New attribute value

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::addAttribute ( const ot_path ePath,
const string &  name,
const ot_obj o 
) [virtual]

Add a new element

Parameters:
ePath Element path

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::removeElement ( const ot_path ePath  )  [virtual]

Remove an element

Parameters:
ePath Element path

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::lockAttribute ( const ot_path aPath  )  [virtual]

Lock an element

Parameters:
aPath Element path

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::unlockAttribute ( const ot_path aPath  )  [virtual]

Unlock an element

Parameters:
aPath Element path

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::setInterfaceAccess ( const ot_path iPath,
OT_IE_ACCESS  a 
) [virtual]

Set the interface access

Parameters:
iPath Interface path

Implements ot_lib::ot_manager.

OT_IE_STATUS ot_lib::ot_socketManager::getAttributeStatus ( const ot_path aPath  )  [virtual]

Unlock an element

Parameters:
aPath Element path

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::addInterface ( const ot_path iPath,
OT_IE_ACCESS  access = IE_PRIVATE 
) [virtual]

Add a new child interface

Parameters:
iPath The interface path
access Interface access mode

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::removeInterface ( const ot_path iPath  )  [virtual]

Delete an interface

Parameters:
iPath The interface path

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::addFunction ( const ot_path iPath,
ot_functionImplementation fImpl,
OT_IE_ACCESS  a = IE_PRIVATE 
) [virtual]

Add a function to an interface

Parameters:
iPath The interface path
fImpl Function callback

Implements ot_lib::ot_manager.

void ot_lib::ot_socketManager::removeFunction ( const ot_path iPath  )  [virtual]

Remove a function to from an interface

Parameters:
iPath The interface path

Implements ot_lib::ot_manager.


Member Data Documentation

ost::TCPStream* ot_lib::ot_socketManager::m_cSocket [private]


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

Generated on Sun May 4 12:42:46 2008 for OT_LIB 4.1 by  doxygen 1.5.5