首页 \ 问答 \ 串行线上的MQTT-SN(蓝牙,CAN,RS485,...)(MQTT-SN over Serial Wire (Bluetooth, CAN, RS485, …))

串行线上的MQTT-SN(蓝牙,CAN,RS485,...)(MQTT-SN over Serial Wire (Bluetooth, CAN, RS485, …))

我发现这个答案RSMB MQTT-SN和蓝牙 ,但我不确定这是否真的是正确的答案。

所以第二个问题 - 我是新来的Stackoverflow,所以我不能直接评论。

...

你确定这里真的需要货代吗? 我读了MQTT-SN规范,对我来说,看起来MQTT-SN是用于UDP的,而UDP是无连接的。 所以我认为可以通过串行模拟UDP来实现点对点连接。

那为什么不呢?

mqtt-sn客户端---串行 - >>任何收音机<< - 串行--- mqtt-sn串行brigdge

在MQTT-SN串行桥接器端,我也可以运行一个连接到我选择的真实MQTT代理的网关。

我从规格中的图1中读出。 我不清楚货运公司的好处是什么? 何时应该有人使用它等等...

谢谢。 马蒂亚斯


I found this Answer RSMB MQTT-SN & Bluetooth, but I am not sure if this is really the correct answer at all.

So a second Question - I am new to Stackoverflow so I cannot comment directly.

...

Are you sure that a forwarder is really needed here? I read the MQTT-SN spec and for me it looks like MQTT-SN is for UDP and UDP is connectionless. So I think it is possible so simulate UDP over serial for one point to point connection.

So why not...

mqtt-sn client---serial-->> any radio <<--serial---mqtt-sn serial brigdge

And on the MQTT-SN serial bridge side I can also run a Gateway which connects to a real MQTT broker of my choice.

I read that out from figure 1 in the specs. I do not clearly understand what´s the benefit of a forwarder is? And when should someone use it and so on ...

thanks. Mathias


原文:https://stackoverflow.com/questions/34177922
更新时间:2023-01-19 17:01

最满意答案

你的链式信号向后,第一个输入要显示相等:

architecture comp32_arch of comp32 is
  component comp1
  port (a,b,g,l,e : in std_logic ;
       great,less,equal : out std_logic);   
  end component comp1;

  signal gre : std_logic_vector(BW downto 0);
  signal les : std_logic_vector(BW downto 0);
  signal equ : std_logic_vector(BW downto 0);

  begin
      gre(BW) <= '0';   -- gre(0) <= '0';
      les(BW) <= '0';   -- les(0) <= '0';
      equ(BW) <= '1';   -- equ(0) <= '0';

  gen: 
      for i in 0 to BW-1 generate
  biti:
          comp1 
              port map ( 
                  a => a_32(i),
                  b => b_32(i),
                  g => gre(i+1),   -- gre(i),
                  l => les(i+1),   -- les(i), 
                  e => equ(i+1),   -- equ(i), 
                  great => gre(i), -- gre(i+1), 
                  less => les(i),  -- les(i+1), 
                  equal => equ(i)  -- equ(i+1)
              );
          end generate;
      g_32 <= gre(0);  -- gre(BW);-- (BW-1);
      l_32 <= les(0);  -- les(BW); -- (BW-1);          
      e_32 <= equ(0);  -- equ(BW); -- (BW-1);  
end architecture comp32_arch;

这给了:

comp32_tb_fixed.png

没有等于的最重要的位定义小于或大于。 如果他们都是平等的,那么一直传播。


You had your chained signals backward, and the first inputs want to show equal:

architecture comp32_arch of comp32 is
  component comp1
  port (a,b,g,l,e : in std_logic ;
       great,less,equal : out std_logic);   
  end component comp1;

  signal gre : std_logic_vector(BW downto 0);
  signal les : std_logic_vector(BW downto 0);
  signal equ : std_logic_vector(BW downto 0);

  begin
      gre(BW) <= '0';   -- gre(0) <= '0';
      les(BW) <= '0';   -- les(0) <= '0';
      equ(BW) <= '1';   -- equ(0) <= '0';

  gen: 
      for i in 0 to BW-1 generate
  biti:
          comp1 
              port map ( 
                  a => a_32(i),
                  b => b_32(i),
                  g => gre(i+1),   -- gre(i),
                  l => les(i+1),   -- les(i), 
                  e => equ(i+1),   -- equ(i), 
                  great => gre(i), -- gre(i+1), 
                  less => les(i),  -- les(i+1), 
                  equal => equ(i)  -- equ(i+1)
              );
          end generate;
      g_32 <= gre(0);  -- gre(BW);-- (BW-1);
      l_32 <= les(0);  -- les(BW); -- (BW-1);          
      e_32 <= equ(0);  -- equ(BW); -- (BW-1);  
end architecture comp32_arch;

And that gives:

comp32_tb_fixed.png

The most significant bit without an equals defines either less than or greater than. If they're all equal that propagates all the way through.

相关问答

更多
  • 是一门语言,与fortran语法最为接近。主要是把一些数学上的算法编好了,mat原意就是矩阵实验室
  • 您的信号out_ALU被声明为您实体的输入。 这就是为什么你不能给它分配一个信号(它是只读的)。 将其更改为out,它可能会编译: entity AlU is Port ( A : in STD_LOGIC_VECTOR (31 downto 0); ---== A input Vector with 32 Bit B : in STD_LOGIC_VECTOR (31 downto 0); ---== B input Vector with 32 Bi ...
  • 答案是肯定的,您可以直接比较相同类型和子类型指示的两种数组类型。 但是,您的示例代码无效。 表达式a=b的结果是布尔值。 您可以通过分配out1和out2将其转换为std_logic。 此上下文中的if语句必须位于流程语句中。 您也不需要两个输出: architecture foo of Comparator1 is begin UNLABELED: process (a,b) begin if a = b then out1 <= '1'; ...
  • 与另外两个标准兼容的模拟器一起发现了三类错误。 语义错误 : UUT: entity idexreg 应该 UUT: entity work.idexreg 没有使用条款use.work.all; 先前分析的实体idexreg的声明将不可见(未绑定,这将解释'U')。 当名称不可直接可见时,可以使用选定的名称。 IEEE Std 1076-2008 12.3可见性 在文本中给定位置出现标识符的含义由可见性规则定义,并且在重载声明的情况下由超载规则定义。 在本小节中考虑的标识符包括除保留字以外的任何标识 ...
  • 正如其他文章指出的那样,您可能需要像GHDL这样的模拟器 。 但是,要调试您的模拟,有几种不同的方法: 经典打印语句 - 只需在程序代码中混合writeline(output,[...]) 。 看到这个你好世界的例子。 如果你刚刚开始,那么添加打印语句将是非常宝贵的。 对于我所做的大部分模拟调试(这是我工作的一部分),我几乎完成了基于我们在设计和测试平台中构建的打印语句的所有调试。 它只用于最终调试,或者用于更难以处理的问题,我使用下一个调试方法。 “倾销”模拟( 对于GHDL请参阅此页面和此 页面 )。 ...
  • 你的链式信号向后,第一个输入要显示相等: architecture comp32_arch of comp32 is component comp1 port (a,b,g,l,e : in std_logic ; great,less,equal : out std_logic); end component comp1; signal gre : std_logic_vector(BW downto 0); signal les : std_logic_vect ...
  • 在这种情况下,最终总和是正确的(“101010”+“110101”=“011111”), 但并非在所有情况下都是如此。 编辑2 :让我们仔细看看,为什么进位不会像你预期的那样波动。 位0(LSB)到5的操作数一起,请求进位从位0传播到位6的进位。操作数的位6产生进位,这是进位的加法器。 由于位0的cin为'0',所有中间进位也都为'0',但它应该通过进位链波动。 现在让我们来看看一位加法器。 您正在添加两个数字,因此AddOrSub为'0'。 有了这个, cout_bout的等式可以简化为: cout_bo ...
  • 我看,你试图用2位比较器( >和= )创建4位比较器。 但我认为你有两个答案问题: 如果您只想创建没有任何比较器(独立)的4位比较器,请将A and B声明为有signed或unsigned进行比较(如果使用std_logic_vector则可以转换为此类型)。 有两个库可供使用: arith和numeric_std (只使用其中一个,两者都被违反)。 如果必须使用2位比较器。 使用这种方式: 建议A = [A3 A2 A1 A0] , B = [B3 B2 B1 B0] 。 运行两个步骤: 步骤1比较两个 ...
  • 回答您的第一个问题:是,使用库IEEE.std_numeric中的unsigned。 它是这种操作的理想选择。 其次,可以通过比较输出和输入来检测溢出。 例如,在两个人的赞美中,如果你执行+ ve plus + ve和overflow,结果将设置msb,结果是-ve。 总结加法和减法 Addition | (+ve) - (+ve) | (+ve) - (-ve) | (-ve) - (+ve) | (-ve) + (-ve)| ----------------------------------- ...
  • unsigned(31 downto 0) 。 您引用的帖子中的2^MAX是一个错误,应该读取2^length 。 31 downto 0的长度是32。 想一想, 31 downto 0可以代表从0到2 ^ 32-1的数字,如果你能代表更大的数字,那么如果任何一个范围的加法将是模2 ^ 31就没有多大意义! 我不确定我理解你的第二个问题,但是加法模2 ^ 32产生的结果范围为0到2 ^ 32-1。 2 ^ 32是非法的,因此你无法用无符号代表它是很好的。 You are fine with unsigned ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)