haruzira_sdk 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f82f2266bddc164b249e2716093cfc60dae0cb73
4
+ data.tar.gz: e5cc8caf2f720464ccd714a87399b1291b235dcb
5
+ SHA512:
6
+ metadata.gz: ce08fb733592d339ba31ebbc1e7e38f66734022628c91ddab0a251c81bdaaa55b6ebab21a915343b3ddf3c7f60aee7780b80621b6e73c7d943c1b2a581918ce2
7
+ data.tar.gz: 6a2a721682841c514a4c08c9d8cef62259582ede55d20b58f1dd26fd75e3c9c71fe504d865e409fe298444a3c24081e6cf93cee46ebfc4010e203f73802802ef
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.0
5
+ before_install: gem install bundler -v 1.12.5
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at git@symmetry-soft.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in haruzira_sdk.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # HaruziraSdk
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/haruzira_sdk`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'haruzira_sdk'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install haruzira_sdk
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/haruzira_sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "haruzira_sdk"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'haruzira_sdk/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "haruzira_sdk"
8
+ spec.version = HaruziraSdk::VERSION
9
+ spec.authors = ["Symmetry Soft"]
10
+ spec.email = ["git@symmetry-soft.com"]
11
+
12
+ spec.summary = %q{SDK for Haruzira UWP application.}
13
+ spec.description = %q{This gem is a SDK for Haruzira to text to remote speech.}
14
+ spec.homepage = ""
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ #if spec.respond_to?(:metadata)
19
+ # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
20
+ #else
21
+ # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
22
+ #end
23
+
24
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ["lib"]
28
+
29
+ spec.add_development_dependency "bundler", "~> 1.12"
30
+ spec.add_development_dependency "rake", "~> 10.0"
31
+ spec.add_development_dependency "rspec", "~> 3.0"
32
+ end
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/ruby
2
+ # -*- coding: utf-8 -*-
3
+
4
+ #module HaruZiraMessage
5
+ #region メッセージID
6
+ MSG_REQ_START_COMM = 0x00
7
+ MSG_ACK_START_COMM = 0x10
8
+ MSG_NOTIFY_END_COMM = 0x01
9
+ MSG_NOTIFY_CONTROL_COMMAND = 0x02
10
+ MSG_SEND_SPEECH_DATA = 0x03
11
+ MSG_NOTIFY_STOP_COMM = 0x11
12
+ MSG_ACK_SEND_SPEECH_DATA = 0x12
13
+ MSG_NOTIFY_COMPLETE_SPEECH = 0x13
14
+ MSG_REQ_CANCEL_READING = 0x04
15
+ MSG_ACK_CANCEL_READING = 0x14
16
+ MSG_CLIENT_OFFLINE = 0x99
17
+ MSG_CLIENT_NONE_MESSAGE = 0xaa
18
+ MSG_SEND_SPEECH_DATA_AUTO = 0x50 #Debug用
19
+ #endregion
20
+
21
+ #region 変数・定数定義
22
+ RECEIVE_POLLING_TIME_OUT = 2 #2秒
23
+ RECEIVE_TIME_OUT = 30 #30秒
24
+ RECEIVE_MAX_TIME_OUT = 60 #60秒
25
+ RECEIVE_MIN_TIME_OUT = 10 #10秒
26
+ WRITE_TIME_OUT = 10 #10秒
27
+ SEND_TIME_OUT = 10 #10秒
28
+ THREAD_JOIN_TIME_OUT = 5 #5秒
29
+ SEND_READ_DATA_MAX_SIZE = 1024
30
+ #@SEND_READ_DATA_MAX_SIZE = 12
31
+ RECEIVE_RETRY_MAX_COUNT = 3
32
+ HRSEULT_SOCKET_CLOSED = -2147483629
33
+
34
+ #共通エラーメッセージ
35
+ HZ_ERROR_RECEIVE_TIMEOUT = 0x01; #応答受信タイムアウト
36
+ HZ_ERROR_OTHER_REASON = 0x99; #その他理由
37
+ #endregion
38
+
39
+
40
+ #end
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/ruby
2
+ # -*- coding: utf-8 -*-
3
+
4
+ require "haruzira_sdk/HzTrace"
5
+ require "haruzira_sdk/HaruziraMessage"
6
+ require "haruzira_sdk/MsgReqStartComm"
7
+ require "haruzira_sdk/MsgAckStartComm"
8
+ require "haruzira_sdk/MsgNotifyEndComm"
9
+ require "haruzira_sdk/MsgSendSpeechData"
10
+ require "haruzira_sdk/MsgAckSendSpeechData"
11
+ require "haruzira_sdk/MsgNotifyCompleteSpeech"
12
+ require "haruzira_sdk/MsgNotifyStopComm"
13
+ require "haruzira_sdk/MsgReqCancelReading"
14
+ require "haruzira_sdk/MsgAckCancelReading"
15
+ require "haruzira_sdk/HzClientTcpCommunication"
16
+ require "haruzira_sdk/HzEncryption"
17
+