btnut/btnode/include/cm/cm_chain.h File Reference


Detailed Description

Simple connection manager to establish pre-defined chain topology.

Author:
Matthias Ringwald
LED CODE: LED 0 (blue): Previous node has connected to me LED 1 (red): Connected to next node

#include <sys/types.h>
#include <bt/bt_hci_defs.h>
#include <bt/bt_hci_cmds.h>

Functions

u_short connect_get_position (void)
u_char connect_get_position_of (bt_addr_t addr)
void connect_init (struct btstack *stack, bt_addr_t *topo, u_short length)


Function Documentation

u_short connect_get_position ( void   ) 

get position of own node

Parameters:
addr of node
Returns:
position in chain, indexed by 0

u_char connect_get_position_of ( bt_addr_t  addr  ) 

get position of node with addr

Parameters:
addr of node
Returns:
position in chain, indexed by 0

void connect_init ( struct btstack stack,
bt_addr_t topo,
u_short  length 
)

Init Chain Connection Manager

Parameters:
struct btstack
topo array of node addresses
number of nodes in chain


Generated on Wed Apr 29 11:12:29 2009 for BTnut System Software by doxygen 1.5.1