Class: Interlnk::Packet::ServerInfoRequest
- Defined in:
- lib/interlnk/packet/serverinfo.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#developer ⇒ Object
Returns the value of attribute developer.
-
#device_driver ⇒ Object
Returns the value of attribute device_driver.
-
#last_server_id ⇒ Object
Returns the value of attribute last_server_id.
-
#max_ser_block ⇒ Object
Returns the value of attribute max_ser_block.
-
#os_type ⇒ Object
Returns the value of attribute os_type.
-
#product ⇒ Object
Returns the value of attribute product.
-
#version ⇒ Object
Returns the value of attribute version.
-
#want_supported ⇒ Object
Returns the value of attribute want_supported.
Instance Method Summary collapse
-
#initialize ⇒ ServerInfoRequest
constructor
A new instance of ServerInfoRequest.
- #raw ⇒ Object
Methods inherited from Request
Constructor Details
#initialize ⇒ ServerInfoRequest
Returns a new instance of ServerInfoRequest.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/interlnk/packet/serverinfo.rb', line 11 def initialize @os_type = 0 @developer = 0 @product = 0 @version = 0x100 @device_driver = 1 @want_supported = 0 @checksum = 0 @crc = 1 @max_ser_block = 8192 @client_id = rand(0xFFFF) @last_server_id = 0 end |
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
9 10 11 |
# File 'lib/interlnk/packet/serverinfo.rb', line 9 def client_id @client_id end |
#developer ⇒ Object
Returns the value of attribute developer.
6 7 8 |
# File 'lib/interlnk/packet/serverinfo.rb', line 6 def developer @developer end |
#device_driver ⇒ Object
Returns the value of attribute device_driver.
7 8 9 |
# File 'lib/interlnk/packet/serverinfo.rb', line 7 def device_driver @device_driver end |
#last_server_id ⇒ Object
Returns the value of attribute last_server_id.
9 10 11 |
# File 'lib/interlnk/packet/serverinfo.rb', line 9 def last_server_id @last_server_id end |
#max_ser_block ⇒ Object
Returns the value of attribute max_ser_block.
8 9 10 |
# File 'lib/interlnk/packet/serverinfo.rb', line 8 def max_ser_block @max_ser_block end |
#os_type ⇒ Object
Returns the value of attribute os_type.
6 7 8 |
# File 'lib/interlnk/packet/serverinfo.rb', line 6 def os_type @os_type end |
#product ⇒ Object
Returns the value of attribute product.
6 7 8 |
# File 'lib/interlnk/packet/serverinfo.rb', line 6 def product @product end |
#version ⇒ Object
Returns the value of attribute version.
7 8 9 |
# File 'lib/interlnk/packet/serverinfo.rb', line 7 def version @version end |
#want_supported ⇒ Object
Returns the value of attribute want_supported.
8 9 10 |
# File 'lib/interlnk/packet/serverinfo.rb', line 8 def want_supported @want_supported end |
Instance Method Details
#raw ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/interlnk/packet/serverinfo.rb', line 25 def raw [ @os_type, @developer, @product, @version, @device_driver, @want_supported, @checksum, @crc, @max_ser_block, '', @client_id, @last_server_id ].pack('vvvvCCCCva12VV') end |