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

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

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

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

Instance Attribute Details

#message_typeString

NMEA (AIS) message types are 5 characters (or so), the last of which are the message type

Returns:

  • (String)

    The two-character “talker ID” of the message



20
21
22
# File 'lib/nmea_plus/message/ais/base_ais.rb', line 20

def message_type
  data_type[2..-1]
end

#talkerString

NMEA (AIS) message types are 5 characters, the first 2 of which are the talker ID

Returns:

  • (String)

    The two-character “talker ID” of the message



13
14
15
# File 'lib/nmea_plus/message/ais/base_ais.rb', line 13

def talker
  data_type[0..1]
end