Class: MsgNotifyEndComm
- Inherits:
-
Object
- Object
- MsgNotifyEndComm
- Defined in:
- lib/haruzira_sdk/MsgNotifyEndComm.rb
Overview
<summary> 通信終了通知メッセージ(0x01) </summary>
Instance Attribute Summary collapse
-
#end_code ⇒ Object
アクセサ定義.
-
#END_CODE_NG ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#END_CODE_OK ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#err_code ⇒ Object
アクセサ定義.
-
#ERR_CODE_NONE ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#ERR_CODE_OTHER_REASONS ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#ERR_CODE_RCV_DATA ⇒ Object
readonly
アクセサ定義(送信メンバデータ値).
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#INDEX_END_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 ⇒ MsgNotifyEndComm
constructor
A new instance of MsgNotifyEndComm.
-
#makeSendData ⇒ Object
<summary> 送信データ生成 </summary> <returns>生成データサイズ, 生成データ</returns>.
Constructor Details
#initialize ⇒ MsgNotifyEndComm
Returns a new instance of MsgNotifyEndComm.
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 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 10 def initialize() #region 変数・定数定義 #メンバーIndex offset定義 @INDEX_ID = 0 #メッセージID @INDEX_END_CODE = 1 #終了コード @INDEX_ERR_CODE = 2 #NGコード(異常時) @INDEX_PADDING = 3 #アライメント # <summary> # 送信メンバデータ値定義 # </summary> #終了コード @END_CODE_OK = 0x00 #正常 @END_CODE_NG = 0x01 #異常 #NGコード(異常時) @ERR_CODE_NONE = 0x00 #エラーなし(正常終了) @ERR_CODE_RCV_DATA = 0x01 #受信データエラー @ERR_CODE_OTHER_REASONS = 0x02 #その他原因によるエラー @id = MSG_NOTIFY_END_COMM #メッセージID @end_code = 0x00 #終了コード @err_code = 0x00 #NGコード(異常時) @padding = Array.new(5, 0x00) #アライメント @total_len = 8 #送信フィールド合計サイズ #endregion end |
Instance Attribute Details
#end_code ⇒ Object
アクセサ定義
44 45 46 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 44 def end_code @end_code end |
#END_CODE_NG ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
41 42 43 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 41 def END_CODE_NG @END_CODE_NG end |
#END_CODE_OK ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
41 42 43 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 41 def END_CODE_OK @END_CODE_OK end |
#err_code ⇒ Object
アクセサ定義
44 45 46 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 44 def err_code @err_code end |
#ERR_CODE_NONE ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
41 42 43 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 41 def ERR_CODE_NONE @ERR_CODE_NONE end |
#ERR_CODE_OTHER_REASONS ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
41 42 43 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 41 def ERR_CODE_OTHER_REASONS @ERR_CODE_OTHER_REASONS end |
#ERR_CODE_RCV_DATA ⇒ Object (readonly)
アクセサ定義(送信メンバデータ値)
41 42 43 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 41 def ERR_CODE_RCV_DATA @ERR_CODE_RCV_DATA end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
45 46 47 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 45 def id @id end |
#INDEX_END_CODE ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
38 39 40 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 38 def INDEX_END_CODE @INDEX_END_CODE end |
#INDEX_ERR_CODE ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
38 39 40 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 38 def INDEX_ERR_CODE @INDEX_ERR_CODE end |
#INDEX_ID ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
38 39 40 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 38 def INDEX_ID @INDEX_ID end |
#INDEX_PADDING ⇒ Object (readonly)
アクセサ定義(メンバーIndex offset)
38 39 40 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 38 def INDEX_PADDING @INDEX_PADDING end |
#padding ⇒ Object
アクセサ定義
44 45 46 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 44 def padding @padding end |
#total_len ⇒ Object (readonly)
Returns the value of attribute total_len.
45 46 47 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 45 def total_len @total_len end |
Instance Method Details
#makeSendData ⇒ Object
<summary> 送信データ生成</summary> <returns>生成データサイズ, 生成データ</returns>
52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/haruzira_sdk/MsgNotifyEndComm.rb', line 52 def makeSendData() len = @total_len data = nil begin data = [@id] + [@end_code] + [@err_code] + @padding rescue Exception => ex p ex len = 0 ensure return len, data end end |