diff options
| author | Tim Redfern <tim@Adaptics.local> | 2013-09-18 17:28:16 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@Adaptics.local> | 2013-09-18 17:28:16 +0100 |
| commit | 31b03c8a1234b966ec56f5da316d93a9259c5d71 (patch) | |
| tree | 765de64c5cb766703beac87bdccf61a739cd3be1 /Waydio.m | |
initial commit
Diffstat (limited to 'Waydio.m')
| -rw-r--r-- | Waydio.m | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Waydio.m b/Waydio.m new file mode 100644 index 0000000..6cb736c --- /dev/null +++ b/Waydio.m @@ -0,0 +1,57 @@ +// +// Waydio.m +// waydio_comms_demo +// +// Created by Tim Redfern on 09/09/2013. +// +// + +#import "Waydio.h" + +@implementation Waydio + + +@synthesize delegate; + +- (id)initWithPeripheral:(CBPeripheral*)peripheral { + return self; +} + +/** + An alternate initializer for this class which sets the input and output buffer sizes. + Use this if the default buffer sizes are not adequate + @param peripheral The CBPeripheral object to be used + @param in_size The fixed input buffer size to use + @param out_size The fixed output buffer size to use + @return self + @note Changes peripheral.delegate to self. If peripheral.delegate is set another object, initWithPeripheral and open will have to be called again + to reinitialize. + @note The default input and output buffer sizes are 1024 bytes + */ +- (id)initWithPeripheral:(CBPeripheral*)peripheral InputBufferSize:(NSUInteger)in_size OutputBufferSize:(NSUInteger)out_size { + // + return self; +} + ++ (CBUUID *) brspServiceUUID{ + return [CBUUID UUIDWithString:BRSP_SERVICE_UUID]; +} + + +/** + Opens a Waydio connection. (Prepares peipheral for using the Waydio service, characteristics, and notifications) + */ +- (void)open { + //[[self delegate] OpenStatusChanged:YES]; + //[NSTimer scheduledTimerWithTimeInterval:5.0 target:self + // selector:@selector(processComplete) userInfo:nil repeats:YES]; +}; + +/** + Closes a Waydio connection. (Turns off notifications, etc) + */ +- (void)close { + +} + +@end
\ No newline at end of file |
