User manual

CAN API reference
15 © 2007-2010 Analytica GmbH
CANGetGlobals
CANGetGlobals — Returns the currently used global settings on the CAN bus.
Syntax
#include <AnaGateDllCAN.h>
int CANGetGlobals(int hHandle, int * pnBaudrate, unsigned char *
pnOperatingMode, BOOL * pbTermination, BOOL * pbHighSpeedMode, BOOL *
pbTimeStampOn);
Parameter
hHandle Valid access handle.
pnBaudrate The baud rate currently used on the CAN bus.
pnOperatingMode The operating mode to be used. Following values are returned.
• 0 = default mode.
• 1 = loop back mode: All telegrams sent by a connected partner is routed back
to all active connected partners.
• 2 = listen mode: Device operates as passive bus partner, this means no
telegrams are sent to the CAN bus (no ACKs for incoming telegrams too).
pbTermination Is the integrated CAN bus termination used? (TRUE= yes, FALSE= no). This setting
is not supported by all AnaGate CAn modells.
pbHighSpeedMode Is the high speed mode switched on? (TRUE= yes, = no). This setting is not
supported by all AnaGate CAN modells.
The high speed mode was created for large baud rates with continuously high bus
load. In this mode telegrams are not confirmed on procol layer and the software
filters defined via CANSetFilter are ignored.
pbTimeStampOn Is a timestamp mode activated on the current network connection? (TRUE= yes,
FALSE= no). This setting is not supported by all AnaGate CAN modells.
In activated time stamp mode an additional timestamp is sent with the CAN
telegram. This timestamp indicates when the incomming message is received by the
CAN controller or when the outgoing message is confirmed by the CAN controller.
Return value
Returns Null if successful, or an error value otherwise (Appendix A, Return Codes).
Description
Returns the global settings of the used CAN interface. These settings are effective for all concurrent
connections to the CAN interface.