gom-sensor-ports 0.0.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/VERSION +1 -1
- data/lib/gom-sensor-ports/sensor-ports.rb +5 -5
- metadata +4 -4
data/.gitignore
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.1.1
|
@@ -2,13 +2,13 @@ module Gom
|
|
2
2
|
class SensorPorts < Gom::Remote::Entry
|
3
3
|
|
4
4
|
Defaults = {
|
5
|
-
:interface
|
6
|
-
:
|
7
|
-
:mode
|
5
|
+
:interface => '0.0.0.0',
|
6
|
+
:sensor_port => 76001,
|
7
|
+
:mode => :udp,
|
8
8
|
}
|
9
9
|
|
10
10
|
include OAttr
|
11
|
-
oattr :interface, :
|
11
|
+
oattr :interface, :sensor_port, :mode
|
12
12
|
|
13
13
|
def initialize path, options = {}
|
14
14
|
@path = path
|
@@ -23,7 +23,7 @@ module Gom
|
|
23
23
|
|
24
24
|
def listen_udp
|
25
25
|
socket = UDPSocket.new
|
26
|
-
socket.bind(interface,
|
26
|
+
socket.bind(interface, sensor_port)
|
27
27
|
loop do
|
28
28
|
msg, sender = socket.recvfrom(1024)
|
29
29
|
puts "-->#{msg}<-- #{sender.inspect}"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gom-sensor-ports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 1
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- art+com AG/dirk luesebrink
|