生成校验和

时间:2019-11-23 13:19:09

标签: typescript

我将使用此文档生成校验和

CountdownTimer(Duration(seconds: 5), Duration(seconds: 1)).listen((data){
})..onData((data){
  print('data $data');
})..onDone((){
  print('onDone.........');
});

消息看起来像这样

Checksum of the entire message from address field up to and including the data field. Calculated as byte total, then reduced to 8 bits and then converted to 2 hex characters.

其中A是地址,CS是校验和。

如何在TypeScript中获取字符串的字节总数?
它像A B CCC DDD CS 一样简单吗?

如何将其转换为8位?

0 个答案:

没有答案