JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Remote Administration Daemon Developer Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Introduction

2.  Concepts

3.  Abstract Data Representation

ADR Interface Description Language

Overview

Enumeration Definitions

Structure Definitions

Union Definitions

Interface Definitions

Version

Methods

Attributes

Events

Pragmas

Example

radadrgen

Code Generation

4.  libadr

5.  Client Libraries

6.  Module Development

7.  rad Best Practices

A.  rad Binary Protocol

radadrgen

radadrgen is the ADR IDL processing tool. Its primary purpose is to generate API-specific language bindings for the rad server and various client environments. It can also generate documentation, and can audit changes to interfaces for consistency with their versions. See the radadrgen(1) man page for details on all its options.

Code Generation

Generated code has advantages and disadvantages. On the one hand, it can provide an interface to a foreign system that acts like a natural part of the consumer's programming environment. On the other, it can introduce a complex maintenance burden if the generated code is flawed, constrains how its consumers are implemented (for example, if the generated code is unsafe to use in a threaded environment), or otherwise needs modifications before it can be used in the consumer's environment.

Because the rad server has complete knowledge of the interfaces and data types used, and that knowledge is explicitly shared with clients, any client can be written to manipulate those data types and communicate with the server without the need for generated code. However, the convenience of language-native interfaces increases developer productivity, their nature improves interoperability, and the ability for the compiler to perform additional type checking makes the resulting product more robust. For these reasons, rad supports generating code for the C and Java environments.

radadrgen needs to generate code for two contexts. The first is a generic, definitions-only “client” context where only the code needed to manipulate data types and interfaces is created. The second is a rad-specific context that, in addition to the definitions generated in the generic context, generates server definitions that include references to functions that form the implementation of the interfaces.