Class: MsgAckSendSpeechData
- Inherits:
-
Object
- Object
- MsgAckSendSpeechData
- Defined in:
- lib/haruzira_sdk/MsgAckSendSpeechData.rb
Overview
<summary> 読み上げデータ送信応答メッセージ(0x11) </summary>
Instance Attribute Summary collapse
-
#ack_code ⇒ Object
アクセサ定義.
-
#ACK_CODE_NG ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#ACK_CODE_OK ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#err_code ⇒ Object
アクセサ定義.
-
#ERR_CODE_BUFFER_FULL ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#ERR_CODE_CREATE_ACK_DATA ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#ERR_CODE_DECODE_ENC ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#ERR_CODE_ENCRIPTION_DISABLE ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#ERR_CODE_NONE ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#ERR_CODE_OTHER_REASONS ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#ERR_CODE_RCV_DATA ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#ERR_CODE_UNKNOWN_IP ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#INDEX_ACK_CODE ⇒ Object
readonly
アクセサ定義(メンバーIndex offset).
-
#INDEX_ERR_CODE ⇒ Object
readonly
アクセサ定義(メンバーIndex offset).
-
#INDEX_ID ⇒ Object
readonly
アクセサ定義(メンバーIndex offset).
-
#INDEX_PADDING ⇒ Object
readonly
アクセサ定義(メンバーIndex offset).
-
#padding ⇒ Object
アクセサ定義.
-
#total_len ⇒ Object
readonly
Returns the value of attribute total_len.
Instance Method Summary collapse
-
#initialize ⇒ MsgAckSendSpeechData
constructor
A new instance of MsgAckSendSpeechData.
-
#makeSendData ⇒ Object
<summary> 送信データ生成 </summary> <returns>生成データサイズ, 生成データ</returns>.
Constructor Details
#initialize ⇒ MsgAckSendSpeechData
Returns a new instance of MsgAckSendSpeechData.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 10 def initialize() #region 変数・定数定義 #メンバーIndex offset定義 @INDEX_ID = 0 #メッセージID @INDEX_ACK_CODE = 1 #応答コード @INDEX_ERR_CODE = 2 #エラーコード(異常時) @INDEX_PADDING = 3 #アライメント # <summary> # 送信メンバデータ値定義 # </summary> #応答コード @ACK_CODE_OK = 0x00 #正常 @ACK_CODE_NG = 0x01 #異常 #エラーコード(異常時) @ERR_CODE_NONE = 0x00 #エラーなし @ERR_CODE_RCV_DATA = 0x01 #受信データエラー @ERR_CODE_CREATE_ACK_DATA = 0x02 #応答データ生成エラー @ERR_CODE_DECODE_ENC = 0x03 #暗号化データ復号エラー @ERR_CODE_UNKNOWN_IP = 0x04 #IPアドレスが不正 @ERR_CODE_ENCRIPTION_DISABLE = 0x05 #暗号化無効(パスワード認証が無効) @ERR_CODE_BUFFER_FULL = 0x06 #バッファーフル @ERR_CODE_OTHER_REASONS = 0x10 #その他原因によるエラー @id = MSG_ACK_SEND_SPEECH_DATA #メッセージID @ack_code = 0x00 #応答コード @err_code = 0x00 #エラーコード(異常時) @padding = Array.new(5, 0x00) #アライメント @total_len = 8 #送信フィールド合計サイズ #endregion end |
Instance Attribute Details
#ack_code ⇒ Object
アクセサ定義
52 53 54 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 52 def ack_code @ack_code end |
#ACK_CODE_NG ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
47 48 49 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 47 def ACK_CODE_NG @ACK_CODE_NG end |
#ACK_CODE_OK ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
47 48 49 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 47 def ACK_CODE_OK @ACK_CODE_OK end |
#err_code ⇒ Object
アクセサ定義
52 53 54 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 52 def err_code @err_code end |
#ERR_CODE_BUFFER_FULL ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
47 48 49 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 47 def ERR_CODE_BUFFER_FULL @ERR_CODE_BUFFER_FULL end |
#ERR_CODE_CREATE_ACK_DATA ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
47 48 49 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 47 def ERR_CODE_CREATE_ACK_DATA @ERR_CODE_CREATE_ACK_DATA end |
#ERR_CODE_DECODE_ENC ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
47 48 49 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 47 def ERR_CODE_DECODE_ENC @ERR_CODE_DECODE_ENC end |
#ERR_CODE_ENCRIPTION_DISABLE ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
47 48 49 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 47 def ERR_CODE_ENCRIPTION_DISABLE @ERR_CODE_ENCRIPTION_DISABLE end |
#ERR_CODE_NONE ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
47 48 49 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 47 def ERR_CODE_NONE @ERR_CODE_NONE end |
#ERR_CODE_OTHER_REASONS ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
47 48 49 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 47 def ERR_CODE_OTHER_REASONS @ERR_CODE_OTHER_REASONS end |
#ERR_CODE_RCV_DATA ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
47 48 49 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 47 def ERR_CODE_RCV_DATA @ERR_CODE_RCV_DATA end |
#ERR_CODE_UNKNOWN_IP ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
47 48 49 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 47 def ERR_CODE_UNKNOWN_IP @ERR_CODE_UNKNOWN_IP end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
53 54 55 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 53 def id @id end |
#INDEX_ACK_CODE ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
44 45 46 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 44 def INDEX_ACK_CODE @INDEX_ACK_CODE end |
#INDEX_ERR_CODE ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
44 45 46 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 44 def INDEX_ERR_CODE @INDEX_ERR_CODE end |
#INDEX_ID ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
44 45 46 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 44 def INDEX_ID @INDEX_ID end |
#INDEX_PADDING ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
44 45 46 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 44 def INDEX_PADDING @INDEX_PADDING end |
#padding ⇒ Object
アクセサ定義
52 53 54 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 52 def padding @padding end |
#total_len ⇒ Object (readonly)
Returns the value of attribute total_len.
53 54 55 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 53 def total_len @total_len end |
Instance Method Details
#makeSendData ⇒ Object
<summary> 送信データ生成</summary> <returns>生成データサイズ, 生成データ</returns>
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/haruzira_sdk/MsgAckSendSpeechData.rb', line 60 def makeSendData() len = @total_len data = nil begin data = [@id] + [@ack_code] + [@err_code] + @padding rescue Exception => ex p ex len = 0 ensure return len, data end end |