Skip to content
New issue

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

[WIP] Add decoder doc #119

Closed
wants to merge 2 commits into from
Closed

[WIP] Add decoder doc #119

wants to merge 2 commits into from

Conversation

seanli33056
Copy link
Contributor

What this PR does / why we need it:
This introduces the design doc for deviceShifu decoder, for a better explanation.

Will this PR make the community happier?
Yes.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

Add decoder doc


当前Shifu无法对设备发出的信息进行解码和分析,只能忠实地照原样呈现原始信息。这会给用户的使用带来很大不便 —— 用户需要额外再编写或购买解码服务对原始信息进行处理。

Shifu应当拥有这种功能,使用户不需要借助外力就可以第一时间理解设备发出的信息。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shifu应当拥有这种功能,使用户不需要二次开发就可以在deviceShifu中将设备发出的信息解码。

type: int
```

这样,deviceShifu在收到信息之后,就会知道第零位的数字表达的是是否open了。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是isOpen了


- 序(endian):字节序,通俗理解就是阅读顺序

也就是说,我们需要用户来定义以上两个参数、一个表示类型的参数、一个表示API的参数和一个表示意义的参数。一个简单的配置例子如下:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要给一个例子,参考https://tools.ietf.org/doc/python-pcs/Web/
image


responseMsgType: formattedString

dictionaryDilimiter: ','
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dictionaryDelimiter


### 字符串

**通用格式的字符串**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要具体例子



**无格式字符串**

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要具体例子

@@ -0,0 +1,161 @@
# Shifu 解码模块(Decode Module)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还需要个英文文档


## 解码流程
一个典型的解码流程如下图:
[![decoder-flow](/img/decoder-flow.svg)](/img/decoder-flow.svg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要标上flow的顺序


### 设计非目标
本设计并不包括对于设备物理信号的解析和处理。当前,Shifu应该专注于数字化信息。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要加上一个sample application,几行代码即可,但是需要让读者知道站在应用开发者角度应该怎么使用这个功能

@saiyan86
Copy link
Contributor

saiyan86 commented Jun 2, 2022

@seanli33056 what's the status of this?

@xiaoyu0803
Copy link
Contributor

The flow chart can be like this
解码模块_2022-06-02_20-15-28

@saiyan86
Copy link
Contributor

saiyan86 commented Jun 5, 2022

The flow chart can be like this 解码模块_2022-06-02_20-15-28

can we translated it to English? Thanks!

@xiaoyu0803
Copy link
Contributor

The flow chart can be like this 解码模块_2022-06-02_20-15-28

can we translated it to English? Thanks!

image
Is that ok

@tomqin93 tomqin93 changed the title Add decoder doc [WIP] Add decoder doc Jun 16, 2022
@saiyan86 saiyan86 closed this Sep 8, 2022
@saiyan86
Copy link
Contributor

saiyan86 commented Sep 8, 2022

Obsolete.

@saiyan86 saiyan86 deleted the decoder-doc branch September 8, 2022 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants