summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0323/sensordata.py
diff options
context:
space:
mode:
authorJoachim Lindborg <Joachim.Lindborg@lsys.se>2013-05-17 12:18:00 +0200
committerJoachim Lindborg <Joachim.Lindborg@lsys.se>2013-05-17 12:18:00 +0200
commitb7adaafb3ecb0a615c93fbb1830e66357b081fe3 (patch)
treed542dbb5263e6b5f21714916bd6b0061e3435842 /sleekxmpp/plugins/xep_0323/sensordata.py
parent0a2737dc77709daa0196340368b7ffbfaf71f641 (diff)
downloadslixmpp-b7adaafb3ecb0a615c93fbb1830e66357b081fe3.tar.gz
slixmpp-b7adaafb3ecb0a615c93fbb1830e66357b081fe3.tar.bz2
slixmpp-b7adaafb3ecb0a615c93fbb1830e66357b081fe3.tar.xz
slixmpp-b7adaafb3ecb0a615c93fbb1830e66357b081fe3.zip
First test stanza
Diffstat (limited to 'sleekxmpp/plugins/xep_0323/sensordata.py')
-rw-r--r--sleekxmpp/plugins/xep_0323/sensordata.py65
1 files changed, 65 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0323/sensordata.py b/sleekxmpp/plugins/xep_0323/sensordata.py
new file mode 100644
index 00000000..1343069d
--- /dev/null
+++ b/sleekxmpp/plugins/xep_0323/sensordata.py
@@ -0,0 +1,65 @@
+"""
+ SleekXMPP: The Sleek XMPP Library
+ Implementation of xeps for Internet of Things
+ http://wiki.xmpp.org/web/Tech_pages/IoT_systems
+ Copyright (C) 2013 Joachim Lindborg, Joachim.lindborg@lsys.se
+ This file is part of SleekXMPP.
+
+ See the file LICENSE for copying permission.
+"""
+
+import logging
+
+from sleekxmpp.xmlstream import JID
+from sleekxmpp.xmlstream.handler import Callback
+from sleekxmpp.xmlstream.matcher import StanzaPath
+from sleekxmpp.plugins.base import BasePlugin
+from sleekxmpp.plugins.xep_0323 import stanza
+
+
+log = logging.getLogger(__name__)
+
+
+class XEP_0323(BasePlugin):
+
+ """
+ XEP-0323 IoT Sensor Data
+ """
+
+ name = 'xep_0323'
+ description = 'XEP-0323 Internet of Things - Sensor Data'
+ dependencies = set(['xep_0030']) # set(['xep_0030', 'xep_0004', 'xep_0082', 'xep_0131'])
+ stanza = stanza
+
+ def plugin_init(self):
+ pass
+ # self.node_event_map = {}
+
+ # self.xmpp.register_handler(
+ # Callback('Sensordata Event: Get',
+ # StanzaPath('message/sensordata_event/get'),
+ # self._handle_event_get))
+
+ def plugin_end(self):
+ # self.xmpp.remove_handler('Sensordata Event: Get')
+ pass
+
+ def get_value(self, jid, msg):
+ """
+ Recieving a stanza for erading values
+ # verify provisioning
+
+ # verify requested values and categories
+
+ # Send accepted
+ # Thread of the readout
+
+ # send started
+
+ # send data messages
+
+ # send done
+ """
+ pass
+
+