AFHBA404
AFHBA404 connects ACQ2106 to PCI-Express
Classes | Macros | Typedefs | Functions
rtm-t-stream.cpp File Reference
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/eventfd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <fcntl.h>
#include "local.h"
#include "rtm-t_ioctl.h"
#include "RTM_T_Device.h"
#include "rtm-t-stream.h"
#include <poll.h>

Go to the source code of this file.

Classes

struct  STREAM
 

Macros

#define DBG(args...)
 
#define LIKELY(x)   (x)
 
#define UNLIKELY(x)   (x)
 
#define SBDN   RTM_T_Device::MAXBUF
 
#define TEST_NULLPTR(ptr)   do{if UNLIKELY(!ptr){fprintf(stderr, "NULL pointer error");return -1;}}while(0)
 
#define ERROR_START(errorcode, message)
 
#define CHECK(i)   (pfds[i].revents & POLLIN)
 
#define CHECK_STOP   CHECK(0)
 
#define CHECK_FD   CHECK(1)
 

Typedefs

typedef struct STREAMSTREAM_P
 

Functions

EXPORT int RtmStreamStart (void **handle, const int devnum, const int NBUFS, int *const maxlen)
 
EXPORT int RtmStreamStop (void *handle)
 
EXPORT int RtmStreamClose (void *handle)
 
EXPORT int RtmStreamGetBuffer (void *handle, void *const buf, const int buflen)
 

Detailed Description

D-TACQ PCIe RTM_T stream access. Continuous streaming using PCIe and buffers

Definition in file rtm-t-stream.cpp.

Macro Definition Documentation

◆ CHECK

#define CHECK (   i)    (pfds[i].revents & POLLIN)

Definition at line 75 of file rtm-t-stream.cpp.

◆ CHECK_FD

#define CHECK_FD   CHECK(1)

Definition at line 77 of file rtm-t-stream.cpp.

◆ CHECK_STOP

#define CHECK_STOP   CHECK(0)

Definition at line 76 of file rtm-t-stream.cpp.

◆ DBG

#define DBG (   args...)

Definition at line 44 of file rtm-t-stream.cpp.

◆ ERROR_START

#define ERROR_START (   errorcode,
  message 
)
Value:
do{\
perror(message " error");\
if (stream && stream->dev)\
delete stream->dev;\
if (stream)\
free(stream);\
return errorcode;\
}while(0)

Definition at line 65 of file rtm-t-stream.cpp.

◆ LIKELY

#define LIKELY (   x)    (x)

Definition at line 50 of file rtm-t-stream.cpp.

◆ SBDN

#define SBDN   RTM_T_Device::MAXBUF

Definition at line 54 of file rtm-t-stream.cpp.

◆ TEST_NULLPTR

#define TEST_NULLPTR (   ptr)    do{if UNLIKELY(!ptr){fprintf(stderr, "NULL pointer error");return -1;}}while(0)

Definition at line 64 of file rtm-t-stream.cpp.

◆ UNLIKELY

#define UNLIKELY (   x)    (x)

Definition at line 51 of file rtm-t-stream.cpp.

Typedef Documentation

◆ STREAM_P

typedef struct STREAM * STREAM_P

Function Documentation

◆ RtmStreamClose()

EXPORT int RtmStreamClose ( void *  handle)

Definition at line 171 of file rtm-t-stream.cpp.

◆ RtmStreamGetBuffer()

EXPORT int RtmStreamGetBuffer ( void *  handle,
void *const  buf,
const int  buflen 
)

Definition at line 181 of file rtm-t-stream.cpp.

◆ RtmStreamStart()

EXPORT int RtmStreamStart ( void **  handle,
const int  devnum,
const int  NBUFS,
int *const  maxlen 
)

Definition at line 137 of file rtm-t-stream.cpp.

◆ RtmStreamStop()

EXPORT int RtmStreamStop ( void *  handle)

Definition at line 162 of file rtm-t-stream.cpp.

rtm-t-stream.stream
stream
Definition: rtm-t-stream.py:44