Menu

famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig > Class Template Reference

The abstract network layer provides functionality that is not specific to a concrete network layer. More...

#include <AbstractNetworkLayer.h>

Public Types

typedef NL::SNN SNN
 short network representation of the subject

Public Member Functions

 AbstractNetworkLayer ()
 constructor
void init ()
 Initalizes the sub networks and bind the subscription management channel.
void announce (const Subject &s, SNN &snn)
 announce a subject and get its short network representation
void publish (const SNN &snn, const Event &e)
 publish an event on the pluged lower network
void subscribe (const Subject &s, SNN &snn)
 subscribe a subject and get its short network representation
int8_t fetch (const SNN &snn, Event &e, const famouso::mw::nl::DistinctNL *bnl)
 fetches an event from the network layer if the short network name is equal to the short network name of the arosen packet.
void event_process_request (famouso::mw::nl::DistinctNL *const bnl)
 Is called by the higher layer to signalise that an event processing request was arised.
void event_processed ()
 Is called by the higher layer to signalise that the event is processed now.

Data Fields

SNN subscribe_SNN
 short network representation of the subscribe subject that is used for announcing subscribtion network-wide

Detailed Description

template<class NL, class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
class famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >

The abstract network layer provides functionality that is not specific to a concrete network layer.

It has the ability to get different lower layer plugs and supports functionality like fragmentation, or in later versions, it handles also the aspects of quality of service or attribute management.

Template Parameters:
NL the network layer see prerequisites.
AFP_FragConfig the AFP fragmentation config, see AFP configuration
AFP_DefragConfig the AFP defragmentation config, see AFP configuration
Precondition:
The type of template parameters can be an famouso::mw::nl::CANNL, famouso::mw::nl::AWDSNL, famouso::mw::nl::UDPMultiCastNL, famouso::mw::nl::UDPBroadCastNL or an famouso::mw::nl::VoidNL dependent on the configuration of the middleware stack

Member Typedef Documentation

template<class NL , class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
typedef NL::SNN famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::SNN

short network representation of the subject


Constructor & Destructor Documentation

template<class NL , class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::AbstractNetworkLayer (  )  [inline]

constructor


Member Function Documentation

template<class NL , class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
void famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::announce ( const Subject s,
SNN snn 
) [inline]

announce a subject and get its short network representation

Parameters:
[in] s the subject that is announced
[out] snn the short network name of the subject

References TRACE_FUNCTION.

template<class NL , class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
void famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::event_process_request ( famouso::mw::nl::DistinctNL *const   bnl  )  [inline]

Is called by the higher layer to signalise that an event processing request was arised.

Parameters:
[in] bnl the sub network-ID from where the request came.
template<class NL , class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
void famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::event_processed (  )  [inline]

Is called by the higher layer to signalise that the event is processed now.

References famouso::mw::afp::DefragmentationProcessorANL< AFPDC >::last_event_processed().

template<class NL , class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
int8_t famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::fetch ( const SNN snn,
Event e,
const famouso::mw::nl::DistinctNL bnl 
) [inline]

fetches an event from the network layer if the short network name is equal to the short network name of the arosen packet.

Parameters:
[in] snn the short network name of the subject
[out] e The event that has to be published. If there is no event to fetch (the arosen packet was a fragment not completing an event), e.data is set to NULL.
[in] bnl the sub network in that the event e will be published.
Returns:
  • -1 if snn and the snn of the last arosen packet are different
  • 0 if they are equal but there is no complete event to fetch
  • 1 if they are equal and e contains a complete event

References famouso::mw::Event::data, famouso::mw::afp::DefragmentationStep< AFPDC >::event_complete(), famouso::mw::afp::DefragmentationStep< AFPDC >::get_event_data(), famouso::mw::afp::DefragmentationStep< AFPDC >::get_event_length(), famouso::mw::Event::length, famouso::mw::afp::DefragmentationProcessorANL< AFPDC >::process_fragment(), and TRACE_FUNCTION.

template<class NL , class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
void famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::init (  )  [inline]

Initalizes the sub networks and bind the subscription management channel.

References famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::subscribe_SNN.

template<class NL , class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
void famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::publish ( const SNN snn,
const Event e 
) [inline]

publish an event on the pluged lower network

Parameters:
[in] snn the short network name of the subject
[in] e the event that has to be published
Todo:
Save copy operation in fragmentation case (needs AFP interface extension returning AFP header and payload separately and Packet/NL adaption)

References famouso::mw::Event::data, famouso::mw::Event::length, and TRACE_FUNCTION.

template<class NL , class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
void famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::subscribe ( const Subject s,
SNN snn 
) [inline]

subscribe a subject and get its short network representation

The subscribtion contains out of two parts. First it binds the subject to its short network name, and second it announces the subscription to allow gateways the establishing of forwarding channels.

Parameters:
[in] s the subject that is announced
[out] snn the short network name of the subject

References famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::subscribe_SNN, UID::tab(), and TRACE_FUNCTION.


Field Documentation

template<class NL , class AFP_FragConfig = typename NL::AFP_Config, class AFP_DefragConfig = typename NL::AFP_Config>
SNN famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::subscribe_SNN

short network representation of the subscribe subject that is used for announcing subscribtion network-wide

Referenced by famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::init(), and famouso::mw::anl::AbstractNetworkLayer< NL, AFP_FragConfig, AFP_DefragConfig >::subscribe().


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