问题标签 [legato]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
60 浏览

ruby - Legato totalEvents 与 Web 界面不同

我正在使用 Legato gem 从 Ruby 中的 Google Analytics 访问某个事件的总数,但我得到的结果与 Web 界面不一致。

我有一个这样的模型:

...然后我通过这样做来使用它:

...并查看totalEvents统计数据。

当我在一月份传递日期时,例如start_date = "2014-01-01".to_date然后end_date = "2014-01-31".to_date它工作正常,并将相同数量的返回totalEvents到谷歌分析网络界面。

但是,当我在上个月使用它时,start_date = "2014-07-01".to_dateend_date = "2014-07-31".to_date比在 Web 界面中要少得多(Legato 在 Web 界面中返回 555 与 662)。

It makes me wonder if it's something to do with British Summer Time (I'm currently in UTC+1) except that even extending the date range by a day either side doesn't bring it up to the same as what the web interface reports, which would appear to rule that out.

Any thoughts much appreciated!

0 投票
2 回答
742 浏览

amazon-web-services - MQTT 无法连接到后端 AWS IoT 核心

更新:我正在尝试连接到后端(AWS IoT Core),因为我正在使用一个运行着busybox图像的小型wp77。使用 8883 端口时,连接超时,所以我已更改为端口 443,我可以连接到后端,但在尝试 3 次后,套接字仍然关闭。这是我的应用程序的日志读数:

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqttMain[2717] | DSC 已连接...开始 MQTT 连接

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqttMain[2717] |

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqttMain[2717] |

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqttMain[2717]/mqttCliSvrComponent T=main | mqttCliSvr.c DcsStateHandler() 317 | rmnet_data0 已连接!开始 MQTT 会话

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqttClient[1120]/mqttClientApiComponent T=main | mqttClientApi.c mqttClient_StartSession() 452 | 调用 StartSession

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqttClient[1120]/mqttClientApiComponent T=main | mqttClientApi.c mqttClient_StartSession() 455 | mqttClientPts 不为空

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqtt客户端[1120] | mqtt_StartSession... 正在连接...

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqtt客户端[1120] | . 播种随机数生成器...好的

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqtt客户端[1120] | . 加载 CA 根证书 ...从证书加载证书 ok(跳过 0 个)

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqtt客户端[1120] | . 正在加载客户端证书... /home/root/aws-iot/xxxxxx-certificate.pem.crt ok

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqtt客户端[1120] | . 正在加载客户端私钥... /home/root/aws-iot/xxxxxx-private.pem.key ok

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqtt客户端[1120] | . 正在连接到 tcp/xxxxxx-ats.iot.ap-southeast-1.amazonaws.com/443...

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqtt客户端[1120] | 好的

8 月 14 日 03:29:13 fx30s user.info 连奏:信息 | mqtt客户端[1120] | . 设置 TLS 结构...好的

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | . 执行 TLS 握手...好的

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | [ 协议为 TLSv1.2 ]

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | [密码套件是 TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256]

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | . 正在验证对等 X.509 证书...好的

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | 客户编号:FX30S

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | 用户名 :

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | 正在尝试 (1/3) 连接到 tcp://xxxxxx-ats.iot.ap-southeast-1.amazonaws.com:443...

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | 检查连接选项。

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | MQTT 序列化连接。

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | MQTT 发送数据包。

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | 发送的字节数:31

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | 发送的总字节数:31 个,共 31 个

8 月 14 日 03:29:15 fx30s user.info 连奏:信息 | mqtt客户端[1120] | MQTT 等待 CONNACK

8 月 14 日 03:29:20 fx30s user.info 连奏:信息 | mqtt客户端[1120] | MQTT 现在以 -1 退出

8 月 14 日 03:29:20 fx30s user.info 连奏:信息 | mqtt客户端[1120] | 失败的

8 月 14 日 03:29:20 fx30s user.info 连奏:信息 | mqtt客户端[1120] | tlsSocket_close 1

这是代码,我从 github 获取的,只是在我的设备上测试...

由于某种原因,后端没有确认与 CONNACK 的连接,这就是失败的原因。AWS 指定在通过端口 443 连接到后端时使用 APLN,所以我想知道这是否是问题所在以及如何在 paho.mqtt.c 上为 tls 指定此协议(我知道 python 有解决方案!!)。

谢谢您的帮助。

0 投票
1 回答
181 浏览

c - SocketCAN 从套接字读取只返回 11cobid

我正在尝试从 socketCAN 中读取,并且始终针对 11 位标识符过滤 msg。这应该是一个可以通过为 29 位标识符设置 roper 标志来解决的问题,但我找不到任何人可以提供帮助的地方......

我正在发送一个带有 idx x901 的 CAN 帧,这就是打印的内容:

读取 COB_ID:80000101

读取 COB_ID:80000101

读取 COB_ID:80000101

我已经以许多不同的方式对此进行了故障排除,并且似乎 C 代码正在正常工作,但我怀疑问题出在内核模块的问题上,即 mcp251x 没有正确接收扩展标志?或者它可能是在运行内核模块之前我需要做一些初始化???

提前感谢任何可以提供帮助的人。

0 投票
1 回答
138 浏览

c - MQTT 上的 CAN 帧(需要将十六进制字符串转换为字节数组)

我正在实现 MQTT 通信。我想通过图形界面(在 python 中实现)通过 MQTT 发送 CAN 帧。我能够从 GUI 向一个主题发送消息,并且当我使用该板时,我能够看到消息到达同一主题(使用 paho 库)。函数如下,主题为diagnostic_request/topic

在这一点上,我有一个困难。我的 can_send 函数(有效!)是:

所以当is语句正常时,我必须在onMessageArrived函数中调用can_send。当我发送关于诊断请求/主题的发布时,我可以看到。唯一的问题是将payloadStr值发送到can_send函数并在frameWrite.data[]中解包。有人可以帮助我了解如何修改 can_send 函数以使值

是我通过 payloadStr 中的 mqtt 发送的值吗?我发送了一个 8 字节的字符串,但我无法解包它。 任何帮助将不胜感激