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

Enumerations

enum  tc_basicops_commands {
  TC_BASICMENU_CMD_SET_THERMO_COUPLE_TYPE , TC_BASICMENU_CMD_SET_SAMPLE_RATE , TC_BASICMENU_CMD_SET_COMP_TEMP , TC_BASICMENU_CMD_SET_CJC_ENABLE ,
  TC_BASICMENU_CMD_SET_CJC_TYPE , TC_BASICMENU_CMD_SET_THRESH , TC_BASICMENU_CMD_CLEAR_STATUS , TC_BASICMENU_CMD_SET_OFFSET_TEMP ,
  TC_BASICMENU_CMD_SET_BACKGROUND_OP_SUSPEND , TC_BASICMENU_CMD_TRIGGER_SYSTEM_CAL , TC_BASICMENU_CMD_TRIGGER_OPEN_CHECK , TC_BASICMENU_CMD_TRIGGER_BIT ,
  TC_BASICMENU_CMD_CHANNEL_STATUS_ENABLE , TC_BASICMENU_CMD_TC_RTD_CONFIG , TC_BASICMENU_CMD_COUNT
}
 

Functions

static bool_t TCBasicMenu_Run (int32_t cardIndex, int32_t module, uint32_t modId)
 Run_TC_BasicOps prompts the user for the card, module and channel to use for the application and calls Cfg_TC_Channel if the card, module, channel is valid for as a discrete module.
 
static void naiapp_TCBasicMenu_DisplayMeasurements (int32_t cardIndex, int32_t module, int32_t chan)
 Display_TC_ChannelCfg illustrate the methods to call in the naibrd library to retrieve the configuration states for basic operation.
 
static void naiapp_TC_Display_ConfigAndThermoCoupleType (int32_t cardIndex, int32_t module, int32_t chan)
 
static void naiapp_TC_Display_Temperature (int32_t cardIndex, int32_t module, int32_t chan)
 
static void naiapp_TC_Display_Voltage (int32_t cardIndex, int32_t module, int32_t chan)
 
static void naiapp_TC_Display_SampleRate (int32_t cardIndex, int32_t module, int32_t chan)
 
static void naiapp_TC_Display_CompTemp (int32_t cardIndex, int32_t module, int32_t chan)
 
static void naiapp_TC_Display_CJCEnable (int32_t cardIndex, int32_t module)
 
static void naiapp_TC_Display_Statuses (int32_t cardIndex, int32_t module, int32_t chan)
 
static void naiapp_TC_Display_Thresholds (int32_t cardIndex, int32_t module, int32_t chan)
 
static void naiapp_TC_Display_CJCType (int32_t cardIndex, int32_t module, int32_t chan)
 
static void naiapp_TC_Display_OffsetTemp (int32_t cardIndex, int32_t module, int32_t chan)
 
static void naiapp_TC_Display_BackgroundOpSuspension (int32_t cardIndex, int32_t module, int32_t chan)
 
static nai_status_t naiapp_TC_Set_ThermoCoupleType (int32_t paramCount, int32_t *p_params)
 TC_Set_ThermoCoupleType handles the user request to configure the thermo couple type for the given channel and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_Set_SampleRate (int32_t paramCount, int32_t *p_params)
 TC_Set_SampleRate handles the user request to configure the sample rate for the given channel and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_Set_CompTemp (int32_t paramCount, int32_t *p_params)
 TC_Set_CompTemp handles the user request to configure the compensation temperature for the given channel and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_Set_CJCEnable (int32_t paramCount, int32_t *p_params)
 TC_Set_CJCEnable handles the user request to configure the cold junction compensation for the TC module and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_Set_Thresh (int32_t paramCount, int32_t *p_params)
 TC_Set_Thresh handles the user request to configure the threshold values for the given channel and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_ClearStatus (int32_t paramCount, int32_t *p_params)
 TC_ClearStatus handles the user request to clear the status for the given status type and channel and calls the relevant method in the naibrd library.
 
static nai_status_t naiapp_TC_Set_CJCType (int32_t paramCount, int32_t *p_params)
 TC_Set_CJCType handles the user request to configure the cold junction compensation type for the TC module and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_Set_OffsetTemp (int32_t paramCount, int32_t *p_params)
 TC_Set_OffsetTemp handles the user request to configure the offset temperature for the given channel and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_Set_BackgroundOpSuspension (int32_t paramCount, int32_t *p_params)
 TC_Set_BackgroundOpSuspension handles the user request to suspend the BIT/Open-Line tests and System Calibration for the given channel and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_Trigger_SystemCalibration (int32_t paramCount, int32_t *p_params)
 TC_Trigger_SystemCalibration handles the user request to trigger system calibration for the given channel and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_Trigger_OpenCheck (int32_t paramCount, int32_t *p_params)
 TC_Trigger_OpenCheck handles the user request to trigger an open-line check for the given channel and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_Trigger_BIT (int32_t paramCount, int32_t *p_params)
 TC_Trigger_BIT handles the user request to trigger BIT for the given channel and calls the relevant setter method in the naibrd library.
 
static nai_status_t naiapp_TC_ChannelStatusEnable (int32_t paramCount, int32_t *params)
 This function Enables\Disables the reporting of the Channel Status. When enabled, the user will get status updates. When disabled, the statuses will not report and status-based interrupts will not assert.
 
static nai_status_t naiapp_TC_Configuration (int32_t paramCount, int32_t *p_params)
 naiapp_TC_Configuration handles the user request to configure the given channel to TC or RTD mode and calls the relevant setter method in the naibrd library.
 
int32_t TC_RunBasicOps (void)
 The purpose of the TC_BasicOps is to illustrate the methods to call in the naibrd library to perform basic operations with the thermal coupling module for configuration setup and reading the channels.
 

Variables

static const int8_t * SAMPLE_PGM_NAME = (const int8_t *)"TC Module Basic Operations"
 
static const int8_t * TC_CONFIG_FILE = (const int8_t *)"default_TC_BasicOps.txt"
 
uint32_t g_modId = 0u
 
naiapp_cmdtbl_params_t TC_BasicOpMenuCmds []
 

Enumeration Type Documentation

◆ tc_basicops_commands

Enumerator
TC_BASICMENU_CMD_SET_THERMO_COUPLE_TYPE 
TC_BASICMENU_CMD_SET_SAMPLE_RATE 
TC_BASICMENU_CMD_SET_COMP_TEMP 
TC_BASICMENU_CMD_SET_CJC_ENABLE 
TC_BASICMENU_CMD_SET_CJC_TYPE 
TC_BASICMENU_CMD_SET_THRESH 
TC_BASICMENU_CMD_CLEAR_STATUS 
TC_BASICMENU_CMD_SET_OFFSET_TEMP 
TC_BASICMENU_CMD_SET_BACKGROUND_OP_SUSPEND 
TC_BASICMENU_CMD_TRIGGER_SYSTEM_CAL 
TC_BASICMENU_CMD_TRIGGER_OPEN_CHECK 
TC_BASICMENU_CMD_TRIGGER_BIT 
TC_BASICMENU_CMD_CHANNEL_STATUS_ENABLE 
TC_BASICMENU_CMD_TC_RTD_CONFIG 
TC_BASICMENU_CMD_COUNT 

Function Documentation

◆ naiapp_TC_ChannelStatusEnable()

static nai_status_t naiapp_TC_ChannelStatusEnable ( int32_t paramCount,
int32_t * params )
static

This function Enables\Disables the reporting of the Channel Status. When enabled, the user will get status updates. When disabled, the statuses will not report and status-based interrupts will not assert.

◆ naiapp_TC_ClearStatus()

static nai_status_t naiapp_TC_ClearStatus ( int32_t paramCount,
int32_t * p_params )
static

TC_ClearStatus handles the user request to clear the status for the given status type and channel and calls the relevant method in the naibrd library.

◆ naiapp_TC_Configuration()

static nai_status_t naiapp_TC_Configuration ( int32_t paramCount,
int32_t * p_params )
static

naiapp_TC_Configuration handles the user request to configure the given channel to TC or RTD mode and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Display_BackgroundOpSuspension()

static void naiapp_TC_Display_BackgroundOpSuspension ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

◆ naiapp_TC_Display_CJCEnable()

static void naiapp_TC_Display_CJCEnable ( int32_t cardIndex,
int32_t module )
static

◆ naiapp_TC_Display_CJCType()

static void naiapp_TC_Display_CJCType ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

◆ naiapp_TC_Display_CompTemp()

static void naiapp_TC_Display_CompTemp ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

◆ naiapp_TC_Display_ConfigAndThermoCoupleType()

static void naiapp_TC_Display_ConfigAndThermoCoupleType ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

◆ naiapp_TC_Display_OffsetTemp()

static void naiapp_TC_Display_OffsetTemp ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

◆ naiapp_TC_Display_SampleRate()

static void naiapp_TC_Display_SampleRate ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

◆ naiapp_TC_Display_Statuses()

static void naiapp_TC_Display_Statuses ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

◆ naiapp_TC_Display_Temperature()

static void naiapp_TC_Display_Temperature ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

◆ naiapp_TC_Display_Thresholds()

static void naiapp_TC_Display_Thresholds ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

◆ naiapp_TC_Display_Voltage()

static void naiapp_TC_Display_Voltage ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

◆ naiapp_TC_Set_BackgroundOpSuspension()

static nai_status_t naiapp_TC_Set_BackgroundOpSuspension ( int32_t paramCount,
int32_t * p_params )
static

TC_Set_BackgroundOpSuspension handles the user request to suspend the BIT/Open-Line tests and System Calibration for the given channel and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Set_CJCEnable()

static nai_status_t naiapp_TC_Set_CJCEnable ( int32_t paramCount,
int32_t * p_params )
static

TC_Set_CJCEnable handles the user request to configure the cold junction compensation for the TC module and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Set_CJCType()

static nai_status_t naiapp_TC_Set_CJCType ( int32_t paramCount,
int32_t * p_params )
static

TC_Set_CJCType handles the user request to configure the cold junction compensation type for the TC module and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Set_CompTemp()

static nai_status_t naiapp_TC_Set_CompTemp ( int32_t paramCount,
int32_t * p_params )
static

TC_Set_CompTemp handles the user request to configure the compensation temperature for the given channel and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Set_OffsetTemp()

static nai_status_t naiapp_TC_Set_OffsetTemp ( int32_t paramCount,
int32_t * p_params )
static

TC_Set_OffsetTemp handles the user request to configure the offset temperature for the given channel and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Set_SampleRate()

static nai_status_t naiapp_TC_Set_SampleRate ( int32_t paramCount,
int32_t * p_params )
static

TC_Set_SampleRate handles the user request to configure the sample rate for the given channel and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Set_ThermoCoupleType()

static nai_status_t naiapp_TC_Set_ThermoCoupleType ( int32_t paramCount,
int32_t * p_params )
static

TC_Set_ThermoCoupleType handles the user request to configure the thermo couple type for the given channel and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Set_Thresh()

static nai_status_t naiapp_TC_Set_Thresh ( int32_t paramCount,
int32_t * p_params )
static

TC_Set_Thresh handles the user request to configure the threshold values for the given channel and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Trigger_BIT()

static nai_status_t naiapp_TC_Trigger_BIT ( int32_t paramCount,
int32_t * p_params )
static

TC_Trigger_BIT handles the user request to trigger BIT for the given channel and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Trigger_OpenCheck()

static nai_status_t naiapp_TC_Trigger_OpenCheck ( int32_t paramCount,
int32_t * p_params )
static

TC_Trigger_OpenCheck handles the user request to trigger an open-line check for the given channel and calls the relevant setter method in the naibrd library.

◆ naiapp_TC_Trigger_SystemCalibration()

static nai_status_t naiapp_TC_Trigger_SystemCalibration ( int32_t paramCount,
int32_t * p_params )
static

TC_Trigger_SystemCalibration handles the user request to trigger system calibration for the given channel and calls the relevant setter method in the naibrd library.

◆ naiapp_TCBasicMenu_DisplayMeasurements()

static void naiapp_TCBasicMenu_DisplayMeasurements ( int32_t cardIndex,
int32_t module,
int32_t chan )
static

Display_TC_ChannelCfg illustrate the methods to call in the naibrd library to retrieve the configuration states for basic operation.

◆ TC_RunBasicOps()

int32_t TC_RunBasicOps ( void )

The purpose of the TC_BasicOps is to illustrate the methods to call in the naibrd library to perform basic operations with the thermal coupling module for configuration setup and reading the channels.

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 TC routines.

  • ClearDeviceCfg
  • QuerySystemCfg
  • DisplayDeviceCfg
  • GetBoardSNModCfg
  • SaveDeviceCfg

◆ TCBasicMenu_Run()

static bool_t TCBasicMenu_Run ( int32_t cardIndex,
int32_t module,
uint32_t moduleID )
static

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

Variable Documentation

◆ g_modId

uint32_t g_modId = 0u

◆ SAMPLE_PGM_NAME

const int8_t* SAMPLE_PGM_NAME = (const int8_t *)"TC Module Basic Operations"
static

◆ TC_BasicOpMenuCmds

naiapp_cmdtbl_params_t TC_BasicOpMenuCmds[]
Initial value:
= {
{"2", "Set the Compensation Temperature", TC_BASICMENU_CMD_SET_COMP_TEMP, naiapp_TC_Set_CompTemp},
{"3", "Enable/Disable Cold Junction Compensation", TC_BASICMENU_CMD_SET_CJC_ENABLE, naiapp_TC_Set_CJCEnable},
{"5", "Set a Threshold Value", TC_BASICMENU_CMD_SET_THRESH, naiapp_TC_Set_Thresh},
{"7", "Set the Offset Temperature", TC_BASICMENU_CMD_SET_OFFSET_TEMP, naiapp_TC_Set_OffsetTemp},
{"8", "Suspend BIT/Open tests and System Cal", TC_BASICMENU_CMD_SET_BACKGROUND_OP_SUSPEND, naiapp_TC_Set_BackgroundOpSuspension},
{"D", "Set TC/RTD Configuration Mode", TC_BASICMENU_CMD_TC_RTD_CONFIG, naiapp_TC_Configuration}
}
static nai_status_t naiapp_TC_Trigger_BIT(int32_t paramCount, int32_t *p_params)
TC_Trigger_BIT handles the user request to trigger BIT for the given channel and calls the relevant s...
Definition tc_basic_ops.c:1199
static nai_status_t naiapp_TC_Trigger_OpenCheck(int32_t paramCount, int32_t *p_params)
TC_Trigger_OpenCheck handles the user request to trigger an open-line check for the given channel and...
Definition tc_basic_ops.c:1140
static nai_status_t naiapp_TC_Set_CJCEnable(int32_t paramCount, int32_t *p_params)
TC_Set_CJCEnable handles the user request to configure the cold junction compensation for the TC modu...
Definition tc_basic_ops.c:668
static nai_status_t naiapp_TC_ClearStatus(int32_t paramCount, int32_t *p_params)
TC_ClearStatus handles the user request to clear the status for the given status type and channel and...
Definition tc_basic_ops.c:825
static nai_status_t naiapp_TC_Set_CJCType(int32_t paramCount, int32_t *p_params)
TC_Set_CJCType handles the user request to configure the cold junction compensation type for the TC m...
Definition tc_basic_ops.c:907
static nai_status_t naiapp_TC_Set_SampleRate(int32_t paramCount, int32_t *p_params)
TC_Set_SampleRate handles the user request to configure the sample rate for the given channel and cal...
Definition tc_basic_ops.c:576
static nai_status_t naiapp_TC_Set_CompTemp(int32_t paramCount, int32_t *p_params)
TC_Set_CompTemp handles the user request to configure the compensation temperature for the given chan...
Definition tc_basic_ops.c:622
static nai_status_t naiapp_TC_Configuration(int32_t paramCount, int32_t *p_params)
naiapp_TC_Configuration handles the user request to configure the given channel to TC or RTD mode and...
Definition tc_basic_ops.c:1291
static nai_status_t naiapp_TC_Set_Thresh(int32_t paramCount, int32_t *p_params)
TC_Set_Thresh handles the user request to configure the threshold values for the given channel and ca...
Definition tc_basic_ops.c:732
static nai_status_t naiapp_TC_Set_OffsetTemp(int32_t paramCount, int32_t *p_params)
TC_Set_OffsetTemp handles the user request to configure the offset temperature for the given channel ...
Definition tc_basic_ops.c:971
static nai_status_t naiapp_TC_ChannelStatusEnable(int32_t paramCount, int32_t *params)
This function Enables\Disables the reporting of the Channel Status. When enabled, the user will get s...
Definition tc_basic_ops.c:1257
static nai_status_t naiapp_TC_Set_ThermoCoupleType(int32_t paramCount, int32_t *p_params)
TC_Set_ThermoCoupleType handles the user request to configure the thermo couple type for the given ch...
Definition tc_basic_ops.c:493
@ TC_BASICMENU_CMD_TRIGGER_BIT
Definition tc_basic_ops.c:75
@ TC_BASICMENU_CMD_TRIGGER_SYSTEM_CAL
Definition tc_basic_ops.c:73
@ TC_BASICMENU_CMD_TRIGGER_OPEN_CHECK
Definition tc_basic_ops.c:74
@ TC_BASICMENU_CMD_SET_THRESH
Definition tc_basic_ops.c:69
@ TC_BASICMENU_CMD_SET_CJC_TYPE
Definition tc_basic_ops.c:68
@ TC_BASICMENU_CMD_CLEAR_STATUS
Definition tc_basic_ops.c:70
@ TC_BASICMENU_CMD_SET_OFFSET_TEMP
Definition tc_basic_ops.c:71
@ TC_BASICMENU_CMD_SET_SAMPLE_RATE
Definition tc_basic_ops.c:65
@ TC_BASICMENU_CMD_TC_RTD_CONFIG
Definition tc_basic_ops.c:77
@ TC_BASICMENU_CMD_CHANNEL_STATUS_ENABLE
Definition tc_basic_ops.c:76
@ TC_BASICMENU_CMD_SET_BACKGROUND_OP_SUSPEND
Definition tc_basic_ops.c:72
@ TC_BASICMENU_CMD_SET_CJC_ENABLE
Definition tc_basic_ops.c:67
@ TC_BASICMENU_CMD_SET_COMP_TEMP
Definition tc_basic_ops.c:66
@ TC_BASICMENU_CMD_SET_THERMO_COUPLE_TYPE
Definition tc_basic_ops.c:64
static nai_status_t naiapp_TC_Trigger_SystemCalibration(int32_t paramCount, int32_t *p_params)
TC_Trigger_SystemCalibration handles the user request to trigger system calibration for the given cha...
Definition tc_basic_ops.c:1081
static nai_status_t naiapp_TC_Set_BackgroundOpSuspension(int32_t paramCount, int32_t *p_params)
TC_Set_BackgroundOpSuspension handles the user request to suspend the BIT/Open-Line tests and System ...
Definition tc_basic_ops.c:1017

◆ TC_CONFIG_FILE

const int8_t* TC_CONFIG_FILE = (const int8_t *)"default_TC_BasicOps.txt"
static