- 论坛徽章:
- 0
|
10可用积分
对Extension 的参数,用ASN.1 BER编码,需不需要在计算长度时也将其算入?
我是一个ASN.1 菜鸟,有个问题请教大侠们:
AARQ-apdu ::= [APPLICATION 0] IMPLICIT SEQUENCE {
protocol-version
[0] IMPLICIT BIT STRING {version1(0)} DEFAULT {version1},
aSO-context-name [1] ASO-context-name,
..........
aSO-context-name-list
[13] IMPLICIT ASO-context-name-list OPTIONAL,
implementation-information [29] IMPLICIT Implementation-data OPTIONAL,
..., //省略了..
-- Extensions for higher level association FU
p-context-definition-list [14] Syntactic-context-list OPTIONAL,
called-asoi-tag [15] IMPLICIT ASOI-tag OPTIONAL,
calling-asoi-tag [16] IMPLICIT ASOI-tag OPTIONAL,
-- End of extensions for higher level association FU
...,
user-information [30] IMPLICIT Association-data OPTIONAL
}
想问一下大侠们, AARQ-apdu 用BER编码方式, 计算其length时,p-context-definition-list,.., user-information这些Extension的fields需不需要也计算在内? 还有对这4个Extension的fields, 在Encode时是不是必需要KnownExtensionEncode(strm)这种方式啊? 但是因为这几个Extension的参数是optional的,有可能根本就没有出现在AARQ-apdu中,为啥还需要KnownExtensionEncode它? 我能否先判断它是不是IsOptionalInclude( p-context-definition-list ), 然后在encode它? 对于这个Extension如何编码有没有什么参考的资料?
多谢大侠啦! |
|