Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
dif_measure.c File Reference

Enumerations

enum  dif_fifo_commands {
  DIF_FIFO_CMD_MODE , DIF_FIFO_CMD_GET_DATA , DIF_FIFO_CMD_FIFO_FREQ , DIF_FIFO_CMD_STATUS ,
  DIF_FIFO_CMD_FIFO_START , DIF_FIFO_CMD_FIFO_STOP , DIF_FIFO_CMD_COUNT , DIF_FIFO_CMD_FIFO_CLEAR ,
  DIF_FIFO_CMD_LAST
}
 

Functions

void Run_DIF_FIFO (int32_t cardIndex, int32_t module, int32_t ModuleID)
 Run_DIF_FIFO prompts the user for the card, module and channel to use for the application and calls Cfg_DIF_Channel if the card, module, channel is valid for as a discrete module.
 
void Cfg_DIF_FIFO_Channel (int32_t cardIndex, int32_t module, uint32_t ModuleID, int32_t MaxChannel)
 Cfg_DIF_FIFO_Channel handles calling the Display_DIF_ChannelCfg routine to display the discrete channel configuration and calling the routines associated with the user's menu commands.
 
static void Display_DIF_ChannelCfg (int32_t cardIndex, int32_t module, int32_t chan, uint32_t ModuleID)
 Display_DIF_ChannelCfg illustrate the methods to call in the naibrd library to retrieve the configuration states for measurement operation.
 
nai_status_t Configure_DIF_FIFO_Mode (int32_t paramCount, int32_t *p_params)
 Configure_DIF_FIFO_Mode handles the user request to select the FIFO mode for the selected channel and calls the method in the naibrd library to set the mode.
 
nai_status_t Start_DIF_FIFO (int32_t paramCount, int32_t *p_params)
 Start_DIF_FIFO must be called in order to start the FIFO in a particular mode.
 
nai_status_t Clear_DIF_FIFO (int32_t paramCount, int32_t *p_params)
 Clear_DIF_FIFO should be called before naibrd_DIF_StartMeasurement to clear out old data.
 
nai_status_t Get_DIF_FIFO_Data (int32_t paramCount, int32_t *p_params)
 Get_DIF_FIFO_Data reads back the data on the FIFO.
 
nai_status_t Configure_DIF_Counter_Interval (int32_t paramCount, int32_t *p_params)
 Configure_DIF_Counter_Interval will configure DIF module gating interval for measurement of counts within the user defined interval.
 
nai_status_t Get_DIF_FIFO_Status (int32_t paramCount, int32_t *p_params)
 Get_DIF_FIFO_Status will read back the value of the counter if the FIFO is configured for opmode 6,7, or 8.
 
nai_status_t Get_DIF_FIFO_Count (int32_t paramCount, int32_t *p_params)
 Get_DIF_FIFO_Count will read back the value of the counter if the FIFO is configured for opmode 6,7, or 8.
 
int32_t DIF_FIFO (void)
 The purpose of the DIF_FIFO is to illustrate the methods to call in the naibrd library to perform DIF enhanced FIFO mode. This example code will configure DIF FIFO to desired mode, start, stop and display the DIF FIFO.
 

Variables

static const int8_t * CONFIG_FILE = (int8_t *)"default_DIF_Measure.txt"
 
static const int32_t DEF_DIF_CARD_INDEX = 0
 
static const int32_t DEF_DIF_MODULE = 1
 
static const int32_t DEF_DIF_CHANNEL = 1
 
naiapp_cmdtbl_params_t DIF_FIFO_MenuCmds []
 

Enumeration Type Documentation

◆ dif_fifo_commands

Enumerator
DIF_FIFO_CMD_MODE 
DIF_FIFO_CMD_GET_DATA 
DIF_FIFO_CMD_FIFO_FREQ 
DIF_FIFO_CMD_STATUS 
DIF_FIFO_CMD_FIFO_START 
DIF_FIFO_CMD_FIFO_STOP 
DIF_FIFO_CMD_COUNT 
DIF_FIFO_CMD_FIFO_CLEAR 
DIF_FIFO_CMD_LAST 

Function Documentation

◆ Cfg_DIF_FIFO_Channel()

void Cfg_DIF_FIFO_Channel ( int32_t cardIndex,
int32_t module,
uint32_t ModuleID,
int32_t MaxChannel )

Cfg_DIF_FIFO_Channel handles calling the Display_DIF_ChannelCfg routine to display the discrete channel configuration and calling the routines associated with the user's menu commands.

◆ Clear_DIF_FIFO()

nai_status_t Clear_DIF_FIFO ( int32_t paramCount,
int32_t * p_params )

Clear_DIF_FIFO should be called before naibrd_DIF_StartMeasurement to clear out old data.

◆ Configure_DIF_Counter_Interval()

nai_status_t Configure_DIF_Counter_Interval ( int32_t paramCount,
int32_t * p_params )

Configure_DIF_Counter_Interval will configure DIF module gating interval for measurement of counts within the user defined interval.

◆ Configure_DIF_FIFO_Mode()

nai_status_t Configure_DIF_FIFO_Mode ( int32_t paramCount,
int32_t * p_params )

Configure_DIF_FIFO_Mode handles the user request to select the FIFO mode for the selected channel and calls the method in the naibrd library to set the mode.

◆ DIF_FIFO()

int32_t DIF_FIFO ( void )

The purpose of the DIF_FIFO is to illustrate the methods to call in the naibrd library to perform DIF enhanced FIFO mode. This example code will configure DIF FIFO to desired mode, start, stop and display the DIF FIFO.

The following system configuration routines from the nai_sys_cfg.c file are called to assist with the configuration setup for this program prior to calling the naibrd DIF routines.

  • ClearDeviceCfg
  • QuerySystemCfg
  • DisplayDeviceCfg
  • GetBoardSNModCfg
  • SaveDeviceCfg

◆ Display_DIF_ChannelCfg()

static void Display_DIF_ChannelCfg ( int32_t cardIndex,
int32_t module,
int32_t chan,
uint32_t ModuleID )
static

Display_DIF_ChannelCfg illustrate the methods to call in the naibrd library to retrieve the configuration states for measurement operation.

◆ Get_DIF_FIFO_Count()

nai_status_t Get_DIF_FIFO_Count ( int32_t paramCount,
int32_t * p_params )

Get_DIF_FIFO_Count will read back the value of the counter if the FIFO is configured for opmode 6,7, or 8.

◆ Get_DIF_FIFO_Data()

nai_status_t Get_DIF_FIFO_Data ( int32_t paramCount,
int32_t * p_params )

Get_DIF_FIFO_Data reads back the data on the FIFO.

◆ Get_DIF_FIFO_Status()

nai_status_t Get_DIF_FIFO_Status ( int32_t paramCount,
int32_t * p_params )

Get_DIF_FIFO_Status will read back the value of the counter if the FIFO is configured for opmode 6,7, or 8.

◆ Run_DIF_FIFO()

void Run_DIF_FIFO ( int32_t cardIndex,
int32_t module,
int32_t ModuleID )

Run_DIF_FIFO prompts the user for the card, module and channel to use for the application and calls Cfg_DIF_Channel if the card, module, channel is valid for as a discrete module.

◆ Start_DIF_FIFO()

nai_status_t Start_DIF_FIFO ( int32_t paramCount,
int32_t * p_params )

Start_DIF_FIFO must be called in order to start the FIFO in a particular mode.

Variable Documentation

◆ CONFIG_FILE

const int8_t* CONFIG_FILE = (int8_t *)"default_DIF_Measure.txt"
static

◆ DEF_DIF_CARD_INDEX

const int32_t DEF_DIF_CARD_INDEX = 0
static

◆ DEF_DIF_CHANNEL

const int32_t DEF_DIF_CHANNEL = 1
static

◆ DEF_DIF_MODULE

const int32_t DEF_DIF_MODULE = 1
static

◆ DIF_FIFO_MenuCmds

naiapp_cmdtbl_params_t DIF_FIFO_MenuCmds[]
Initial value:
= {
{"Mode", "DIF Select FIFO Mode", DIF_FIFO_CMD_MODE, Configure_DIF_FIFO_Mode},
{"Disp", "DIF Display FIFO Data", DIF_FIFO_CMD_GET_DATA, Get_DIF_FIFO_Data},
{"Intv", "DIF Set Counter Interval", DIF_FIFO_CMD_FIFO_FREQ, Configure_DIF_Counter_Interval},
{"Stat", "DIF Display FIFO Status", DIF_FIFO_CMD_STATUS, Get_DIF_FIFO_Status},
{"Go", "DIF Start FIFO/Clear count", DIF_FIFO_CMD_FIFO_START, Start_DIF_FIFO},
{"STOP", "DIF Stop Measurement", DIF_FIFO_CMD_FIFO_STOP, NULL},
{"Count", "DIF Display FIFO Count", DIF_FIFO_CMD_COUNT, Get_DIF_FIFO_Count},
{"R", "DIF Clear FIFO", DIF_FIFO_CMD_FIFO_CLEAR, Clear_DIF_FIFO}
}
nai_status_t Get_DIF_FIFO_Data(int32_t paramCount, int32_t *p_params)
Get_DIF_FIFO_Data reads back the data on the FIFO.
Definition dif_measure.c:531
nai_status_t Start_DIF_FIFO(int32_t paramCount, int32_t *p_params)
Start_DIF_FIFO must be called in order to start the FIFO in a particular mode.
Definition dif_measure.c:494
nai_status_t Configure_DIF_FIFO_Mode(int32_t paramCount, int32_t *p_params)
Configure_DIF_FIFO_Mode handles the user request to select the FIFO mode for the selected channel and...
Definition dif_measure.c:361
nai_status_t Configure_DIF_Counter_Interval(int32_t paramCount, int32_t *p_params)
Configure_DIF_Counter_Interval will configure DIF module gating interval for measurement of counts wi...
Definition dif_measure.c:587
nai_status_t Get_DIF_FIFO_Status(int32_t paramCount, int32_t *p_params)
Get_DIF_FIFO_Status will read back the value of the counter if the FIFO is configured for opmode 6,...
Definition dif_measure.c:664
@ DIF_FIFO_CMD_MODE
Definition dif_measure.c:42
@ DIF_FIFO_CMD_STATUS
Definition dif_measure.c:45
@ DIF_FIFO_CMD_GET_DATA
Definition dif_measure.c:43
@ DIF_FIFO_CMD_COUNT
Definition dif_measure.c:48
@ DIF_FIFO_CMD_FIFO_STOP
Definition dif_measure.c:47
@ DIF_FIFO_CMD_FIFO_FREQ
Definition dif_measure.c:44
@ DIF_FIFO_CMD_FIFO_START
Definition dif_measure.c:46
@ DIF_FIFO_CMD_FIFO_CLEAR
Definition dif_measure.c:49
nai_status_t Clear_DIF_FIFO(int32_t paramCount, int32_t *p_params)
Clear_DIF_FIFO should be called before naibrd_DIF_StartMeasurement to clear out old data.
Definition dif_measure.c:512
nai_status_t Get_DIF_FIFO_Count(int32_t paramCount, int32_t *p_params)
Get_DIF_FIFO_Count will read back the value of the counter if the FIFO is configured for opmode 6,...
Definition dif_measure.c:642