MMS and ASN.1 Simple Samples and Explanations
© Copyright 1996, 1997 SISCO, Inc. All Rights Reserved. Page 1
Introduction
During my work with the electrical utility industry, several educational issues in regards
to MMS have often been discussed. The issues of understanding the ISO/IEC-9506
standard have always been a core problem for the non-initiated.
For the MMS non-initiated, the MMS standard is a problem since it infers the use of other
standards (e.g., Presentation, ASN.1, and ACSE). Besides not being a self-contained
standard, the division of protocol specification and encoding represents a different
philosophy from many of the previous SCADA protocols. However, given all the
required documentation, it still takes considerable time to understand ASN.1 and MMS.
This document is intended to help boot-strap individuals in the educational process. In
order to achieve an initial understanding of the encoding of MMS, I have intentionally
restricted the included examples of commonly used semantics and protocols.
Abstract Syntax Notation 1 (ASN.1)
The purpose of ASN.1 is to provide encoding and decoding specifications for protocol
syntax that is to be sent over a network. The intent of this standard (ISO/IEC 8824 and
8825) is to have a neutral representation of fields as they are exchanged over a
communication media.
Therefore, ASN.1 accounts for the problems typically associated in exchanging data
between Intel, Motorola, VAX, and RISC platforms. This includes accounting for the
Big/Little Endian problems and byte representation issues.
In order to accomplish this, ASN.1 concretely specifies the sequence and order of bits as
they are to be transmitted on the wire. Additionally, the standard defines key words that
are to be used within MMS, and other standards, to aid in the specification of the
semantics and encodings. For example, ASN.1 always typically specifies that the most
significant bit of the most significant byte is encoded to be transferred first.
The key words, found in MMS, are all capitalized. For example:
SEQUENCE SEQUENCE OF
IMPLICIT INTEGER
BOOLEAN NULL
Also, ASN.1 encoded values always have the format of TAG, LENGTH, followed by
VALUE. As with any rule, there is typically an exception. In the case of ASN.1, it is
NULL, which only has a TAG and always has a length of 0 and no data (what better way
to represent a NULL value). The combination of a TAG, LENGTH, and VALUE (TLV)
is termed a “production”.
- 1
- 2
前往页