src/master/cdm_daq.cpp File Reference

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)

Detailed Description

Master-side implementation of simple access functions to DAQ services provided by a ChapDAQ slave.

Bla, bla .... demà serà

Author:
Angel Perles
Date:
5/2010, 4/2011

Definition in file cdm_daq.cpp.


Function Documentation

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

Parameters:
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
Returns:
the result of the operation, being cd_Error_NoError if all worked OK

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.

 All Data Structures Files Functions
Generated on Wed Apr 27 16:00:50 2011 for CheapDAQ by  doxygen 1.6.3