Class: NMEAPlus::Message::AIS::AISMessage

Inherits:
Base
  • Object
show all
Defined in:
lib/nmea_plus/message/ais/base_ais.rb

Overview

The base NMEA message type for AIS. This is currently a thin wrapper, as VDM is the only defined message type.

Direct Known Subclasses

VDM

Instance Attribute Summary collapse

Attributes inherited from Base

#checksum, #data_type, #fields, #interpreted_data_type, #message_number, #next_part, #original, #payload, #prefix, #total_messages

Method Summary

Methods inherited from Base

_float, _hex_to_integer, #_highest_contiguous_index, _integer, _interval_hms, _string, _utc_date_time, _utctime_hms, #add_message_part, #all_checksums_ok?, #all_messages_received?, #calculated_checksum, #checksum_ok?, degrees_minutes_to_decimal, field_reader, #highest_contiguous_index, nsew_signed_float

Instance Attribute Details

#message_typeString

The generic type of the NMEA message. NMEA message types are 5 characters (or so): the first 2 are the talker ID, and the remaining characters are the generic message type.

Returns:

  • (String)

    The two-character “talker ID” of the message



27
28
29
# File 'lib/nmea_plus/message/ais/base_ais.rb', line 27

def message_type
  data_type[2..-1]
end

#talkerString

The first two characters of the NMEA message type

Returns:

  • (String)

    The two-character “talker ID” of the message



18
19
20
# File 'lib/nmea_plus/message/ais/base_ais.rb', line 18

def talker
  data_type[0..1]
end