zephyr/samples
Leandro Pereira 141c0a5f1a samples: net: NATS protocol sample
NATS is a publisher/subscriber protocol implemented on top of TCP. It
is specified in [1], and this is a sample implementation for Zephyr
using the new IP stack.  The API is loosely based off of [2].

With this sample, it's possible to subscribe/unsubscribe to a given
subject, and be notified of changes asynchronously.  In order to
conserve resources, the implementation does not keep its own track of
subscribed subjects; that must be performed by the application itself,
so it ignore unknown/undesired subjects.

TLS is not supported yet, although basic auth is.  The client will
indicate if it supports username/password if a certain callback is set
in the struct nats.  This callback will then be called, and the user
must copy the username/password to the supplied user/pass buffers.

Content might be also published for a given subject.

The sample application lets one observe the subject "led0", and turn it
"on", "off", or "toggle" its value.  Changing the value will, if
supported, act on a status LED on the development board.  The new
status will be published.

Also worth noting is that most of the networking and GPIO boilerplate
has been shamelessly copied from the IRC bot example.  (Curiously, both
protocols are similar.)

[1] http://nats.io/documentation/internals/nats-protocol/
[2] https://github.com/nats-io/go-nats

Jira: ZEP-1012

Change-Id: I204adc61c4c533661eacfb8c28c1c08870debd91
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-09 20:33:45 +02:00
..
basic samples: pwm: change hard-coded device name 2017-03-07 23:03:44 +00:00
bluetooth net: nbuf: Split one global DATA pool to RX and TX DATA pools 2017-03-09 20:33:43 +02:00
drivers samples: i2c_fujitsu: change hard-coded device name 2017-02-28 13:49:48 +00:00
environmental_sensing doc: fix wiki board reference back to web page 2017-01-26 23:06:04 +00:00
grove samples: grove: add missing testcase.ini 2017-03-06 16:58:31 +00:00
hello_world
ipm
legacy REVERTME: cpp_synchronization: disable on Xtensa 2017-02-13 11:39:03 -08:00
logger-hook samples/logger-hook: fix usage of ring buffer 2017-03-07 12:40:23 +00:00
net samples: net: NATS protocol sample 2017-03-09 20:33:45 +02:00
nfc/nfc_hello
philosophers misc: fix more variable type mismatches 2017-02-11 00:14:15 +00:00
power samples: power: Remove mention of specific versions in README 2017-02-08 06:28:25 +00:00
sensor samples: bmi160: use correct device name 2017-02-11 01:28:09 +00:00
shell
static_lib
synchronization
testing lifo: Make use of k_queue as implementation 2017-02-27 21:20:53 +00:00
usb samples: webusb: fix variable type mismatches 2017-02-14 02:13:52 +00:00
advanced.rst
kernel.rst
samples.rst