MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Data Structures for Drivers                             tuple(9S)



NAME
     tuple - card information structure (CIS) access structure

SYNOPSIS
     #include 


INTERFACE LEVEL
     Solaris DI Specific (Solaris DI)

DESCRIPTION
     The tuplet structure is the basic data  structure  provided
     by  card  services  to manage PC card information. A PC card
     provides  identification   and   configuration   information
     through  its  card  information  structure  (CIS). A PC card
     driver accesses a PC card's CIS through  various  card  ser-
     vices functions.


     The CIS information allows PC cards to be  self-identifying:
     the  CIS  provides  information to the system so that it can
     identify the proper PC card driver for the PC card, and pro-
     vides configuration information so that the driver can allo-
     cate appropriate resources to  configure  the  PC  card  for
     proper operation in the system.


     The CIS information is contained on the PC card in a  linked
     list of tuple data structures called a CIS chain. Each tuple
     has a one-byte type and a one-byte link, an  offset  to  the
     next  tuple in the list. A  PC card can have one or more CIS
     chains.


     A multi-function PC card that complies with the PC  Card  95
     MultiFunction Metaformat specification will have one or more
     global CIS chains that collectively are referred to  as  the
     global  CIS.  These PC Cards will also have one or more per-
     function CIS chains. Each  per-function  collection  of  CIS
     chains is referred to as a function-specific CIS.


     To examine a PC card's CIS, first  a  PC  card  driver  must
     locate  the  desired tuple by calling csxGetFirstTuple(9F).
     Once the first tuple is located, subsequent  tuples  may  be
     located     by     calling     csxGetNextTuple(9F).     See
     csxGetFirstTuple(9F). The linked  list  of  tuples  may  be
     inspected one by one, or the driver may narrow the search by
     requesting only tuples of a particular type.






SunOS 5.11          Last change: 20 Dec 1996                    1






Data Structures for Drivers                             tuple(9S)



     Once a tuple has  been  located,  the  PC  card  driver  may
     inspect  the  tuple data. The most convenient way to do this
     for standard tuples is by  calling  one  of  the  number  of
     tuple-parsing  utility  functions;  for  custom  tuples, the
     driver may get access to  the  raw  tuple  data  by  calling
     csxGetTupleData(9F).


     Solaris PC card drivers do not need  to  be  concerned  with
     which  CIS  chain a tuple appears in. On a multi-function PC
     card, the client will get the tuples  from  the  global  CIS
     followed  by  the  tuples  in the function-specific CIS. The
     caller will not get any tuples from a function-specific  CIS
     that does not belong to the caller's function.

STRUCTURE MEMBERS
     The structure members of tuplet are:

       uint32t      Socket;          /* socket number */
       uint32t      Attributes;      /* tuple attributes */
       cisdatat     DesiredTuple;    /* tuple to search for */
       cisdatat     TupleOffset;     /* tuple data offset */
       cisdatat     TupleDataMax;    /* max tuple data size */
       cisdatat     TupleDataLen;    /* actual tuple data length */
       cisdatat     TupleData[CISMAXTUPLEDATALEN];
                                      /* body tuple data */
       cisdatat     TupleCode;       /* tuple type code */
       cisdatat     TupleLink;       /* tuple link */



     The fields are defined as follows:

     Socket           Not used in Solaris,  but  for  portability
                      with  other  card services implementations,
                      it should be  set  to  the  logical  socket
                      number.


     Attributes       This field  is  bit-mapped.  The  following
                      bits are defined:

                      TUPLERETURNLINK

                          Return link tuples if set.


                      TUPLERETURNIGNOREDTUPLES

                          Return ignored tuples if  set.  Ignored
                          tuples  are  those  tuples  in a multi-
                          function PC  card's  global  CIS  chain



SunOS 5.11          Last change: 20 Dec 1996                    2






Data Structures for Drivers                             tuple(9S)



                          that  are duplicates of the same tuples
                          in a function-specific CIS chain.


                      TUPLERETURNAME

                          Return  tuple  name  string  using  the
                          csxParseTuple(9F) function if set.



     DesiredTuple     This field is the requested tuple type code
                      to     be     returned     when     calling
                      csxGetFirstTuple(9F)                    or
                      csxGetNextTuple(9F). RETURNFIRSTUPLE is
                      used to return the first  tuple  regardless
                      of tuple type. RETURNEXTUPLE is used to
                      return the next tuple regardless  of  tuple
                      type.


     TupleOffset      This field allows partial tuple information
                      to  be retrieved, starting at the specified
                      offset within the tuple.  This  field  must
                      only      be     set     before     calling
                      csxGetTupleData(9F).


     TupleDataMax     This field is the size of  the  tuple  data
                      buffer  that  card  services uses to return
                      raw tuple data  from  csxGetTupleData(9F).
                      It  can  be larger than the number of bytes
                      in  the  tuple  data  body.  Card  services
                      ignores   any  value  placed  here  by  the
                      client.


     TupleDataLen     This field is the actual size of the  tuple
                      data  body.  It  represents  the  number of
                      tuple   data   body   bytes   returned   by
                      csxGetTupleData(9F).


     TupleData        This field is an array of bytes  containing
                      the  raw  tuple data body contents returned
                      by csxGetTupleData(9F).


     TupleCode        This field is the tuple type  code  and  is
                      returned    by   csxGetFirstTuple(9F)   or
                      csxGetNextTuple(9F) when a tuple  matching
                      the DesiredTuple field is returned.



SunOS 5.11          Last change: 20 Dec 1996                    3






Data Structures for Drivers                             tuple(9S)



     TupleLink        This field is the tuple link, the offset to
                      the   next   tuple,   and  is  returned  by
                      csxGetFirstTuple(9F)                    or
                      csxGetNextTuple(9F)  when a tuple matching
                      the DesiredTuple field is returned.


SEE ALSO
     csxGetFirstTuple(9F),                 csxGetTupleData(9F),
     csxParseTuple(9F),            csxParseCISTPLBATERY(9F),
     csxParseCISTPLBYTEORDER(9F),
     csxParseCISTPLCFTABLENTRY(9F),
     csxParseCISTPLCONFIG(9F),      csxParseCISTPLDATE(9F),
     csxParseCISTPLDEVICE(9F),     csxParseCISTPLFUNCE(9F),
     csxParseCISTPLFUNCID(9F),   csxParseCISTPLJEDEC(9F),
     csxParseCISTPLMANFID(9F),      csxParseCISTPLSPCL(9F),
     csxParseCISTPLVERS1(9F), csxParseCISTPLVERS2(9F)


     PC Card 95 Standard,  PCMCIA/JEIDA



































SunOS 5.11          Last change: 20 Dec 1996                    4



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™