| libvkdaq VKINGING DAQ Library API Reference |

Loading...
Searching...
No Matches
Functions
Set device attribute value
libvkdaq Function interface » Configuration task

## Functions
int32_t | VkDaqSetDeviceAttribute (const char *dev, const char *attrName, const char *attrValue)
| Set device attribute value.

## Detailed Description

## Function Documentation

## ◆ VkDaqSetDeviceAttribute()

int32_t VkDaqSetDeviceAttribute | ( | const char * | dev,
|  | const char * | attrName,
|  | const char * | attrValue
| ) |  |

Set device attribute value.

data type | parameter | describe
--- | --- | ---
`const char*` | `dev` | Device name or Channel name, such as "dev1", "dev2",etc.
`const char*` | `attrName` | Attribute name,such as "Sampling Frequency", etc
`const char*` | `attrValue` | Attribute values.

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

Note
  For detailed information about device properties, please refer to the property reference of the corresponding acquisition card below:
  1. VP8388_VP8384_Device_Attributes
  2. VK7016_VK7018_Device_Attributes
  3. VP6068_Device_Attributes

C language reference
#include <stdio.h>
#include "libvkdaq.h"
int main(int argc, char* argv[])
{
const char* dev = "dev1";
const char* attrName = "SamplingFrequency";
const char* attrValue = "10000";
int32_t result = VkDaqSetDeviceAttribute(dev, attrName, attrValue);
if (result >= 0) {
printf("Successful\n");
}
else {
printf("Failed\n");
}
return 0;
}
VkDaqSetDeviceAttribute
int32_t VkDaqSetDeviceAttribute(const char *dev, const char *attrName, const char *attrValue)
Set device attribute value.