| With the increasing application of network protocols and service protocols, ASN.1, as an abstract syntax notation for information expression, faces great confusion in expressing the dependence relations among fields of PDU. In the process of protocol conformance testing, the applications of ASN.1 encoding rules, widely used XML encoding rules and prospective encoding rules, make a strong demand for a general codec tool with better adaptability. Moreover, codec efficiency has direct effects on the efficiency and even correctness of testing.In response to these needs, three representative commercial ASN.1 codec tools have been studied, and the ASN.1 codec tool of《the communication protocol testing workbench based on TTCN-3》which is developed by author's laboratory has been analysed in depth. On the intensive study of ASN.1 and TSN.1, ASN.1 syntax is extended according to the language characteristic of TSN.1, so that it can easily and correctly describe the dependence relations among fields of PDU . Simultaneously, on the basis of studies on BER and PER encoding rules, a system of encoding rules named ExER is created combining advantages of the two, raising codec efficiency. A set of intermediate file translation rules is defined, in accordance with which ASN.1 scripts and XML files are translated after the compilation by their respective compiler or parser. Through the standardized intermediate format the two are united, in this way, a general codec tool with wide adaptability and good scalability is realized.The general codec tool has been applied in industry primarily. Working together with the communication protocol testing workbench based on TTCN-3, it is applied in AGPS location protocol conformance testing of China Mobile. |