nmea_plus 1.0.23 → 1.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/nmea_plus/ais_message_factory.rb +3 -4
- data/lib/nmea_plus/generated_parser/parser.rb +5 -5
- data/lib/nmea_plus/generated_parser/tokenizer.rb +1 -1
- data/lib/nmea_plus/message/ais/base_ais.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm.rb +25 -25
- data/lib/nmea_plus/message/ais/vdm_payload/payload.rb +2 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg.rb +2 -2
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg1.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg10.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg11.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg12.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg13.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg14.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg15.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg16.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg17.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg18.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg19.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg2.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg20.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg21.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg24.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg27.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg3.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg4.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg5.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg6.rb +8 -8
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg6_dynamic_payload.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg6d1022f61.rb +2 -2
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg6d1f0.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg6d1f2.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg6d1f3.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg6d1f4.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg6d1f5.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg6d235f10.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg7.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8.rb +6 -6
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8_dynamic_payload.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f0.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f22.rb +2 -2
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d366f56.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg9.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg_binary_acknowledgement.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg_class_b_cs_position.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg_station_report.rb +1 -1
- data/lib/nmea_plus/message/ais/vdo.rb +1 -1
- data/lib/nmea_plus/message/base.rb +4 -4
- data/lib/nmea_plus/message/nmea/aam.rb +1 -1
- data/lib/nmea_plus/message/nmea/alm.rb +1 -1
- data/lib/nmea_plus/message/nmea/apa.rb +1 -1
- data/lib/nmea_plus/message/nmea/apb.rb +1 -1
- data/lib/nmea_plus/message/nmea/base_nmea.rb +1 -1
- data/lib/nmea_plus/message/nmea/bec.rb +1 -1
- data/lib/nmea_plus/message/nmea/ber.rb +1 -1
- data/lib/nmea_plus/message/nmea/bod.rb +1 -1
- data/lib/nmea_plus/message/nmea/bpi.rb +1 -1
- data/lib/nmea_plus/message/nmea/bwc.rb +2 -2
- data/lib/nmea_plus/message/nmea/bwr.rb +1 -1
- data/lib/nmea_plus/message/nmea/bww.rb +2 -2
- data/lib/nmea_plus/message/nmea/dbk.rb +1 -1
- data/lib/nmea_plus/message/nmea/dbs.rb +2 -2
- data/lib/nmea_plus/message/nmea/dbt.rb +2 -2
- data/lib/nmea_plus/message/nmea/dcn.rb +1 -1
- data/lib/nmea_plus/message/nmea/dpt.rb +1 -1
- data/lib/nmea_plus/message/nmea/dru.rb +1 -1
- data/lib/nmea_plus/message/nmea/dtm.rb +1 -1
- data/lib/nmea_plus/message/nmea/fsi.rb +1 -1
- data/lib/nmea_plus/message/nmea/gbs.rb +1 -1
- data/lib/nmea_plus/message/nmea/gda.rb +1 -1
- data/lib/nmea_plus/message/nmea/gdf.rb +1 -1
- data/lib/nmea_plus/message/nmea/gdp.rb +1 -1
- data/lib/nmea_plus/message/nmea/gga.rb +1 -1
- data/lib/nmea_plus/message/nmea/gla.rb +1 -1
- data/lib/nmea_plus/message/nmea/glc.rb +1 -1
- data/lib/nmea_plus/message/nmea/glf.rb +1 -1
- data/lib/nmea_plus/message/nmea/gll.rb +1 -1
- data/lib/nmea_plus/message/nmea/glp.rb +1 -1
- data/lib/nmea_plus/message/nmea/gns.rb +1 -1
- data/lib/nmea_plus/message/nmea/goa.rb +1 -1
- data/lib/nmea_plus/message/nmea/gof.rb +1 -1
- data/lib/nmea_plus/message/nmea/gop.rb +1 -1
- data/lib/nmea_plus/message/nmea/grs.rb +1 -1
- data/lib/nmea_plus/message/nmea/gsa.rb +1 -1
- data/lib/nmea_plus/message/nmea/gst.rb +1 -1
- data/lib/nmea_plus/message/nmea/gsv.rb +1 -1
- data/lib/nmea_plus/message/nmea/gtd.rb +1 -1
- data/lib/nmea_plus/message/nmea/gxa.rb +1 -1
- data/lib/nmea_plus/message/nmea/gxf.rb +1 -1
- data/lib/nmea_plus/message/nmea/gxp.rb +1 -1
- data/lib/nmea_plus/message/nmea/hcc.rb +1 -1
- data/lib/nmea_plus/message/nmea/hcd.rb +1 -1
- data/lib/nmea_plus/message/nmea/hdg.rb +1 -1
- data/lib/nmea_plus/message/nmea/hdm.rb +1 -1
- data/lib/nmea_plus/message/nmea/hdt.rb +1 -1
- data/lib/nmea_plus/message/nmea/hfb.rb +1 -1
- data/lib/nmea_plus/message/nmea/hsc.rb +1 -1
- data/lib/nmea_plus/message/nmea/htc.rb +1 -1
- data/lib/nmea_plus/message/nmea/hvd.rb +1 -1
- data/lib/nmea_plus/message/nmea/hvm.rb +1 -1
- data/lib/nmea_plus/message/nmea/ima.rb +1 -1
- data/lib/nmea_plus/message/nmea/its.rb +1 -1
- data/lib/nmea_plus/message/nmea/lcd.rb +1 -1
- data/lib/nmea_plus/message/nmea/mda.rb +1 -1
- data/lib/nmea_plus/message/nmea/mhu.rb +1 -1
- data/lib/nmea_plus/message/nmea/mmb.rb +1 -1
- data/lib/nmea_plus/message/nmea/msk.rb +1 -1
- data/lib/nmea_plus/message/nmea/mss.rb +1 -1
- data/lib/nmea_plus/message/nmea/mta.rb +1 -1
- data/lib/nmea_plus/message/nmea/mtw.rb +1 -1
- data/lib/nmea_plus/message/nmea/mwh.rb +1 -1
- data/lib/nmea_plus/message/nmea/mws.rb +1 -1
- data/lib/nmea_plus/message/nmea/mwv.rb +1 -1
- data/lib/nmea_plus/message/nmea/oln.rb +1 -1
- data/lib/nmea_plus/message/nmea/olw.rb +1 -1
- data/lib/nmea_plus/message/nmea/omp.rb +1 -1
- data/lib/nmea_plus/message/nmea/onz.rb +1 -1
- data/lib/nmea_plus/message/nmea/osd.rb +1 -1
- data/lib/nmea_plus/message/nmea/proprietary/pashr.rb +1 -1
- data/lib/nmea_plus/message/nmea/r00.rb +1 -1
- data/lib/nmea_plus/message/nmea/rma.rb +1 -1
- data/lib/nmea_plus/message/nmea/rmb.rb +1 -1
- data/lib/nmea_plus/message/nmea/rmc.rb +1 -1
- data/lib/nmea_plus/message/nmea/rnn.rb +1 -1
- data/lib/nmea_plus/message/nmea/rot.rb +1 -1
- data/lib/nmea_plus/message/nmea/rpm.rb +1 -1
- data/lib/nmea_plus/message/nmea/rsa.rb +1 -1
- data/lib/nmea_plus/message/nmea/rsd.rb +1 -1
- data/lib/nmea_plus/message/nmea/rte.rb +1 -1
- data/lib/nmea_plus/message/nmea/sbk.rb +1 -1
- data/lib/nmea_plus/message/nmea/scd.rb +1 -1
- data/lib/nmea_plus/message/nmea/scy.rb +1 -1
- data/lib/nmea_plus/message/nmea/sdb.rb +1 -1
- data/lib/nmea_plus/message/nmea/sfi.rb +1 -1
- data/lib/nmea_plus/message/nmea/sgd.rb +1 -1
- data/lib/nmea_plus/message/nmea/sgr.rb +1 -1
- data/lib/nmea_plus/message/nmea/siu.rb +1 -1
- data/lib/nmea_plus/message/nmea/slc.rb +1 -1
- data/lib/nmea_plus/message/nmea/snc.rb +1 -1
- data/lib/nmea_plus/message/nmea/snu.rb +1 -1
- data/lib/nmea_plus/message/nmea/sps.rb +1 -1
- data/lib/nmea_plus/message/nmea/ssf.rb +1 -1
- data/lib/nmea_plus/message/nmea/stc.rb +1 -1
- data/lib/nmea_plus/message/nmea/stn.rb +1 -1
- data/lib/nmea_plus/message/nmea/str.rb +1 -1
- data/lib/nmea_plus/message/nmea/sys.rb +1 -1
- data/lib/nmea_plus/message/nmea/tds.rb +1 -1
- data/lib/nmea_plus/message/nmea/tec.rb +1 -1
- data/lib/nmea_plus/message/nmea/tep.rb +1 -1
- data/lib/nmea_plus/message/nmea/tfi.rb +1 -1
- data/lib/nmea_plus/message/nmea/tga.rb +1 -1
- data/lib/nmea_plus/message/nmea/tif.rb +1 -1
- data/lib/nmea_plus/message/nmea/tpc.rb +1 -1
- data/lib/nmea_plus/message/nmea/tpr.rb +1 -1
- data/lib/nmea_plus/message/nmea/tpt.rb +1 -1
- data/lib/nmea_plus/message/nmea/trf.rb +1 -1
- data/lib/nmea_plus/message/nmea/trp.rb +1 -1
- data/lib/nmea_plus/message/nmea/trs.rb +1 -1
- data/lib/nmea_plus/message/nmea/ttm.rb +1 -1
- data/lib/nmea_plus/message/nmea/vbw.rb +1 -1
- data/lib/nmea_plus/message/nmea/vcd.rb +1 -1
- data/lib/nmea_plus/message/nmea/vdr.rb +1 -1
- data/lib/nmea_plus/message/nmea/vhw.rb +1 -1
- data/lib/nmea_plus/message/nmea/vlw.rb +1 -1
- data/lib/nmea_plus/message/nmea/vpe.rb +1 -1
- data/lib/nmea_plus/message/nmea/vpw.rb +1 -1
- data/lib/nmea_plus/message/nmea/vta.rb +1 -1
- data/lib/nmea_plus/message/nmea/vtg.rb +1 -1
- data/lib/nmea_plus/message/nmea/vti.rb +1 -1
- data/lib/nmea_plus/message/nmea/vwe.rb +1 -1
- data/lib/nmea_plus/message/nmea/vwr.rb +1 -1
- data/lib/nmea_plus/message/nmea/vwt.rb +1 -1
- data/lib/nmea_plus/message/nmea/wcv.rb +1 -1
- data/lib/nmea_plus/message/nmea/wdc.rb +1 -1
- data/lib/nmea_plus/message/nmea/wdr.rb +1 -1
- data/lib/nmea_plus/message/nmea/wfm.rb +1 -1
- data/lib/nmea_plus/message/nmea/wnc.rb +1 -1
- data/lib/nmea_plus/message/nmea/wnr.rb +1 -1
- data/lib/nmea_plus/message/nmea/wpl.rb +1 -1
- data/lib/nmea_plus/message/nmea/xdr.rb +1 -1
- data/lib/nmea_plus/message/nmea/xte.rb +1 -1
- data/lib/nmea_plus/message/nmea/xtr.rb +1 -1
- data/lib/nmea_plus/message/nmea/ywp.rb +1 -1
- data/lib/nmea_plus/message/nmea/yws.rb +1 -1
- data/lib/nmea_plus/message/nmea/zaa.rb +1 -1
- data/lib/nmea_plus/message/nmea/zcd.rb +1 -1
- data/lib/nmea_plus/message/nmea/zda.rb +1 -1
- data/lib/nmea_plus/message/nmea/zev.rb +1 -1
- data/lib/nmea_plus/message/nmea/zfi.rb +1 -1
- data/lib/nmea_plus/message/nmea/zfo.rb +1 -1
- data/lib/nmea_plus/message/nmea/zlz.rb +1 -1
- data/lib/nmea_plus/message/nmea/zpi.rb +1 -1
- data/lib/nmea_plus/message/nmea/zta.rb +1 -1
- data/lib/nmea_plus/message/nmea/zte.rb +1 -1
- data/lib/nmea_plus/message/nmea/ztg.rb +1 -1
- data/lib/nmea_plus/message/nmea/zti.rb +1 -1
- data/lib/nmea_plus/message/nmea/zwp.rb +1 -1
- data/lib/nmea_plus/message/nmea/zzu.rb +1 -1
- data/lib/nmea_plus/nmea_message_factory.rb +151 -151
- data/lib/nmea_plus/version.rb +1 -1
- metadata +2 -2
@@ -19,7 +19,7 @@ module NMEAPlus
|
|
19
19
|
# having to name the entire function. field_reader is a static method, so if not for the fact that
|
20
20
|
# `self.class.methods.include? formatter` fails to work for class methods in this context (unlike
|
21
21
|
# `self.methods.include?`, which properly finds instance methods), I would allow either one and just
|
22
|
-
# conditionally `
|
22
|
+
# conditionally `define_method` the proper definition
|
23
23
|
#
|
24
24
|
# @param name [String] What the accessor will be called
|
25
25
|
# @param field_num [Integer] The index of the field in the payload
|
@@ -27,12 +27,12 @@ module NMEAPlus
|
|
27
27
|
# @return [void]
|
28
28
|
# @macro [attach] field_reader
|
29
29
|
# @!attribute [r] $1
|
30
|
-
# @return field $2 of the payload, formatted with the function {
|
30
|
+
# @return field $2 of the payload, formatted with the function {$3}
|
31
31
|
def self.field_reader(name, field_num, formatter = nil)
|
32
32
|
if formatter.nil?
|
33
|
-
|
33
|
+
define_method(name) { @fields[field_num] }
|
34
34
|
else
|
35
|
-
|
35
|
+
define_method(name) { self.class.send(formatter.to_sym, @fields[field_num]) }
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|