Get Chip Type
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
Syntax
long getChipType(long channel);
Function
Determines the type of CAN controller used.
Parameters
CAN channel
Return Values
Type of controller with the following values:
| Value | Meaning (CANoe 12 reference) |
|---|---|
5 | NEC 72005 |
200 | Philipps PCA82C200 |
526 | Intel 82526 |
527 | Intel 82527 |
1000,1001 | Philipps SJA1000 |
Other types may occur. DEMO versions return the result 0 or simulate one of the existing types. If an attempt is made to access a nonexistent channel (e.g. Channel 2 for CPC/PP) or if the driver used does not support this function, the functional result is 0.
Reference example from the CANoe 12 help. This is an incomplete context fragment: omitted surrounding code is shown as comments. Do not paste it as a complete program.
// ... surrounding context omitted
switch(getChipType(0)) {
case 200: setOcr(0,0x02);
break;
// Other device-specific cases omitted.
default:
write("Unknown CAN-chip %d", getChipType(0));
break;
}
// ... surrounding context omitted
Source detail restored from the authorized CANoe 12 help. Hardware support and API availability must be checked against the installed product version.