nuttx-apps/system/psmq
YAMAMOTO Takashi e7156be066 Change the defaults of stack size configs to DEFAULT_TASK_STACKSIZE
This commit changes only ones with the default 2048 and
leaves the others.
E.g. this leaves SYSTEM_RAMTEST_STACKSIZE, whose default is 1024.
I guess those need to be inspected one-by-one.
2020-03-27 02:43:11 -05:00
..
.gitignore Revert "Don't generate .depend anymore" 2020-03-22 23:09:40 -05:00
Kconfig Change the defaults of stack size configs to DEFAULT_TASK_STACKSIZE 2020-03-27 02:43:11 -05:00
Make.defs In all Make.defs files, append CONFIGURED_APPS with the consistent ifeq/ifneq. 2019-10-17 11:42:49 -06:00
Makefile Makefiles: This reverts part of commit cf0365ea9. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured. 2019-10-15 09:25:48 +08:00
README.txt apps/system/psmq/README.txt: Add a README.txt file. This is just a copy of the description accompanying that patch that added system/psmq. 2019-02-18 17:51:50 -06:00

README.txt
==========

psmq is publish subscribe message queue. It's a set of programs and libraries
to implement publish/subscribe way of inter process communication on top of
POSIX message queue.

Manuals, source code and more info at:
https://psmq.kurwinet.pl


Little demo using psmqd broker, psmq_pub and psmq_sub:

# start broker and make it log to file
  nsh> psmqd -b/brok -p/sd/psmqd/psmqd.log

# start subscribe thread that will read all messages send on /can/* topic
  nsh> psmq_sub -n/sub -b/brok -t/can/* -o/sd/psmq-sub/can.log
  n/connected to broker /brok
  n/subscribed to /can/*
  n/start receiving data

# publish some messages
  nsh> psmq_pub -b/brok -t/can/engine/rpm -m50
  nsh> psmq_pub -b/brok -t/adc/volt -m30
  nsh> psmq_pub -b/brok -t/can/room/10/temp -m23
  nsh> psmq_pub -b/brok -t/pwm/fan1/speed -m300

# check out subscribe thread logs
  nsh> cat /sd/psmq-sub/can.log
  [1970-01-01 00:00:53] topic: /can/engine/rpm, priority: 0, paylen: 3, payload:
  [1970-01-01 00:00:53] 0x0000  35 30 00                                         50.
  [1970-01-01 00:00:58] topic: /can/room/10/temp, priority: 0, paylen: 3, payload:
  [1970-01-01 00:00:58] 0x0000  32 33 00                                         23.

As you can see /adc/volt and /pwm/fan1/speed haven't been received by subscribe
thread.

Content:

* psmqd - broker, relays messages between clients
* psmq_sub - listens to specified topics, can be used as logger for
  communication (optional)
* psmq_pub - publishes messages directly from shell. Can send binary data, but
  requires pipes, so on nuttx it can only send ASCII.
* libpsmq - library used to communicate with the broker and send/receive
  messages