sicl 0.2.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.
@@ -1,8 +1,8 @@
1
- = 0.2.0 2007-05-12
2
-
3
- * add build rules for bcc32 with ruby-mswin32.
4
- * refactor testcases in test/test_sicl.rb.
5
-
6
- = 0.1.0 2007-05-12
7
-
8
- * Birthday!
1
+ = 0.2.0 2007-05-12
2
+
3
+ * add build rules for bcc32 with ruby-mswin32.
4
+ * refactor testcases in test/test_sicl.rb.
5
+
6
+ = 0.1.0 2007-05-12
7
+
8
+ * Birthday!
@@ -1,9 +1,9 @@
1
- History.txt
2
- Manifest.txt
3
- README.txt
4
- Rakefile
5
-
6
- ext/sicl.c
7
- ext/extconf.rb
8
- ext/Makefile.bcc
9
- test/test_sicl.rb
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+
6
+ ext/sicl.c
7
+ ext/extconf.rb
8
+ ext/Makefile.bcc
9
+ test/test_sicl.rb
data/README.txt CHANGED
@@ -1,79 +1,93 @@
1
- SICL/Ruby
2
- http://rubyforge.org/projects/sicl/
3
-
4
- == DESCRIPTION:
5
-
6
- SICL/Ruby is SICL(Standard Instrument Control Library) API module for
7
- Ruby. SICL is part of the Agilent IO Libraries Suite product. SICL/Ruby
8
- gives you a capability to control your instruments via GPIB, USB, and LAN.
9
-
10
- == SYNOPSIS:
11
-
12
- require 'sicl'
13
-
14
- SICL.open('gpib0,17') do |io|
15
-
16
- io.output('*IDN?')
17
-
18
- puts io.enter
19
-
20
- # ... instruments specific operations ...
21
-
22
- end
23
-
24
- or
25
-
26
- require 'sicl'
27
-
28
- io = SICL.open('gpib0,17')
29
-
30
- io.output('*RST')
31
-
32
- puts io.spoll
33
-
34
- puts io.query('*IDN?')
35
-
36
- # ... instruments specific operations ...
37
-
38
- io.close
39
-
40
- or
41
-
42
- require 'sicl'
43
-
44
- class MyInst < SICL::Instrument
45
- def reset; output('*RST'); end
46
- end
47
-
48
- io = MyInst.new 'gpib0,17'
49
-
50
- io.reset
51
-
52
- # ... instruments specific operations ...
53
-
54
- io.close
55
-
56
- == REQUIREMENTS:
57
-
58
- * Aiglent IO Libraries Suite 14.2
59
-
60
- Agilent Technologies
61
- http://www.home.agilent.com
62
-
63
- == INSTALL:
64
-
65
- $ export http_proxy='http://web-proxy:8088' # if you need
66
- $ gem install sicl
67
-
68
- or
69
-
70
- $ tar jvxf sicl.tar.bz2
71
- $ cd sicl
72
- $ ruby extconf.rb
73
- $ make
74
-
75
- == LICENSE:
76
-
77
- (GPL ver.2)
78
-
79
- Copyright (c) 2007, Naoki Kobayashi
1
+ = SICL/Ruby
2
+
3
+ ((<download|URL:http://rubyforge.org/projects/sicl/>))
4
+
5
+ == DESCRIPTION:
6
+
7
+ SICL/Ruby is SICL(Standard Instrument Control Library) API module for
8
+ Ruby. SICL is part of the Agilent IO Libraries Suite product. SICL/Ruby
9
+ gives you a capability to control your instruments via GPIB, USB, and LAN.
10
+
11
+ == SYNOPSIS:
12
+
13
+ Please, use like this.
14
+
15
+ Example:
16
+
17
+ require 'sicl'
18
+
19
+ SICL.open('gpib0,17') do |io|
20
+
21
+ io.output('*IDN?')
22
+
23
+ puts io.enter
24
+
25
+ # ... instruments specific operations ...
26
+
27
+ end
28
+
29
+ or
30
+
31
+ Example:
32
+
33
+ require 'sicl'
34
+
35
+ io = SICL.open('gpib0,17')
36
+
37
+ io.output('*RST')
38
+
39
+ puts io.spoll
40
+
41
+ puts io.query('*IDN?')
42
+
43
+ # ... instruments specific operations ...
44
+
45
+ io.close
46
+
47
+ or
48
+
49
+ Example:
50
+
51
+ require 'sicl'
52
+
53
+ class MyInst < SICL::Instrument
54
+ def reset; output('*RST'); end
55
+ end
56
+
57
+ io = MyInst.new 'gpib0,17'
58
+
59
+ io.reset
60
+
61
+ # ... instruments specific operations ...
62
+
63
+ io.close
64
+
65
+ == DOCUMENTS:
66
+
67
+ SICL/Ruby Reference : ((<English|URL:sicl.en.html>))/((<Japanese|URL:sicl.ja.html>))
68
+
69
+ == REQUIREMENTS:
70
+
71
+ ((<Aiglent IO Libraries Suite 14.2|URL:http://www.agilent.com/>))
72
+
73
+ == INSTALL:
74
+
75
+ If you can use the ((<RubyGems|URL:http://docs.rubygems.org/>)),
76
+ Please install to use the ((|gem|)) command.
77
+
78
+ $ export http_proxy='http://web-proxy:8088' # if you need
79
+ $ gem install sicl
80
+
81
+ Or not, Please build from the soruce code.
82
+
83
+ $ svn checkout svn://rubyforge.org/var/svn/sicl
84
+ $ cd sicl/ext
85
+ $ ruby extconf.rb
86
+ $ make
87
+ $ make install
88
+
89
+ == LICENSE:
90
+
91
+ (GPL ver.2)
92
+
93
+ Copyright (c) 2007, Naoki Kobayashi
data/Rakefile CHANGED
@@ -1,55 +1,78 @@
1
- ################################################################################
2
- #
3
- # Copyright (c) 2007 Naoki Kobayashi
4
- #
5
- # This library is free software. ( except for SICL Library )
6
- # You can distribute/modify this file under the same terms of ruby.
7
- #
8
- # $Header: $
9
- #
10
- ################################################################################
11
-
12
- begin
13
- require 'rubygems'
14
- require 'rake/gempackagetask'
15
- rescue Exception
16
- nil
17
- end
18
-
19
- require "rake/clean"
20
- require "rake/gempackagetask"
21
-
22
- PKG_FILES = []
23
- File.open("Manifest.txt") do |manifest|
24
- manifest.each do |file|
25
- PKG_FILES << file.chomp if file =~ /\w+/
26
- end
27
- end
28
-
29
- task :default => :package
30
-
31
- spec = Gem::Specification.new do |s|
32
- s.name = "sicl"
33
- s.version = "0.2.0"
34
- s.summary = "Agilent SICL API wrapper class for Ruby."
35
- s.autorequire = "sicl"
36
- s.files = PKG_FILES
37
- s.default_executable = "ext/extconf.rb"
38
- s.extensions = ["ext/extconf.rb"]
39
- s.description = <<EOF
40
- SICL/Ruby is SICL(Standard Instrument Control Library) API module for Ruby. SICL is part of the Agilent IO Libraries Suite product. SICL/Ruby gives you a capability to control your instruments via GPIB, USB, and LAN.
41
- EOF
42
- end
43
-
44
- Rake::GemPackageTask.new(spec) do |pkg|
45
- pkg.need_tar_bz2 = true
46
- pkg.need_tar_gz = true
47
- end
48
-
49
- task :test do
50
- ruby "-Iext test/test_sicl.rb"
51
- end
52
-
53
- task :html do
54
- sh "rd2 -r rd/rd2html-lib.rb --with-css=style.css doc/sicl.ja.rd > html/sicl.ja.html"
55
- end
1
+ ################################################################################
2
+ #
3
+ # Copyright (c) 2007 Naoki Kobayashi
4
+ #
5
+ # This library is free software. ( except for SICL Library )
6
+ # You can distribute/modify this file under the same terms of ruby.
7
+ #
8
+ # $LastChangedDate$
9
+ # $Revision$
10
+ # $Author$
11
+ #
12
+ ################################################################################
13
+
14
+ begin
15
+ require 'rubygems'
16
+ require 'rake/gempackagetask'
17
+ rescue Exception
18
+ nil
19
+ end
20
+
21
+ require "rake/clean"
22
+ require "rake/gempackagetask"
23
+
24
+ PKG_FILES = []
25
+ File.open("Manifest.txt") do |manifest|
26
+ manifest.each do |file|
27
+ PKG_FILES << file.chomp if file =~ /\w+/
28
+ end
29
+ end
30
+
31
+ task :default => :package
32
+
33
+ spec = Gem::Specification.new do |s|
34
+ s.name = "sicl"
35
+ s.version = "1.0.0"
36
+ s.summary = "Agilent SICL API wrapper class for Ruby."
37
+ s.autorequire = "sicl"
38
+ s.files = PKG_FILES
39
+ s.default_executable = "ext/extconf.rb"
40
+ s.extensions = ["ext/extconf.rb"]
41
+ s.description = <<EOF
42
+ SICL/Ruby is SICL(Standard Instrument Control Library) API module for Rubby. SICL is part of the Agilent IO Libraries Suite product. SICL/Ruby gives you a capability to control your instruments via GPIB, USB, and LAN.
43
+ EOF
44
+ end
45
+
46
+ Rake::GemPackageTask.new(spec) do |pkg|
47
+ pkg.need_tar_bz2 = true
48
+ pkg.need_tar_gz = true
49
+ end
50
+
51
+ task :test do
52
+ ruby "-Iext test/test_sicl.rb"
53
+ end
54
+
55
+ HTML_DIR = "html"
56
+ CLEAN << HTML_DIR
57
+ RD2_OPT = ["--out-code=euc-jp", "--with-css=style.css"]
58
+
59
+ def convertToHtml(src, dst, title)
60
+ sh "rd2 -r rd/rd2html-lib.rb #{RD2_OPT.join(" ")} --html-title='#{title}' #{src} > #{dst}"
61
+ end
62
+
63
+ task :html do
64
+ Dir::mkdir HTML_DIR unless FileTest.exists? HTML_DIR
65
+
66
+ FileUtils.cp "doc/style.css", "html/style.css"
67
+ [
68
+ ["README.txt", "html/index.html", "SICL/Ruby"],
69
+ ["doc/sicl.en.rd", "html/sicl.en.html", "SICL/Ruby Reference"],
70
+ ["doc/sicl.ja.rd", "html/sicl.ja.html", "SICL/Ruby Reference"]
71
+ ].each do |src, dst, title|
72
+ convertToHtml src, dst, title
73
+ end
74
+ end
75
+
76
+ task :www => :html do
77
+ sh "scp html/*.html html/*.css #{ENV['SVN_USER']}@sicl.rubyforge.org:/var/www/gforge-projects/sicl/"
78
+ end
@@ -1,79 +1,81 @@
1
- ################################################################################
2
- #
3
- # Copyright (c) 2007 Satoshi Nihonyanagi
4
- # Copyright (c) 2007 Naoki Kobayashi
5
- #
6
- # $Header: $
7
- #
8
- # Description:
9
- #
10
- # You need to export three environment variables for path of header
11
- # files and libraries if you wish to build this library.
12
- #
13
- # - SICL_DIR is path of Agilent IO Libraries Suite.
14
- # - BCC_DIR is path of Borland C/C++ compiler.
15
- # - RUBY_DIR is path of Ruby mswin32 verion.
16
- #
17
- # Please, make like this:)
18
- #
19
- # $ SICL_DIR='C:\Program Files\Agilent\IO Libraries Suite' \
20
- # > BCC_DIR='C:\borland\bcc55' RUBY_DIR='C:\ruby-mswin32' \
21
- # > PATH=/cygdrive/c/borland/bcc55/Bin:$PATH make -f Makefile.bcc
22
- #
23
- ################################################################################
24
-
25
- ################################################################################
26
- # Path definitions
27
- ################################################################################
28
-
29
- #SICL_DIR = C:\Program Files\Agilent\IO Libraries Suite
30
- SICL_INC_DIR = $(SICL_DIR)\include
31
- SICL_LIB_DIR = $(SICL_DIR)\lib
32
-
33
- #BCC_DIR = C:\borland\bcc55
34
- BCC_INC_DIR = $(BCC_DIR)\include
35
- BCC_LIB_DIR = $(BCC_DIR)\lib
36
-
37
- #RUBY_DIR = C:\ruby-mswin32
38
- RUBY_BIN_DIR = $(RUBY_DIR)\bin
39
- RUBY_INC_DIR = $(RUBY_DIR)\lib\ruby\1.8\i386-mswin32
40
- RUBYDLL = msvcrt-ruby18.dll
41
- RUBYLIB = $(RUBYDLL:.dll=.lib)
42
-
43
- ################################################################################
44
- # Compiler and linker settings
45
- ################################################################################
46
-
47
- CC = bcc32
48
- CFLAGS = -O2 -w-8070 -w-8004 -w-8057 \
49
- -I"$(SICL_INC_DIR)" -I"$(RUBY_INC_DIR)" -I"$(BCC_INC_DIR)" \
50
- -L"$(BCC_LIB_DIR)"
51
-
52
- LD = ilink32
53
- LDFLAGS = -L"$(BCC_LIB_DIR)" -L"$(SICL_LIB_DIR)"
54
-
55
- ################################################################################
56
- # List of target files
57
- ################################################################################
58
-
59
- SRCS = sicl.c
60
- OBJS = $(SRCS:.c=.obj)
61
- LIBS = bcsicl32.lib import32.lib cw32mt.lib $(RUBYLIB)
62
- SICLDLL = sicl.dll
63
-
64
- ################################################################################
65
- # Build rules
66
- ################################################################################
67
-
68
- .PHONY: all
69
- all: $(SICLDLL)
70
-
71
- $(RUBYLIB): $(RUBY_BIN_DIR)\$(RUBYDLL)
72
- implib -a $@ $?
73
-
74
- $(SICLDLL): $(OBJS) $(RUBYLIB)
75
- $(LD) $(LDFLAGS) -Tpd $? c0d32.obj, $(DLL), , $(LIBS),
76
-
77
- .PHONY: clean
78
- clean:
79
- rm -f *~ *.obj *.lib *.tds *.map *.ilc *.ild *.ilf *.ils
1
+ ################################################################################
2
+ #
3
+ # Copyright (c) 2007 Satoshi Nihonyanagi
4
+ # Copyright (c) 2007 Naoki Kobayashi
5
+ #
6
+ # $LastChangedDate$
7
+ # $Revision$
8
+ # $Author$
9
+ #
10
+ # Description:
11
+ #
12
+ # You need to export three environment variables for path of header
13
+ # files and libraries if you wish to build this library.
14
+ #
15
+ # - SICL_DIR is path of Agilent IO Libraries Suite.
16
+ # - BCC_DIR is path of Borland C/C++ compiler.
17
+ # - RUBY_DIR is path of Ruby mswin32 verion.
18
+ #
19
+ # Please, make like this:)
20
+ #
21
+ # $ SICL_DIR='C:\Program Files\Agilent\IO Libraries Suite' \
22
+ # > BCC_DIR='C:\borland\bcc55' RUBY_DIR='C:\ruby-mswin32' \
23
+ # > PATH=/cygdrive/c/borland/bcc55/Bin:$PATH make -f Makefile.bcc
24
+ #
25
+ ################################################################################
26
+
27
+ ################################################################################
28
+ # Path definitions
29
+ ################################################################################
30
+
31
+ #SICL_DIR = C:\Program Files\Agilent\IO Libraries Suite
32
+ SICL_INC_DIR = $(SICL_DIR)\include
33
+ SICL_LIB_DIR = $(SICL_DIR)\lib
34
+
35
+ #BCC_DIR = C:\borland\bcc55
36
+ BCC_INC_DIR = $(BCC_DIR)\include
37
+ BCC_LIB_DIR = $(BCC_DIR)\lib
38
+
39
+ #RUBY_DIR = C:\ruby-mswin32
40
+ RUBY_BIN_DIR = $(RUBY_DIR)\bin
41
+ RUBY_INC_DIR = $(RUBY_DIR)\lib\ruby\1.8\i386-mswin32
42
+ RUBYDLL = msvcrt-ruby18.dll
43
+ RUBYLIB = $(RUBYDLL:.dll=.lib)
44
+
45
+ ################################################################################
46
+ # Compiler and linker settings
47
+ ################################################################################
48
+
49
+ CC = bcc32
50
+ CFLAGS = -O2 -w-8070 -w-8004 -w-8057 \
51
+ -I"$(SICL_INC_DIR)" -I"$(RUBY_INC_DIR)" -I"$(BCC_INC_DIR)" \
52
+ -L"$(BCC_LIB_DIR)"
53
+
54
+ LD = ilink32
55
+ LDFLAGS = -L"$(BCC_LIB_DIR)" -L"$(SICL_LIB_DIR)"
56
+
57
+ ################################################################################
58
+ # List of target files
59
+ ################################################################################
60
+
61
+ SRCS = sicl.c
62
+ OBJS = $(SRCS:.c=.obj)
63
+ LIBS = bcsicl32.lib import32.lib cw32mt.lib $(RUBYLIB)
64
+ SICLDLL = sicl.dll
65
+
66
+ ################################################################################
67
+ # Build rules
68
+ ################################################################################
69
+
70
+ .PHONY: all
71
+ all: $(SICLDLL)
72
+
73
+ $(RUBYLIB): $(RUBY_BIN_DIR)\$(RUBYDLL)
74
+ implib -a $@ $?
75
+
76
+ $(SICLDLL): $(OBJS) $(RUBYLIB)
77
+ $(LD) $(LDFLAGS) -Tpd $? c0d32.obj, $(DLL), , $(LIBS),
78
+
79
+ .PHONY: clean
80
+ clean:
81
+ rm -f *~ *.obj *.lib *.tds *.map *.ilc *.ild *.ilf *.ils