mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
added function for retrieving link etx to neighbor
This commit is contained in:
parent
39d1e09232
commit
e414c8c5a4
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: neighbor-info.c,v 1.12 2010/10/21 19:46:21 nvt-se Exp $
|
||||
* $Id: neighbor-info.c,v 1.13 2010/10/22 11:34:24 joxe Exp $
|
||||
*/
|
||||
/**
|
||||
* \file
|
||||
@ -164,3 +164,11 @@ neighbor_info_subscribe(neighbor_info_subscriber_t s)
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
uint8_t
|
||||
neighbor_info_get_etx(const rimeaddr_t *addr)
|
||||
{
|
||||
uint8_t *etxp;
|
||||
etxp = (uint8_t *)neighbor_attr_get_data(&etx, addr);
|
||||
return etxp == NULL ? 0 : etxp;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: neighbor-info.h,v 1.2 2010/03/12 13:40:13 nvt-se Exp $
|
||||
* $Id: neighbor-info.h,v 1.3 2010/10/22 11:34:24 joxe Exp $
|
||||
*/
|
||||
/**
|
||||
* \file
|
||||
@ -70,4 +70,12 @@ void neighbor_info_packet_received(void);
|
||||
*/
|
||||
int neighbor_info_subscribe(neighbor_info_subscriber_t);
|
||||
|
||||
|
||||
/**
|
||||
* Get link ETX value for a specific neighbor.
|
||||
*
|
||||
* \return Returns ETX if the neighbor exists, and 0 if not.
|
||||
*/
|
||||
uint8_t neighbor_info_get_etx(const rimeaddr_t *addr);
|
||||
|
||||
#endif /* NEIGHBOR_INFO_H */
|
||||
|
Loading…
Reference in New Issue
Block a user