Bowls Eye  1.0
Functions
bluetoothController.c File Reference
#include "bluetoothController.h"
Include dependency graph for bluetoothController.c:

Go to the source code of this file.

Functions

void BluetoothServer_construct (BluetoothServer_t *server)
 
void BluetoothServer_enable (BluetoothServer_t *server)
 
void BluetoothServer_disable (BluetoothServer_t *server)
 
void BluetoothServer_readInt (BluetoothServer_t *server, int *dst)
 
void BluetoothServer_readChar (BluetoothServer_t *server, char *dst)
 
void BluetoothClient_construct (BluetoothClient_t *client)
 
void BluetoothClient_enable (BluetoothClient_t *client)
 
void BluetoothClient_disable (BluetoothClient_t *client)
 
void BluetoothClient_sendString (BluetoothClient_t *client, char *data, int size)
 
void BluetoothClient_checkError (BluetoothClient_t *client)
 

Detailed Description

Author
Harvey Leicester

Definition in file bluetoothController.c.

Function Documentation

void BluetoothClient_checkError ( BluetoothClient_t *  client)

Check for errors in status of Bluetooth client

Parameters
clientInstance of BluetoothClient_t

Definition at line 147 of file bluetoothController.c.

References BluetoothClient_t::status.

Referenced by BluetoothClient_enable(), and BluetoothClient_sendString().

void BluetoothClient_construct ( BluetoothClient_t *  client)

constructor for BluetoothClient_t

Parameters
clientInstance of BluetoothClient_t

Definition at line 100 of file bluetoothController.c.

References BluetoothClient_t::addr, BluetoothClient_enable(), and BluetoothClient_t::dst.

Here is the call graph for this function:

void BluetoothClient_disable ( BluetoothClient_t *  client)

Disables a Bluetooth client

Parameters
clientInstance of BluetoothClient_t

Definition at line 126 of file bluetoothController.c.

void BluetoothClient_enable ( BluetoothClient_t *  client)

Enables a Bluetooth client

Parameters
clientInstance of BluetoothClient_t

Definition at line 116 of file bluetoothController.c.

References BluetoothClient_t::addr, BluetoothClient_checkError(), and BluetoothClient_t::status.

Referenced by BluetoothClient_construct().

Here is the call graph for this function:

void BluetoothClient_sendString ( BluetoothClient_t *  client,
char *  data,
int  size 
)

Send a string of data to connected Bluetooth server

Parameters
clientInstance of bluetoothClient_t
dataData to send
sizeSize of data to send

Definition at line 137 of file bluetoothController.c.

References BluetoothClient_checkError(), and BluetoothClient_t::status.

Here is the call graph for this function:

void BluetoothServer_construct ( BluetoothServer_t *  server)

Constructor for BluetoothServer_t

Parameters
serverInstance of BluetoothServer_t

Definition at line 16 of file bluetoothController.c.

References BluetoothServer_enable(), BluetoothServer_t::locAddr, BluetoothServer_t::opt, BluetoothServer_t::recData, and BluetoothServer_t::remAddr.

Here is the call graph for this function:

void BluetoothServer_disable ( BluetoothServer_t *  server)

Disables Bluetooth server

Parameters
serverInstance of BluetoothServer_t

Definition at line 53 of file bluetoothController.c.

References BluetoothServer_t::client.

void BluetoothServer_enable ( BluetoothServer_t *  server)

Enablea the Bluetooth server

Parameters
serverInstance of BluetoothServer_t

Definition at line 39 of file bluetoothController.c.

References BluetoothServer_t::buf, BluetoothServer_t::client, BluetoothServer_t::opt, and BluetoothServer_t::remAddr.

Referenced by BluetoothServer_construct().

void BluetoothServer_readChar ( BluetoothServer_t *  server,
char *  dst 
)

Read character value(s) from a connected Bluetooth client

Parameters
serverInstance of BluetoothServer_t
dstDestination of received data

Definition at line 84 of file bluetoothController.c.

References BluetoothServer_t::client, and BluetoothServer_t::recData.

void BluetoothServer_readInt ( BluetoothServer_t *  server,
int *  dst 
)

Read integer value(s) from a connected Bluetooth client

Parameters
serverInstance of BluetoothServer_t
dstDestination of received data

Definition at line 64 of file bluetoothController.c.

References BluetoothServer_t::client, and BluetoothServer_t::recData.