Class: Baykit::BayServer::WaterCraft::Yacht

Inherits:
Object
  • Object
show all
Includes:
Agent::Transporter::DataListener, Util, Util::Reusable
Defined in:
lib/baykit/bayserver/watercraft/yacht.rb

Direct Known Subclasses

Tours::SendFileYacht

Constant Summary collapse

YACHT_ID_NOCHECK =
-1
INVALID_YACHT_ID =
0

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Agent::Transporter::DataListener

#check_timeout, #notify_close, #notify_connect, #notify_eof, #notify_handshake_done, #notify_protocol_error, #notify_read

Constructor Details

#initializeYacht

Returns a new instance of Yacht.



31
32
33
34
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 31

def initialize()
  @object_id = Yacht.oid_counter.next()
  @yacht_id = INVALID_YACHT_ID
end

Class Attribute Details

.oid_counterObject (readonly)

Returns the value of attribute oid_counter.



18
19
20
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 18

def oid_counter
  @oid_counter
end

.yacht_id_counterObject (readonly)

Returns the value of attribute yacht_id_counter.



19
20
21
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 19

def yacht_id_counter
  @yacht_id_counter
end

Instance Attribute Details

#object_idObject (readonly)

Returns the value of attribute object_id.



25
26
27
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 25

def object_id
  @object_id
end

#yacht_idObject (readonly)

Returns the value of attribute yacht_id.



26
27
28
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 26

def yacht_id
  @yacht_id
end

Instance Method Details

#init_yachtObject



36
37
38
# File 'lib/baykit/bayserver/watercraft/yacht.rb', line 36

def init_yacht()
  @yacht_id = Yacht.yacht_id_counter.next()
end