| libvkdaq VKINGING DAQ Library API Reference |

Loading...
Searching...
No Matches
Functions
Get channel list
libvkdaq Function interface » Channel configuration

## Functions
int32_t | VkDaqGetChannels (const char *dev, char channels[], int32_t size)
| Get channel list.

## Detailed Description

## Function Documentation

## ◆ VkDaqGetChannels()

int32_t VkDaqGetChannels | ( | const char * | dev,
|  | char | channels[],
|  | int32_t | size
| ) |  |

Get channel list.

data type | parameter | describe
--- | --- | ---
`const char*` | `dev` | Device name or Channel name, such as "dev1", "dev2",etc.
`char[]` | `chans[]` | Character array, used to store the channel list. The function will fill channel names into this array, and multiple channel names are separated by commas.
`const char*` | `size` | The size of the chans arrays.

Returns
  On success, return value >= 0.
  On failure, returns a negative error number.For detail, please Call VkDaqGetLastErrorInfo

C language reference
#include <stdio.h>
#include "libvkdaq.h"
int main(int argc, char* argv[])
{
const char* dev = "dev1";
char channels[4096] = { 0 };
int32_t size = sizeof(channels);
int32_t result = VkDaqGetChannels(dev, channels, size);
printf("Channels = %s \n",channels);
if (result >= 0) {
printf("Successful\n");
}
else {
printf("Failed\n");
}
return 0;
}
VkDaqGetChannels
int32_t VkDaqGetChannels(const char *dev, char channels[], int32_t size)
Get channel list.