netlinx-workspace 0.3.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +206 -6
- data/bin/netlinx-workspace +27 -0
- data/doc/NetLinx.html +18 -7
- data/doc/NetLinx/Compile.html +15 -4
- data/doc/NetLinx/Compile/Extension.html +15 -4
- data/doc/NetLinx/Compile/Extension/APW.html +8 -8
- data/doc/NetLinx/Project.html +334 -90
- data/doc/NetLinx/Rake.html +128 -0
- data/doc/NetLinx/Rake/Workspace.html +128 -0
- data/doc/NetLinx/Rake/Workspace/CreateWorkspaceConfig.html +387 -0
- data/doc/NetLinx/Rake/Workspace/GenerateAPW.html +371 -0
- data/doc/NetLinx/System.html +1341 -217
- data/doc/NetLinx/SystemFile.html +454 -51
- data/doc/NetLinx/Workspace.html +434 -69
- data/doc/NetLinx/Workspace/YAML.html +398 -0
- data/doc/_index.html +66 -4
- data/doc/class_list.html +6 -2
- data/doc/file.README.html +218 -10
- data/doc/file.license.html +4 -4
- data/doc/file_list.html +5 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +218 -10
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +171 -23
- data/doc/top-level-namespace.html +3 -3
- data/lib/netlinx/compile/extension/apw.rb +3 -0
- data/lib/netlinx/rake/workspace.rb +14 -0
- data/lib/netlinx/rake/workspace/create_workspace_config.rb +49 -0
- data/lib/netlinx/rake/workspace/generate_apw.rb +41 -0
- data/lib/netlinx/workspace.rb +58 -14
- data/lib/netlinx/workspace/project.rb +107 -0
- data/lib/netlinx/workspace/system.rb +226 -0
- data/lib/netlinx/workspace/system_file.rb +98 -0
- data/lib/netlinx/workspace/yaml.rb +217 -0
- data/license.txt +1 -1
- metadata +53 -28
- data/lib/netlinx-workspace.rb +0 -1
- data/lib/netlinx/project.rb +0 -83
- data/lib/netlinx/system.rb +0 -122
- data/lib/netlinx/system_file.rb +0 -36
data/doc/class_list.html
CHANGED
@@ -20,7 +20,11 @@
|
|
20
20
|
</head>
|
21
21
|
<body>
|
22
22
|
<script type="text/javascript" charset="utf-8">
|
23
|
-
|
23
|
+
var hasFrames = false;
|
24
|
+
try {
|
25
|
+
hasFrames = window.top.frames.main ? true : false;
|
26
|
+
} catch (e) { }
|
27
|
+
if (hasFrames) {
|
24
28
|
document.getElementById('base_target').target = 'main';
|
25
29
|
document.body.className = 'frames';
|
26
30
|
}
|
@@ -46,7 +50,7 @@
|
|
46
50
|
|
47
51
|
<ul id="full_list" class="class">
|
48
52
|
<li><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></li>
|
49
|
-
<li><a class='toggle'></a> <span class='object_link'><a href="NetLinx.html" title="NetLinx (module)">NetLinx</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="NetLinx/Compile.html" title="NetLinx::Compile (module)">Compile</a></span><small class='search_info'>NetLinx</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="NetLinx/Compile/Extension.html" title="NetLinx::Compile::Extension (module)">Extension</a></span><small class='search_info'>NetLinx::Compile</small></li><ul><li><span class='object_link'><a href="NetLinx/Compile/Extension/APW.html" title="NetLinx::Compile::Extension::APW (class)">APW</a></span> < Object<small class='search_info'>NetLinx::Compile::Extension</small></li></ul></ul><li><span class='object_link'><a href="NetLinx/Project.html" title="NetLinx::Project (class)">Project</a></span> < Object<small class='search_info'>NetLinx</small></li><li><span class='object_link'><a href="NetLinx/System.html" title="NetLinx::System (class)">System</a></span> < Object<small class='search_info'>NetLinx</small></li><li><span class='object_link'><a href="NetLinx/SystemFile.html" title="NetLinx::SystemFile (class)">SystemFile</a></span> < Object<small class='search_info'>NetLinx</small></li><li><span class='object_link'><a href="NetLinx/Workspace.html" title="NetLinx::Workspace (class)">Workspace</a></span> < Object<small class='search_info'>NetLinx</small></li></ul>
|
53
|
+
<li><a class='toggle'></a> <span class='object_link'><a href="NetLinx.html" title="NetLinx (module)">NetLinx</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="NetLinx/Compile.html" title="NetLinx::Compile (module)">Compile</a></span><small class='search_info'>NetLinx</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="NetLinx/Compile/Extension.html" title="NetLinx::Compile::Extension (module)">Extension</a></span><small class='search_info'>NetLinx::Compile</small></li><ul><li><span class='object_link'><a href="NetLinx/Compile/Extension/APW.html" title="NetLinx::Compile::Extension::APW (class)">APW</a></span> < Object<small class='search_info'>NetLinx::Compile::Extension</small></li></ul></ul><li><span class='object_link'><a href="NetLinx/Project.html" title="NetLinx::Project (class)">Project</a></span> < Object<small class='search_info'>NetLinx</small></li><li><a class='toggle'></a> <span class='object_link'><a href="NetLinx/Rake.html" title="NetLinx::Rake (module)">Rake</a></span><small class='search_info'>NetLinx</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="NetLinx/Rake/Workspace.html" title="NetLinx::Rake::Workspace (module)">Workspace</a></span><small class='search_info'>NetLinx::Rake</small></li><ul><li><span class='object_link'><a href="NetLinx/Rake/Workspace/CreateWorkspaceConfig.html" title="NetLinx::Rake::Workspace::CreateWorkspaceConfig (class)">CreateWorkspaceConfig</a></span> < TaskLib<small class='search_info'>NetLinx::Rake::Workspace</small></li><li><span class='object_link'><a href="NetLinx/Rake/Workspace/GenerateAPW.html" title="NetLinx::Rake::Workspace::GenerateAPW (class)">GenerateAPW</a></span> < TaskLib<small class='search_info'>NetLinx::Rake::Workspace</small></li></ul></ul><li><span class='object_link'><a href="NetLinx/System.html" title="NetLinx::System (class)">System</a></span> < Object<small class='search_info'>NetLinx</small></li><li><span class='object_link'><a href="NetLinx/SystemFile.html" title="NetLinx::SystemFile (class)">SystemFile</a></span> < Object<small class='search_info'>NetLinx</small></li><li><a class='toggle'></a> <span class='object_link'><a href="NetLinx/Workspace.html" title="NetLinx::Workspace (class)">Workspace</a></span> < Object<small class='search_info'>NetLinx</small></li><ul><li><span class='object_link'><a href="NetLinx/Workspace/YAML.html" title="NetLinx::Workspace::YAML (class)">YAML</a></span> < Object<small class='search_info'>NetLinx::Workspace</small></li></ul></ul>
|
50
54
|
|
51
55
|
</ul>
|
52
56
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
File: README
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -61,25 +61,233 @@
|
|
61
61
|
|
62
62
|
<iframe id="search_frame"></iframe>
|
63
63
|
|
64
|
-
<div id="content"><div id='filecontents'
|
65
|
-
|
66
|
-
<p>netlinx-workspace</p>
|
64
|
+
<div id="content"><div id='filecontents'>
|
65
|
+
<h1 id="label-netlinx-workspace">netlinx-workspace</h1>
|
67
66
|
|
68
67
|
<p>A library for working with AMX NetLinx Studio workspaces in Ruby.</p>
|
69
68
|
|
70
|
-
<p><a href="http://badge.fury.io/rb/netlinx-workspace"><img
|
69
|
+
<p><a href="http://badge.fury.io/rb/netlinx-workspace"><img
|
70
|
+
src="https://badge.fury.io/rb/netlinx-workspace.png"></a> <a
|
71
|
+
href="http://www.rubydoc.info/gems/netlinx-workspace"><img
|
72
|
+
src="https://img.shields.io/badge/docs-api-blue.svg"></a> <a
|
73
|
+
href="http://www.apache.org/licenses/LICENSE-2.0"><img
|
74
|
+
src="https://img.shields.io/badge/license-Apache%202.0-yellowgreen.svg"></a></p>
|
75
|
+
|
76
|
+
<p>This library provides a developer API for working with NetLinx Studio
|
77
|
+
workspaces in Ruby. It also adds compiler support to the <a
|
78
|
+
href="https://github.com/amclain/netlinx-compile">netlinx-compile</a> gem
|
79
|
+
for these workspaces.</p>
|
80
|
+
|
81
|
+
<p><strong>APW Target Version</strong></p>
|
82
|
+
|
83
|
+
<p>This library targets NetLinx .apw version <code>4.0</code> (created by
|
84
|
+
NetLinx Studio 4).</p>
|
85
|
+
|
86
|
+
<h2 id="label-Issues-2C+Bugs-2C+Feature+Requests">Issues, Bugs, Feature Requests</h2>
|
87
|
+
|
88
|
+
<p>Any bugs and feature requests should be reported on the GitHub issue
|
89
|
+
tracker:</p>
|
90
|
+
|
91
|
+
<p><a
|
92
|
+
href="https://github.com/amclain/netlinx-workspace/issues">github.com/amclain/netlinx-workspace/issues</a></p>
|
93
|
+
|
94
|
+
<p><strong>Pull requests are preferred via GitHub.</strong></p>
|
95
|
+
|
96
|
+
<p>Mercurial users can use <a href="http://hg-git.github.io/">Hg-Git</a> to
|
97
|
+
interact with GitHub repositories.</p>
|
98
|
+
|
99
|
+
<h2 id="label-Installation">Installation</h2>
|
100
|
+
|
101
|
+
<p>netlinx-workspace is available as a Ruby gem.</p>
|
102
|
+
<ol><li>
|
103
|
+
<p>Install <a href="https://www.ruby-lang.org">Ruby</a> 2.0.0 or higher.</p>
|
104
|
+
<ul><li>
|
105
|
+
<p>Windows: Use <a
|
106
|
+
href="http://rubyinstaller.org/downloads/">RubyInstaller</a> and make sure
|
107
|
+
ruby/bin is in your <a
|
108
|
+
href="http://www.computerhope.com/issues/ch000549.htm">system path</a>.</p>
|
109
|
+
</li><li>
|
110
|
+
<p>Linux: Use <a
|
111
|
+
href="https://github.com/sstephenson/rbenv#basic-github-checkout">rbenv</a>.</p>
|
112
|
+
</li><li>
|
113
|
+
<p>Windows: Use <a
|
114
|
+
href="http://rubyinstaller.org/downloads/">RubyInstaller</a> and make sure
|
115
|
+
ruby/bin is in your <a
|
116
|
+
href="http://www.computerhope.com/issues/ch000549.htm">system path</a>.</p>
|
117
|
+
</li><li>
|
118
|
+
<p>Linux: Use <a
|
119
|
+
href="https://github.com/sstephenson/rbenv#basic-github-checkout">rbenv</a>.</p>
|
120
|
+
</li></ul>
|
121
|
+
</li><li>
|
122
|
+
<p>Open the <a
|
123
|
+
href="http://www.addictivetips.com/windows-tips/windows-7-elevated-command-prompt-in-context-menu/">command
|
124
|
+
line</a> and type:</p>
|
125
|
+
</li></ol>
|
126
|
+
|
127
|
+
<pre class="code ruby"><code class="ruby">gem install netlinx-workspace
|
128
|
+
gem install netlinx-compile (optional for compiler support)</code></pre>
|
129
|
+
|
130
|
+
<h2 id="label-Usage">Usage</h2>
|
131
|
+
|
132
|
+
<h3 id="label-netlinx-compile+Support">netlinx-compile Support</h3>
|
133
|
+
|
134
|
+
<p>Installing this gem automatically enables support for <a
|
135
|
+
href="https://github.com/amclain/netlinx-compile">netlinx-compile</a> to
|
136
|
+
compile NetLinx Studio workspace (.apw) files.</p>
|
137
|
+
|
138
|
+
<h3 id="label-Rake+Tasks">Rake Tasks</h3>
|
139
|
+
|
140
|
+
<p>netlinx-workspace comes with a set of rake tasks that can be used by adding
|
141
|
+
<code>require 'netlinx/rake/workspace'</code> to your project's
|
142
|
+
Rakefile. Type <code>rake --tasks</code> on the command line to view the
|
143
|
+
available tasks.</p>
|
144
|
+
|
145
|
+
<h3 id="label-Command+Line">Command Line</h3>
|
146
|
+
|
147
|
+
<p>netlinx-workspace is available from the command line. A list of options can
|
148
|
+
be displayed by executing <code>netlinx-workspace --help</code>.</p>
|
149
|
+
|
150
|
+
<h3 id="label-Ruby+Developer+API">Ruby Developer API</h3>
|
151
|
+
|
152
|
+
<p>A Ruby API is provided for developers looking to integrate the
|
153
|
+
netlinx-workspace library into thier own tools. See the <a
|
154
|
+
href="http://rubydoc.info/gems/netlinx-workspace">netlinx-workspace API
|
155
|
+
documentation</a>.</p>
|
156
|
+
|
157
|
+
<h2 id="label-YAML+Workspace+Configuration">YAML Workspace Configuration</h2>
|
158
|
+
|
159
|
+
<p>netlinx-workspace has the ability to generate a NetLinx Studio Workspace
|
160
|
+
(.apw) file from a <code>workspace.config.yaml</code> text file. The
|
161
|
+
advantage of using <a href="http://yaml.org/spec/1.1/#id857168">YAML</a> is
|
162
|
+
that a workspace can easily be defined and maintained without the use of a
|
163
|
+
proprietary GUI editor. This means developers are free to use whichever
|
164
|
+
text editor they please, like <a
|
165
|
+
href="https://github.com/amclain/sublime-netlinx">sublime-netlinx</a>, to
|
166
|
+
maintain a NetLinx workspace. Automated tools can generate, maintain, and
|
167
|
+
analyze this file as well.</p>
|
168
|
+
|
169
|
+
<p>To generate a template workspace config file, execute
|
170
|
+
<code>netlinx-workspace --create</code>.</p>
|
171
|
+
|
172
|
+
<pre class="code ruby"><code class="ruby">systems:
|
173
|
+
-
|
174
|
+
name: Client - Room
|
175
|
+
connection: 192.168.1.2
|
176
|
+
touch_panels:
|
177
|
+
-
|
178
|
+
path: Touch Panel.TP4
|
179
|
+
dps: 10001:1:0
|
180
|
+
ir:
|
181
|
+
-
|
182
|
+
path: IR.irl
|
183
|
+
dps: 5001:1:0</code></pre>
|
184
|
+
|
185
|
+
<h3 id="label-Directory+Structure">Directory Structure</h3>
|
186
|
+
|
187
|
+
<p>In order to simplify the configuration file, assumptions are made as to
|
188
|
+
where project files are located:</p>
|
189
|
+
|
190
|
+
<pre class="code ruby"><code class="ruby">include/
|
191
|
+
ir/
|
192
|
+
module/
|
193
|
+
touch_panel/
|
194
|
+
system_name.axs
|
195
|
+
workspace.config.yaml</code></pre>
|
196
|
+
|
197
|
+
<p>The <code>include</code> directory is automatically scanned for
|
198
|
+
<code>.axi</code> files, and the <code>module</code> directory is scanned
|
199
|
+
for <code>.tko</code> and <code>.jar</code> files. <code>.axs</code>
|
200
|
+
modules are ignored, as they should be tested and compiled independently
|
201
|
+
before being included in a project. However, it is encouraged to place the
|
202
|
+
<code>.axs</code> module source code file in the module directory as a
|
203
|
+
courtesy so that other developers can fix bugs and make updates if
|
204
|
+
necessary.</p>
|
205
|
+
|
206
|
+
<p>Since touch panel and IR files can have a device address (DPS) attached,
|
207
|
+
these files are explicitly listed in the system. Multiple addresses can be
|
208
|
+
defined by using a YAML array.</p>
|
209
|
+
|
210
|
+
<pre class="code ruby"><code class="ruby">ir:
|
211
|
+
-
|
212
|
+
path: Cable Box.irl
|
213
|
+
dps: ['5001:5:0', '5001:6:0', '5001:7:0', '5001:8:0']</code></pre>
|
214
|
+
|
215
|
+
<p>In the case of multiple systems, the root directory of each system may need
|
216
|
+
to be offset from the workspace directory. This can be achieved by using
|
217
|
+
the <code>root</code> key.</p>
|
218
|
+
|
219
|
+
<pre class="code ruby"><code class="ruby">systems:
|
220
|
+
-
|
221
|
+
name: Room 101
|
222
|
+
root: room_101
|
223
|
+
connection: 192.168.1.2
|
224
|
+
touch_panels:
|
225
|
+
- path: Room_101.TP4
|
226
|
+
dps: 10001:1:1
|
227
|
+
-
|
228
|
+
name: Room 201
|
229
|
+
root: room_201
|
230
|
+
connection: 192.168.1.3
|
231
|
+
touch_panels:
|
232
|
+
- path: Room_201.TP4
|
233
|
+
dps: 10002:1:2</code></pre>
|
234
|
+
|
235
|
+
<pre class="code ruby"><code class="ruby">room_101/include/
|
236
|
+
room_101/ir/
|
237
|
+
room_101/module/
|
238
|
+
room_101/touch_panel/
|
239
|
+
room_101/Room 101.axs
|
240
|
+
|
241
|
+
room_201/include/
|
242
|
+
room_201/ir/
|
243
|
+
room_201/module/
|
244
|
+
room_201/touch_panel/
|
245
|
+
room_201/Room 201.axs
|
246
|
+
|
247
|
+
workspace.config.yaml</code></pre>
|
248
|
+
|
249
|
+
<h3 id="label-Connection+Settings">Connection Settings</h3>
|
250
|
+
|
251
|
+
<p>The <code>connection</code> key supports a variety of options for
|
252
|
+
configuring a system's connection to the master controller:</p>
|
253
|
+
|
254
|
+
<pre class="code ruby"><code class="ruby"># IP address. Default ICSLan port 1319 is used.
|
255
|
+
connection: 192.168.1.2
|
256
|
+
|
257
|
+
# IP address with specific ICSLan port number.
|
258
|
+
connection: 192.168.1.2:1234
|
259
|
+
|
260
|
+
# IP address with specific ICSLan port number.
|
261
|
+
connection:
|
262
|
+
host: 192.168.1.2
|
263
|
+
port: 1234
|
264
|
+
|
265
|
+
# Serial port. Default baud rate 38,400 is used.
|
266
|
+
connection: COM2
|
267
|
+
|
268
|
+
# Serial port with baud rate.
|
269
|
+
connection: COM2:57600
|
71
270
|
|
72
|
-
|
271
|
+
# Serial port with multiple port settings.
|
272
|
+
connection:
|
273
|
+
port: com2
|
274
|
+
baud_rate: 115200
|
275
|
+
data_bits: 7
|
276
|
+
parity: even
|
277
|
+
stop_bits: 2</code></pre>
|
73
278
|
|
74
|
-
<
|
279
|
+
<h3 id="label-Additional+Information">Additional Information</h3>
|
75
280
|
|
76
|
-
<p
|
281
|
+
<p>Examples of workspace configuration files can be found in the <a
|
282
|
+
href="https://github.com/amclain/netlinx-workspace/tree/master/spec/workspace/yaml">specworkspaceyaml</a>
|
283
|
+
directory of this library. These files show all of the keywords that are
|
284
|
+
available.</p>
|
77
285
|
</div></div>
|
78
286
|
|
79
287
|
<div id="footer">
|
80
|
-
Generated on
|
288
|
+
Generated on Tue Feb 24 17:43:02 2015 by
|
81
289
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
82
|
-
0.8.7.
|
290
|
+
0.8.7.6 (ruby-2.1.3).
|
83
291
|
</div>
|
84
292
|
|
85
293
|
</body>
|
data/doc/file.license.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
File: license
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -61,12 +61,12 @@
|
|
61
61
|
|
62
62
|
<iframe id="search_frame"></iframe>
|
63
63
|
|
64
|
-
<div id="content"><div id='filecontents'>Copyright 2013 Alex McLain<br/><br/>Licensed under the Apache License, Version 2.0 (the "License");<br/>you may not use this file except in compliance with the License.<br/>You may obtain a copy of the License at<br/><br/> http://www.apache.org/licenses/LICENSE-2.0<br/><br/>Unless required by applicable law or agreed to in writing, software<br/>distributed under the License is distributed on an "AS IS" BASIS,<br/>WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br/>See the License for the specific language governing permissions and<br/>limitations under the License.</div></div>
|
64
|
+
<div id="content"><div id='filecontents'>Copyright 2013-2015 Alex McLain<br/><br/>Licensed under the Apache License, Version 2.0 (the "License");<br/>you may not use this file except in compliance with the License.<br/>You may obtain a copy of the License at<br/><br/> http://www.apache.org/licenses/LICENSE-2.0<br/><br/>Unless required by applicable law or agreed to in writing, software<br/>distributed under the License is distributed on an "AS IS" BASIS,<br/>WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br/>See the License for the specific language governing permissions and<br/>limitations under the License.</div></div>
|
65
65
|
|
66
66
|
<div id="footer">
|
67
|
-
Generated on
|
67
|
+
Generated on Tue Feb 24 17:43:02 2015 by
|
68
68
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
69
|
-
0.8.7.
|
69
|
+
0.8.7.6 (ruby-2.1.3).
|
70
70
|
</div>
|
71
71
|
|
72
72
|
</body>
|
data/doc/file_list.html
CHANGED
@@ -20,7 +20,11 @@
|
|
20
20
|
</head>
|
21
21
|
<body>
|
22
22
|
<script type="text/javascript" charset="utf-8">
|
23
|
-
|
23
|
+
var hasFrames = false;
|
24
|
+
try {
|
25
|
+
hasFrames = window.top.frames.main ? true : false;
|
26
|
+
} catch (e) { }
|
27
|
+
if (hasFrames) {
|
24
28
|
document.getElementById('base_target').target = 'main';
|
25
29
|
document.body.className = 'frames';
|
26
30
|
}
|
data/doc/frames.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
5
|
<head>
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
7
|
-
<title>Documentation by YARD 0.8.7.
|
7
|
+
<title>Documentation by YARD 0.8.7.6</title>
|
8
8
|
</head>
|
9
9
|
<script type="text/javascript" charset="utf-8">
|
10
10
|
window.onload = function() {
|
data/doc/index.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
File: README
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -61,25 +61,233 @@
|
|
61
61
|
|
62
62
|
<iframe id="search_frame"></iframe>
|
63
63
|
|
64
|
-
<div id="content"><div id='filecontents'
|
65
|
-
|
66
|
-
<p>netlinx-workspace</p>
|
64
|
+
<div id="content"><div id='filecontents'>
|
65
|
+
<h1 id="label-netlinx-workspace">netlinx-workspace</h1>
|
67
66
|
|
68
67
|
<p>A library for working with AMX NetLinx Studio workspaces in Ruby.</p>
|
69
68
|
|
70
|
-
<p><a href="http://badge.fury.io/rb/netlinx-workspace"><img
|
69
|
+
<p><a href="http://badge.fury.io/rb/netlinx-workspace"><img
|
70
|
+
src="https://badge.fury.io/rb/netlinx-workspace.png"></a> <a
|
71
|
+
href="http://www.rubydoc.info/gems/netlinx-workspace"><img
|
72
|
+
src="https://img.shields.io/badge/docs-api-blue.svg"></a> <a
|
73
|
+
href="http://www.apache.org/licenses/LICENSE-2.0"><img
|
74
|
+
src="https://img.shields.io/badge/license-Apache%202.0-yellowgreen.svg"></a></p>
|
75
|
+
|
76
|
+
<p>This library provides a developer API for working with NetLinx Studio
|
77
|
+
workspaces in Ruby. It also adds compiler support to the <a
|
78
|
+
href="https://github.com/amclain/netlinx-compile">netlinx-compile</a> gem
|
79
|
+
for these workspaces.</p>
|
80
|
+
|
81
|
+
<p><strong>APW Target Version</strong></p>
|
82
|
+
|
83
|
+
<p>This library targets NetLinx .apw version <code>4.0</code> (created by
|
84
|
+
NetLinx Studio 4).</p>
|
85
|
+
|
86
|
+
<h2 id="label-Issues-2C+Bugs-2C+Feature+Requests">Issues, Bugs, Feature Requests</h2>
|
87
|
+
|
88
|
+
<p>Any bugs and feature requests should be reported on the GitHub issue
|
89
|
+
tracker:</p>
|
90
|
+
|
91
|
+
<p><a
|
92
|
+
href="https://github.com/amclain/netlinx-workspace/issues">github.com/amclain/netlinx-workspace/issues</a></p>
|
93
|
+
|
94
|
+
<p><strong>Pull requests are preferred via GitHub.</strong></p>
|
95
|
+
|
96
|
+
<p>Mercurial users can use <a href="http://hg-git.github.io/">Hg-Git</a> to
|
97
|
+
interact with GitHub repositories.</p>
|
98
|
+
|
99
|
+
<h2 id="label-Installation">Installation</h2>
|
100
|
+
|
101
|
+
<p>netlinx-workspace is available as a Ruby gem.</p>
|
102
|
+
<ol><li>
|
103
|
+
<p>Install <a href="https://www.ruby-lang.org">Ruby</a> 2.0.0 or higher.</p>
|
104
|
+
<ul><li>
|
105
|
+
<p>Windows: Use <a
|
106
|
+
href="http://rubyinstaller.org/downloads/">RubyInstaller</a> and make sure
|
107
|
+
ruby/bin is in your <a
|
108
|
+
href="http://www.computerhope.com/issues/ch000549.htm">system path</a>.</p>
|
109
|
+
</li><li>
|
110
|
+
<p>Linux: Use <a
|
111
|
+
href="https://github.com/sstephenson/rbenv#basic-github-checkout">rbenv</a>.</p>
|
112
|
+
</li><li>
|
113
|
+
<p>Windows: Use <a
|
114
|
+
href="http://rubyinstaller.org/downloads/">RubyInstaller</a> and make sure
|
115
|
+
ruby/bin is in your <a
|
116
|
+
href="http://www.computerhope.com/issues/ch000549.htm">system path</a>.</p>
|
117
|
+
</li><li>
|
118
|
+
<p>Linux: Use <a
|
119
|
+
href="https://github.com/sstephenson/rbenv#basic-github-checkout">rbenv</a>.</p>
|
120
|
+
</li></ul>
|
121
|
+
</li><li>
|
122
|
+
<p>Open the <a
|
123
|
+
href="http://www.addictivetips.com/windows-tips/windows-7-elevated-command-prompt-in-context-menu/">command
|
124
|
+
line</a> and type:</p>
|
125
|
+
</li></ol>
|
126
|
+
|
127
|
+
<pre class="code ruby"><code class="ruby">gem install netlinx-workspace
|
128
|
+
gem install netlinx-compile (optional for compiler support)</code></pre>
|
129
|
+
|
130
|
+
<h2 id="label-Usage">Usage</h2>
|
131
|
+
|
132
|
+
<h3 id="label-netlinx-compile+Support">netlinx-compile Support</h3>
|
133
|
+
|
134
|
+
<p>Installing this gem automatically enables support for <a
|
135
|
+
href="https://github.com/amclain/netlinx-compile">netlinx-compile</a> to
|
136
|
+
compile NetLinx Studio workspace (.apw) files.</p>
|
137
|
+
|
138
|
+
<h3 id="label-Rake+Tasks">Rake Tasks</h3>
|
139
|
+
|
140
|
+
<p>netlinx-workspace comes with a set of rake tasks that can be used by adding
|
141
|
+
<code>require 'netlinx/rake/workspace'</code> to your project's
|
142
|
+
Rakefile. Type <code>rake --tasks</code> on the command line to view the
|
143
|
+
available tasks.</p>
|
144
|
+
|
145
|
+
<h3 id="label-Command+Line">Command Line</h3>
|
146
|
+
|
147
|
+
<p>netlinx-workspace is available from the command line. A list of options can
|
148
|
+
be displayed by executing <code>netlinx-workspace --help</code>.</p>
|
149
|
+
|
150
|
+
<h3 id="label-Ruby+Developer+API">Ruby Developer API</h3>
|
151
|
+
|
152
|
+
<p>A Ruby API is provided for developers looking to integrate the
|
153
|
+
netlinx-workspace library into thier own tools. See the <a
|
154
|
+
href="http://rubydoc.info/gems/netlinx-workspace">netlinx-workspace API
|
155
|
+
documentation</a>.</p>
|
156
|
+
|
157
|
+
<h2 id="label-YAML+Workspace+Configuration">YAML Workspace Configuration</h2>
|
158
|
+
|
159
|
+
<p>netlinx-workspace has the ability to generate a NetLinx Studio Workspace
|
160
|
+
(.apw) file from a <code>workspace.config.yaml</code> text file. The
|
161
|
+
advantage of using <a href="http://yaml.org/spec/1.1/#id857168">YAML</a> is
|
162
|
+
that a workspace can easily be defined and maintained without the use of a
|
163
|
+
proprietary GUI editor. This means developers are free to use whichever
|
164
|
+
text editor they please, like <a
|
165
|
+
href="https://github.com/amclain/sublime-netlinx">sublime-netlinx</a>, to
|
166
|
+
maintain a NetLinx workspace. Automated tools can generate, maintain, and
|
167
|
+
analyze this file as well.</p>
|
168
|
+
|
169
|
+
<p>To generate a template workspace config file, execute
|
170
|
+
<code>netlinx-workspace --create</code>.</p>
|
171
|
+
|
172
|
+
<pre class="code ruby"><code class="ruby">systems:
|
173
|
+
-
|
174
|
+
name: Client - Room
|
175
|
+
connection: 192.168.1.2
|
176
|
+
touch_panels:
|
177
|
+
-
|
178
|
+
path: Touch Panel.TP4
|
179
|
+
dps: 10001:1:0
|
180
|
+
ir:
|
181
|
+
-
|
182
|
+
path: IR.irl
|
183
|
+
dps: 5001:1:0</code></pre>
|
184
|
+
|
185
|
+
<h3 id="label-Directory+Structure">Directory Structure</h3>
|
186
|
+
|
187
|
+
<p>In order to simplify the configuration file, assumptions are made as to
|
188
|
+
where project files are located:</p>
|
189
|
+
|
190
|
+
<pre class="code ruby"><code class="ruby">include/
|
191
|
+
ir/
|
192
|
+
module/
|
193
|
+
touch_panel/
|
194
|
+
system_name.axs
|
195
|
+
workspace.config.yaml</code></pre>
|
196
|
+
|
197
|
+
<p>The <code>include</code> directory is automatically scanned for
|
198
|
+
<code>.axi</code> files, and the <code>module</code> directory is scanned
|
199
|
+
for <code>.tko</code> and <code>.jar</code> files. <code>.axs</code>
|
200
|
+
modules are ignored, as they should be tested and compiled independently
|
201
|
+
before being included in a project. However, it is encouraged to place the
|
202
|
+
<code>.axs</code> module source code file in the module directory as a
|
203
|
+
courtesy so that other developers can fix bugs and make updates if
|
204
|
+
necessary.</p>
|
205
|
+
|
206
|
+
<p>Since touch panel and IR files can have a device address (DPS) attached,
|
207
|
+
these files are explicitly listed in the system. Multiple addresses can be
|
208
|
+
defined by using a YAML array.</p>
|
209
|
+
|
210
|
+
<pre class="code ruby"><code class="ruby">ir:
|
211
|
+
-
|
212
|
+
path: Cable Box.irl
|
213
|
+
dps: ['5001:5:0', '5001:6:0', '5001:7:0', '5001:8:0']</code></pre>
|
214
|
+
|
215
|
+
<p>In the case of multiple systems, the root directory of each system may need
|
216
|
+
to be offset from the workspace directory. This can be achieved by using
|
217
|
+
the <code>root</code> key.</p>
|
218
|
+
|
219
|
+
<pre class="code ruby"><code class="ruby">systems:
|
220
|
+
-
|
221
|
+
name: Room 101
|
222
|
+
root: room_101
|
223
|
+
connection: 192.168.1.2
|
224
|
+
touch_panels:
|
225
|
+
- path: Room_101.TP4
|
226
|
+
dps: 10001:1:1
|
227
|
+
-
|
228
|
+
name: Room 201
|
229
|
+
root: room_201
|
230
|
+
connection: 192.168.1.3
|
231
|
+
touch_panels:
|
232
|
+
- path: Room_201.TP4
|
233
|
+
dps: 10002:1:2</code></pre>
|
234
|
+
|
235
|
+
<pre class="code ruby"><code class="ruby">room_101/include/
|
236
|
+
room_101/ir/
|
237
|
+
room_101/module/
|
238
|
+
room_101/touch_panel/
|
239
|
+
room_101/Room 101.axs
|
240
|
+
|
241
|
+
room_201/include/
|
242
|
+
room_201/ir/
|
243
|
+
room_201/module/
|
244
|
+
room_201/touch_panel/
|
245
|
+
room_201/Room 201.axs
|
246
|
+
|
247
|
+
workspace.config.yaml</code></pre>
|
248
|
+
|
249
|
+
<h3 id="label-Connection+Settings">Connection Settings</h3>
|
250
|
+
|
251
|
+
<p>The <code>connection</code> key supports a variety of options for
|
252
|
+
configuring a system's connection to the master controller:</p>
|
253
|
+
|
254
|
+
<pre class="code ruby"><code class="ruby"># IP address. Default ICSLan port 1319 is used.
|
255
|
+
connection: 192.168.1.2
|
256
|
+
|
257
|
+
# IP address with specific ICSLan port number.
|
258
|
+
connection: 192.168.1.2:1234
|
259
|
+
|
260
|
+
# IP address with specific ICSLan port number.
|
261
|
+
connection:
|
262
|
+
host: 192.168.1.2
|
263
|
+
port: 1234
|
264
|
+
|
265
|
+
# Serial port. Default baud rate 38,400 is used.
|
266
|
+
connection: COM2
|
267
|
+
|
268
|
+
# Serial port with baud rate.
|
269
|
+
connection: COM2:57600
|
71
270
|
|
72
|
-
|
271
|
+
# Serial port with multiple port settings.
|
272
|
+
connection:
|
273
|
+
port: com2
|
274
|
+
baud_rate: 115200
|
275
|
+
data_bits: 7
|
276
|
+
parity: even
|
277
|
+
stop_bits: 2</code></pre>
|
73
278
|
|
74
|
-
<
|
279
|
+
<h3 id="label-Additional+Information">Additional Information</h3>
|
75
280
|
|
76
|
-
<p
|
281
|
+
<p>Examples of workspace configuration files can be found in the <a
|
282
|
+
href="https://github.com/amclain/netlinx-workspace/tree/master/spec/workspace/yaml">specworkspaceyaml</a>
|
283
|
+
directory of this library. These files show all of the keywords that are
|
284
|
+
available.</p>
|
77
285
|
</div></div>
|
78
286
|
|
79
287
|
<div id="footer">
|
80
|
-
Generated on
|
288
|
+
Generated on Tue Feb 24 17:43:01 2015 by
|
81
289
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
82
|
-
0.8.7.
|
290
|
+
0.8.7.6 (ruby-2.1.3).
|
83
291
|
</div>
|
84
292
|
|
85
293
|
</body>
|