nds2-client - ClientDeveloper  0.16.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
channel.h File Reference
#include <stddef.h>
#include <sys/types.h>
Include dependency graph for channel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DLL_EXPORT
 
#define MAX_LONG_CHANNEL_NAME_LENGTH   255
 
#define MAX_CHANNEL_NAME_LENGTH   64
 
#define MAX_SIGNAL_UNIT_LENGTH   40
 
#define MIN_DATA_TYPE   _16bit_integer
 
#define MAX_DATA_TYPE   _32bit_uint
 
enum  chantype {
  cUnknown, cOnline, cRaw, cRDS,
  cSTrend, cMTrend, cTestPoint, cStatic,
  cSimData
}
 Channel type code enumerator. More...
 
enum  daq_data_t {
  _undefined = 0, _16bit_integer = 1, _32bit_integer = 2, _64bit_integer = 3,
  _32bit_float = 4, _64bit_double = 5, _32bit_complex = 6, _32bit_uint = 7
}
 
typedef enum chantype chantype_t
 Channel type code enumerator. More...
 
DLL_EXPORT chantype_t cvt_str_chantype (const char *str)
 
DLL_EXPORT const char * cvt_chantype_str (chantype_t code)
 
DLL_EXPORT size_t data_type_size (daq_data_t dtype)
 
DLL_EXPORT double data_type_max (daq_data_t dtype)
 
DLL_EXPORT const char * data_type_name (daq_data_t dtype)
 
DLL_EXPORT daq_data_t data_type_code (const char *name)
 
DLL_EXPORT size_t data_type_word (daq_data_t dtype)
 

Macro Definition Documentation

#define DLL_EXPORT
#define MAX_CHANNEL_NAME_LENGTH   64

Allowed maximum length for DAQ channels

#define MAX_DATA_TYPE   _32bit_uint

should be equal to the last data type

#define MAX_LONG_CHANNEL_NAME_LENGTH   255

Allowed maximum length for DMT channels

#define MAX_SIGNAL_UNIT_LENGTH   40

Allowed maximum length for signal units

#define MIN_DATA_TYPE   _16bit_integer

should be equal to the first data type

Enumeration Type Documentation

enum daq_data_t

Data type enumerator.

Remarks
numbering must be contiguous
Enumerator
_undefined 

The data type is not defined.

_16bit_integer 

16-bit (short) integer data.

_32bit_integer 

32-bit (int) integer data.

_64bit_integer 

64-bit (long) integer data.

_32bit_float 

32-bit (float) floating point data.

_64bit_double 

64-bit (double) floating point data.

_32bit_complex 

Complex data from two 32-bit floats {re, im}.

_32bit_uint 

Unsigned 32-bit integer.

Function Documentation

DLL_EXPORT const char* cvt_chantype_str ( chantype_t  code)

Convert a channel type code to a string.

DLL_EXPORT chantype_t cvt_str_chantype ( const char *  str)

Convert a channel type string to a channel type code

DLL_EXPORT daq_data_t data_type_code ( const char *  name)

Function to return data type name.

DLL_EXPORT double data_type_max ( daq_data_t  dtype)

Function to relate data types to maximum value.

DLL_EXPORT const char* data_type_name ( daq_data_t  dtype)

Function to return data type name.

DLL_EXPORT size_t data_type_size ( daq_data_t  dtype)

Function to relate data types to size.

DLL_EXPORT size_t data_type_word ( daq_data_t  dtype)

Inline function to return word length in bytes. This number gives the granularity in byte for use when swapping data bytes. It differs from the size attribute for complex numbers.