Add, delete and modify signals in messages. More...
Add, delete and modify signals in messages.
KvaDbStatus kvaDbAddEnumValue | ( | KvaDbSignalHnd | sh, |
int | val, | ||
const char * | name | ||
) |
Add a new enumeration value to a signal.
[in] | sh | A signal handle |
[out] | val | The enumeration value |
[out] | name | The enumeration name |
KvaDbStatus kvaDbAddSignal | ( | KvaDbMessageHnd | mh, |
KvaDbSignalHnd * | sh | ||
) |
Add a new signal to a message.
[in] | mh | A message handle |
[out] | sh | A handle to the new signal |
KvaDbStatus kvaDbDeleteEnumValue | ( | KvaDbSignalHnd | sh, |
KvaDbEnumValueHnd | eh | ||
) |
Delete an enumeration value from a signal.
[in] | sh | A signal handle |
[in] | eh | An enumeration value handle |
KvaDbStatus kvaDbDeleteSignal | ( | KvaDbMessageHnd | mh, |
KvaDbSignalHnd | sh | ||
) |
Delete a signal from a message.
[in] | mh | A message handle |
[in] | sh | A handle to the signal to delete |
KvaDbStatus kvaDbGetEnumValue | ( | KvaDbEnumValueHnd | eh, |
int * | val, | ||
char * | buf, | ||
size_t | buflen | ||
) |
Get the enumeration value and name. The name is returned as a null-terminated string. If buf is to small, the name will be truncated and status will be kvaDbOK.
[in] | eh | An enumeration value handle |
[out] | val | The enumeration value |
[out] | buf | The buffer that will hold the enumeration name |
[in] | buflen | The length of the buffer |
KvaDbStatus kvaDbGetFirstEnumValue | ( | KvaDbSignalHnd | sh, |
KvaDbEnumValueHnd * | eh | ||
) |
Get the first enumeration value in a signal.
[in] | sh | A signal handle |
[out] | eh | A handle to the first enumeration value |
KvaDbStatus kvaDbGetFirstEnumValuePair | ( | KvaDbSignalHnd | sh, |
KvaDbEnumValueHnd * | eh, | ||
int * | val, | ||
char * | buf, | ||
size_t | buflen | ||
) |
Get the enumeration value and name for the first enumeration value for a signal. The name is returned as a null-terminated string. If buf is to small, the name will be truncated and status will be kvaDbOK.
[in] | sh | A signal handle. |
[out] | eh | An enumeration value handle. |
[out] | val | The enumeration value. |
[out] | buf | The buffer that will hold the enumeration name. |
[in] | buflen | The length of the buffer. |
KvaDbStatus kvaDbGetFirstSignal | ( | KvaDbMessageHnd | mh, |
KvaDbSignalHnd * | sh | ||
) |
Get the first signal in a message.
[in] | mh | A message handle |
[out] | sh | A handle to the first signal |
KvaDbStatus kvaDbGetNextEnumValue | ( | KvaDbSignalHnd | sh, |
KvaDbEnumValueHnd * | eh | ||
) |
Get the next enumeration value in a signal. Should be called after kvaDbGetFirstEnumValue().
[in] | sh | A signal handle |
[out] | eh | A handle to the next enumeration value |
KvaDbStatus kvaDbGetNextEnumValuePair | ( | KvaDbSignalHnd | sh, |
KvaDbEnumValueHnd * | eh, | ||
int * | val, | ||
char * | buf, | ||
size_t | buflen | ||
) |
Get the enumeration value and name for the next enumeration value for a signal. The name is returned as a null-terminated string. If buf is to small, the name will be truncated and status will be kvaDbOK. Should be called after kvaDbGetFirstEnumValuePair().
[in] | sh | A signal handle. |
[out] | eh | An enumeration value handle. |
[out] | val | The enumeration value. |
[out] | buf | The buffer that will hold the enumeration name. |
[in] | buflen | The length of the buffer. |
KvaDbStatus kvaDbGetNextSignal | ( | KvaDbMessageHnd | mh, |
KvaDbSignalHnd * | sh | ||
) |
Get the next signal in a message. Should be called after kvaDbGetFirstSignal().
[in] | mh | A message handle |
[out] | sh | A handle to the next signal |
KvaDbStatus kvaDbGetSignalByName | ( | KvaDbMessageHnd | mh, |
char * | buf, | ||
KvaDbSignalHnd * | sh | ||
) |
Get a signal handle by seaching for the signals's name.
[in] | mh | A message handle |
[in] | buf | The buffer that contains the name of the signal to search for |
[out] | sh | A handle to the signal |
KvaDbStatus kvaDbGetSignalComment | ( | KvaDbSignalHnd | sh, |
char * | buf, | ||
size_t | buflen | ||
) |
Get the comment for a signal as a null-terminated string. A truncated string will be returned if buf is too small and status will be kvaDbOK.
[in] | sh | A signal handle |
[out] | buf | The signal comment |
[in] | buflen | The length of the buffer that will hold the signal comment |
KvaDbStatus kvaDbGetSignalEncoding | ( | KvaDbSignalHnd | sh, |
KvaDbSignalEncoding * | e | ||
) |
Get the signal encoding.
[in] | sh | A signal handle |
[out] | e | The signal encoding, Intel or Motorola, KvaDbSignalEncoding |
KvaDbStatus kvaDbGetSignalMessage | ( | KvaDbSignalHnd | sh, |
KvaDbMessageHnd * | mh | ||
) |
Get handle to message, which given signal is associated with.
[in] | sh | A signal handle |
[out] | mh | Signal's message |
KvaDbStatus kvaDbGetSignalMode | ( | KvaDbSignalHnd | sh, |
int * | mux | ||
) |
Gets mux from multiplexer mode value of given signal. See KVADB_MUX_xxx for special (negative) values of multiplexer mode.
[in] | sh | A signal handle |
[out] | mux | Signal's multiplex mode |
KvaDbStatus kvaDbGetSignalName | ( | KvaDbSignalHnd | sh, |
char * | buf, | ||
size_t | buflen | ||
) |
Get the name of a signal as a null-terminated string. A truncated string will be returned if buf is too small and status will be kvaDbOK.
[in] | sh | A signal handle. |
[out] | buf | The signal name. |
[in] | buflen | The length of the buffer that will hold the signal name. |
KvaDbStatus kvaDbGetSignalPresentationType | ( | KvaDbSignalHnd | sh, |
KvaDbSignalType * | t | ||
) |
Get the signal representation type.
[in] | sh | |
[out] | t | The signal representation type, KvaDbSignalType |
KvaDbStatus kvaDbGetSignalQualifiedName | ( | KvaDbSignalHnd | sh, |
char * | buf, | ||
size_t | buflen | ||
) |
Get the qualified signal name, which is the database, message and signal names separated by dots, as a null-terminated string. An empty string will be returned if buf is too small and status will be kvaDbOK.
[in] | sh | A signal handle |
[out] | buf | The qualified signal name |
[in] | buflen | The length of the buffer that will hold the qualified signal name |
KvaDbStatus kvaDbGetSignalRepresentationType | ( | KvaDbSignalHnd | sh, |
KvaDbSignalType * | t | ||
) |
Get the signal representation type.
[in] | sh | A signal handle |
[out] | t | The signal representation type, KvaDbSignalType |
KvaDbStatus kvaDbGetSignalUnit | ( | KvaDbSignalHnd | sh, |
char * | buf, | ||
size_t | buflen | ||
) |
Get the signal unit as a null-terminated string. A truncated string will be returned if buf is too small and status will be kvaDbOK.
[in] | sh | A signal handle |
[out] | buf | The signal unit |
[in] | buflen | The length of the buffer that will hold the signal unit |
KvaDbStatus kvaDbGetSignalValueEnum | ( | KvaDbSignalHnd | sh, |
char * | buf, | ||
size_t | buflen, | ||
void * | data, | ||
size_t | len | ||
) |
Retrieve signal's enumeration (string) value from can data.
[in] | sh | A signal handle |
[out] | buf | The buffer that will hold the enumeration string |
[in] | buflen | The length of the buffer. |
[in] | data | The data buffer to be converted |
[in] | len | The length of the data buffer |
KvaDbStatus kvaDbGetSignalValueFloat | ( | KvaDbSignalHnd | sh, |
double * | f, | ||
void * | data, | ||
size_t | len | ||
) |
Retrieve signal's physical (floating-point) value from can data.
This function is deprecated and should not be used. Consider kvaDbRetrieveSignalValuePhys() instead
[in] | sh | A signal handle |
[out] | f | The converted value |
[in] | data | The data buffer to be converted |
[in] | len | The length of the data buffer |
KvaDbStatus kvaDbGetSignalValueInteger | ( | KvaDbSignalHnd | sh, |
int * | f, | ||
void * | data, | ||
size_t | len | ||
) |
Retrieve signal's raw (integer) value from can data.
This function is deprecated and should not be used. Consider kvaDbRetrieveSignalValueRaw() instead
[in] | sh | A signal handle |
[out] | f | The converted value |
[in] | data | The data buffer to be converted |
[in] | len | The length of the data buffer |
KvaDbStatus kvaDbGetSignalValueLimits | ( | KvaDbSignalHnd | sh, |
double * | minval, | ||
double * | maxval | ||
) |
Get the minimum and maximum values from a signal.
[in] | sh | A signal handle |
[out] | minval | The minimum value |
[out] | maxval | The maximum value |
KvaDbStatus kvaDbGetSignalValueScaling | ( | KvaDbSignalHnd | sh, |
double * | factor, | ||
double * | offset | ||
) |
Get the scale factor and offset from a signal.
[in] | sh | A signal handle |
[out] | factor | The signal scale factor |
[out] | offset | The signal offset |
KvaDbStatus kvaDbGetSignalValueSize | ( | KvaDbSignalHnd | sh, |
int * | startbit, | ||
int * | length | ||
) |
Get the size and position of the signal value.
[in] | sh | A signal handle |
[out] | startbit | The bit where the signal value starts |
[out] | length | The length of the signal value in bits |
KvaDbStatus kvaDbRetrieveSignalValuePhys | ( | KvaDbSignalHnd | sh, |
double * | value, | ||
void * | data, | ||
size_t | len | ||
) |
Retrieve signal's physical (floating-point) value from can data.
[in] | sh | A signal handle |
[out] | value | The converted value |
[in] | data | The data buffer to be converted |
[in] | len | The length of the data buffer |
KvaDbStatus kvaDbRetrieveSignalValueRaw | ( | KvaDbSignalHnd | sh, |
int * | value, | ||
void * | data, | ||
size_t | len | ||
) |
Retrieve signal's raw (integer) value from can data.
[in] | sh | A signal handle |
[out] | value | The converted value |
[in] | data | The data buffer to be converted |
[in] | len | The length of the data buffer |
KvaDbStatus kvaDbRetrieveSignalValueRaw64 | ( | KvaDbSignalHnd | sh, |
uint64_t * | value, | ||
void * | data, | ||
size_t | len | ||
) |
Retrieve signal's raw (integer) value from can data.
[in] | sh | A signal handle |
[out] | value | The converted value (64-bits) |
[in] | data | The data buffer to be converted |
[in] | len | The length of the data buffer |
KvaDbStatus kvaDbSetSignalComment | ( | KvaDbSignalHnd | sh, |
char * | buf | ||
) |
Set the signal comment.
[in] | sh | A signal handle |
[in] | buf | The buffer that contains the signal comment |
KvaDbStatus kvaDbSetSignalEncoding | ( | KvaDbSignalHnd | sh, |
KvaDbSignalEncoding | e | ||
) |
Set the signal encoding.
[in] | sh | A signal handle |
[in] | e | The signal encoding, Intel or Motorola, KvaDbSignalEncoding |
KvaDbStatus kvaDbSetSignalMode | ( | KvaDbSignalHnd | sh, |
int | mux | ||
) |
Sets signal's multiplex mode. If value is equal to KVADB_MUX_SIGNAL, marks signal as a multiplexer.
[in] | sh | A signal handle |
[in] | mux | Signal's multiplex mode |
KvaDbStatus kvaDbSetSignalName | ( | KvaDbSignalHnd | sh, |
char * | buf | ||
) |
Set the signal name.
[in] | sh | A signal handle |
[in] | buf | The buffer that contains the signal name |
KvaDbStatus kvaDbSetSignalRepresentationType | ( | KvaDbSignalHnd | sh, |
KvaDbSignalType | t | ||
) |
Set the signal representation type.
[in] | sh | A signal handle |
[in] | t | The signal representation type, KvaDbSignalType |
KvaDbStatus kvaDbSetSignalUnit | ( | KvaDbSignalHnd | sh, |
char * | buf | ||
) |
Set the signal unit.
[in] | sh | A signal handle |
[in] | buf | The buffer that contains the unit for the signal |
KvaDbStatus kvaDbSetSignalValueLimits | ( | KvaDbSignalHnd | sh, |
double | minval, | ||
double | maxval | ||
) |
Set the value limits for a signal.
[in] | sh | A signal handle |
[in] | minval | The minimum signal value |
[in] | maxval | The maximum signal value |
KvaDbStatus kvaDbSetSignalValueScaling | ( | KvaDbSignalHnd | sh, |
double | factor, | ||
double | offset | ||
) |
Set the scale factor and offset for a signal.
[in] | sh | A signal handle |
[in] | factor | The scale factor for the signal value |
[in] | offset | The offset for the signal value |
KvaDbStatus kvaDbSetSignalValueSize | ( | KvaDbSignalHnd | sh, |
int | startbit, | ||
int | length | ||
) |
Set the value position and size for a signal.
[in] | sh | A signal handle |
[in] | startbit | The starting bit of the signal's value |
[in] | length | The length of the value in bits |
KvaDbStatus kvaDbStoreSignalValuePhys | ( | KvaDbSignalHnd | sh, |
void * | can_data, | ||
int | len, | ||
double | value | ||
) |
Convert a physical signal value to data bytes.
[in] | sh | A signal handle |
[out] | can_data | The buffer that will hold the converted value |
[in] | len | The length of the data buffer |
[in] | value | The physical signal value to convert |
KvaDbStatus kvaDbStoreSignalValueRaw | ( | KvaDbSignalHnd | sh, |
void * | can_data, | ||
int | len, | ||
int | value | ||
) |
Convert a raw signal value to data bytes.
[in] | sh | A signal handle |
[out] | can_data | The buffer that will hold the converted value |
[in] | len | The length of the data buffer |
[in] | value | The raw signal value to convert |
KvaDbStatus kvaDbStoreSignalValueRaw64 | ( | KvaDbSignalHnd | sh, |
void * | can_data, | ||
int | len, | ||
uint64_t | value | ||
) |
Convert a raw signal value to data bytes.
[in] | sh | A signal handle |
[out] | can_data | The buffer that will hold the converted value |
[in] | len | The length of the data buffer |
[in] | value | The raw signal value to convert (64-bits) |