wiseml-ruby 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile +4 -0
- data/README.md +0 -0
- data/Rakefile +2 -0
- data/lib/version.rb +3 -0
- data/lib/wise_ml.rb +6 -0
- data/lib/wiseconfig/application.rb +5 -0
- data/lib/wiseconfig/configuration.rb +5 -0
- data/lib/wiseconfig/nodename.rb +5 -0
- data/lib/wiseconfig/nodes.rb +5 -0
- data/lib/wiseconfig/portal_app.rb +5 -0
- data/lib/wiseconfig/protobuf_interface.rb +5 -0
- data/lib/wiseconfig/server_connection.rb +5 -0
- data/lib/wiseconfig/testbed_configuration.rb +5 -0
- data/lib/wiseconfig/web_service.rb +5 -0
- data/lib/wiseconfig/wsn_device.rb +5 -0
- data/lib/wiseml/all.rb +66 -0
- data/lib/wiseml/scenario/disable_link.rb +15 -0
- data/lib/wiseml/scenario/disable_node.rb +12 -0
- data/lib/wiseml/scenario/enable_link.rb +14 -0
- data/lib/wiseml/scenario/enable_node.rb +13 -0
- data/lib/wiseml/scenario/scenario.rb +17 -0
- data/lib/wiseml/scenario/timestamp.rb +20 -0
- data/lib/wiseml/setup/capability.rb +19 -0
- data/lib/wiseml/setup/data.rb +15 -0
- data/lib/wiseml/setup/defaults.rb +14 -0
- data/lib/wiseml/setup/link.rb +20 -0
- data/lib/wiseml/setup/node.rb +23 -0
- data/lib/wiseml/setup/origin.rb +18 -0
- data/lib/wiseml/setup/position.rb +17 -0
- data/lib/wiseml/setup/rssi.rb +15 -0
- data/lib/wiseml/setup/setup.rb +21 -0
- data/lib/wiseml/setup/time_info.rb +16 -0
- data/lib/wiseml/trace/message.rb +15 -0
- data/lib/wiseml/trace/trace.rb +15 -0
- data/lib/wiseml/wise_ml.rb +17 -0
- data/test/test_xml.rb +33 -0
- data/test/wisebed_uzl_demo.json +3153 -0
- data/test/wisebed_uzl_demo.xml +3038 -0
- data/test/wiseml.model.xsd +89 -0
- data/wiseml-ruby.gemspec +20 -0
- metadata +122 -0
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.idea
|
data/Gemfile
ADDED
data/README.md
ADDED
File without changes
|
data/Rakefile
ADDED
data/lib/version.rb
ADDED
data/lib/wise_ml.rb
ADDED
data/lib/wiseml/all.rb
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
# this file simply loads all the classes but without actual
|
2
|
+
# definitions. This ensures that when loading them in abitrary order,
|
3
|
+
# no NameError are raised.
|
4
|
+
|
5
|
+
module WiseML
|
6
|
+
module Setup
|
7
|
+
class Capability
|
8
|
+
include ROXML
|
9
|
+
end
|
10
|
+
class Data
|
11
|
+
include ROXML
|
12
|
+
end
|
13
|
+
class Defaults
|
14
|
+
include ROXML
|
15
|
+
end
|
16
|
+
class Link
|
17
|
+
include ROXML
|
18
|
+
end
|
19
|
+
class Node
|
20
|
+
include ROXML
|
21
|
+
end
|
22
|
+
class Origin
|
23
|
+
include ROXML
|
24
|
+
end
|
25
|
+
class Position
|
26
|
+
include ROXML
|
27
|
+
end
|
28
|
+
class Rssi
|
29
|
+
include ROXML
|
30
|
+
end
|
31
|
+
class Setup
|
32
|
+
include ROXML
|
33
|
+
end
|
34
|
+
class TimeInfo
|
35
|
+
include ROXML
|
36
|
+
end
|
37
|
+
end
|
38
|
+
module Scenario
|
39
|
+
class DisableLink
|
40
|
+
include ROXML
|
41
|
+
end
|
42
|
+
class DisableNode
|
43
|
+
include ROXML
|
44
|
+
end
|
45
|
+
class EnableLink
|
46
|
+
include ROXML
|
47
|
+
end
|
48
|
+
class EnableNode
|
49
|
+
include ROXML
|
50
|
+
end
|
51
|
+
class Scenario
|
52
|
+
include ROXML
|
53
|
+
end
|
54
|
+
class Timestamp
|
55
|
+
include ROXML
|
56
|
+
end
|
57
|
+
end
|
58
|
+
module Trace
|
59
|
+
class Message
|
60
|
+
include ROXML
|
61
|
+
end
|
62
|
+
class Trace
|
63
|
+
include ROXML
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Scenario
|
3
|
+
class DisableLink
|
4
|
+
|
5
|
+
# This is a persistent class for the object DisableLink that has the
|
6
|
+
# properties of a DisableLink. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :source
|
10
|
+
xml_accessor :target
|
11
|
+
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Scenario
|
3
|
+
class DisableNode
|
4
|
+
|
5
|
+
# This is a persistent class for the object DisableNode that has the
|
6
|
+
# properties of a DisableNode. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :id, :as => Integer
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Scenario
|
3
|
+
class EnableLink
|
4
|
+
|
5
|
+
# This is a persistent class for the object EnableLink that has the
|
6
|
+
# properties of a EnableLink. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :source
|
10
|
+
xml_accessor :target
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Scenario
|
3
|
+
class EnableNode
|
4
|
+
|
5
|
+
# This is a persistent class for the object EnableNode that has the
|
6
|
+
# properties of a EnableNode. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :id, :as => Integer
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Scenario
|
3
|
+
class Scenario
|
4
|
+
|
5
|
+
# This is a persistent class for the object Scenario that has the
|
6
|
+
# properties of a Scenario. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :id, :as => Integer
|
10
|
+
xml_accessor :timestamp, :as => [Timestamp]
|
11
|
+
xml_accessor :data, :as => Setup::Data
|
12
|
+
xml_accessor :children
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Scenario
|
3
|
+
class Timestamp
|
4
|
+
|
5
|
+
# This is a persistent class for the object Timestamp that has the
|
6
|
+
# properties of a Timestamp. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :value
|
10
|
+
xml_accessor :enableNode, :as => EnableNode
|
11
|
+
xml_accessor :disableNode, :as => DisableNode
|
12
|
+
xml_accessor :enableLink, :as => EnableLink
|
13
|
+
xml_accessor :disableLink, :as => DisableLink
|
14
|
+
xml_accessor :node, :as => [Setup::Node]
|
15
|
+
xml_accessor :message, :as => [Trace::Message]
|
16
|
+
xml_accessor :link, :as => [Setup::Link]
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Setup
|
3
|
+
class Capability
|
4
|
+
|
5
|
+
# This is a persistant class for the object capability that has the
|
6
|
+
# properties of a capability. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :name
|
10
|
+
xml_accessor :datatype
|
11
|
+
xml_accessor :unit
|
12
|
+
xml_accessor :defaultValue
|
13
|
+
xml_accessor :nodes, :as => [Node]
|
14
|
+
xml_accessor :links, :as => [Link]
|
15
|
+
xml_accessor :description
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Setup
|
3
|
+
class Data
|
4
|
+
|
5
|
+
# This is a persistent class for the object data that has the
|
6
|
+
# properties of a data. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :key
|
10
|
+
xml_accessor :value
|
11
|
+
xml_accessor :message, :as => Trace::Message
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Setup
|
3
|
+
class Defaults
|
4
|
+
|
5
|
+
# This is a persistent class for the object defaults that has the
|
6
|
+
# properties of a defaults. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :node, :as => Node
|
10
|
+
xml_accessor :link, :as => Link
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Setup
|
3
|
+
class Link
|
4
|
+
|
5
|
+
# This is a persistent class for the object link that has the
|
6
|
+
# properties of a link. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :source
|
10
|
+
xml_accessor :target
|
11
|
+
xml_accessor :encrypted
|
12
|
+
xml_accessor :virtual
|
13
|
+
xml_accessor :capabilities, :as => [Capability]
|
14
|
+
xml_accessor :rssi, :as => Rssi
|
15
|
+
xml_accessor :data, :as => [Data]
|
16
|
+
xml_accessor :setup, :as => Setup
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Setup
|
3
|
+
class Node
|
4
|
+
|
5
|
+
# This is a persistent class for the object node that has the
|
6
|
+
# properties of a node. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :id, :as => Integer
|
10
|
+
xml_accessor :capabilities, :as => [Capability]
|
11
|
+
xml_accessor :position, :as => Position
|
12
|
+
xml_accessor :nodeType
|
13
|
+
xml_accessor :description
|
14
|
+
xml_accessor :gateway
|
15
|
+
xml_accessor :programDetails
|
16
|
+
xml_accessor :data, :as => [Data]
|
17
|
+
xml_accessor :message, :as => Trace::Message
|
18
|
+
xml_accessor :setup, :as => Setup
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Setup
|
3
|
+
class Origin
|
4
|
+
|
5
|
+
# This is a persistent class for the object origin that has the
|
6
|
+
# properties of a origin. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :x, :as => Float
|
10
|
+
xml_accessor :y, :as => Float
|
11
|
+
xml_accessor :z, :as => Float
|
12
|
+
xml_accessor :phi, :as => Float
|
13
|
+
xml_accessor :theta, :as => Float
|
14
|
+
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Setup
|
3
|
+
class Position
|
4
|
+
|
5
|
+
# This is a persistent class for the object position that has the
|
6
|
+
# properties of a position. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :x, :as => Float
|
10
|
+
xml_accessor :y, :as => Float
|
11
|
+
xml_accessor :z, :as => Float
|
12
|
+
xml_accessor :phi, :as => Float
|
13
|
+
xml_accessor :theta, :as => Float
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Setup
|
3
|
+
class Rssi
|
4
|
+
|
5
|
+
# This is a persistent class for the object rssi that has the
|
6
|
+
# properties of a rssi. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :datatype
|
10
|
+
xml_accessor :unit
|
11
|
+
xml_accessor :value
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module WiseML
|
2
|
+
module Setup
|
3
|
+
class Setup
|
4
|
+
|
5
|
+
# This is a persistant class for the object setup that has the
|
6
|
+
# properties of a setup. Setters and getters are implicitly defined
|
7
|
+
# trough the accesors
|
8
|
+
|
9
|
+
xml_accessor :id
|
10
|
+
xml_accessor :origin, :as => Origin
|
11
|
+
xml_accessor :timeinfo, :as => TimeInfo
|
12
|
+
xml_accessor :interpolation
|
13
|
+
xml_accessor :description
|
14
|
+
xml_accessor :coordinateType
|
15
|
+
xml_accessor :defaults, :as => Defaults
|
16
|
+
xml_accessor :nodes, :as => [Node]
|
17
|
+
xml_accessor :link, :as => [Link]
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|