Applies To
GC5050, GX5050, GX5055, GX5150, GX5280, GX5290, GX5290e, GX5295, File
Purpose
Returns the board type code.
Syntax
DioGetBoardType (nHandle, pnBoardType, pnStatus)
Parameters
Name |
Type |
Comments |
nHandle |
SHORT |
Board or File board handle. |
pnBoardType |
PSHORT |
The board type values are: GX5150 (Master): 0x20 GX5151 (Slave): 0x21 GC5050 (Master): 0x30 GC5051 (Slave): 0x31 GX5152(Master): 0x40 GX5050: 0x50 GX5055: 0x55 GX5280: 0x60 GX5290: 0x70 GX5290e: 0x75 GX5295: 0x7A |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Comments
The board type is read from the board associated with the handle.
Example
The following example returns the board type specified by the handle:
SHORT nStatus, nBoardType;
DioGetBoardType (nHandle, &nBoardType, &nStatus);
switch(nBoardType)
{ case 0x20:
printf (“Board type: GX5150”);
break;
default:
printf (“Board type: Invalid”);
}
See Also
DioSetupInitialization, DioInitialize, DioGetErrorString