DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
UDI driver coding basics

Channel operation data layouts

Most channel operations use strongly typed functions to exchange data, and therefore the UDI environment on the target system knows the data format for the parameters used.

Drivers that define channel operations that use weakly typed, structured, data parameters must declare the format of the data to the UDI environment through an array of udi_layout_t structures. For example, a function parameter might be a pointer to memory. If that memory chunk contains anything more complex than an array of bytes, then that structure must be declared in the driver code.

While the udi_cmos driver does not use any structured, weakly typed data, the pseudod code contains one such declaration:

   static udi_layout_t xfer_layout[] = { UDI_DL_UBIT32_T, UDI_DL_UBIT32_T,
   	UDI_DL_UBIT16_T, UDI_DL_END
   };

pseudod.c sample code (cont.)

This layout indicates that the memory chunk passed as part of the GIO transfer control block inline data will be divided into segments of four data values. The constants used in the layout specification are defined in the Core Specification (see udi_layout_t(3udi)).

This definition is used in the initialization of the driver's control blocks (see ``Control block indexes and structures'').

For the functions that use this layout, a description of how the memory that holds the data is allocated, etc., see the section ``udi_cmos child channel operations''.


Next topic: Driver initialization structure
Previous topic: Channel operations initialization

© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - 19 June 2005