"quad/git@git.ece.iastate.edu:danc/MicroCART.git" did not exist on "0f1b60a93d0f1daeb359101ae850e37264a3045b"
Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* Bluetooth.cpp
*
* Created on: Nov 15, 2015
* Author: Branden Sammons
*/
class Bluetooth {
public:
/**
* connect() :
* Takes 1 argument, A Bluetooth address, and tries to connect to that address
* only if this device has successfully paired with the address given before.
* If the other address is recognized then we attempt to connect and returns
* true if successful.
*
* Arguments :
* Bluetooth address of another device
*
* Returns :
* Boolean determining whether connection was made.
*/
virtual bool connect(/* Bluetooth address */) {}
/**
* pair() :
* Attempts to pair with the Bluetooth Address given, returns true if successful.
*
* Arguments :
* Bluetooth address of another device
*
* Returns :
* Boolean determining whether pairing was successful.
*/
virtual bool pair(/* Bluetooth address */) {}
/**
* send() :
* Sends the given data to the last device a connection was established with.
*
* Arguments :
* String to be sent
*
* Returns :
* Boolean determining whether sending was successful.
*/
virtual bool send(std::string *string) {}
/**
* receive() :
* Receives the data coming to the device by storing it in the pointer specified.
*
* Arguments :
* Pointer to store data that is incoming.
*
* Returns :
* Boolean determining whether receive was successful.
*/
virtual bool receive(std::string *string) {}
};