Previous PageTable Of Contents../index.htmlIndexNext Page

glHWDetect( )

Description | Example | Example

Name:

int glHWDetect ( glSystem *glSys, glBoardSystem *glBdSys, int reserve2)

Inputs:

glSystem *glSys

  • Pointer to glSystem structure or NULL if this information is not desired.

glBoardSystem *glBdSys

  • Pointer to glBoardSystem structure or NULL if this information is not desired.
 

int reserve2

  • Must be 0 (zero).

Outputs:

glSystem *glSys

  • Contains channel information if the return value is GL_HWCONFIG_
    SUCCESS and the pointer to glSystem was not NULL.
 

glBoardSystem *glBdSys

  • Contains CP Fax board information if the return value is GL_HWCONFIG_
    SUCCESS and the pointer to glBoardSystem was not NULL.

Returns:

GL_HWCONFIG_SUCCESS

  • Successful.
 

GL_HWDETECT_IN_PROGRESS

  • An instance of glHWDetect is already running. Wait until the first instance completes.
 

GL_SERVICE_RUNNING

  • The GDK System Service is running. Stop the service then run glHWDetect again.
 

GL_SYSTEM_NULL_PTR

  • Invalid parameters. The first and second parameters cannot both be NULL.
 

GL_SYSTEM_CHANNEL_
OVERLAP

  • glHWDetect found overlapping fax channels for boardtypes CP4/SC, CP6/SC, or CP12/SC. Check that all channels in the system have unique I/O addresses, reconfigure, and run glHWDetect again.
 

GL_HWDRIVER_FAIL

  • The required device drivers failed to start. Try starting the GDK ISA Device Driver and the GDK PCI Device Driver using the Devices Control Panel Applet. Call Technical Support for additional assistance.
 

GL_HWDETECT_FAIL

  • Internal failure to create a system controlled resource. Fatal error, reboot the system and try again.

GL_SYSTEM_MALLOCFAILED

  • Internal failure to allocate a system controlled resource. Fatal error, reboot the system and try again.

Includes:

gfdboard.h

 

Top Of PageDescription

The glHWDetect( ) function provides information about the CP Fax hardware installed in the system. This function blocks while checking a limited area of I/O space for the presence of CP Fax channels. Upon completion, the GDK System Service dependency list is updated to depend on the bus types detected in the system.

If the GDK service is not installed, glHWDetect will not return an error.

The glSystem data structure, unchanged from GDK 3.0, provides information about all working channels in the system. If this information is not desired, the first parameter may be NULL.

The glBoardSystem data structure, provides board-level resources and additional channel attributes. If this information is not desired, the second parameter may be NULL.

Top Of PageExample

The following are examples of valid calling conventions:

The glSystem and glBoardSystem data structures are defined in the include file gfdboard.h. More information about these structures follow:

glSystem

This structure contains identification information about the CP Fax Isa and Pci fax channels installed in the system.

The glSystem structure has three fields; numchan, numBRI, and Channel_ID. The total of numchan and numBRI describe the number of valid elements in the Channel_ID array. The Channel_ID array elements contains channel specific information for each fax channel detected in the system.

Channel_ID elements [0 to numchan-1] describe fax channels; and elements [numchan to (numchan + numBRI) - 1] describe BRI controller cells.

NOTE:
If numBRI is greater than zero, there will always be a CPi/200 BRI fax channel in the Channel_ID structure array.

Each Channel_ID element, CHAN, contains two union fields: parm1 and parm2. The valid fields within parm1 and parm2 are determined by the value of the BusType field as shown in the following chart.

BusType Value

Valid Parm Fields

gl_ISA

parm1.PortAddress

 

parm2.PhysicalChannel

gl_PCI

parm1.BoardNumber

 

parm2.ChannelOffset

The CHAN.BoardType member describes the model of the fax channel. This value is usually the same as the board model.

glBoardSystem

This structure contains detailed identification information about the CP Fax ISA and PCI fax boards and channels installed in the system.

The glBoardSystem structure contains two data members, numBoard and BoardID. The value of numBoard describes the number of valid elements in the BoardID array. Each CP Fax physical hardware entity is represented by a BoardID element. For example, the CP4/LSI, a 4-channel analog board, is represented by one BoardID element.

The fields in BoardID represent board level information.

Board_t Fields

Description

BoardModel

Descriptive name of board. This value is usually the same as the value for Channel_t.BoardType, with the exception of CPD/220.

CountryModel

Country code retrieved from ROM that the board was certified for. If ROM does not contain this information, this value is zero.

ChanList

List of fax channels associated with physical board.

NumChanCount

The number of valid ChanList elements. It represents the total number of fax channels expected for BoardModel, i.e. a CP4/LSI is always exected to have four fax channels.

BadChanCount

The number of undetectable fax channels for BoardModel. The range of this value is [0..NumChanCount].

Resource

Shared resource used by fax channels.

BusType

PC Bus interface type of BoardModel. Supported values are gl_ISA or gl_PCI.

The fields in BoardID.Resource represent board level resources, shared by the associated fax channels specified in the ChanList array.

Resource_t Fields

Description

bus.isa.SHPortAddress

I/O address of SC2000 resource, -1 if the resource does not exist.

bus.isa.BRIPortAddress

I/O address of BRI controller resource, -1 if the resource does not exist.

bus.isa.BRIPhysicalChannel

Physical channel of BRI controller resource, -1 if the resource does not exist.

The fields in BoardID.ChanList represent a fax channel.

Channel_t fields

Description

glSystemChanIndex

Zero-based index to glSystem structure. Value is -1 if the channel is not detected, i.e. State is gl_NotPresent.

bus.isa.PortAddress

For BoardID.BusType equal to gl_ISA, I/O address of ISA fax channel.

bus.isa.PhysicalChannel

For BoardID.BusType equal to gl_ISA, physical channel of ISA fax channel.

bus.pci.BoardNumber

For BoardID.BusType equal to gl_PCI, board id of PCI fax channel.

bus.pci.ChannelOffset

For BoardID.BusType equal to gl_PCI, PCI channel associated with board id.

BoardType

Name of fax channel; it may be different from BoardID.BoardModel
(i.e. CPD/220).

RomId

Raw identification information retrieved from fax channel's EPROM.

State

Indicates the fax channel's physical status. If the channel was detectable, the State is gl_Present, if not, the State is gl_NotPresent.

The fields in BoardID.ChanList.RomId represent the electronic signature of a fax channel.

RomId_t fields

Description

BoardInfo

Name of channel's board family and revision level.

ModemInfo

Identifies modem speed (i.e. 9600, 14400, etc.) and network interface type (i.e. digital or analog).

OemStamp

Value is always zero.

CpuSpeed

Speed of on-board processor.

Spare

Reserved.

BoardModel

Country code that board was certified for.

RomVersion

Version of Rom.

RomVersionString

Descriptive string containing version of Rom.

RomPersonality

Designates programmability of channel (i.e. toolkit vs. standard).

Top Of PageExample


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2000, Dialogic Corporation
All rights reserved
This page generated January, 2002