From cb69d2e1c7ced951cbf7a31ee286b0ed92cab8a8 Mon Sep 17 00:00:00 2001 From: rcoh Date: Fri, 18 Feb 2011 16:56:43 -0500 Subject: Adding Epydoc generated docs. --- html/SmootLight.inputs.UDPInput-pysrc.html | 130 +++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 html/SmootLight.inputs.UDPInput-pysrc.html (limited to 'html/SmootLight.inputs.UDPInput-pysrc.html') diff --git a/html/SmootLight.inputs.UDPInput-pysrc.html b/html/SmootLight.inputs.UDPInput-pysrc.html new file mode 100644 index 0000000..ca913aa --- /dev/null +++ b/html/SmootLight.inputs.UDPInput-pysrc.html @@ -0,0 +1,130 @@ + + + + + SmootLight.inputs.UDPInput + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package SmootLight :: + Package inputs :: + Module UDPInput + + + + + + +
[hide private]
[frames] | no frames]
+
+

Source Code for Module SmootLight.inputs.UDPInput

+
+ 1  from operationscore.Input import * 
+ 2  import socket 
+
3 -class UDPInput(Input): +
4 """UDPInput is a barebones UDP Input class. It takes any data it receives and adds it to the + 5 'data' element of the response dict. It also notes the 'address'. Specify: + 6 <Port> -- the Port to listen on.""" + 7 +
8 - def inputInit(self): +
9 HOST = '' # Symbolic name meaning all available interfaces +10 PORT = self.argDict['Port'] # Arbitrary non-privileged port +11 self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) +12 self.sock.bind((HOST, PORT)) +
13 - def sensingLoop(self): +
14 (data,address) = self.sock.recvfrom(1024) +15 dataDict = {'data':data, 'address':address} +16 self.respond(dataDict) +
17 +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + -- cgit v1.2.3