Class: MsgAckCancelSpeech
- Inherits:
-
Object
- Object
- MsgAckCancelSpeech
- Defined in:
- lib/haruzira_sdk/MsgAckCancelSpeech.rb
Overview
<summary> 読み上げ取り消し応答メッセージ(0x14) </summary>
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#INDEX_ID ⇒ Object
readonly
アクセサ定義(メンバーIndex offset).
-
#INDEX_RESULT ⇒ Object
readonly
アクセサ定義(メンバーIndex offset).
-
#INDEX_TIME_STAMP ⇒ Object
readonly
アクセサ定義(メンバーIndex offset).
-
#result ⇒ Object
アクセサ定義.
-
#RESULT_NG_READED ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#RESULT_NG_UNKNOWN ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#RESULT_OK_READING ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#RESULT_OK_UNREAD ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#time_stamp ⇒ Object
アクセサ定義.
-
#total_len ⇒ Object
readonly
Returns the value of attribute total_len.
Instance Method Summary collapse
-
#initialize ⇒ MsgAckCancelSpeech
constructor
A new instance of MsgAckCancelSpeech.
-
#makeSendData ⇒ Object
<summary> 送信データ生成 </summary> <returns>生成データサイズ, 生成データ</returns>.
Constructor Details
#initialize ⇒ MsgAckCancelSpeech
Returns a new instance of MsgAckCancelSpeech.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 10 def initialize() #region 変数・定数定義 #メンバーIndex offset定義 @INDEX_ID = 0 #メッセージID @INDEX_RESULT = 1 #結果 @INDEX_TIME_STAMP = 2 #タイムスタンプ(00:00:00) # <summary> # 送信メンバデータ値定義 # </summary> #結果 @RESULT_OK_UNREAD = 0x00 #成功(読み上げ前) @RESULT_OK_READING = 0x01 #成功(読み上げ中) @RESULT_NG_READED = 0x02 #失敗(読み上げ済み) @RESULT_NG_UNKNOWN = 0x03 #失敗(その他要因) @id = MSG_ACK_CANCEL_READING #メッセージID @result = RESULT_OK_UNREAD #結果 @time_stamp = Array.new(8, 0x00) #タイムスタンプ(00:00:00) @total_len = 10 #送信フィールド合計サイズ #endregion end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
41 42 43 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 41 def id @id end |
#INDEX_ID ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
34 35 36 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 34 def INDEX_ID @INDEX_ID end |
#INDEX_RESULT ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
34 35 36 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 34 def INDEX_RESULT @INDEX_RESULT end |
#INDEX_TIME_STAMP ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
34 35 36 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 34 def INDEX_TIME_STAMP @INDEX_TIME_STAMP end |
#result ⇒ Object
アクセサ定義
40 41 42 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 40 def result @result end |
#RESULT_NG_READED ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
37 38 39 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 37 def RESULT_NG_READED @RESULT_NG_READED end |
#RESULT_NG_UNKNOWN ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
37 38 39 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 37 def RESULT_NG_UNKNOWN @RESULT_NG_UNKNOWN end |
#RESULT_OK_READING ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
37 38 39 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 37 def RESULT_OK_READING @RESULT_OK_READING end |
#RESULT_OK_UNREAD ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
37 38 39 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 37 def RESULT_OK_UNREAD @RESULT_OK_UNREAD end |
#time_stamp ⇒ Object
アクセサ定義
40 41 42 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 40 def time_stamp @time_stamp end |
#total_len ⇒ Object (readonly)
Returns the value of attribute total_len.
41 42 43 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 41 def total_len @total_len end |
Instance Method Details
#makeSendData ⇒ Object
<summary> 送信データ生成</summary> <returns>生成データサイズ, 生成データ</returns>
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/haruzira_sdk/MsgAckCancelSpeech.rb', line 48 def makeSendData() len = @total_len data = nil begin data = [@id] + [@result] + @time_stamp rescue Exception => ex p ex len = 0 ensure return len, data end end |