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


Detailed Description

Implementation of a simple connection manager.

Author:
Mustafa Yuecel <mustafa.yuecel@alumni.ethz.ch>
Date:
2006/04/06

#include <bt/bt_hci_api.h>
#include <bt/bt_psm.h>
#include <sys/types.h>
#include <cm/con_mgr.h>

Defines

#define CM_BT_ADDR2   0x00
#define CM_BT_ADDR3   0x3F
#define CM_BT_ADDR4   0x04
#define CM_BT_ADDR5   0x00
#define CM_COD_MASK   0xFFFFFFl
#define CM_DEFAULT_INQ_DURATION   2
#define CM_DEFAULT_INQ_SCAN_MODE   BT_HCI_SCAN_MODE_OFF
#define CM_DEFAULT_LINK_POLICY   BT_HCI_LINK_POLICY_ALL_DISABLED | BT_HCI_LINK_POLICY_ROLE_SWITCH | BT_HCI_LINK_POLICY_SNIFF_MODE
#define CM_DEFAULT_MAX_SLEEP_TIME   120*1000l
#define CM_DEFAULT_MIN_SLEEP_TIME   10*1000l
#define CM_DEFAULT_MY_ROLE_MASTER_MAX_FOREIGN_DEVICES   6
#define CM_DEFAULT_MY_ROLE_MASTER_MAX_OWN_DEVICES   2
#define CM_DEFAULT_MY_ROLE_SLAVE_MAX_FOREIGN_DEVICES   2
#define CM_DEFAULT_MY_ROLE_SLAVE_MAX_OWN_DEVICES   1
#define CM_DEFAULT_PAGE_BLACKLIST_EXP_TIME   120*3
#define CM_DEFAULT_PAGE_LIST_EXP_TIME   120*2
#define CM_DEFAULT_PAGE_MAX_PAGE_ATTEMPTS   2
#define CM_DEFAULT_PAGE_SCAN_MODE   BT_HCI_SCAN_MODE_OFF
#define CM_DEFAULT_PAGE_TIMEOUT   3200
#define CM_DEFAULT_SCAN_MODE_TIMEOUT   0
#define CM_DEFAULT_STEP_SLEEP_TIME   10*1000l
#define CM_DEFAULT_THREAD_PRIORITY   100
#define CM_INQ_MAX_DEVS   10
#define con_mgr_init   cm_local_init

Functions

void cm_local_init (struct btstack *bt_stack, bt_psm_t *psmux, u_short cm_psm, HCI_CON_TABLE_CB_REGISTRATION, u_long cod)


Define Documentation

#define CM_DEFAULT_INQ_DURATION   2

inquiry duration (x * 1.28s)

#define CM_DEFAULT_INQ_SCAN_MODE   BT_HCI_SCAN_MODE_OFF

preferred scan mode while inquiring

#define CM_DEFAULT_MIN_SLEEP_TIME   10*1000l

sleep time in ms

#define CM_DEFAULT_PAGE_SCAN_MODE   BT_HCI_SCAN_MODE_OFF

preferred scan mode while paging

#define CM_DEFAULT_PAGE_TIMEOUT   3200

connect timeout (x * 0.625ms)

#define CM_DEFAULT_SCAN_MODE_TIMEOUT   0

duration in ms to reject new connections after be connected

#define CM_DEFAULT_THREAD_PRIORITY   100

priority of this thread (see NutThreadSetPriority)


Function Documentation

void cm_local_init ( struct btstack bt_stack,
bt_psm_t psmux,
u_short  cm_psm,
HCI_CON_TABLE_CB_REGISTRATION  ,
u_long  cod 
)

Initialization function for the connection manger.


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