以下文档适用于模块,现已“退役” 而我正在写它的替代品。 在我写替换之前,我想让我的条款正确。 我知道文档中的术语是错误的 - 它很快就被黑了 所以我可以指导一个在这个项目的硬件方面工作的大学如何使用我制作的程序。 对于任何感兴趣的人(在编写并添加到我们的维基中),可以找到完整的纪录片here,该网站可能只适用于某些IPS(取决于您的ISP - 大学互联网连接最多)可能有用),SVN回购是私有的。
所以有很多条款都是错的。
如。
的 deliminators
包含值表达式的格式化字符串(现在可能错了,但很难说)
这些的正确用语是什么。 还有我犯的其他错误
==== formatted string containing value expressions ==== Before I start on actual programs an explanation of: "formatted string containing value expressions" and how to encode values in them. The ''formatted string containing value expressions'' is at the core of doing low level transmission. We know the decimal 65, hex 41, binary 0100 0001, and the ascii character 'A' all have the same binary representation, so to tell which we are using we have a series of deliminators - numbers preceded by: # are decimal $ are Hex @ are binary No deliminator, then ascii. Putting a sign indicator after the deliminator is optional. It is required if you want to send a negative number. You may put muliple values in the same string. eg: "a#21@1001111$-0F" All values in a ''formatted string containing value expressions'' must be in the range -128 to 255 (inclusive) as they must fit in 8bytes (other values will cause an error). Negative numbers have the compliment of 2 representation for their binary form. There are some problems with ascii - characters that can't be sent (in future versions this will be fixed by giving ascii a delineator and some more code to make that deliminator work, I think). Characters that can't be sent: * The delineator characters: $#@ * Numbers written immediately after a value that could have contained those digits: * 0,1,2,3,4,5,6,7,8,9 for decimal * 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,A,B,C,D,E,F for hex * 0,1 for binary
答案 0 :(得分:1)
首先,deliminator可能是分隔符,虽然我注意到你的文本中有delineator和deliminator - 也许deliminator是一个特殊的分隔符/终结符组合: - )
但是,分隔符通常用于分隔字段,无论如何都会出现。你拥有的是一个可选的前缀,它指示以下字段类型。所以我可能会把它称为“前缀”或“类型前缀”。
“包含值表达式的格式化字符串”我只是调用“值表达式字符串”或“值字符串”将其更改为更短的形式。
另一个可能的问题:
必须在-128到255(含)范围内,因为它们必须符合8字节
我认为你的意思是8 位。
答案 1 :(得分:1)
尝试以下内容:
==== Value string encoding ==== The value string is at the core of the data used for low level transmissions. Within the value string the following refixes are used: # decimal $ Hex @ binary No prefix - ASCII. An optional sign may be included after the delimiter for negative numbers. Negative numbers are represented using twos complement. The value string may contain multiple values: eg: "a#21@1001111$-0F" All elements of the value string must represent an 8bit value and must be in the range -128 to 255 When using ASCII representation the following characters that can't be sent * The delineator characters: $#@ (use prefixed hex value.) * Numbers written immediately after a value that could have contained those digits: * 0,1,2,3,4,5,6,7,8,9 for decimal * 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,A,B,C,D,E,F for hex * 0,1 for binary