Open Type

An Open Type as defined in the X.680 standard is specified as a reference to a Type Field in an Information Object Class. The most common form of this is when the Type field in the built-in TYPE-IDENTIFIER class is referenced as follows:

   TYPE-IDENTIFIER.&Type

See the section in this document on Information Objects for a more detailed explanation.

The Open Type is converted into a Go byte slice ([]byte). The slice is assumed to contain previously encoded ASN.1 data. When a message containing an open type is decoded, a copy of the encoded data is made.

If the -tables or -table-unions command line option is selected and the ASN.1 type definition references a table constraint, the code generated is different. In this case, instead of a byte slice, a union-type structure is used, similar to what is done for a CHOICE type. Each information object in the information object set referenced by the table constraint specifies an actual ASN.1 type that can be used for the open type; taken together, these objects represent all of the possible alternatives for the open type.