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 with qcc to link against this library.

Description:

Note: This function can only be used if you have QNX Acoustic Management Platform 3.0 installed.

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.

This function can also return the return values of devctl() (see devctl() in the QNX Neutrino C Library Reference).

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 Yes
Interrupt handler No
Signal handler Yes
Thread Yes

Caveats:

This function is not thread safe if the handle (snd_afm_t) is used across multiple threads.