Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

ViaNetManager Class Reference

Collaboration diagram for ViaNetManager:
[legend]
List of all members.

Detailed Description

class responsible for interfacing with the incomming and outgoing data sockets

Definition at line 18 of file viaNetManager.h.

Public Types

enum  sock_port {
  df_in_port = 1001,
  df_out_port = 1000
}
 enumeration for the ports used by the netmanager More...


Public Member Functions

int netListener ()
 makes calls to the in and out net to listen for socket connections

int disconnect ()
 forces a disconnect with the remote computer

int writePacket (Packet *packet)
 sets up a packet to send over the outnet

int waitForReply (int ID, Packet *packet)
 wait for a reply from a message

int createID ()
 create an id for a packet


Static Public Member Functions

ViaNetManagertheInstance ()
 returns the one and only instance of ViaNetManager


Protected Member Functions

 ViaNetManager ()
 constructor for the ViaNetManager class

 ~ViaNetManager ()
 destructor for the ViaNetManager class


Private Attributes

SysLogsystemLogger
 reference to the syslog

ViaInNetSockinNetSock
 refernce to the InNetSock

ViaOutNetSockoutNetSock
 reference to the OutNetSock

sockaddr_in defaultOutNet
 information for making a default out connection to the the robot

sockaddr_in defaultInNet
 information for making a default in connection to the robot

int curID
 current ID upto


Static Private Attributes

char * df_addr
 the default ip address for connecting to the robot


Member Enumeration Documentation

enum ViaNetManager::sock_port
 

enumeration for the ports used by the netmanager

Enumeration values:
df_in_port  incomming data port
df_out_port  outgoing data port

Definition at line 24 of file viaNetManager.h.


Member Function Documentation

int ViaNetManager::createID  ) 
 

create an id for a packet

Return values:
the id created

int ViaNetManager::disconnect  ) 
 

forces a disconnect with the remote computer

Return values:
1 on success -1 on error

int ViaNetManager::netListener  ) 
 

makes calls to the in and out net to listen for socket connections

Return values:
1 on success -1 on error

ViaNetManager* ViaNetManager::theInstance  )  [static]
 

returns the one and only instance of ViaNetManager

Return values:
the singleton instance of ViaNetManager

int ViaNetManager::waitForReply int  ID,
Packet packet
 

wait for a reply from a message

Parameters:
ID of the packet to look for
packet pointer to put data
Return values:
1 on success -1 on error

int ViaNetManager::writePacket Packet packet  ) 
 

sets up a packet to send over the outnet

Parameters:
packet to write
Return values:
packetID 


The documentation for this class was generated from the following file:
Generated on Fri Mar 25 23:48:46 2005 for CS498EmbeddedSystemsProgramming by doxygen 1.3.6