Class: NMEAPlus::Message::AIS::VDMPayload::VDMMsg6

Inherits:
VDMMsg
  • Object
show all
Defined in:
lib/nmea_plus/message/ais/vdm_payload/vdm_msg6.rb

Overview

AIS Type 6: Binary Addressed Message

Instance Attribute Summary collapse

Attributes inherited from VDMMsg

#message_type, #repeat_indicator, #source_mmsi, #source_mmsi_info

Attributes inherited from Payload

#fill_bits, #payload_bitstring

Instance Method Summary collapse

Methods inherited from VDMMsg

#auxiliary_craft?, #get_navigational_status_description, #get_ship_cargo_type_description

Methods inherited from Payload

#_2b_data_string, #_6b_ascii, #_6b_boolean, #_6b_integer, #_6b_integer_scaled, #_6b_integer_scaled_shifted, #_6b_negated_boolean, #_6b_string, #_6b_string_nullterminated, #_6b_unsigned_integer, #_6b_unsigned_integer_scaled, #_6b_unsigned_integer_scaled_shifted, #_8b_data_string, #_access, #_bit_slices, #_get_date_mdhm, #_object_by_name, #initialize, payload_reader

Constructor Details

This class inherits a constructor from NMEAPlus::Message::AIS::VDMPayload::Payload

Instance Attribute Details

#designated_area_codeObject (readonly)

Returns The field defined by the 10 bits starting at payload bit 72, formatted with the function Payload#_u(, , ).

Returns:

  • The field defined by the 10 bits starting at payload bit 72, formatted with the function Payload#_u(, , )



21
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg6.rb', line 21

payload_reader :designated_area_code, 72, 10, :_u

#destination_mmsiObject (readonly)

Returns The field defined by the 30 bits starting at payload bit 40, formatted with the function Payload#_u(, , ).

Returns:

  • The field defined by the 30 bits starting at payload bit 40, formatted with the function Payload#_u(, , )



19
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg6.rb', line 19

payload_reader :destination_mmsi, 40, 30, :_u

#dpVDMMsg6DynamicPayload (readonly)

Dynamic Payload containing fields for the appropriate message 6 subtype. This is a factory method for the container class



28
29
30
31
32
33
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg6.rb', line 28

def dp
  ret = _dynamic_payload_container
  ret.payload_bitstring = payload_bitstring
  ret.fill_bits = fill_bits
  ret
end

#functional_idObject (readonly)

Returns The field defined by the 6 bits starting at payload bit 82, formatted with the function Payload#_u(, , ).

Returns:

  • The field defined by the 6 bits starting at payload bit 82, formatted with the function Payload#_u(, , )



22
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg6.rb', line 22

payload_reader :functional_id, 82, 6, :_u

#retransmitted?Object (readonly)

Returns The field defined by the 1 bits starting at payload bit 70, formatted with the function Payload#_b(, , ).

Returns:

  • The field defined by the 1 bits starting at payload bit 70, formatted with the function Payload#_b(, , )



20
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg6.rb', line 20

payload_reader :retransmitted?, 70, 1, :_b

#sequence_numberObject (readonly)

Returns The field defined by the 2 bits starting at payload bit 38, formatted with the function Payload#_u(, , ).

Returns:

  • The field defined by the 2 bits starting at payload bit 38, formatted with the function Payload#_u(, , )



18
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg6.rb', line 18

payload_reader :sequence_number, 38, 2, :_u

Instance Method Details

#_dynamic_payload_containerObject

Dynamically calculate what message subtype to use which depends on the designated_area_code and functional_id



37
38
39
40
41
42
43
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg6.rb', line 37

def _dynamic_payload_container
  class_identifier = "NMEAPlus::Message::AIS::VDMPayload::VDMMsg6d#{designated_area_code}f#{functional_id}"
  ret = _object_by_name(class_identifier)
  return ret unless ret.nil?

  _object_by_name("NMEAPlus::Message::AIS::VDMPayload::VDMMsg6Undefined") # generic
end