Code Search for Developers
 
 
  

MdOppGradient.h from EmStar at Krugle


Show MdOppGradient.h syntax highlighted

#ifndef __MD_OPP_GRADIENT_H__
#define __MD_OPP_GRADIENT_H__

#include "libmisc/queue.h"
#include "DiffTypes.h"
#include "Mdiff.h"


// Queue related for IntDiffMsg_t
result_t MdOppGradient_init(Mdiff_state_t * state);

result_t MdOppGradient_start(Mdiff_state_t * state);

result_t MdOppGradient_stop(Mdiff_state_t * state);

result_t MdOppGradient_recv(Mdiff_state_t * state,
			    IntDiffMsg_t * p_pMsg);

int8_t   MdOppGradient_subscribe(Mdiff_state_t * state,
				 DiffAttr_t * p_pAttributeArray,
                                 uint8_t p_uiNumAttr);

int8_t MdOppGradient_addGradient(Mdiff_state_t * state,
				 uint16_t p_uiSrcAddr,
				 uint16_t p_uiNexHop,
				 DiffAttr_t *p_pAttributeArray,
				 uint8_t p_uiNumAttr,
				 uint8_t p_uiRound);

result_t MdOppGradient_unSubscribe(Mdiff_state_t * state,
				   int8_t p_iHandle);

uint8_t MdOppGradient_getNumGradients( Mdiff_state_t * state );

result_t MdOppGradient_getGradientByIndex( Mdiff_state_t * state,
					   uint8_t          p_uiLogicalIndex,
					   DiffGradient_t  *p_pOutputGradient,
					   uint8_t          p_uiOutputLen );

result_t MdOppGradient_getGradientByHandle( Mdiff_state_t * state,
					    int8_t           p_iHandle,
					    DiffGradient_t  *p_pOutputGradient,
					    uint8_t          p_uiOutputLen );

void MdOppGradient_matchGradient(Mdiff_state_t * state, IntDiffMsg_t * m_tMsg);

// Function does NOT own * tMsg
result_t MdData_recvMsg( Mdiff_state_t * state,
			 DiffMsg_t * tMsg);

result_t MdComm_send( Mdiff_state_t * state,
		      uint16_t ui_nextHop,
		      DiffMsg_t * tMsg);

result_t MdOppGradient_addInterest( Mdiff_state_t * state,
				    DiffAttr_t * p_pAttributeArray,
				    uint8_t p_uiNumAttr);

gint MdOppGradient_sendInterests( gpointer data,
				  int interval,
				  g_event_t * event);

gint MdOppGradient_timeoutGradients( gpointer data,
				     int interval,
				     g_event_t * event);

int8_t MdOppGradient_addGradient( Mdiff_state_t * state,
				  uint16_t     p_uiSrcAddr,
				  uint16_t     p_uiNextHop,
				  DiffAttr_t  *p_pAttributeArray,
				  uint8_t      p_uiNumAttr,
				  uint8_t      p_uiRound );

result_t MdOppGradient_getGradient( Mdiff_state_t * state,
				    uint16_t          p_uiIndex,
				    DiffGradient_t   *p_pOutputGradient,
				    uint8_t           p_uiOutputLen );

result_t MdOppGradient_updateGradient( Mdiff_state_t * state,
				       int8_t      p_iHandle,
				       uint16_t    p_uiNextHop,
				       uint8_t     p_uiLastSeen,
				       uint8_t     p_uiRound );

result_t MdOppGradient_remGradient( Mdiff_state_t * state,
				    int8_t p_iHandle );


#endif




See more files for this project here

EmStar

EmStar is a software system for developing and deploying wireless sensor networks involving Linux-based platforms. As the wireless sensor network community has attempted to deploy more complex designs---large-scale, long-lived systems that need self-organization and adaptivity---a number of difficult software design issues have arisen. Advances in software design have not kept pace with the capabilities of hardware. This is because designing for an adaptive, efficient, and useful sensor network has turned out to be surprisingly complex and difficult. EmStar is a Linux-based software framework, whose goal is to dramatically reduce this complexity, enabling work to be shared and reused, and simplifying and speeding the design of new sensor network applications.

Project homepage: http://cvs.cens.ucla.edu/emstar/
Programming language(s): C,Shell Script
License: other

  old/
    MDForwarder.c
    MDForwarder_i.h
    MDOppGradient.c
    MDOppGradient.h
    MD_i.h
    microdiff.c
    microdiff.h
  DiffTypes.h
  MdForwarder.c
  MdForwarder.h
  MdMatch.c
  MdMatch.h
  MdOppGradient.c
  MdOppGradient.h
  Mdiff.h
  Mdiff.txt
  Mdiff_main.c