Simple Form Code Generation

In the simple form of information object code generation, the Invoke type above would result in the following C or C++ typedefs being generated:

   typedef struct Invoke ::= SEQUENCE {
      OSINT32 invokeID;
      OPERATION_operationCode opcode;
      ASN1OpenType argument;
   }

The following would be the procedure to add the Invoke header type to an ASN.1 message body:

  1. Encode the body type

  2. Get the message pointer and length of the encoded body

  3. Plug the pointer and length into the numocts and data items of the argument open type field in the Invoke type variable.

  4. Populate the remaining Invoke type fields.

  5. Encode the Invoke type to produce the final message.

In this case, the amount of code generated to support the information object references is minimal. The amount of coding required by a user to encode or decode the variable type field elements, however, can be rather large. This is a tradeoff that exists between using the compiler generated table constraints solution (as we will see below) and using the simple form.