Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: libnsdl_m0 BLE_API Base64 nRF51822 SplitterAssembler
Diff: bt_network/BleUartRPC/UartRPC.h
- Revision:
- 9:bf0cf5828378
- Parent:
- 6:98af441fd960
- Child:
- 11:d601b867b297
diff -r 65d3c97aab26 -r bf0cf5828378 bt_network/BleUartRPC/UartRPC.h
--- a/bt_network/BleUartRPC/UartRPC.h Tue Feb 17 07:01:22 2015 +0000
+++ b/bt_network/BleUartRPC/UartRPC.h Wed Feb 18 06:58:01 2015 +0000
@@ -31,10 +31,24 @@
class UartRPC {
public:
UartRPC(BLEDevice &ble);
- int dispatch(uint8_t fn_id,uint8_t *response,int response_length,const char *format,...);
-
- private:
- Dispatcher m_dispatcher;
+
+ // remote dispatch
+ int dispatch(uint8_t fn_id,uint8_t *response,int response_length,const char *format,...);
+
+ // local accumulate and dispatch of packets
+ bool accumulate(uint8_t *buffer,int buffer_length);
+ void dispatch();
+ bool localDispatchAvailable(void);
+ int retrieveLocalDispatch(uint8_t *buffer,int buffer_length);
+
+ private:
+ void resetLocalDispatch(void);
+
+ Dispatcher m_dispatcher;
+ SplitterAssembler m_recv_accumulator;
+ bool m_local_dispatch_available;
+ char *m_recv_raw_data;
+ int m_recv_raw_data_length;
};
#endif // __UART_RPC_H__
\ No newline at end of file