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

Enumerations

enum  dt_basicops_commands {
  DT_BASICOP_CMD_IOFORMAT , DT_BASICOP_CMD_OUTPUTSTATE , DT_BASICOP_CMD_THRESHOLD_MIN_LO , DT_BASICOP_CMD_THRESHOLD_LOWER ,
  DT_BASICOP_CMD_THRESHOLD_UPPER , DT_BASICOP_CMD_THRESHOLD_MAX_HI , DT_BASICOP_CMD_DEBOUNCE , DT_BASICOP_CMD_RESET_OC ,
  DT_BASICOP_CMD_STATUS , DT_BASICOP_CMD_FLOAT , DT_BASICOP_CMD_BIT_THRESHOLD , DT_BASICOP_CMD_CHANNEL_STATUS_ENABLE ,
  DT_BASICOP_CMD_CHECK_POWER_ON_BIT_COMPLETE , DT_BASICOP_CMD_CLEAR_MODULE_BIT_LOGIC , DT_BASICOP_CMD_MODULE_POWER_RESET , DT_BASICOP_CMD_WD_MENU ,
  DT_BASICOP_CMD_COUNT
}
 
enum  dt_gen5_dt_watchdog_commands {
  DT_COMMON_CMD_WD_QUIETTIME , DT_COMMON_CMD_WD_WINDOWTIME , DT_COMMON_CMD_WD_DISPLAY , DT_COMMON_CMD_WD_STROBE ,
  DT_COMMON_CMD_WD_KILL , DT_COMMON_CMD_WD_BACK , DT_COMMON_CMD_WD_COUNT
}
 
enum  dt_module_power_reset_commands { DT_MODULE_POWER_RESET_CMD_BACK , DT_MODULE_POWER_RESET_CMD_CLEAR_MODULE_POWER_RESET_STATUS , DT_MODULE_POWER_RESET_CMD_SET_MODULE_POWER_RESET , DT_MODULE_POWER_RESET_CMD_COUNT }
 

Functions

static int32_t Run_DT_BasicOps (int32_t cardIndex, int32_t module, uint32_t modid)
 Run_DT_BasicOps prompts the user for the card, module and channel to use for the application and calls Cfg_DT_Channel if the card, module, channel is valid for as a discrete module.
 
static void Verify_DT_ParamCnt (int32_t paramCnt)
 Verify_DT_ParamCnt verifies parameter count and displays error message if invalid.
 
static void Cfg_DT_Channel (int32_t cardIndex, int32_t module, uint32_t ModuleID, int32_t MaxChannel)
 Cfg_DT_Channel handles calling the Display_DT_ChannelCfg routine to display the discrete channel configuration and calling the routines associated with the user's menu commands.
 
static void Display_DT_ChannelCfg (int32_t cardIndex, int32_t module, int32_t chan, uint32_t ModuleID)
 Display_DT_ChannelCfg illustrate the methods to call in the naibrd library to retrieve the configuration states for basic operation.
 
static nai_status_t Display_DT_Status (int32_t paramCnt, int32_t *p_params)
 Display_DT_Status illustrate the methods to call in the naibrd library to retrieve the status states.
 
static nai_status_t Configure_DT_IOFormat (int32_t paramCnt, int32_t *p_params)
 Configure_DT_IOFormat handles the user request to configure the Input/Output configuration for the selected channel and calls the method in the naibrd library to set the Input/Output mode.
 
static nai_status_t Configure_DT_OutputState (int32_t paramCnt, int32_t *p_params)
 Configure_DT_OutputState handles the user request to set the Output state for the selected channel and calls the method in the naibrd library to set the Output state.
 
static nai_status_t Configure_DT_MinLoThreshold (int32_t paramCnt, int32_t *p_params)
 Configure_DT_MinLoThreshold calls the Configure_DT_Threshold() routine for Min Low Threshold configuration.
 
static nai_status_t Configure_DT_LowThreshold (int32_t paramCnt, int32_t *p_params)
 Configure_DT_LowThreshold calls the Configure_DT_Threshold() routine for Lower Threshold configuration.
 
static nai_status_t Configure_DT_UpperThreshold (int32_t paramCnt, int32_t *p_params)
 Configure_DT_UpperThreshold calls the Configure_DT_Threshold() routine for Upper Threshold configuration.
 
static nai_status_t Configure_DT_MaxHiThreshold (int32_t paramCnt, int32_t *p_params)
 Configure_DT_MaxHiThreshold calls the Configure_DT_Threshold() routine for Max High Threshold configuration.
 
static nai_status_t Configure_DT_Threshold (int32_t paramCnt, int32_t *p_params, naibrd_dt_thresh_type_t thresholdtype, int8_t *thresholdtext)
 Configure_DT_Threshold handles the user request to configure the selected threshold configuration and channel and calls the method in the naibrd library to set the threshold voltage.
 
static nai_status_t Configure_DT_Debounce (int32_t paramCnt, int32_t *p_params)
 Configure_DT_Threshold handles the user request to configure the selected threshold configuration and channel and calls the method in the naibrd library to set the threshold voltage.
 
static nai_status_t Configure_DT_Floating (int32_t paramCnt, int32_t *p_params)
 Configure_DT_Floating handles the user request to set the floating point enable and calls the method in the naibrd library to set the floating point state.
 
static nai_status_t Configure_DT_BITThresholds (int32_t paramCnt, int32_t *p_params)
 Configure_DT_BITThresholds() allows the user to set and get the BIT error thresholds. This is an advanced feature.
 
static nai_status_t Configure_DT_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 Configure_DT_CheckPBITComplete (int32_t paramCount, int32_t *p_params)
 Configure_DT_CheckPBITComplete handles the user request to check the module power-on BIT completed state and calls the method in the naibrd library to check the power-on BIT completed state. If the power-on BIT completed state is set, meaning that power-on BIT has completed, the Latched BIT Status of each channel is checked by calling the method in the naibrd library to read the BIT Status.
 
static nai_status_t Configure_DT_ClearModuleBITLogic (int32_t paramCount, int32_t *p_params)
 Configure_DT_ClearModuleBITLogic handles the user request to clear the module BIT logic, which resets the Continuous BIT internal circuitry and counter, and calls the method in the naibrd library to clear the module BIT logic.
 
static bool_t configurable_DT_IOFormat (uint32_t ModuleID, int32_t chan)
 configurable_DT_IOFormat determines whether the channel selected for the given Discrete Module ID is capable of being programmed for high side and push-pull output configurations.
 
static bool_t configurable_DT_Output (uint32_t ModuleID, int32_t chan)
 configurable_DT_Output determines whether the channel selected for the given Discrete Module ID is capable of being configured as an output channel.
 
static nai_status_t Configure_DT_ModulePowerResetMenu (int32_t paramCount, int32_t *p_params)
 Handle_DT_ModulePowerResetMenu displays the menu for module power reset commands.
 
static nai_status_t Configure_DT_ClearModulePowerResetStatus (int32_t paramCount, int32_t *p_params)
 Handle_DT_ClearModulePowerResetStatus handles the user request to clear the module power reset status and calls the method in the naibrd library to clear the module power reset status. The user is prompted for the module power reset status type to clear.
 
static nai_status_t Configure_DT_SetModulePowerReset (int32_t paramCount, int32_t *p_params)
 Handle_DT_SetModulePowerReset handles the user request to set the module power reset request and calls the method in the naibrd library to set the module power reset request. The user is prompted for the module power reset request type to set, and then the user is prompted to set or reset the request bit.
 
static nai_status_t Handle_DT_WatchdogShowMenu (int32_t paramCount, int32_t *params)
 This function displays the menu for watchdog commands.
 
static nai_status_t Handle_DT_WatchDogQuietTime (int32_t paramCount, int32_t *params)
 This function sets the watchdog quiet time for the module. The user is prompted for the value in ms.
 
static nai_status_t Handle_DT_WatchDogWindowTime (int32_t paramCount, int32_t *params)
 This function sets the watchdog window time for the module. The user is prompted for the value in ms.
 
static nai_status_t Handle_DT_DisplayWatchdog (int32_t paramCount, int32_t *params)
 This function displays the DT Watchdog Operations data.
 
static nai_status_t Handle_DT_StrobeWatchdog (int32_t paramCount, int32_t *params)
 This function will start a thread to continuously Strobe the watchdog. The user is prompted for the value in ms. NOTE: When this thread/application exits the module will shut off all outputs and will need to be power cycled in order to be operational.
 
static nai_status_t Handle_DT_kill_WDStrobe_Thread (int32_t paramCount, int32_t *params)
 This function will terminate the WD Strobing thread. Module will shut off outputs at this state and will need to be power cycled to be operational.
 
static void naiapp_kill_WDStrobe_Thread ()
 This function will terminate the WD strobing thread. Module will shut off outputs at this state and will need to be power cycled to be operational.
 
DWORD WINAPI WD_Strobe_ThreadEntryPoint (LPVOID param) void *WD_Strobe_ThreadEntryPoint(void *param) static int WD_Strobe_ThreadEntryPoint(int32_t param)
 This function will continuously loop, strobing the watchdog every QuietTime + Window/2.
 
void * WD_Strobe_ThreadEntryPoint (void *arg)
 
static int WD_Strobe_ThreadEntryPoint (int32_t nParam)
 
int32_t DT_BasicOps (void)
 The purpose of the DT_BasicOps is to illustrate the methods to call in the naibrd library to perform basic operations with the discrete modules for configuration setup, controlling the drive outputs, and reading the channels.
 

Variables

static const int8_t * DEF_CONFIG_FILE = (const int8_t *)"default_DT_BasicOps.txt"
 
static bool_t terminateThread
 
static const int8_t * SAMPLE_WD_PGM_NAME = (const int8_t*)"DT Watchdog Operations"
 
static const int32_t DEF_DT_CARD_INDEX = 0
 
static const int32_t DEF_DT_MODULE = 1
 
static const int32_t DEF_DT_CHANNEL = 1
 
static const int32_t DEF_DT_KA_CHANNEL = 13
 
static HANDLE thread = NULL
 
static naiapp_cmdtbl_params_t DT_BasicOpMenuCmds []
 
naiapp_cmdtbl_params_t DT_WatchdogOpMenuCmds [DT_COMMON_CMD_WD_COUNT]
 
naiapp_cmdtbl_params_t DT_ModulePowerResetMenuCmds [DT_MODULE_POWER_RESET_CMD_COUNT]
 

Enumeration Type Documentation

◆ dt_basicops_commands

Enumerator
DT_BASICOP_CMD_IOFORMAT 
DT_BASICOP_CMD_OUTPUTSTATE 
DT_BASICOP_CMD_THRESHOLD_MIN_LO 
DT_BASICOP_CMD_THRESHOLD_LOWER 
DT_BASICOP_CMD_THRESHOLD_UPPER 
DT_BASICOP_CMD_THRESHOLD_MAX_HI 
DT_BASICOP_CMD_DEBOUNCE 
DT_BASICOP_CMD_RESET_OC 
DT_BASICOP_CMD_STATUS 
DT_BASICOP_CMD_FLOAT 
DT_BASICOP_CMD_BIT_THRESHOLD 
DT_BASICOP_CMD_CHANNEL_STATUS_ENABLE 
DT_BASICOP_CMD_CHECK_POWER_ON_BIT_COMPLETE 
DT_BASICOP_CMD_CLEAR_MODULE_BIT_LOGIC 
DT_BASICOP_CMD_MODULE_POWER_RESET 
DT_BASICOP_CMD_WD_MENU 
DT_BASICOP_CMD_COUNT 

◆ dt_gen5_dt_watchdog_commands

Enumerator
DT_COMMON_CMD_WD_QUIETTIME 
DT_COMMON_CMD_WD_WINDOWTIME 
DT_COMMON_CMD_WD_DISPLAY 
DT_COMMON_CMD_WD_STROBE 
DT_COMMON_CMD_WD_KILL 
DT_COMMON_CMD_WD_BACK 
DT_COMMON_CMD_WD_COUNT 

◆ dt_module_power_reset_commands

Enumerator
DT_MODULE_POWER_RESET_CMD_BACK 
DT_MODULE_POWER_RESET_CMD_CLEAR_MODULE_POWER_RESET_STATUS 
DT_MODULE_POWER_RESET_CMD_SET_MODULE_POWER_RESET 
DT_MODULE_POWER_RESET_CMD_COUNT 

Function Documentation

◆ Cfg_DT_Channel()

static void Cfg_DT_Channel ( int32_t cardIndex,
int32_t module,
uint32_t ModuleID,
int32_t MaxChannel )
static

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

◆ configurable_DT_IOFormat()

static bool_t configurable_DT_IOFormat ( uint32_t ModuleID,
int32_t chan )
static

configurable_DT_IOFormat determines whether the channel selected for the given Discrete Module ID is capable of being programmed for high side and push-pull output configurations.

◆ configurable_DT_Output()

static bool_t configurable_DT_Output ( uint32_t ModuleID,
int32_t chan )
static

configurable_DT_Output determines whether the channel selected for the given Discrete Module ID is capable of being configured as an output channel.

◆ Configure_DT_BITThresholds()

static nai_status_t Configure_DT_BITThresholds ( int32_t paramCnt,
int32_t * p_params )
static

Configure_DT_BITThresholds() allows the user to set and get the BIT error thresholds. This is an advanced feature.

◆ Configure_DT_ChannelStatusEnable()

static nai_status_t Configure_DT_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.

◆ Configure_DT_CheckPBITComplete()

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

Configure_DT_CheckPBITComplete handles the user request to check the module power-on BIT completed state and calls the method in the naibrd library to check the power-on BIT completed state. If the power-on BIT completed state is set, meaning that power-on BIT has completed, the Latched BIT Status of each channel is checked by calling the method in the naibrd library to read the BIT Status.

◆ Configure_DT_ClearModuleBITLogic()

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

Configure_DT_ClearModuleBITLogic handles the user request to clear the module BIT logic, which resets the Continuous BIT internal circuitry and counter, and calls the method in the naibrd library to clear the module BIT logic.

◆ Configure_DT_ClearModulePowerResetStatus()

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

Handle_DT_ClearModulePowerResetStatus handles the user request to clear the module power reset status and calls the method in the naibrd library to clear the module power reset status. The user is prompted for the module power reset status type to clear.

◆ Configure_DT_Debounce()

nai_status_t Configure_DT_Debounce ( int32_t paramCnt,
int32_t * p_params )
static

Configure_DT_Threshold handles the user request to configure the selected threshold configuration and channel and calls the method in the naibrd library to set the threshold voltage.

◆ Configure_DT_Floating()

static nai_status_t Configure_DT_Floating ( int32_t paramCnt,
int32_t * p_params )
static

Configure_DT_Floating handles the user request to set the floating point enable and calls the method in the naibrd library to set the floating point state.

◆ Configure_DT_IOFormat()

nai_status_t Configure_DT_IOFormat ( int32_t paramCnt,
int32_t * p_params )
static

Configure_DT_IOFormat handles the user request to configure the Input/Output configuration for the selected channel and calls the method in the naibrd library to set the Input/Output mode.

◆ Configure_DT_LowThreshold()

nai_status_t Configure_DT_LowThreshold ( int32_t paramCnt,
int32_t * p_params )
static

Configure_DT_LowThreshold calls the Configure_DT_Threshold() routine for Lower Threshold configuration.

◆ Configure_DT_MaxHiThreshold()

nai_status_t Configure_DT_MaxHiThreshold ( int32_t paramCnt,
int32_t * p_params )
static

Configure_DT_MaxHiThreshold calls the Configure_DT_Threshold() routine for Max High Threshold configuration.

◆ Configure_DT_MinLoThreshold()

nai_status_t Configure_DT_MinLoThreshold ( int32_t paramCnt,
int32_t * p_params )
static

Configure_DT_MinLoThreshold calls the Configure_DT_Threshold() routine for Min Low Threshold configuration.

◆ Configure_DT_ModulePowerResetMenu()

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

Handle_DT_ModulePowerResetMenu displays the menu for module power reset commands.

◆ Configure_DT_OutputState()

static nai_status_t Configure_DT_OutputState ( int32_t paramCnt,
int32_t * p_params )
static

Configure_DT_OutputState handles the user request to set the Output state for the selected channel and calls the method in the naibrd library to set the Output state.

◆ Configure_DT_SetModulePowerReset()

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

Handle_DT_SetModulePowerReset handles the user request to set the module power reset request and calls the method in the naibrd library to set the module power reset request. The user is prompted for the module power reset request type to set, and then the user is prompted to set or reset the request bit.

◆ Configure_DT_Threshold()

nai_status_t Configure_DT_Threshold ( int32_t paramCnt,
int32_t * p_params,
naibrd_dt_thresh_type_t thresholdtype,
int8_t * thresholdtext )
static

Configure_DT_Threshold handles the user request to configure the selected threshold configuration and channel and calls the method in the naibrd library to set the threshold voltage.

◆ Configure_DT_UpperThreshold()

nai_status_t Configure_DT_UpperThreshold ( int32_t paramCnt,
int32_t * p_params )
static

Configure_DT_UpperThreshold calls the Configure_DT_Threshold() routine for Upper Threshold configuration.

◆ Display_DT_ChannelCfg()

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

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

◆ Display_DT_Status()

static nai_status_t Display_DT_Status ( int32_t paramCnt,
int32_t * p_params )
static

Display_DT_Status illustrate the methods to call in the naibrd library to retrieve the status states.

◆ DT_BasicOps()

int32_t DT_BasicOps ( void )

The purpose of the DT_BasicOps is to illustrate the methods to call in the naibrd library to perform basic operations with the discrete modules for configuration setup, controlling the drive outputs, 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 DT routines.

  • ClearDeviceCfg
  • QuerySystemCfg
  • DisplayDeviceCfg
  • GetBoardSNModCfg
  • SaveDeviceCfg

◆ Handle_DT_DisplayWatchdog()

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

This function displays the DT Watchdog Operations data.

◆ Handle_DT_kill_WDStrobe_Thread()

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

This function will terminate the WD Strobing thread. Module will shut off outputs at this state and will need to be power cycled to be operational.

◆ Handle_DT_StrobeWatchdog()

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

This function will start a thread to continuously Strobe the watchdog. The user is prompted for the value in ms. NOTE: When this thread/application exits the module will shut off all outputs and will need to be power cycled in order to be operational.

◆ Handle_DT_WatchDogQuietTime()

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

This function sets the watchdog quiet time for the module. The user is prompted for the value in ms.

◆ Handle_DT_WatchdogShowMenu()

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

This function displays the menu for watchdog commands.

◆ Handle_DT_WatchDogWindowTime()

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

This function sets the watchdog window time for the module. The user is prompted for the value in ms.

◆ naiapp_kill_WDStrobe_Thread()

static void naiapp_kill_WDStrobe_Thread ( )
static

This function will terminate the WD strobing thread. Module will shut off outputs at this state and will need to be power cycled to be operational.

◆ Run_DT_BasicOps()

static int32_t Run_DT_BasicOps ( int32_t cardIndex,
int32_t module,
uint32_t modid )
static

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

◆ Verify_DT_ParamCnt()

static void Verify_DT_ParamCnt ( int32_t paramCnt)
static

Verify_DT_ParamCnt verifies parameter count and displays error message if invalid.

◆ WD_Strobe_ThreadEntryPoint() [1/3]

static int WD_Strobe_ThreadEntryPoint ( int32_t nParam)
static

◆ WD_Strobe_ThreadEntryPoint() [2/3]

DWORD WINAPI WD_Strobe_ThreadEntryPoint ( LPVOID param)

This function will continuously loop, strobing the watchdog every QuietTime + Window/2.

◆ WD_Strobe_ThreadEntryPoint() [3/3]

void * WD_Strobe_ThreadEntryPoint ( void * arg)

Variable Documentation

◆ DEF_CONFIG_FILE

const int8_t* DEF_CONFIG_FILE = (const int8_t *)"default_DT_BasicOps.txt"
static

◆ DEF_DT_CARD_INDEX

const int32_t DEF_DT_CARD_INDEX = 0
static

◆ DEF_DT_CHANNEL

const int32_t DEF_DT_CHANNEL = 1
static

◆ DEF_DT_KA_CHANNEL

const int32_t DEF_DT_KA_CHANNEL = 13
static

◆ DEF_DT_MODULE

const int32_t DEF_DT_MODULE = 1
static

◆ DT_BasicOpMenuCmds

naiapp_cmdtbl_params_t DT_BasicOpMenuCmds[]
static
Initial value:
= {
{"IO", "DT Set IO Format", DT_BASICOP_CMD_IOFORMAT, Configure_DT_IOFormat},
{"OUT", "DT Set Output State", DT_BASICOP_CMD_OUTPUTSTATE, Configure_DT_OutputState},
{"ML", "DT Set Min Low Threshold", DT_BASICOP_CMD_THRESHOLD_MIN_LO, Configure_DT_MinLoThreshold},
{"L", "DT Set Lower Threshold", DT_BASICOP_CMD_THRESHOLD_LOWER, Configure_DT_LowThreshold},
{"MH", "DT Set Max High Threshold", DT_BASICOP_CMD_THRESHOLD_MAX_HI, Configure_DT_MaxHiThreshold},
{"D", "DT Set Debounce Time", DT_BASICOP_CMD_DEBOUNCE, Configure_DT_Debounce},
{"OVER", "DT Reset Overcurrent", DT_BASICOP_CMD_RESET_OC, NULL},
{"STAT", "DT Display Status", DT_BASICOP_CMD_STATUS, Display_DT_Status},
{"Float", "DT Enable/Disable Floating Point", DT_BASICOP_CMD_FLOAT, Configure_DT_Floating},
{"THRESH", "DT Set BIT Error Threshold", DT_BASICOP_CMD_BIT_THRESHOLD, Configure_DT_BITThresholds},
{"CHANSTAT", "DT Enable/Disable Channel Status", DT_BASICOP_CMD_CHANNEL_STATUS_ENABLE, Configure_DT_ChannelStatusEnable},
{"POWER", "DT Check Power-On BIT Completed", DT_BASICOP_CMD_CHECK_POWER_ON_BIT_COMPLETE, Configure_DT_CheckPBITComplete},
{"RESET", "Show Module Power Reset Menu Options", DT_BASICOP_CMD_MODULE_POWER_RESET, Configure_DT_ModulePowerResetMenu},
#if !defined (NAIBSP_CONFIG_SOFTWARE_OS_DEOS)
{"WATCHDOG", "Show Watchdog Menu Options", DT_BASICOP_CMD_WD_MENU, Handle_DT_WatchdogShowMenu}
#endif
}
static nai_status_t Configure_DT_MaxHiThreshold(int32_t paramCnt, int32_t *p_params)
Configure_DT_MaxHiThreshold calls the Configure_DT_Threshold() routine for Max High Threshold configu...
Definition dt_basic_ops.c:827
static nai_status_t Handle_DT_WatchdogShowMenu(int32_t paramCount, int32_t *params)
This function displays the menu for watchdog commands.
Definition dt_basic_ops.c:1096
@ DT_BASICOP_CMD_FLOAT
Definition dt_basic_ops.c:105
@ DT_BASICOP_CMD_RESET_OC
Definition dt_basic_ops.c:103
@ DT_BASICOP_CMD_THRESHOLD_UPPER
Definition dt_basic_ops.c:100
@ DT_BASICOP_CMD_STATUS
Definition dt_basic_ops.c:104
@ DT_BASICOP_CMD_BIT_THRESHOLD
Definition dt_basic_ops.c:106
@ DT_BASICOP_CMD_CHANNEL_STATUS_ENABLE
Definition dt_basic_ops.c:107
@ DT_BASICOP_CMD_THRESHOLD_MIN_LO
Definition dt_basic_ops.c:98
@ DT_BASICOP_CMD_IOFORMAT
Definition dt_basic_ops.c:96
@ DT_BASICOP_CMD_THRESHOLD_LOWER
Definition dt_basic_ops.c:99
@ DT_BASICOP_CMD_OUTPUTSTATE
Definition dt_basic_ops.c:97
@ DT_BASICOP_CMD_WD_MENU
Definition dt_basic_ops.c:112
@ DT_BASICOP_CMD_CHECK_POWER_ON_BIT_COMPLETE
Definition dt_basic_ops.c:108
@ DT_BASICOP_CMD_THRESHOLD_MAX_HI
Definition dt_basic_ops.c:101
@ DT_BASICOP_CMD_MODULE_POWER_RESET
Definition dt_basic_ops.c:110
@ DT_BASICOP_CMD_DEBOUNCE
Definition dt_basic_ops.c:102
@ DT_BASICOP_CMD_CLEAR_MODULE_BIT_LOGIC
Definition dt_basic_ops.c:109
static nai_status_t Configure_DT_Floating(int32_t paramCnt, int32_t *p_params)
Configure_DT_Floating handles the user request to set the floating point enable and calls the method ...
Definition dt_basic_ops.c:907
static nai_status_t Configure_DT_ModulePowerResetMenu(int32_t paramCount, int32_t *p_params)
Handle_DT_ModulePowerResetMenu displays the menu for module power reset commands.
Definition dt_basic_ops.c:1569
static nai_status_t Configure_DT_OutputState(int32_t paramCnt, int32_t *p_params)
Configure_DT_OutputState handles the user request to set the Output state for the selected channel an...
Definition dt_basic_ops.c:726
static nai_status_t Configure_DT_CheckPBITComplete(int32_t paramCount, int32_t *p_params)
Configure_DT_CheckPBITComplete handles the user request to check the module power-on BIT completed st...
Definition dt_basic_ops.c:1459
static nai_status_t Configure_DT_IOFormat(int32_t paramCnt, int32_t *p_params)
Configure_DT_IOFormat handles the user request to configure the Input/Output configuration for the se...
Definition dt_basic_ops.c:645
static nai_status_t Configure_DT_ClearModuleBITLogic(int32_t paramCount, int32_t *p_params)
Configure_DT_ClearModuleBITLogic handles the user request to clear the module BIT logic,...
Definition dt_basic_ops.c:1533
static nai_status_t Configure_DT_LowThreshold(int32_t paramCnt, int32_t *p_params)
Configure_DT_LowThreshold calls the Configure_DT_Threshold() routine for Lower Threshold configuratio...
Definition dt_basic_ops.c:803
static nai_status_t Configure_DT_BITThresholds(int32_t paramCnt, int32_t *p_params)
Configure_DT_BITThresholds() allows the user to set and get the BIT error thresholds....
Definition dt_basic_ops.c:944
static nai_status_t Configure_DT_MinLoThreshold(int32_t paramCnt, int32_t *p_params)
Configure_DT_MinLoThreshold calls the Configure_DT_Threshold() routine for Min Low Threshold configur...
Definition dt_basic_ops.c:791
static nai_status_t Configure_DT_UpperThreshold(int32_t paramCnt, int32_t *p_params)
Configure_DT_UpperThreshold calls the Configure_DT_Threshold() routine for Upper Threshold configurat...
Definition dt_basic_ops.c:815
static nai_status_t Configure_DT_Debounce(int32_t paramCnt, int32_t *p_params)
Configure_DT_Threshold handles the user request to configure the selected threshold configuration and...
Definition dt_basic_ops.c:874
static nai_status_t Configure_DT_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 dt_basic_ops.c:1008
static nai_status_t Display_DT_Status(int32_t paramCnt, int32_t *p_params)
Display_DT_Status illustrate the methods to call in the naibrd library to retrieve the status states.
Definition dt_basic_ops.c:534

◆ DT_ModulePowerResetMenuCmds

naiapp_cmdtbl_params_t DT_ModulePowerResetMenuCmds[DT_MODULE_POWER_RESET_CMD_COUNT]
Initial value:
=
{
{"BACK", "Back to Main Menu", DT_MODULE_POWER_RESET_CMD_BACK, NULL},
}
static nai_status_t Configure_DT_ClearModulePowerResetStatus(int32_t paramCount, int32_t *p_params)
Handle_DT_ClearModulePowerResetStatus handles the user request to clear the module power reset status...
Definition dt_basic_ops.c:1650
@ DT_MODULE_POWER_RESET_CMD_SET_MODULE_POWER_RESET
Definition dt_basic_ops.c:134
@ DT_MODULE_POWER_RESET_CMD_BACK
Definition dt_basic_ops.c:132
@ DT_MODULE_POWER_RESET_CMD_CLEAR_MODULE_POWER_RESET_STATUS
Definition dt_basic_ops.c:133
static nai_status_t Configure_DT_SetModulePowerReset(int32_t paramCount, int32_t *p_params)
Handle_DT_SetModulePowerReset handles the user request to set the module power reset request and call...
Definition dt_basic_ops.c:1728

◆ DT_WatchdogOpMenuCmds

naiapp_cmdtbl_params_t DT_WatchdogOpMenuCmds[DT_COMMON_CMD_WD_COUNT]
Initial value:
=
{
{"BACK", "Back to Main Menu", (int32_t)0, NULL},
{"DISPLAY", "Display Watchdog Settings", DT_COMMON_CMD_WD_DISPLAY, Handle_DT_DisplayWatchdog},
{"TIME QUIET", "Set Watchdog Quiet Time", DT_COMMON_CMD_WD_QUIETTIME, Handle_DT_WatchDogQuietTime},
{"WINDOW", "Set Watchdog Window Time", DT_COMMON_CMD_WD_WINDOWTIME, Handle_DT_WatchDogWindowTime},
{"STROBE", "Start thread to continuously strobe watchdog", DT_COMMON_CMD_WD_STROBE, Handle_DT_StrobeWatchdog},
{"KILL", "Kill Watchdog strobing thread", DT_COMMON_CMD_WD_KILL, Handle_DT_kill_WDStrobe_Thread}
}
@ DT_COMMON_CMD_WD_QUIETTIME
Definition dt_basic_ops.c:120
@ DT_COMMON_CMD_WD_KILL
Definition dt_basic_ops.c:124
@ DT_COMMON_CMD_WD_DISPLAY
Definition dt_basic_ops.c:122
@ DT_COMMON_CMD_WD_WINDOWTIME
Definition dt_basic_ops.c:121
@ DT_COMMON_CMD_WD_STROBE
Definition dt_basic_ops.c:123
static nai_status_t Handle_DT_kill_WDStrobe_Thread(int32_t paramCount, int32_t *params)
This function will terminate the WD Strobing thread. Module will shut off outputs at this state and w...
Definition dt_basic_ops.c:1438
static nai_status_t Handle_DT_WatchDogWindowTime(int32_t paramCount, int32_t *params)
This function sets the watchdog window time for the module. The user is prompted for the value in ms.
Definition dt_basic_ops.c:1188
static nai_status_t Handle_DT_WatchDogQuietTime(int32_t paramCount, int32_t *params)
This function sets the watchdog quiet time for the module. The user is prompted for the value in ms.
Definition dt_basic_ops.c:1155
static nai_status_t Handle_DT_DisplayWatchdog(int32_t paramCount, int32_t *params)
This function displays the DT Watchdog Operations data.
Definition dt_basic_ops.c:1222
static nai_status_t Handle_DT_StrobeWatchdog(int32_t paramCount, int32_t *params)
This function will start a thread to continuously Strobe the watchdog. The user is prompted for the v...
Definition dt_basic_ops.c:1258

◆ SAMPLE_WD_PGM_NAME

const int8_t* SAMPLE_WD_PGM_NAME = (const int8_t*)"DT Watchdog Operations"
static

◆ terminateThread

bool_t terminateThread
static

◆ thread

static int thread = NULL
static