Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes
jafar::ddf::SensorNodeBase Class Reference

This class implements the core functionalitires for a sensornode i.e. More...


Detailed Description

This class implements the core functionalitires for a sensornode i.e.

local filter, channel filters synchronization etc. For connecting nodes together a channel manager has to be implemented: the derived class has to override the following functions RequestConnection, SetupChanMgrComm, #Listen and #CleanChanMgrComm. The derived class has also to implement a periodic call of ExecSyncThreadFunc

Author:
Pierre Lamon

Definition at line 57 of file sensornodegeneric.hpp.

#include <sensornodegeneric.hpp>

Inheritance diagram for jafar::ddf::SensorNodeBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SensorNodeBase (unsigned short sv_size, unsigned short id, time const &sync_period, PredictModelFactoryBase *pred_factory, CommFactoryBase *comm_factory, bool delayed_data)
bool IsJustSync () const
void SetNotSync ()
time GetLastSyncTime () const
void SetLastSyncTime (time const &last)
void SetEpsilon (time const &epsilon)
time GetEpsilon () const
void SetNow (time const &t_orig)
time const & GetNow () const
unsigned short GetID ()
unsigned short GetSvSize ()
time const & GetSyncPeriod ()
void SetLogChanFilters (bool log)
bool GetLogChanFilters ()
void SetInitWithState (VEC const &x, MSYM const &X)
 Initialize the local filter with the state and its covariance matrix.
void SetInitWithInfo (VEC const &y, MSYM const &Y)
 Initialize the local filter with the information and the information matrix.
void SetNextHorizon (time const &horizon)
time const & GetNextHorizon ()
time const & GetLocalInfoTime () const
 Get the time of last prediction or update of the local filter.
void SetLocalInfoTime (time const &t)
InfoContainer const & GetLocalInfo () const
InfoContainer const & GetLocalState () const
void PrintPredModel ()
bool IsNodeConnected (unsigned short other_node)
 Check if other_node is connected.
virtual SN_CODE_TYPE RequestConnection (unsigned short node_id)=0
 Connexion function: return SN_CODE_OK or SN_CODE_ALREADY_CONNECTED.
virtual void SetupChanMgrComm ()=0
 Called by the channel manager thread.
virtual void Listen ()=0
virtual void CleanChanMgrComm ()=0
virtual void PurgeFifo ()=0
 Empty the measurement buffer before channel filters sync.
void ExecSyncThreadFunc (time const &horizon, time const &elapsed, int call_nr)
 Executed periodically by the synchronization process.
CommBaseCreateChannelFilter (unsigned short link_with)
 Called by the manager to create a new channel filter.
void CreateChannelFilter (key_t chan_key, unsigned short link_with)
void UpdateWithChannelFilters (time const &horizon)
 Collect information from the channel filters, update the local filter and send the result.

Protected Types

typedef std::list
< ChannelFilterBase * > 
ChanFiltersBuf

Protected Member Functions

ChannelFilterBaseGetChanFltbyNodeID (unsigned short node_id)

Protected Attributes

unsigned short m_id
unsigned short m_sv_size
PredictionEngineBasem_pred_engine
PredictModelFactoryBasem_pred_factory
CommFactoryBasem_comm_factory
ChanFiltersBuf m_chan_filters
time m_next_sync_horizon
time m_time_orig
time m_sync_period
time m_last_sync
time m_time_eps
bool m_just_sync
bool m_log_chan
boost::mutex m_chan_mutex
boost::try_mutex m_local_mutex
boost::mutex m_next_horiz_mutex

Static Protected Attributes

static unsigned short m_static_id

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

Generated on Wed Oct 15 2014 00:37:33 for Jafar by doxygen 1.7.6.1
LAAS-CNRS