star_ethernet 0.1.9 → 0.1.10
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/.travis.yml +0 -2
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/star_ethernet/command.rb +1 -1
- data/lib/star_ethernet/exceptions.rb +2 -0
- data/lib/star_ethernet/printer.rb +10 -6
- data/lib/star_ethernet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83280458b18283e860c6c06ea48156aa57e54df9f7ed3112c58426cf007417de
|
4
|
+
data.tar.gz: 717be784b2926d2478bcd75a5a4d6d756912120a122147aaa0c76e8056e6244f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e0bced26daff4e3259766e931560beeced4752c73740aa64db6c455419619d64010084ca7889b562c6ce06602aab39249717a2b03948156b0f31c66e1a955cd
|
7
|
+
data.tar.gz: 05f41ecae4e625abd39719a0161b56c77c35e4f51c12cdfae6e106e6c496df4de65c860eda776da68f916faa0e41afd1bd77fc81b6dac71e6cdf8261f4d9514e
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@ star_ethernet [
|
5
5
|
|
6
6
|
## Description
|
7
|
-
This library makes it possible to print via
|
7
|
+
This library makes it possible to print via IFBD-HE07/08-BE07 ethernet I/F Card by ruby command.
|
8
8
|
According to [user manual's Raw Socket Print](https://www.starmicronics.com/Support/Mannualfolder/UsersManual_IFBD_HE0708BE07_EN.pdf) document, this library is developed.
|
9
9
|
Currently this supports only Raw Socket Print(TCP Port 9100), Gets Printer Status(TCP Port 9101) and Reset with authentication, gets settings information(TCP Port 22222).
|
10
10
|
|
@@ -453,7 +453,7 @@ module StarEthernet
|
|
453
453
|
end
|
454
454
|
|
455
455
|
def self.set_2_byte_kanji_character_left_right_spaces(n1, n2)
|
456
|
-
[0x1b, 0x73,
|
456
|
+
[0x1b, 0x73, n1, n2].pack('C*')
|
457
457
|
end
|
458
458
|
|
459
459
|
def self.set_1_byte_kanji_character_left_right_spaces(n1, n2)
|
@@ -76,12 +76,16 @@ module StarEthernet
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def fetch_status(purpose = '')
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
79
|
+
begin
|
80
|
+
socket = socket(StarEthernet.configuration.status_acquisition_port)
|
81
|
+
socket.print(StarEthernet::Command.status_acquisition)
|
82
|
+
asb_status = socket.read(StarEthernet.configuration.asb_status_size)
|
83
|
+
@status.set_status(asb_status, purpose)
|
84
|
+
socket.close
|
85
|
+
@status.current_status
|
86
|
+
rescue => e
|
87
|
+
raise StarEthernet::StatusFetchFailed.new(e.full_message)
|
88
|
+
end
|
85
89
|
end
|
86
90
|
|
87
91
|
def reboot
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: star_ethernet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shinsuke IMAI
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-telnet
|