// // CommunicationProtocol.h // DUREX Vendor Control // // Created by Imanol Barba on 5/23/14. // Copyright (c) 2014 Emmoco. All rights reserved. // #import #import "EMFramework.h" #define MAX_STRING_LENGTH ((int)200) #define MAX_RETRIES ((int)3) #define MAX_PRODUCT_NAME_LENGTH ((int)64) #define MAX_CHANNELS ((int)16) #define MONEY_NUM_UNITS ((int)5) #define MAX_PRODUCTS ((int)16) @interface CommunicationProtocol : NSObject @property Boolean messageAvailableMobile; @property Boolean messageAvailableDevice; -(Boolean) waitForMessageAvailableMobile: (Boolean) status; -(Boolean) waitForMessageAvailableDevice: (Boolean) status; -(Boolean) writeMessage: (NSString*) message; -(NSString*) readMessage; -(Boolean) establishConnection; -(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; -(NSString*) readSensorData; +(id) sharedProtocol; @end