#include <rapidnet-application-base.h>
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< RelationBase > | GetRelation (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< Tuple > | Encrypt (Ptr< Tuple > tuple, string attrName) |
Encrypts the given tuple. | |
virtual Ptr< Tuple > | Decrypt (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< RelationBase > | Encrypt (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< Tuple > | CreateNewTuple (string name) |
Factory method to create a new Tuple. | |
virtual Ptr< Relation > | CreateNewRelation (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< Socket > | m_Socket |
Single socket per application for all communications. | |
Ptr< Database > | m_database |
List of tuples. | |
EventId | m_eventSoftStateDelete |
Event object for periodic soft-state deletes. | |
Ptr< RapidNetDecoratorFrontend > | m_decoratorFrontend |
Decorator for visualization. | |
Ptr< SendlogAuthenticationManager > | m_authenticationMgr |
SeNDlog authentication manager. | |
Ptr< SendlogEncryptionManager > | m_encryptionMgr |
SeNDlog encryption manager. | |
Private Member Functions | |
void | DoSend (Ptr< Tuple > tuple) |
void | InitSocket () |
Initializes the socket. |
The basic book-keeping common to all RapidNet applications is implemented here. This includes a database, database triggers, methods to send and receive tuples
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.
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.
relnName | Name of the relation | |
attributes | List of key attributes | |
ttl | Soft-state timeout duration |
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:
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().