ns3::rapidnet::RapidNetApplicationBase Class Reference
[RapidNet Library]

A base class for all RapidNet applications. More...

#include <rapidnet-application-base.h>

Inheritance diagram for ns3::rapidnet::RapidNetApplicationBase:

Inheritance graph
[legend]
Collaboration diagram for ns3::rapidnet::RapidNetApplicationBase:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void SetAddress (Ipv4Address addr)
 Sets the IP address for this application instance.
virtual Ipv4Address GetAddress (void)
 Returns the IP address of this application instance.
virtual void SetPort (uint16_t port)
 Sets the port number on which the application communicates.
virtual uint16_t GetPort ()
 Returns the port number on which the application communicates.
virtual void Insert (Ptr< Tuple > tuple)
 Inserts a new tuple to the application database.
virtual void Inject (Ptr< Tuple > tuple)
 Injects the tuple into this application.
virtual void Insert (Ptr< RelationBase > reln)
 Inserts all tuples of the given relation.
virtual void Delete (Ptr< Tuple > tuple)
 Deletes the given tuple from the application database.
virtual void Delete (Ptr< RelationBase > reln)
 Deletes the given relation from the application database.
virtual Ptr< RelationBaseGetRelation (string name)
 Returns the relation in the application database with the given name. Throws an error if it does not exist.
void SetMaxJitter (uint32_t maxJitter)
 Sets the maximum value of the jitter in milliseconds.

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::rapidnet::RapidNetApplicationBase.

Public Attributes

TriggerList OnSend
 Application specific send triggers can be added to this.
TriggerList OnRecv
 Application specific recv triggers can be added to this.
TriggerList OnInsert
 Application specific insert triggers can be added to this.
TriggerList OnDelete
 Application specific delete triggers can be added to this.

Protected Member Functions

virtual void DoDispose (void)
 Clean up after stopping.
virtual void StartApplication (void)
 Initializes and starts the application.
virtual void StopApplication (void)
 Stops the application.
virtual void InitDatabase (void)
 Application should use this to define the database schema.
virtual void SendlogInit ()
 Initialize SeNDlog specific members.
virtual void Send (Ptr< Tuple > tuple)
 Sends the given tuple over the network. The destination is is specified in a special attribute of the tuple.
virtual void Sign (Ptr< Tuple > tuple)
 Signs the given tuple.
virtual bool Verify (Ptr< Tuple > tuple, string attrName)
 Verify the given tuple.
virtual Ptr< TupleEncrypt (Ptr< Tuple > tuple, string attrName)
 Encrypts the given tuple.
virtual Ptr< TupleDecrypt (Ptr< Tuple > tuple)
 Decrypts the given tuple.
virtual void SendLocal (Ptr< Tuple > tuple)
 Sends a tuple locally, i.e. to itself.
virtual void SendBroadcast (Ptr< Tuple > tuple)
 Broadcast tuple.
virtual void Send (Ptr< RelationBase > reln)
 Send all tuples in the given relation.
virtual void Sign (Ptr< RelationBase > reln)
 Sign all tuples in the given relation.
virtual Ptr< RelationBaseEncrypt (Ptr< RelationBase > reln, string attrName)
 Encrypt all tuples in the given relation.
virtual void SendLocal (Ptr< RelationBase > reln)
 Sends locally all tuples in the given relation.
void Receive (Ptr< Socket > socket)
 Receives the network event retrieves the.
virtual Ptr< TupleCreateNewTuple (string name)
 Factory method to create a new Tuple.
virtual Ptr< RelationCreateNewRelation (string name)
 Factory method to create a new relation and set triggers.
virtual void AddRelationWithKeys (string relnName, list< attrdeftype > attributes, Time ttl=Seconds(TIME_INFINITY))
 Inserts a.
virtual void AddHeapRelationWithKeys (string relnName, list< attrdeftype > attributes, string heapAttr, HeapRelation::Type type, uint32_t size, Time ttl=Seconds(TIME_INFINITY))
 Inserts a new.
virtual void DemuxRecv (Ptr< Tuple > tuple)
 The demux method that all applications must implement by specifying what to do when the given tuple is received.
virtual void SoftStateDelete ()
 Triggered periodically, it checks for any tuples in the database that have timed out and deletes them.

Protected Attributes

Ipv4Address m_address
 Address of the node on which this application instance is running.
uint16_t s_Port
 Port at which the applications communicate.
Ptr< Socketm_Socket
 Single socket per application for all communications.
Ptr< Databasem_database
 List of tuples.
EventId m_eventSoftStateDelete
 Event object for periodic soft-state deletes.
Ptr< RapidNetDecoratorFrontendm_decoratorFrontend
 Decorator for visualization.
Ptr< SendlogAuthenticationManagerm_authenticationMgr
 SeNDlog authentication manager.
Ptr< SendlogEncryptionManagerm_encryptionMgr
 SeNDlog encryption manager.

Private Member Functions

void DoSend (Ptr< Tuple > tuple)
void InitSocket ()
 Initializes the socket.


Detailed Description

A base class for all RapidNet applications.

The basic book-keeping common to all RapidNet applications is implemented here. This includes a database, database triggers, methods to send and receive tuples


Member Function Documentation

virtual void ns3::rapidnet::RapidNetApplicationBase::AddHeapRelationWithKeys ( string  relnName,
list< attrdeftype >  attributes,
string  heapAttr,
HeapRelation::Type  type,
uint32_t  size,
Time  ttl = Seconds(TIME_INFINITY) 
) [protected, virtual]

Inserts a new.

See also:
HeapRelation with the given name.
Parameters:
relnName Name of the relation
attributes List of key attributes
heapAttr The heap attribute
type The heap type (min or max)
size The maximum size of the heap.
ttl Soft-state timeout duration

virtual void ns3::rapidnet::RapidNetApplicationBase::AddRelationWithKeys ( string  relnName,
list< attrdeftype >  attributes,
Time  ttl = Seconds(TIME_INFINITY) 
) [protected, virtual]

Inserts a.

See also:
Relation with the given name.
Parameters:
relnName Name of the relation
attributes List of key attributes
ttl Soft-state timeout duration

void ns3::rapidnet::RapidNetApplicationBase::DoSend ( Ptr< Tuple tuple  )  [private]

Actually sends the packet.

static TypeId ns3::rapidnet::RapidNetApplicationBase::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::rapidnet::RapidNetApplicationBase.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/ApplicationList/[i]/$ns3::rapidnet::RapidNetApplicationBase
No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented from ns3::Application.

virtual void ns3::rapidnet::RapidNetApplicationBase::Inject ( Ptr< Tuple tuple  )  [inline, virtual]

Injects the tuple into this application.

This can be invoked explicitly to simulate a network event being received.

References SendLocal().

void ns3::rapidnet::RapidNetApplicationBase::Receive ( Ptr< Socket socket  )  [protected]

Receives the network event retrieves the.

See also:
Tuple and invokes the

DemuxRecv() method.


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

Generated on Fri Apr 9 15:01:11 2010 for NS-3 by  doxygen 1.5.8