We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm facing a TypeError "Cannot call method 'readDoubleBE' of undefined" with the follow buffer:
Offset 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 000000 82 B4 73 6F 75 72 63 65 5F 70 61 63 6B 65 74 5F .´source_packet_ 000010 68 65 61 64 65 72 83 A7 70 61 63 6B 5F 69 64 85 header.§pack_id. 000020 A7 76 65 72 73 5F 6E 6F 00 A9 70 61 63 6B 5F 74 §vers_no.©pack_t 000030 79 70 65 00 A3 64 66 68 01 A3 70 69 64 41 A4 70 ype.£dfh.£pidA¤p 000040 63 61 74 04 AD 70 61 63 6B 5F 73 65 71 5F 63 74 cat.pack_seq_ct 000050 72 6C 82 A9 73 65 71 5F 66 6C 61 67 73 03 A7 73 rl.©seq_flags.§s 000060 65 71 5F 63 6E 74 4B A8 70 61 63 6B 5F 6C 65 6E eq_cntK¨pack_len 000070 CD 01 09 B1 70 61 63 6B 65 74 5F 64 61 74 61 5F Í..±packet_data_ 000080 66 69 65 6C 64 82 B0 61 70 70 6C 69 63 61 74 69 field.°applicati 000090 6F 6E 5F 64 61 74 61 82 A3 73 69 64 06 A6 70 61 on_data.£sid.¦pa 0000A0 72 61 6D 73 81 A3 68 6B 36 DE 00 3F A9 62 65 6C rams.£hk6Þ.?©bel 0000B0 61 5F 6D 6F 64 65 30 A7 61 70 73 5F 76 65 72 11 a_mode0§aps_ver. 0000C0 A8 70 70 73 5F 74 69 6D 65 CE E5 00 00 20 AB 74 ¨pps_timeÎå.. «t 0000D0 63 5F 72 65 63 65 69 76 65 64 1A AB 74 63 5F 65 c_received.«tc_e 0000E0 78 65 63 75 74 65 64 1A AA 74 63 5F 65 72 72 5F xecuted.ªtc_err_ 0000F0 61 63 6B 00 AB 74 63 5F 65 72 72 5F 65 78 65 63 ack.«tc_err_exec 000100 00 A8 74 6D 5F 74 6F 74 61 6C CC C6 A7 74 6D 5F .¨tm_totalÌƧtm_ 000110 73 65 6E 74 CC C6 AA 74 6D 5F 64 72 6F 70 70 65 sentÌƪtm_droppe 000120 64 00 AB 74 6D 5F 62 75 66 66 65 72 65 64 00 AC d.«tm_buffered.¬ 000130 73 63 69 5F 74 6D 5F 74 6F 74 61 6C 3E AF 73 63 sci_tm_total>¯sc 000140 69 5F 74 6D 5F 61 63 63 65 70 74 65 64 3E AE 73 i_tm_accepted>®s 000150 63 69 5F 74 6D 5F 64 72 6F 70 70 65 64 00 AD 73 ci_tm_dropped.s 000160 63 69 5F 74 6D 5F 65 6E 61 62 6C 65 1F AA 73 63 ci_tm_enable.ªsc 000170 69 5F 74 6D 5F 70 69 64 42 AD 73 70 77 5F 6C 69 i_tm_pidBspw_li 000180 6E 6B 5F 73 74 61 74 05 AE 73 70 77 5F 74 69 6D nk_stat.®spw_tim 000190 65 5F 63 6F 64 65 73 CD 04 BE AB 73 70 77 5F 64 e_codesÍ.¾«spw_d 0001A0 6D 61 5F 65 72 72 00 AA 73 70 77 5F 74 78 5F 65 ma_err.ªspw_tx_e 0001B0 72 72 00 AA 73 70 77 5F 72 78 5F 65 72 72 00 AF rr.ªspw_rx_err.¯ 0001C0 65 64 61 63 5F 73 69 6E 67 6C 65 5F 65 72 72 00 edac_single_err. 0001D0 AD 65 64 61 63 5F 65 72 72 5F 73 74 61 74 00 AD edac_err_stat. 0001E0 65 64 61 63 5F 65 72 72 5F 61 64 64 72 00 AA 70 edac_err_addr.ªp 0001F0 63 6D 5F 74 78 5F 63 6E 74 CD 2B AE AA 70 63 6D cm_tx_cntÍ+®ªpcm 000200 5F 72 78 5F 63 6E 74 CD 2B AD AB 70 63 6D 5F 65 _rx_cntÍ+«pcm_e 000210 72 72 5F 63 6E 74 00 AD 70 63 6D 5F 65 72 72 5F rr_cnt.pcm_err_ 000220 66 6C 61 67 73 00 AA 6C 65 75 5F 74 78 5F 63 6E flags.ªleu_tx_cn 000230 74 CD 2F 69 AA 6C 65 75 5F 72 78 5F 63 6E 74 CD tÍ/iªleu_rx_cntÍ 000240 2F 69 AB 6C 65 75 5F 65 72 72 5F 63 6E 74 00 AD /i«leu_err_cnt. 000250 6C 65 75 5F 65 72 72 5F 66 6C 61 67 73 00 AA 72 leu_err_flags.ªr 000260 66 6D 5F 74 78 5F 63 6E 74 CD 09 E5 AA 72 66 6D fm_tx_cntÍ.åªrfm 000270 5F 72 78 5F 63 6E 74 CD 09 E1 AB 72 66 6D 5F 65 _rx_cntÍ.á«rfm_e 000280 72 72 5F 63 6E 74 00 AD 72 66 6D 5F 65 72 72 5F rr_cnt.rfm_err_ 000290 66 6C 61 67 73 00 AB 6F 72 62 69 74 5F 76 61 6C flags.«orbit_val 0002A0 69 64 00 AB 6F 72 62 69 74 5F 66 6C 61 67 73 03 id.«orbit_flags. 0002B0 AE 6F 72 62 69 74 5F 69 6E 74 65 72 76 61 6C CD ®orbit_intervalÍ 0002C0 03 E8 A9 63 61 6C 63 5F 74 69 6D 65 92 67 6B AD .è©calc_time.gk 0002D0 68 61 6C 66 5F 6F 72 62 69 74 5F 74 31 00 AD 68 half_orbit_t1.h 0002E0 61 6C 66 5F 6F 72 62 69 74 5F 74 32 00 AC 6F 66 alf_orbit_t2.¬of 0002F0 66 5F 6E 61 64 69 72 5F 74 31 00 AC 6F 66 66 5F f_nadir_t1.¬off_ 000300 6E 61 64 69 72 5F 74 32 00 AD 6F 72 62 69 74 5F nadir_t2.orbit_ 000310 74 69 6D 65 5F 74 61 82 A3 73 65 63 CE 52 14 E5 time_ta.£secÎR.å 000320 4D A4 6D 73 65 63 CC B4 AD 6F 72 62 69 74 5F 74 M¤msecÌ´orbit_t 000330 69 6D 65 5F 74 62 82 A3 73 65 63 CE 52 14 E5 4E ime_tb.£secÎR.åN 000340 A4 6D 73 65 63 CC B4 AD 6F 72 62 69 74 5F 64 69 ¤msecÌ´orbit_di 000350 73 74 5F 68 61 CB 00 00 00 00 00 00 00 00 AD 6F st_haË........o 000360 72 62 69 74 5F 64 69 73 74 5F 68 62 CB 00 00 00 rbit_dist_hbË... 000370 00 00 00 00 00 AD 6F 72 62 69 74 5F 64 69 73 74 .....orbit_dist 000380 5F 64 68 CB 00 00 00 00 00 00 00 00 AF 6F 72 62 _dhË........¯orb 000390 69 74 5F 70 6F 6C 79 6E 6F 6D 5F 61 CB 00 00 00 it_polynom_aË... 0003A0 00 00 00 00 00 AF 6F 72 62 69 74 5F 70 6F 6C 79 .....¯orbit_poly 0003B0 6E 6F 6D 5F 62 CB 00 00 00 00 00 00 00 00 A6 74 nom_bË........¦t 0003C0 63 5F 6C 6F 67 95 86 A4 74 69 6D 65 AB 30 3A 32 c_log..¤time«0:2 0003D0 30 3A 30 31 2E 37 35 31 A7 74 63 5F 73 74 61 74 0:01.751§tc_stat 0003E0 20 A9 74 63 5F 6C 65 6E 67 74 68 02 A7 74 63 5F ©tc_length.§tc_ 0003F0 74 79 70 65 CC BA AA 74 63 5F 73 75 62 74 79 70 type̺ªtc_subtyp 000400 65 19 A9 74 63 5F 70 61 72 61 6D 73 CE 01 00 00 e.©tc_paramsÎ... 000410 00 86 A4 74 69 6D 65 A4 30 3A 30 30 A7 74 63 5F ..¤time¤0:00§tc_ 000420 73 74 61 74 00 A9 74 63 5F 6C 65 6E 67 74 68 00 stat.©tc_length. 000430 A7 74 63 5F 74 79 70 65 00 AA 74 63 5F 73 75 62 §tc_type.ªtc_sub 000440 74 79 70 65 00 A9 74 63 5F 70 61 72 61 6D 73 00 type.©tc_params. 000450 86 A4 74 69 6D 65 A4 30 3A 30 30 A7 74 63 5F 73 .¤time¤0:00§tc_s 000460 74 61 74 00 A9 74 63 5F 6C 65 6E 67 74 68 00 A7 tat.©tc_length.§ 000470 74 63 5F 74 79 70 65 00 AA 74 63 5F 73 75 62 74 tc_type.ªtc_subt 000480 79 70 65 00 A9 74 63 5F 70 61 72 61 6D 73 00 86 ype.©tc_params.. 000490 A4 74 69 6D 65 A4 30 3A 30 30 A7 74 63 5F 73 74 ¤time¤0:00§tc_st 0004A0 61 74 00 A9 74 63 5F 6C 65 6E 67 74 68 00 A7 74 at.©tc_length.§t 0004B0 63 5F 74 79 70 65 00 AA 74 63 5F 73 75 62 74 79 c_type.ªtc_subty 0004C0 70 65 00 A9 74 63 5F 70 61 72 61 6D 73 00 86 A4 pe.©tc_params..¤ 0004D0 74 69 6D 65 A4 30 3A 30 30 A7 74 63 5F 73 74 61 time¤0:00§tc_sta 0004E0 74 00 A9 74 63 5F 6C 65 6E 67 74 68 00 A7 74 63 t.©tc_length.§tc 0004F0 5F 74 79 70 65 00 AA 74 63 5F 73 75 62 74 79 70 _type.ªtc_subtyp 000500 65 00 A9 74 63 5F 70 61 72 61 6D 73 00 A7 68 6B e.©tc_params.§hk 000510 5F 63 66 67 35 82 A6 73 69 64 5F 65 6E 51 AB 72 _cfg5.¦sid_enQ«r 000520 70 5F 69 6E 74 65 72 76 61 6C CD 01 E0 A7 68 6B p_intervalÍ.à§hk 000530 5F 63 66 67 36 82 A6 73 69 64 5F 65 6E 61 AB 72 _cfg6.¦sid_ena«r 000540 70 5F 69 6E 74 65 72 76 61 6C CD 01 E0 A7 68 6B p_intervalÍ.à§hk 000550 5F 63 66 67 37 82 A6 73 69 64 5F 65 6E 70 AB 72 _cfg7.¦sid_enp«r 000560 70 5F 69 6E 74 65 72 76 61 6C CD 01 E0 A7 68 6B p_intervalÍ.à§hk 000570 5F 63 66 67 38 82 A6 73 69 64 5F 65 6E CC 80 AB _cfg8.¦sid_enÌ.« 000580 72 70 5F 69 6E 74 65 72 76 61 6C 50 A7 68 6B 5F rp_intervalP§hk_ 000590 63 66 67 39 82 A6 73 69 64 5F 65 6E CC 90 AB 72 cfg9.¦sid_enÌ.«r 0005A0 70 5F 69 6E 74 65 72 76 61 6C 50 A8 68 6B 5F 63 p_intervalP¨hk_c 0005B0 66 67 31 30 82 A6 73 69 64 5F 65 6E CC A1 AB 72 fg10.¦sid_enÌ¡«r 0005C0 70 5F 69 6E 74 65 72 76 61 6C CD 01 E0 A8 68 6B p_intervalÍ.à¨hk 0005D0 5F 63 66 67 31 31 82 A6 73 69 64 5F 65 6E CC B1 _cfg11.¦sid_eṉ 0005E0 AB 72 70 5F 69 6E 74 65 72 76 61 6C CD 01 E0 A8 «rp_intervalÍ.ਠ0005F0 68 6B 5F 63 66 67 31 32 82 A6 73 69 64 5F 65 6E hk_cfg12.¦sid_en 000600 CC C0 AB 72 70 5F 69 6E 74 65 72 76 61 6C CD 01 ÌÀ«rp_intervalÍ. 000610 E0 A8 68 6B 5F 63 66 67 31 33 82 A6 73 69 64 5F à¨hk_cfg13.¦sid_ 000620 65 6E CC D1 AB 72 70 5F 69 6E 74 65 72 76 61 6C enÌÑ«rp_interval 000630 CD 01 E0 A8 68 6B 5F 63 66 67 31 34 82 A6 73 69 Í.à¨hk_cfg14.¦si 000640 64 5F 65 6E CC E1 AB 72 70 5F 69 6E 74 65 72 76 d_enÌá«rp_interv 000650 61 6C 50 A8 68 6B 5F 63 66 67 31 35 82 A6 73 69 alP¨hk_cfg15.¦si 000660 64 5F 65 6E CC F0 AB 72 70 5F 69 6E 74 65 72 76 d_enÌð«rp_interv 000670 61 6C CD 01 E0 B1 64 61 74 61 5F 66 69 65 6C 64 alÍ.à±data_field 000680 5F 68 65 61 64 65 72 86 A3 73 68 66 00 A8 70 75 _header.£shf.¨pu 000690 73 5F 76 65 72 73 01 AC 73 65 72 76 69 63 65 5F s_vers.¬service_ 0006A0 74 79 70 65 03 AF 73 65 72 76 69 63 65 5F 73 75 type.¯service_su 0006B0 62 74 79 70 65 19 A7 64 65 73 74 5F 69 64 00 A4 btype.§dest_id.¤ 0006C0 73 63 65 74 AB 31 36 3A 35 3A 33 33 2C 37 31 38 scet«16:5:33,718
The buffer should be valid, unpack using node-msgpack yields the correct object:
node-msgpack
{ "source_packet_header": { "pack_id": { "vers_no": 0, "pack_type": 0, "dfh": 1, "pid": 65, "pcat": 4 }, "pack_seq_ctrl": { "seq_flags": 3, "seq_cnt": 75 }, "pack_len": 265 }, "packet_data_field": { "application_data": { "sid": 6, "params": { "hk6": { "bela_mode": 48, "aps_ver": 17, "pps_time": 3841982496, "tc_received": 26, "tc_executed": 26, "tc_err_ack": 0, "tc_err_exec": 0, "tm_total": 198, "tm_sent": 198, "tm_dropped": 0, "tm_buffered": 0, "sci_tm_total": 62, "sci_tm_accepted": 62, "sci_tm_dropped": 0, "sci_tm_enable": 31, "sci_tm_pid": 66, "spw_link_stat": 5, "spw_time_codes": 1214, "spw_dma_err": 0, "spw_tx_err": 0, "spw_rx_err": 0, "edac_single_err": 0, "edac_err_stat": 0, "edac_err_addr": 0, "pcm_tx_cnt": 11182, "pcm_rx_cnt": 11181, "pcm_err_cnt": 0, "pcm_err_flags": 0, "leu_tx_cnt": 12137, "leu_rx_cnt": 12137, "leu_err_cnt": 0, "leu_err_flags": 0, "rfm_tx_cnt": 2533, "rfm_rx_cnt": 2529, "rfm_err_cnt": 0, "rfm_err_flags": 0, "orbit_valid": 0, "orbit_flags": 3, "orbit_interval": 1000, "calc_time": [ 103, 107 ], "half_orbit_t1": 0, "half_orbit_t2": 0, "off_nadir_t1": 0, "off_nadir_t2": 0, "orbit_time_ta": { "sec": 1377101133, "msec": 180 }, "orbit_time_tb": { "sec": 1377101134, "msec": 180 }, "orbit_dist_ha": 0, "orbit_dist_hb": 0, "orbit_dist_dh": 0, "orbit_polynom_a": 0, "orbit_polynom_b": 0, "tc_log": [ { "time": "0:20:01.751", "tc_stat": 32, "tc_length": 2, "tc_type": 186, "tc_subtype": 25, "tc_params": 16777216 }, { "time": "0:00", "tc_stat": 0, "tc_length": 0, "tc_type": 0, "tc_subtype": 0, "tc_params": 0 }, { "time": "0:00", "tc_stat": 0, "tc_length": 0, "tc_type": 0, "tc_subtype": 0, "tc_params": 0 }, { "time": "0:00", "tc_stat": 0, "tc_length": 0, "tc_type": 0, "tc_subtype": 0, "tc_params": 0 }, { "time": "0:00", "tc_stat": 0, "tc_length": 0, "tc_type": 0, "tc_subtype": 0, "tc_params": 0 } ], "hk_cfg5": { "sid_en": 81, "rp_interval": 480 }, "hk_cfg6": { "sid_en": 97, "rp_interval": 480 }, "hk_cfg7": { "sid_en": 112, "rp_interval": 480 }, "hk_cfg8": { "sid_en": 128, "rp_interval": 80 }, "hk_cfg9": { "sid_en": 144, "rp_interval": 80 }, "hk_cfg10": { "sid_en": 161, "rp_interval": 480 }, "hk_cfg11": { "sid_en": 177, "rp_interval": 480 }, "hk_cfg12": { "sid_en": 192, "rp_interval": 480 }, "hk_cfg13": { "sid_en": 209, "rp_interval": 480 }, "hk_cfg14": { "sid_en": 225, "rp_interval": 80 }, "hk_cfg15": { "sid_en": 240, "rp_interval": 480 } } } }, "data_field_header": { "shf": 0, "pus_vers": 1, "service_type": 3, "service_subtype": 25, "dest_id": 0, "scet": "16:5:33,718" } } }
I'm using version 0.3.0 with node 0.10.18:
npm list msgpack-js bela-packet@0.0.1 /home/alain/projects/node/bela-packet └── msgpack-js@0.3.0 -> /home/alain/.nvm/v0.10.18/lib/node_modules/msgpack-js
Best regards, Alain
The text was updated successfully, but these errors were encountered:
Thanks for the report. I'm out of town, but I'll look at this when I'm home again next week.
Sorry, something went wrong.
Add regression test for #10
36a2654
I can't reproduce the error. See above for the regression test I added. It parses just fine.
Feel free to reopen once you provide a failing test case.
No branches or pull requests
Hi,
I'm facing a TypeError "Cannot call method 'readDoubleBE' of undefined" with the follow buffer:
The buffer should be valid, unpack using
node-msgpack
yields the correct object:I'm using version 0.3.0 with node 0.10.18:
Best regards,
Alain
The text was updated successfully, but these errors were encountered: