aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send_publish
diff options
context:
space:
mode:
authorsideshowdave72016-12-16 18:29:13 -0700
committersideshowdave72016-12-16 18:29:13 -0700
commitfa8ef3f4956470fdc689349bb19d5a831e63083c (patch)
tree67c07132e2db95f9a7747009b165cf514d5ddb86 /bin/send_publish
parentfbb4a93bb99fcd41a55333e9205c1f1c9c97b48b (diff)
downloadeventmq-fa8ef3f4956470fdc689349bb19d5a831e63083c.tar.gz
eventmq-fa8ef3f4956470fdc689349bb19d5a831e63083c.zip
Initial pubsub
Diffstat (limited to 'bin/send_publish')
-rwxr-xr-xbin/send_publish19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/send_publish b/bin/send_publish
new file mode 100755
index 0000000..52f9f6d
--- /dev/null
+++ b/bin/send_publish
@@ -0,0 +1,19 @@
1#!/usr/bin/env python
2"""
3Usage: ./send_msg <ipaddresss> <command> <frame w/ values space separated>
4"""
5import sys
6import zmq
7
8from eventmq.sender import Sender
9from eventmq.client.messages import send_publish_request
10
11if __name__ == "__main__":
12 for i in xrange(1):
13 s = Sender()
14 s.connect(sys.argv[1])
15
16 topic = sys.argv[2]
17 msg = ['update', '1']
18
19 send_publish_request(s, topic, msg)