Chapter 8. The ODR Module

Table of Contents

1. Introduction
2. Using ODR
2.1. ODR Streams
2.2. Memory Management
2.3. Encoding and Decoding Data
2.4. Printing
2.5. Diagnostics
2.6. Summary and Synopsis
3. Programming with ODR
3.1. The Primitive ASN.1 Types
3.1.1. INTEGER
3.1.2. BOOLEAN
3.1.3. REAL
3.1.4. NULL
3.2. Tagging Primitive Types
3.3. Constructed Types
3.4. Tagging Constructed Types
3.4.1. Implicit Tagging
3.4.2. Explicit Tagging
3.6. CHOICE Types
4. Debugging

1. Introduction

ODR is the BER-encoding/decoding subsystem of YAZ. Care has been taken to isolate ODR from the rest of the package - specifically from the transport interface. ODR may be used in any context where basic ASN.1/BER representations are used.

If you are only interested in writing a Z39.50 implementation based on the PDUs that are already provided with YAZ, you only need to concern yourself with the section on managing ODR streams (Section 2, “Using ODR”). Only if you need to implement ASN.1 beyond that which has been provided, should you worry about the second half of the documentation (Section 3, “Programming with ODR”). If you use one of the higher-level interfaces, you can skip this section entirely.

This is important, so we'll repeat it for emphasis: You do not need to read Section 3, “Programming with ODR” to implement Z39.50 with YAZ.

If you need a part of the protocol that isn't already in YAZ, you should contact the authors before going to work on it yourself: We might already be working on it. Conversely, if you implement a useful part of the protocol before us, we'd be happy to include it in a future release.