Master-side implementation of simple access functions to DAQ services provided by a ChapDAQ slave. More...
#include <cdm_link.h>
#include <cdm_daq.h>
#include <stdio.h>
#include <string.h>
Go to the source code of this file.
Defines | |
#define | MSG_BUF_SIZE 100 |
Functions | |
cdm_Error | cdm_DAQWriteDigitalLine (uint8_t subdevice, uint8_t line, uint8_t value) |
Writes the digital output of a given line in a given subdevice. | |
cd_Error | cdm_DAQReadDigitalLine (uint8_t subdevice, uint8_t line, uint8_t *value) |
cdm_Error | cdm_DAQReadDigitalFrecuency (int subdevice, double *value) |
cdm_Error | cdm_DAQWritePWM (int subdevice, double dutty_cycle) |
Master-side implementation of simple access functions to DAQ services provided by a ChapDAQ slave.
Bla, bla .... demà serÃ
Definition in file cdm_daq.cpp.
cdm_Error cdm_DAQWriteDigitalLine | ( | uint8_t | subdevice, | |
uint8_t | line, | |||
uint8_t | value | |||
) |
Writes the digital output of a given line in a given subdevice.
Most digital output systems are organized in groups of lines, (8, 16, 32 ...) and the aim of this function is to handle only one line a given group
subdevice | target subdevice, an integer between 0 and 255 | |
line | line to be modifided, in general, a value between 0 and 31, but depends on the target slave | |
value | state to be written to thew line, mus be 0 or 1 |
Example:
cd_Error my_error; my_error = cdm_DAQWriteDigitalLine(2,31,1); if (my_error != CD_Erro_NoError) { printf("Ups, this failed with error %s\n", cd_ErrorStr(my_error); }
Definition at line 45 of file cdm_daq.cpp.