pebble-packet
Simple wrapper for AppMessage integer and string types with built in error
reporting. Never directly use DictionaryIterator
or Tuple
again!
Available on NPM.
How to use
- Install the Pebble package:
$ pebble package install pebble-packet
- Add the pebble-package include at the top of your source.
- Ensure
AppMessage
is open:
const int inbox = 128;const int outbox = 128;
- Begin, build, and send a packet:
if(packet_begin())
- Get data from a received dictionary:
// in your setup after the app_message_open call static void
Documentation
See include/pebble-packet.h
for function documentation.
Changelog
1.0
- Initial version
1.1
- Add
packet_get_size()
,packet_contains_key()
,packet_put_boolean()
,packet_get_boolean()
,packet_get_integer()
, andpacket_get_string()
.
1.2
- Build for Diorite platform on SDK 4.0
1.3
- Add failed handler so client apps can retry their packets.
1.3.1
- Add
NULL
check for retry callbacks.