xorp

Transmit< A > Class Template Reference

The base class for all transmissions. More...

#include <transmit.hh>

Inheritance diagram for Transmit< A >:
SimpleTransmit< A >

List of all members.

Public Types

typedef ref_ptr< TransmitTransmitRef

Public Member Functions

virtual bool valid ()=0
 Is this object still valid?
virtual bool multiple ()=0
 A transmit object may be able to generate multiple packets; not just one.
virtual TransmitRef clone ()=0
 Make a copy of this object.
virtual uint8_t * generate (size_t &len)=0
 Generate a packet for transmission.
virtual A destination ()=0
virtual A source ()=0

Detailed Description

template<typename A>
class Transmit< A >

The base class for all transmissions.

Typically a large number of Transmit objects could be queued for transmission. By the time a Transmit object is scheduled for transmission circumstances could have changed. It may no longer be appropriate to transmit this packet. Therefore allow a transmit object to become invalid. A single transmit object can generate a number of packets. For example for the database synchronisation process.


Member Function Documentation

template<typename A>
virtual TransmitRef Transmit< A >::clone ( ) [pure virtual]

Make a copy of this object.

If the same data is being sent to multiple locations, provide a mechanism to make a copy for each location.

Implemented in SimpleTransmit< A >.

template<typename A>
virtual A Transmit< A >::destination ( ) [pure virtual]
Returns:
the destination address of this packet.

Implemented in SimpleTransmit< A >.

template<typename A>
virtual uint8_t* Transmit< A >::generate ( size_t &  len) [pure virtual]

Generate a packet for transmission.

Parameters:
lenlength of the encoded packet.
Returns:
A pointer that must be delete'd.

Implemented in SimpleTransmit< A >.

template<typename A>
virtual bool Transmit< A >::multiple ( ) [pure virtual]

A transmit object may be able to generate multiple packets; not just one.

Returns:
True if this object can be invoked multiple times?

Implemented in SimpleTransmit< A >.

template<typename A>
virtual A Transmit< A >::source ( ) [pure virtual]
Returns:
the source address of this packet.

Implemented in SimpleTransmit< A >.

template<typename A>
virtual bool Transmit< A >::valid ( ) [pure virtual]

Is this object still valid?

Returns:
True if this transmit object is still valid.

Implemented in SimpleTransmit< A >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations