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

Enumerations

enum  cd_gen5_cd_common_commands {
  CD_COMMON_CMD_ENABLE_CHANNELS , CD_COMMON_CMD_GET_ENABLED_CHANNELS , CD_COMMON_CMD_INITIATE_MANUAL_BURN_CHANNELS , CD_COMMON_CMD_GET_MANUAL_BURN_CHANNELS ,
  CD_COMMON_CMD_SET_AUTO_BURN_MAX_COUNT , CD_COMMON_CMD_GET_AUTO_BURN_MAX_COUNT , CD_COMMON_CMD_INITIATE_AUTO_BURN_CHANNELS , CD_COMMON_CMD_GET_AUTO_BURN_CHANNELS ,
  CD_COMMON_CMD_GET_AUTO_BURN_COUNT , CD_COMMON_CMD_SET_CHAN_ENERGY_SETTING , CD_COMMON_CMD_GET_CHAN_ENERGY_SETTING , CD_COMMON_CMD_GET_CHAN_RESISTANCE ,
  CD_COMMON_CMD_SET_CHAN_FAULT_RESISTANCE , CD_COMMON_CMD_GET_CHAN_FAULT_RESISTANCE , CD_COMMON_CMD_SET_CHAN_WARNING_RESISTANCE , CD_COMMON_CMD_GET_CHAN_WARNING_RESISTANCE ,
  CD_COMMON_CMD_SET_CHAN_OPEN_RESISTANCE , CD_COMMON_CMD_GET_CHAN_OPEN_RESISTANCE , CD_COMMON_CMD_SET_MODULE_BIT_ENABLE , CD_COMMON_CMD_GET_MODULE_BIT_ENABLE ,
  CD_COMMON_CMD_CHECK_MODULE_PBIT_COMPLETE , CD_COMMON_CMD_BIT_ERROR_THRESHOLDS , CD_COMMON_CMD_COUNT
}
 

Functions

static bool_t Run_CD_BasicOps (int32_t cardIndex, int32_t module, uint32_t modId)
 This function runs the basic operations CD program. It controls the top level menu of the CD_BasicOps program and calls Handle_CD_Configuration or Handle_CD_StandardOps, depending on what the user specifies.
 
static nai_status_t Handle_CD_EnableChannels (int32_t paramCount, int32_t *params)
 This function is responsible for enabling the desired channels. User is prompted to enter which channels are to be enabled.
 
static nai_status_t Handle_CD_GetEnableChannels (int32_t paramCount, int32_t *params)
 This function retrieves a bitmapped 32 bit value of channels that are currently enabled.
 
static nai_status_t Handle_CD_InitiateManualBurnChannels (int32_t paramCount, int32_t *params)
 This function initiates a manual burn on the desired channels.
 
static nai_status_t Handle_CD_GetManualBurnChannels (int32_t paramCount, int32_t *params)
 This function returns a bitmapped 32 bit value of channels that have been configured for manual-burn.
 
static nai_status_t HANDLE_CD_SetAutoBurnMaxCount (int32_t paramCount, int32_t *params)
 This function assigns the Auto Burn Max count value for the given channel.
 
static nai_status_t HANDLE_CD_GetAutoBurnMaxCount (int32_t paramCount, int32_t *params)
 This function returns what a given channel's auto burn max count is currently configured to.
 
static nai_status_t Handle_CD_InitiateAutoBurnChannels (int32_t paramCount, int32_t *params)
 This function initiates an auto burn on the desired channels.
 
static nai_status_t Handle_CD_GetAutoBurnChannels (int32_t paramCount, int32_t *params)
 This function Gets auto burn channels.
 
static nai_status_t HANDLE_CD_GetAutoBurnCount (int32_t paramCount, int32_t *params)
 This function returns what a given channel's auto burn count is currently configured to.
 
static nai_status_t Handle_CD_SetChanEnergySetting (int32_t paramCount, int32_t *params)
 This function is responsible for assigning what amount of energy (in joules) a channel will be charged.
 
static nai_status_t Handle_CD_GetChanEnergySetting (int32_t paramCount, int32_t *params)
 This function returns what a given channel's energy setting is currently configured to.
 
static nai_status_t Handle_CD_GetChanResistance (int32_t paramCount, int32_t *params)
 This function retrieves the resistance level for the given channel.
 
static nai_status_t Handle_CD_SetChanFaultResistance (int32_t paramCount, int32_t *params)
 This function assigns the fault resistance threshold value for the given channel.
 
static nai_status_t Handle_CD_GetChanFaultResistance (int32_t paramCount, int32_t *params)
 This function retrieves the fault resistance threshold for the given channel.
 
static nai_status_t Handle_CD_SetChanWarningResistance (int32_t paramCount, int32_t *params)
 This function assigns the warning resistance threshold value for the given channel.
 
static nai_status_t Handle_CD_GetChanWarningResistance (int32_t paramCount, int32_t *params)
 This function retrieves the warning resistance threshold for the given channel.
 
static nai_status_t Handle_CD_SetChanOpenResistance (int32_t paramCount, int32_t *params)
 This function assigns the open resistance threshold value for the given channel.
 
static nai_status_t Handle_CD_GetChanOpenResistance (int32_t paramCount, int32_t *params)
 This function retrieves the open resistance threshold for the given channel.
 
static nai_status_t Handle_CD_SetModuleBITEnable (int32_t paramCount, int32_t *params)
 This function Enables/Disables the BIT test specified by the type parameter.
 
static nai_status_t Handle_CD_GetModuleBITEnable (int32_t paramCount, int32_t *params)
 This function retrieves the state(Enabled or Disabled) of the BIT test specified by the type parameter.
 
static nai_status_t Handle_CD_CheckModulePBITComplete (int32_t paramCount, int32_t *params)
 This function checks to see if the power-on BIT test has been run on the module. If the PBIT test has run, it checks the result of the test and reports it back.
 
static nai_status_t Handle_CD_BITErrorThresholds (int32_t paramCount, int32_t *params)
 This function callows the user to set and get the BIT error thresholds. This is an advanced feature.
 
int32_t CD_BasicOps (void)
 The purpose of the CD_BasicOps is to illustrate the methods to call in the naibrd library to perform basic operations with the CD modules for configuration setup and basic chip-detect operation.
 

Variables

static const int8_t * SAMPLE_PGM_NAME = (const int8_t*)"CD Basic Operations"
 
static const int8_t * DEF_CONFIG_FILE = (const int8_t*)"default_CD_BasicOps.txt"
 
static const int32_t DEF_CD_CHANNEL = 1
 
naiapp_cmdtbl_params_t CD_StandardOpMenuCmds [CD_COMMON_CMD_COUNT]
 

Enumeration Type Documentation

◆ cd_gen5_cd_common_commands

Enumerator
CD_COMMON_CMD_ENABLE_CHANNELS 
CD_COMMON_CMD_GET_ENABLED_CHANNELS 
CD_COMMON_CMD_INITIATE_MANUAL_BURN_CHANNELS 
CD_COMMON_CMD_GET_MANUAL_BURN_CHANNELS 
CD_COMMON_CMD_SET_AUTO_BURN_MAX_COUNT 
CD_COMMON_CMD_GET_AUTO_BURN_MAX_COUNT 
CD_COMMON_CMD_INITIATE_AUTO_BURN_CHANNELS 
CD_COMMON_CMD_GET_AUTO_BURN_CHANNELS 
CD_COMMON_CMD_GET_AUTO_BURN_COUNT 
CD_COMMON_CMD_SET_CHAN_ENERGY_SETTING 
CD_COMMON_CMD_GET_CHAN_ENERGY_SETTING 
CD_COMMON_CMD_GET_CHAN_RESISTANCE 
CD_COMMON_CMD_SET_CHAN_FAULT_RESISTANCE 
CD_COMMON_CMD_GET_CHAN_FAULT_RESISTANCE 
CD_COMMON_CMD_SET_CHAN_WARNING_RESISTANCE 
CD_COMMON_CMD_GET_CHAN_WARNING_RESISTANCE 
CD_COMMON_CMD_SET_CHAN_OPEN_RESISTANCE 
CD_COMMON_CMD_GET_CHAN_OPEN_RESISTANCE 
CD_COMMON_CMD_SET_MODULE_BIT_ENABLE 
CD_COMMON_CMD_GET_MODULE_BIT_ENABLE 
CD_COMMON_CMD_CHECK_MODULE_PBIT_COMPLETE 
CD_COMMON_CMD_BIT_ERROR_THRESHOLDS 
CD_COMMON_CMD_COUNT 

Function Documentation

◆ CD_BasicOps()

int32_t CD_BasicOps ( void )

The purpose of the CD_BasicOps is to illustrate the methods to call in the naibrd library to perform basic operations with the CD modules for configuration setup and basic chip-detect operation.

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

  • ConfigDevice
  • DisplayDeviceCfg
  • GetBoardSNModCfg
  • CheckModule

◆ Handle_CD_BITErrorThresholds()

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

This function callows the user to set and get the BIT error thresholds. This is an advanced feature.

◆ Handle_CD_CheckModulePBITComplete()

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

This function checks to see if the power-on BIT test has been run on the module. If the PBIT test has run, it checks the result of the test and reports it back.

◆ Handle_CD_EnableChannels()

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

This function is responsible for enabling the desired channels. User is prompted to enter which channels are to be enabled.

◆ Handle_CD_GetAutoBurnChannels()

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

This function Gets auto burn channels.

◆ HANDLE_CD_GetAutoBurnCount()

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

This function returns what a given channel's auto burn count is currently configured to.

◆ HANDLE_CD_GetAutoBurnMaxCount()

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

This function returns what a given channel's auto burn max count is currently configured to.

◆ Handle_CD_GetChanEnergySetting()

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

This function returns what a given channel's energy setting is currently configured to.

◆ Handle_CD_GetChanFaultResistance()

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

This function retrieves the fault resistance threshold for the given channel.

◆ Handle_CD_GetChanOpenResistance()

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

This function retrieves the open resistance threshold for the given channel.

◆ Handle_CD_GetChanResistance()

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

This function retrieves the resistance level for the given channel.

◆ Handle_CD_GetChanWarningResistance()

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

This function retrieves the warning resistance threshold for the given channel.

◆ Handle_CD_GetEnableChannels()

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

This function retrieves a bitmapped 32 bit value of channels that are currently enabled.

◆ Handle_CD_GetManualBurnChannels()

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

This function returns a bitmapped 32 bit value of channels that have been configured for manual-burn.

◆ Handle_CD_GetModuleBITEnable()

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

This function retrieves the state(Enabled or Disabled) of the BIT test specified by the type parameter.

◆ Handle_CD_InitiateAutoBurnChannels()

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

This function initiates an auto burn on the desired channels.

◆ Handle_CD_InitiateManualBurnChannels()

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

This function initiates a manual burn on the desired channels.

◆ HANDLE_CD_SetAutoBurnMaxCount()

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

This function assigns the Auto Burn Max count value for the given channel.

◆ Handle_CD_SetChanEnergySetting()

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

This function is responsible for assigning what amount of energy (in joules) a channel will be charged.

◆ Handle_CD_SetChanFaultResistance()

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

This function assigns the fault resistance threshold value for the given channel.

◆ Handle_CD_SetChanOpenResistance()

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

This function assigns the open resistance threshold value for the given channel.

◆ Handle_CD_SetChanWarningResistance()

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

This function assigns the warning resistance threshold value for the given channel.

◆ Handle_CD_SetModuleBITEnable()

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

This function Enables/Disables the BIT test specified by the type parameter.

◆ Run_CD_BasicOps()

static bool_t Run_CD_BasicOps ( int32_t cardIndex,
int32_t module,
uint32_t modId )
static

This function runs the basic operations CD program. It controls the top level menu of the CD_BasicOps program and calls Handle_CD_Configuration or Handle_CD_StandardOps, depending on what the user specifies.

Variable Documentation

◆ CD_StandardOpMenuCmds

naiapp_cmdtbl_params_t CD_StandardOpMenuCmds[CD_COMMON_CMD_COUNT]
Initial value:
=
{
{"22", "Manipulate BIT Error Thresholds", CD_COMMON_CMD_BIT_ERROR_THRESHOLDS, Handle_CD_BITErrorThresholds }
}
static nai_status_t Handle_CD_GetAutoBurnChannels(int32_t paramCount, int32_t *params)
This function Gets auto burn channels.
Definition cd_basic_ops.c:531
static nai_status_t Handle_CD_EnableChannels(int32_t paramCount, int32_t *params)
This function is responsible for enabling the desired channels. User is prompted to enter which chann...
Definition cd_basic_ops.c:233
static nai_status_t Handle_CD_GetEnableChannels(int32_t paramCount, int32_t *params)
This function retrieves a bitmapped 32 bit value of channels that are currently enabled.
Definition cd_basic_ops.c:279
static nai_status_t Handle_CD_SetChanOpenResistance(int32_t paramCount, int32_t *params)
This function assigns the open resistance threshold value for the given channel.
Definition cd_basic_ops.c:915
static nai_status_t HANDLE_CD_GetAutoBurnMaxCount(int32_t paramCount, int32_t *params)
This function returns what a given channel's auto burn max count is currently configured to.
Definition cd_basic_ops.c:445
static nai_status_t Handle_CD_CheckModulePBITComplete(int32_t paramCount, int32_t *params)
This function checks to see if the power-on BIT test has been run on the module. If the PBIT test has...
Definition cd_basic_ops.c:1225
static nai_status_t Handle_CD_GetChanEnergySetting(int32_t paramCount, int32_t *params)
This function returns what a given channel's energy setting is currently configured to.
Definition cd_basic_ops.c:654
static nai_status_t Handle_CD_SetChanFaultResistance(int32_t paramCount, int32_t *params)
This function assigns the fault resistance threshold value for the given channel.
Definition cd_basic_ops.c:732
static nai_status_t Handle_CD_GetChanOpenResistance(int32_t paramCount, int32_t *params)
This function retrieves the open resistance threshold for the given channel.
Definition cd_basic_ops.c:967
static nai_status_t Handle_CD_GetChanFaultResistance(int32_t paramCount, int32_t *params)
This function retrieves the fault resistance threshold for the given channel.
Definition cd_basic_ops.c:783
static nai_status_t Handle_CD_SetModuleBITEnable(int32_t paramCount, int32_t *params)
This function Enables/Disables the BIT test specified by the type parameter.
Definition cd_basic_ops.c:1007
static nai_status_t Handle_CD_InitiateAutoBurnChannels(int32_t paramCount, int32_t *params)
This function initiates an auto burn on the desired channels.
Definition cd_basic_ops.c:484
static nai_status_t HANDLE_CD_SetAutoBurnMaxCount(int32_t paramCount, int32_t *params)
This function assigns the Auto Burn Max count value for the given channel.
Definition cd_basic_ops.c:395
static nai_status_t Handle_CD_GetChanWarningResistance(int32_t paramCount, int32_t *params)
This function retrieves the warning resistance threshold for the given channel.
Definition cd_basic_ops.c:875
static nai_status_t Handle_CD_BITErrorThresholds(int32_t paramCount, int32_t *params)
This function callows the user to set and get the BIT error thresholds. This is an advanced feature.
Definition cd_basic_ops.c:1281
static nai_status_t Handle_CD_GetChanResistance(int32_t paramCount, int32_t *params)
This function retrieves the resistance level for the given channel.
Definition cd_basic_ops.c:693
static nai_status_t Handle_CD_GetModuleBITEnable(int32_t paramCount, int32_t *params)
This function retrieves the state(Enabled or Disabled) of the BIT test specified by the type paramete...
Definition cd_basic_ops.c:1131
static nai_status_t Handle_CD_InitiateManualBurnChannels(int32_t paramCount, int32_t *params)
This function initiates a manual burn on the desired channels.
Definition cd_basic_ops.c:314
@ CD_COMMON_CMD_ENABLE_CHANNELS
Definition cd_basic_ops.c:65
@ CD_COMMON_CMD_SET_CHAN_OPEN_RESISTANCE
Definition cd_basic_ops.c:81
@ CD_COMMON_CMD_GET_MODULE_BIT_ENABLE
Definition cd_basic_ops.c:84
@ CD_COMMON_CMD_GET_CHAN_WARNING_RESISTANCE
Definition cd_basic_ops.c:80
@ CD_COMMON_CMD_GET_AUTO_BURN_MAX_COUNT
Definition cd_basic_ops.c:70
@ CD_COMMON_CMD_GET_CHAN_RESISTANCE
Definition cd_basic_ops.c:76
@ CD_COMMON_CMD_BIT_ERROR_THRESHOLDS
Definition cd_basic_ops.c:86
@ CD_COMMON_CMD_INITIATE_MANUAL_BURN_CHANNELS
Definition cd_basic_ops.c:67
@ CD_COMMON_CMD_GET_CHAN_FAULT_RESISTANCE
Definition cd_basic_ops.c:78
@ CD_COMMON_CMD_SET_CHAN_FAULT_RESISTANCE
Definition cd_basic_ops.c:77
@ CD_COMMON_CMD_GET_MANUAL_BURN_CHANNELS
Definition cd_basic_ops.c:68
@ CD_COMMON_CMD_GET_CHAN_ENERGY_SETTING
Definition cd_basic_ops.c:75
@ CD_COMMON_CMD_GET_AUTO_BURN_CHANNELS
Definition cd_basic_ops.c:72
@ CD_COMMON_CMD_SET_CHAN_WARNING_RESISTANCE
Definition cd_basic_ops.c:79
@ CD_COMMON_CMD_GET_ENABLED_CHANNELS
Definition cd_basic_ops.c:66
@ CD_COMMON_CMD_CHECK_MODULE_PBIT_COMPLETE
Definition cd_basic_ops.c:85
@ CD_COMMON_CMD_SET_AUTO_BURN_MAX_COUNT
Definition cd_basic_ops.c:69
@ CD_COMMON_CMD_SET_CHAN_ENERGY_SETTING
Definition cd_basic_ops.c:74
@ CD_COMMON_CMD_GET_CHAN_OPEN_RESISTANCE
Definition cd_basic_ops.c:82
@ CD_COMMON_CMD_GET_AUTO_BURN_COUNT
Definition cd_basic_ops.c:73
@ CD_COMMON_CMD_INITIATE_AUTO_BURN_CHANNELS
Definition cd_basic_ops.c:71
@ CD_COMMON_CMD_SET_MODULE_BIT_ENABLE
Definition cd_basic_ops.c:83
static nai_status_t Handle_CD_SetChanWarningResistance(int32_t paramCount, int32_t *params)
This function assigns the warning resistance threshold value for the given channel.
Definition cd_basic_ops.c:823
static nai_status_t Handle_CD_GetManualBurnChannels(int32_t paramCount, int32_t *params)
This function returns a bitmapped 32 bit value of channels that have been configured for manual-burn.
Definition cd_basic_ops.c:360
static nai_status_t Handle_CD_SetChanEnergySetting(int32_t paramCount, int32_t *params)
This function is responsible for assigning what amount of energy (in joules) a channel will be charge...
Definition cd_basic_ops.c:603
static nai_status_t HANDLE_CD_GetAutoBurnCount(int32_t paramCount, int32_t *params)
This function returns what a given channel's auto burn count is currently configured to.
Definition cd_basic_ops.c:565

◆ DEF_CD_CHANNEL

const int32_t DEF_CD_CHANNEL = 1
static

◆ DEF_CONFIG_FILE

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

◆ SAMPLE_PGM_NAME

const int8_t* SAMPLE_PGM_NAME = (const int8_t*)"CD Basic Operations"
static