|
1
2
3
4
5
6
7
8
9
10
11
|
//
// CommunicationProtocol.h
// DUREX Vendor Control
//
// Created by Imanol Barba on 5/23/14.
// Copyright (c) 2014 Emmoco. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "EMFramework.h"
|
|
12
13
14
|
#define MAX_STRING_LENGTH ((int)200)
#define MAX_RETRIES ((int)3)
#define MAX_PRODUCT_NAME_LENGTH ((int)64)
|
|
15
16
17
|
@interface CommunicationProtocol : NSObject
|
|
18
19
|
-(Boolean) waitForMessageAvailableMobile: (Boolean) status;
-(Boolean) waitForMessageAvailableDevice: (Boolean) status;
|
|
20
21
22
|
-(Boolean) writeMessage: (NSString*) message;
-(NSString*) readMessage;
-(Boolean) establishConnection;
|
|
23
24
25
|
-(Boolean) updateTime: (NSDateComponents*) date;
-(Boolean) updatePrice: (uint8_t) channel : (uint8_t) product : (uint8_t) eur : (uint8_t) cents;
-(Boolean) updateProductName: (uint8_t) channel : (uint8_t) product : (NSString*) name;
|
|
26
|
+(id) sharedProtocol;
|
|
27
28
|
@property Boolean messageAvailableMobile;
@property Boolean messageAvailableDevice;
|
|
29
30
|
@end
|