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


Detailed Description

Implementation of a simple power manager for already established bluetooth connections.

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

#include <sys/types.h>
#include <bt/bt_hci_api.h>

Defines

#define CPM_DEFAULT_MASTER_OR_SLAVE   BT_HCI_MY_ROLE_SLAVE
#define CPM_DEFAULT_MAX_SNIFF_LINKS   1
#define CPM_DEFAULT_SLEEP_TIME   10000
#define CPM_DEFAULT_SNIFF_ATTEMPT   8
#define CPM_DEFAULT_SNIFF_INTERVAL   512
#define CPM_DEFAULT_SNIFF_TIMEOUT   16
#define CPM_DEFAULT_THREAD_PRIORITY   100
#define CPM_DEFAULT_WAIT_TIME   1000

Functions

char cpm_init (struct btstack *bt_stack, u_long cod)
 Initializes the Connection Power Manager.
void cpm_pause (void)
 Pauses the Connection Power Manager.
void cpm_resume (void)
 Resumes the Connection Power Manager.
void cpm_start (void)
 Starts the Connection Power Manager.
void cpm_stop (void)
 Stops the Connection Power Manager.


Define Documentation

#define CPM_DEFAULT_MASTER_OR_SLAVE   BT_HCI_MY_ROLE_SLAVE

put either master or slave links to sniff

#define CPM_DEFAULT_MAX_SNIFF_LINKS   1

maximum links putted to sniff

#define CPM_DEFAULT_SLEEP_TIME   10000

periodic time in ms to check the con_table

#define CPM_DEFAULT_SNIFF_ATTEMPT   8

sniff attempt SA (see bt_hci_sniff_mode)

#define CPM_DEFAULT_SNIFF_INTERVAL   512

sniff interval SI (see bt_hci_sniff_mode)

#define CPM_DEFAULT_SNIFF_TIMEOUT   16

sniff timeout ST (see bt_hci_sniff_mode)

#define CPM_DEFAULT_THREAD_PRIORITY   100

priority of this thread (see NutThreadSetPriority)

#define CPM_DEFAULT_WAIT_TIME   1000

wait time in ms between each link putting in sniff mode


Function Documentation

char cpm_init ( struct btstack bt_stack,
u_long  cod 
)

Initializes the Connection Power Manager.

Parameters:
stack Pointer to the btstack
cod only put connections in sniff mode if remote device has this CoD (0 to disable)
Returns:
0 if no error

void cpm_pause ( void   ) 

Pauses the Connection Power Manager.

Waits to put active links to sniff mode

void cpm_resume ( void   ) 

Resumes the Connection Power Manager.

Resumes to put active links to sniff mode

void cpm_start ( void   ) 

Starts the Connection Power Manager.

Puts active links to sniff mode

void cpm_stop ( void   ) 

Stops the Connection Power Manager.

Returns all sniff links back to active mode


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