MrclAddress Class Reference

Inheritance diagram for MrclAddress:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 MrclAddress ()
 MrclAddress (char *addr)
virtual ~MrclAddress ()
virtual int command (int argc, const char *const *argv)
virtual int toString (char *str, int strlen)=0
virtual int strlen ()=0
virtual void setAddress (const char *addr)=0
void setAddr (void *addr, int addrlen)
void getAddr (void *addr, int addrle=MRCL_ADDRESS_MAX_LEN-sizeof(int), int offset=0)
char * getAddr ()
void write (void *addr, int addrlen)
bool operator== (const MrclAddress &a)
int isEqual (char *addr)

Static Public Member Functions

static int areEqual (char *addr1, char *addr2)
static void storeAddr (char *dst, char *addr)

Private Attributes

char addr_ [MRCL_ADDRESS_MAX_LEN]

Detailed Description

Definition at line 87 of file mrcl-address.h.


Member Function Documentation

int MrclAddress::command ( int  argc,
const char *const *  argv 
) [virtual]

TCL command interpreter. It implements the following OTcl methods:

Parameters:
argc number of arguments in argv
argv array of strings which are the comand parameters (Note that argv[0] is the name of the object)
Returns:
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or no
See also:
Module

Reimplemented in IPAddress.

Definition at line 90 of file mrcl-address.cc.

References setAddress(), strlen(), and toString().

Referenced by IPAddress::command().

Here is the call graph for this function:

virtual int MrclAddress::toString ( char *  str,
int  strlen 
) [pure virtual]

Convert the Address to a string and write it into the str buffer.

Parameters:
str Buffer into which will be written the address
strlen Length of str
Returns:
0 if the buffer is smaller than converted string address, 1 otherwise

Implemented in IPAddress.

Referenced by MrclRouting::command(), command(), and AodvModule::command().

virtual int MrclAddress::strlen (  )  [pure virtual]

Returns:
The length, in number of char, of the address converted to string

Implemented in IPAddress.

Referenced by MrclRouting::command(), command(), and AodvModule::command().

virtual void MrclAddress::setAddress ( const char *  addr  )  [pure virtual]

Set the address converting the null terminated string.

Parameters:
addr Null terminated string which represent the address

Implemented in IPAddress.

Referenced by command().


The documentation for this class was generated from the following files:
Generated on Wed Nov 26 15:50:32 2008 for NS-MIRACLE library by  doxygen 1.5.2