Functions | |
canStatus | canParamGetCount (void) |
canStatus | canParamCommitChanges (void) |
canStatus | canParamDeleteEntry (int index) |
canStatus | canParamCreateNewEntry (void) |
canStatus | canParamSwapEntries (int index1, int index2) |
canStatus | canParamGetName (int index, char *buffer, int maxlen) |
canStatus | canParamGetChannelNumber (int index) |
canStatus | canParamGetBusParams (int index, long *bitrate, unsigned int *tseg1, unsigned int *tseg2, unsigned int *sjw, unsigned int *noSamp) |
canStatus | canParamSetName (int index, const char *buffer) |
canStatus | canParamSetChannelNumber (int index, int channel) |
canStatus | canParamSetBusParams (int index, long bitrate, unsigned int tseg1, unsigned int tseg2, unsigned int sjw, unsigned int noSamp) |
canStatus | canParamFindByName (const char *name) |
canStatus canParamCommitChanges | ( | void | ) |
This function writes the current set of named parameters to the Registry. Previous entries are erased.
The named parameters are stored in the HKEY_LOCAL_MACHINE\SOFTWARE\KVASER
AB\CANLIB32\PredefinedBitrates
key in the Registry.
canStatus canParamCreateNewEntry | ( | void | ) |
This function creates a new entry in the table of named parameter settings.
The named parameters are stored in the HKEY_LOCAL_MACHINE\SOFTWARE\KVASER
AB\CANLIB32\PredefinedBitrates
key in the Registry.
canStatus canParamDeleteEntry | ( | int | index | ) |
This function deletes the entry in the table of named parameter settings with the given index. The entries below (i.e. with higher indices) the deleted entry are moved up one step in the table.
The named parameters are stored in the HKEY_LOCAL_MACHINE\SOFTWARE\KVASER
AB\CANLIB32\PredefinedBitrates
key in the Registry.
[in] | index | The index of the entry to delete. |
canStatus canParamFindByName | ( | const char * | name | ) |
This function returns the index of the parameter setting with the given name.
[in] | name | A pointer to a string containing the name of the setting. |
canStatus canParamGetBusParams | ( | int | index, |
long * | bitrate, | ||
unsigned int * | tseg1, | ||
unsigned int * | tseg2, | ||
unsigned int * | sjw, | ||
unsigned int * | noSamp | ||
) |
This function retrieves the bus parameters associated with the entry with the given index in the table of named parameter settings.
[in] | index | The index of the entry in the table of named parameter settings. |
[out] | bitrate | Bit rate (bits per second). |
[out] | tseg1 | Time segment 1, that is, the number of quanta from (but not including) the Sync Segment to the sampling point. |
[out] | tseg2 | Time segment 2, that is, the number of quanta from the sampling point to the end of the bit. |
[out] | sjw | The Synchronization Jump Width. |
[out] | noSamp | The number of sampling points; can be 1 or 3. |
canStatus canParamGetChannelNumber | ( | int | index | ) |
This function returns the channel number of the entry with the given index in the table of named parameter settings.
[in] | index | The index of the entry in the table of named parameter settings. |
canStatus canParamGetCount | ( | void | ) |
This function returns the number of entries in the table of named channels.
canStatus canParamGetName | ( | int | index, |
char * | buffer, | ||
int | maxlen | ||
) |
This function returns the name of a given entry in the list of named parameters.
The named parameters are stored in the HKEY_LOCAL_MACHINE\SOFTWARE\KVASER
AB\CANLIB32\PredefinedBitrates
key in the Registry.
[in] | index | The index of the entry in the named parameters list, whose name is to be returned. |
[out] | buffer | A pointer to a buffer that is to receive a NULL terminated string which contains the name. The buffer is allocated and deallocated by the user. |
[in] | maxlen | The length of the buffer. |
canStatus canParamSetBusParams | ( | int | index, |
long | bitrate, | ||
unsigned int | tseg1, | ||
unsigned int | tseg2, | ||
unsigned int | sjw, | ||
unsigned int | noSamp | ||
) |
This function sets or changes the bus parameters for a given entry in the list of named parameters.
[in] | index | The index of the entry in the named parameter list whose parameters are to be set or changed. |
[in] | bitrate | Bit rate (measured in bits per second); or one of the predefined constants canBITRATE_xxx. |
[in] | tseg1 | Time segment 1, that is, the number of quanta from (but not including) the Sync Segment to the sampling point. |
[in] | tseg2 | Time segment 2, that is, the number of quanta from the sampling point to the end of the bit. |
[in] | sjw | The Synchronization Jump Width. |
[in] | noSamp | The number of sampling points; can be 1 or 3. |
canStatus canParamSetChannelNumber | ( | int | index, |
int | channel | ||
) |
This function sets the channel number for a specified entry in the list of named parameters. Channels are numbered from 0 and up.
[in] | index | The index of the entry in the named parameter list whose channel number is to be set. |
[in] | channel | The channel number. |
canStatus canParamSetName | ( | int | index, |
const char * | buffer | ||
) |
This function sets or changes the name of a named parameter.
[in] | index | The index of the named parameter whose name is to be changed or set. |
[out] | buffer | A pointer to a NULL terminated string that contains the new name. If the string is longer than the maximum allowed name length, it is truncated. |
canStatus canParamSwapEntries | ( | int | index1, |
int | index2 | ||
) |
This function swaps two entries in the list of named parameters.
The named parameters are stored in the HKEY_LOCAL_MACHINE\SOFTWARE\KVASER
AB\CANLIB32\PredefinedBitrates
key in the Registry.
[in] | index1 | The first of the two entries that are to be swapped in the named parameters list. |
[in] | index2 | The second of the two entries that are to be swapped in the named parameters list. |