OpalKelly 5.2.1.pre1
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 +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +71 -0
- data/ext/OpalKelly/FrontPanelDLL_wrap.cxx +27465 -0
- data/ext/OpalKelly/FrontPanelDLL_wrap.h +29 -0
- data/ext/OpalKelly/extconf.rb +46 -0
- metadata +48 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b0dd5afa9b665b6fda7321c932671a4dc7fd6b60a0f82360d5e69dda3a89e77a
|
|
4
|
+
data.tar.gz: 27b32b57d2714f3195388f69f0debf1e90c6e0f3b17dd1dbcc37fd6f8c9e92b0
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 693b1f13ca358786f79c61218b27e3e961901d030573ca97840660b8f23d428950e25f6a5eaaa1537fafaf8d38bc7be3dee27456c251831c6d08aad1574c282b
|
|
7
|
+
data.tar.gz: fc374be450c83b47889fe57b9535efb0fa3ba4cfcd7f79894baf6a1eb0ebc9c49b10ba7e102857e73e4a2b77d0ba55d4c9b4ea08f8600c66ab46bba050ddef1f
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Opal Kelly Incorporated
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Opal Kelly Ruby Gem
|
|
2
|
+
===================
|
|
3
|
+
|
|
4
|
+
This gem provides access to FrontPanel API from Ruby. In order to use this
|
|
5
|
+
extension, you must have Opal Kelly FrontPanel SDK installed.
|
|
6
|
+
|
|
7
|
+
Installation
|
|
8
|
+
------------
|
|
9
|
+
|
|
10
|
+
Ensure that FrontPanel SDK is installed and `okFP_SDK` environment variable is
|
|
11
|
+
defined to point to the location of `API` subdirectory of the SDK installation.
|
|
12
|
+
|
|
13
|
+
You also need to have a working C++ compiler in order to build the native
|
|
14
|
+
extension which is part of this gem. Under Microsoft Windows systems, you need
|
|
15
|
+
to install [RubyInstaller](https://rubyinstaller.org/downloads/) to compile
|
|
16
|
+
Ruby extensions, unless you already have it. Note that when selecting the file
|
|
17
|
+
to download, you should choose a version with development kit (i.e. with
|
|
18
|
+
`Ruby+DevKit` in its name) unless, again, you already have a functioning MSYS2
|
|
19
|
+
installation.
|
|
20
|
+
|
|
21
|
+
If the requirements are satisfied, a simple
|
|
22
|
+
```shell
|
|
23
|
+
> gem install OpalKelly
|
|
24
|
+
```
|
|
25
|
+
should build the extension and install the gem. If you get any errors about
|
|
26
|
+
missing headers or libraries, please check that `okFP_SDK` is defined
|
|
27
|
+
correctly. If you have the `okFrontPanel.h` header or the library in some
|
|
28
|
+
non-default location, you may also set `okFP_SDK_INCLUDE` and `okFP_SDK_LIBS`
|
|
29
|
+
environment variables to point to them directly. Finally, you can also specify
|
|
30
|
+
their locations on `gem install` command line after `--`, e.g.:
|
|
31
|
+
```shell
|
|
32
|
+
> gem install OpalKelly -- --with-frontpanel-include=c:/fp/inc --with-frontpanel-lib=c:/fp/lib
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
Use
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
Gem API parallels FrontPanel C++ API, please see the [documentation][docs] for
|
|
40
|
+
more information.
|
|
41
|
+
|
|
42
|
+
[docs]: https://docs.opalkelly.com/display/FPSDK/Programming+Languages
|
|
43
|
+
|
|
44
|
+
Here is a very simple example which can be used to check that the gem is
|
|
45
|
+
installed correctly:
|
|
46
|
+
```ruby
|
|
47
|
+
require 'OpalKelly'
|
|
48
|
+
|
|
49
|
+
puts "Using OpalKelly SDK #{OpalKelly::GetAPIVersionString()}"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Please notice that Ruby programs using this gem must be able to load FrontPanel
|
|
53
|
+
SDK shared library during run-time and this may require separate set up:
|
|
54
|
+
|
|
55
|
+
Under Microsoft Windows systems, you need to set the special `RUBY_DLL_PATH`
|
|
56
|
+
environment variable to the directory containing `okFrontPanel.dll` to allow
|
|
57
|
+
recent Ruby version find this DLL. Please note that having this DLL in one of
|
|
58
|
+
the directories included in the usual `PATH` variable is _not_ sufficient.
|
|
59
|
+
|
|
60
|
+
Under Unix-like systems, you can simply copy the shared `libokFrontPanel.so`
|
|
61
|
+
library to one of the directories searched by default (e.g. `/usr/local/lib`)
|
|
62
|
+
or add `$okFP_SDK` to the standard environment variable containing the list of
|
|
63
|
+
directories to search, i.e. `DYLD_LIBRARY_PATH` under macOS or
|
|
64
|
+
`LD_LIBRARY_PATH` elsewhere.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
License
|
|
68
|
+
-------
|
|
69
|
+
|
|
70
|
+
The gem is available as open source under the terms of the
|
|
71
|
+
[MIT License](https://opensource.org/licenses/MIT).
|