snd_afm_get_vin_list()

Get the current Vehicle Input (VIN) list from an AFM

Synopsis:

#include <sys/asoundlib.h>

int snd_afm_get_vin_list( snd_afm_t *handle,
                          snd_afm_vin_list_item_t *list,
                          int num );

Arguments:

handle
The handle for the AFM device, which you must have opened by calling snd_afm_open_name() or snd_afm_open().
list
An array of snd_afm_vin_list_item_t entries to populate; see below.
num
The number of entries in the array. Use snd_afm_get_vin_list_count() to determine the number of entries required.

Library:

libasound

Use the -l asound option to qcc to link against this library.

Description:

(QNX Software Development Platform 6.6 io-audio patch [patch ID 4510] or later) The snd_afm_get_vin_list_count() function gets the list of vehicle inputs that you should retrieve data for from the CAN bus or other vehicle interface and inputs it to the AFM using afm_set_win_stream(). The number and type of vehicle inputs depends on the AFM's current configuration and can only be retrieved after the AFM is running.

The afm_vin_list_item structure is defined as follows:

typedef struct snd_afm_vin_list_item
{
   int16_t key;
   int16_t min;
   int16_t max;
   int16_t is_rpm;
} snd_afm_vin_list_item_t;

The members include:

key
A unique key that's used to identify this parameter.
min
The minimum value that the parameter can take.
max
The maximum value that the parameter can take.
is_rpm
1 if the ASD AFM should treat this parameter as the RPM input; 0 otherwise.

Returns:

EOK on success, or a negative errno value upon failure.

Errors:

-EAGAIN
The AFM hasn't been started.
-EINVAL
The value of handle or list is NULL.
-ENOMEM
The array needs more than num entries.
-ENOTSUP
The AFM doesn't support VIN lists.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread No