Class: NMEAPlus::Message::AIS::VDMPayload::SubArea

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

Overview

A sub-structure in a payload: 87 bits describing a shape

Direct Known Subclasses

SubArea5, SubAreaScaled, SubAreaUndefined

Instance Attribute Summary collapse

Attributes inherited from Payload

#fill_bits, #payload_bitstring

Method Summary

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

#shape_descriptionString (readonly)

Returns Shape description.

Returns:

  • (String)

    Shape description



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 13

def shape_description
  case shape_id
  when 0 then "Circle or point"
  when 1 then "Rectangle"
  when 2 then "Sector"
  when 3 then "Polyline"
  when 4 then "Polygon"
  when 5 then "Associated text"
  when 6, 7 then "Reserved"
  end
end

#shape_idObject (readonly)

Returns The field defined by the 3 bits starting at payload bit 0, formatted with the function Payload#_e(, , ).

Returns:

  • The field defined by the 3 bits starting at payload bit 0, formatted with the function Payload#_e(, , )



9
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 9

payload_reader :shape_id, 0, 3, :_e