LLC2_API
Defines | Enumerations | Functions
ll2-api.h File Reference

C API definition for LOWLATENCY2. More...

Go to the source code of this file.

Defines

#define LLC_SYNC2V_IN_MBOX0   LLCV2_STATUS_MBOX0
 status offsets
[ 0] contents of MAIL BOX 0
#define LLC_SYNC2V_IN_MBOX1   LLCV2_STATUS_MBOX1
 [ 1] contents of MAIL BOX 1
#define LLC_SYNC2V_IN_MBOX2   LLCV2_STATUS_MBOX2
 [ 2] contents of MAIL BOX 2
#define LLC_SYNC2V_IN_MBOX3   LLCV2_STATUS_MBOX3
 [ 3] contents of MAIL BOX 3
#define LLC_SYNC2V_IN_DIO6   LLCV2_STATUS_DIO
 [ 4] DIO6 value
#define LLC_SYNC2V_IN_TINST   LLCV2_STATUS_TINST
 [ 5] Garbage for SYNC2V
#define LLC_SYNC2V_IN_TLATCH   LLCV2_STATUS_TLATCH
 [ 6] HW TLATCH 11:0
#define LLC_SYNC2V_IN_BDR   LLCV2_STATUS_BDR
 [ 7] 0xdeadbeef
#define LLC_SYNC2V_IN_ITER   (LLCV2_STATUS_BDR+1)
 [ 8] Iteration
#define LLC_SYNC2V_IN_DI32   (LLCV2_STATUS_BDR+2)
 [ 9] DI32 values
#define LLC_SYNC2V_IN_LASTE   (LLCV2_STATUS_BDR+3)
 [10] ITER last error
#define LLC_SYNC2V_IN_TLAT32   (LLCV2_STATUS_BDR+4)
 [11] SW TLATCH 31:0 [OPT] lags one cycle
#define LLC_SYNC2V_IN_VERID   (LLCV2_STATUS_BDR+5)
 [12] Version ID
#define LLC_SYNC2V_IN_SCOUNT   (LLCV2_STATUS_BDR+6)
 [13] Sample Count
#define LLC_SYNC2V_IN_FIFSTA   (LLCV2_STATUS_BDR+7)
 [14] FIFSTAT fifo status register
#define LLC_SYNC2V_IN_DO64   (LLCV2_STATUS_BDR+8)
 [15] Last DO64 outval
#define LLC_SYNC2V_IN_LAST   (LLCV2_STATUS_MBOX0+15)
#define LLC_SYNC2V_IDLE_PAT   0x2f2fc0de

Enumerations

enum  STATUS_OK { OK, ERR = -1 }

Functions

STATUS_OK RtSetup (const char *config_file, int argc, const char *argv[])
 instantiate system
STATUS_OK RtArm (const short *ao_values, const unsigned *do_values)
 arm the capture
STATUS_OK RtIO (const short *ao_values, const unsigned *do_values, short *ai_values, unsigned *di_values, unsigned *status_values)
 set next outputs, wait for and return next sample
STATUS_OK RtDone (void)
 stop and cleanup.

Detailed Description

C API definition for LOWLATENCY2.

Definition in file ll2-api.h.


Define Documentation

#define LLC_SYNC2V_IDLE_PAT   0x2f2fc0de

Definition at line 110 of file ll2-api.h.

#define LLC_SYNC2V_IN_BDR   LLCV2_STATUS_BDR

[ 7] 0xdeadbeef

Definition at line 92 of file ll2-api.h.

#define LLC_SYNC2V_IN_DI32   (LLCV2_STATUS_BDR+2)

[ 9] DI32 values

Definition at line 96 of file ll2-api.h.

#define LLC_SYNC2V_IN_DIO6   LLCV2_STATUS_DIO

[ 4] DIO6 value

Definition at line 86 of file ll2-api.h.

#define LLC_SYNC2V_IN_DO64   (LLCV2_STATUS_BDR+8)

[15] Last DO64 outval

Definition at line 108 of file ll2-api.h.

#define LLC_SYNC2V_IN_FIFSTA   (LLCV2_STATUS_BDR+7)

[14] FIFSTAT fifo status register

Definition at line 106 of file ll2-api.h.

#define LLC_SYNC2V_IN_ITER   (LLCV2_STATUS_BDR+1)

[ 8] Iteration

Definition at line 94 of file ll2-api.h.

#define LLC_SYNC2V_IN_LAST   (LLCV2_STATUS_MBOX0+15)

Definition at line 109 of file ll2-api.h.

#define LLC_SYNC2V_IN_LASTE   (LLCV2_STATUS_BDR+3)

[10] ITER last error

Definition at line 98 of file ll2-api.h.

#define LLC_SYNC2V_IN_MBOX0   LLCV2_STATUS_MBOX0

status offsets
[ 0] contents of MAIL BOX 0

Definition at line 78 of file ll2-api.h.

#define LLC_SYNC2V_IN_MBOX1   LLCV2_STATUS_MBOX1

[ 1] contents of MAIL BOX 1

Definition at line 80 of file ll2-api.h.

#define LLC_SYNC2V_IN_MBOX2   LLCV2_STATUS_MBOX2

[ 2] contents of MAIL BOX 2

Definition at line 82 of file ll2-api.h.

#define LLC_SYNC2V_IN_MBOX3   LLCV2_STATUS_MBOX3

[ 3] contents of MAIL BOX 3

Definition at line 84 of file ll2-api.h.

#define LLC_SYNC2V_IN_SCOUNT   (LLCV2_STATUS_BDR+6)

[13] Sample Count

Definition at line 104 of file ll2-api.h.

#define LLC_SYNC2V_IN_TINST   LLCV2_STATUS_TINST

[ 5] Garbage for SYNC2V

Definition at line 88 of file ll2-api.h.

#define LLC_SYNC2V_IN_TLAT32   (LLCV2_STATUS_BDR+4)

[11] SW TLATCH 31:0 [OPT] lags one cycle

Definition at line 100 of file ll2-api.h.

#define LLC_SYNC2V_IN_TLATCH   LLCV2_STATUS_TLATCH

[ 6] HW TLATCH 11:0

Definition at line 90 of file ll2-api.h.

#define LLC_SYNC2V_IN_VERID   (LLCV2_STATUS_BDR+5)

[12] Version ID

Definition at line 102 of file ll2-api.h.


Enumeration Type Documentation

enum STATUS_OK
Enumerator:
OK 
ERR 

Definition at line 37 of file ll2-api.h.


Function Documentation

STATUS_OK RtArm ( const short *  ao_values,
const unsigned *  do_values 
)

arm the capture

Parameters:
ao_valuesinitial ao values
do_valuesinitial do_values

Definition at line 77 of file ll2-api.cpp.

References DynamicSystem::instance(), and RETOK.

Referenced by main().

STATUS_OK RtDone ( void  )

stop and cleanup.

Definition at line 103 of file ll2-api.cpp.

References LL_ControlSystem::closedown(), DynamicSystem::instance(), OK, and LL_ControlSystem::Stop().

Referenced by main().

STATUS_OK RtIO ( const short *  ao_values,
const unsigned *  do_values,
short *  ai_values,
unsigned *  di_values,
unsigned *  status_values 
)

set next outputs, wait for and return next sample

Parameters:
ao_valuesnext ao_values
do_valuesnext do_values
ai_valueslatest ai sample
di_valueslatest di sample
status_valueslatest status values

Definition at line 91 of file ll2-api.cpp.

References DynamicSystem::instance(), and RETOK.

Referenced by main().

STATUS_OK RtSetup ( const char *  config_file,
int  argc,
const char *  argv[] 
)

instantiate system

Parameters:
config_file.xml file with system definition
argcpass in argc argv for optional command line initialization set zero if not required
argvoptional command line argv array

Definition at line 67 of file ll2-api.cpp.

References LL_ControlSystem::init(), DynamicSystem::instance(), and OK.

Referenced by main().