Software Library API naibrd 1.62
See all documentation at naii.docs.com
Module Diagnostics Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetMS0ConnectionStatus (int32_t cardIndex, int32_t module, int32_t slaveAddr, NAIBRD_PB_CONNECTION_STATUS *p_outconnectionStatus)
 Responsible for reporting the connection status.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_ResetMS0ConnectionCounters (int32_t cardIndex, int32_t module, int32_t slaveAddr)
 Responsible for resetting connection counters for the given slave.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetAlarmCounters (int32_t cardIndex, int32_t module, int32_t slaveAddr, NAIBRD_PB_ALARM_COUNTERS *p_outalarmCounters)
 Responsible for returning alarm counter information for specified slave.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_ResetAlarmCounters (int32_t cardIndex, int32_t module, int32_t slaveAddr)
 Responsible for resetting alarm counters for the specified slave.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetSlaveDiagnostics (int32_t cardIndex, int32_t module, int32_t slaveAddr, NAIBRD_PB_SLAVE_DIAGNOSTICS *p_outslaveDiagnostics)
 Responsible for retrieving slave diagnostic information for a given slave.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetCPULoad (int32_t cardIndex, int32_t module, NAIBRD_PB_CPU_LOAD *p_outcpuLoad)
 Responsible for reporting the load of the CPU.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_KickoffGetLiveList (int32_t cardIndex, int32_t module)
 Responsible for Kicking off the probing of the entire bus for slaves. NOTE: This probing / data collection can take several minutes to complete. Caller can make repeated calls to naibrd_PB_GetLiveListResults to see if task completed. If still in progress, an error indicating so will be returned.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetLiveListResults (int32_t cardIndex, int32_t module, NAIBRD_PB_LIVELIST_RESULTS *p_outliveListResults)
 Responsible for returning the results collected from making a call to naibrd_PB_KickoffGetLiveList. NOTE: The probing / data collection from the naibrd_PB_KickoffGetLiveList can take several minutes to complete. Caller can make repeated calls this function to see if task completed. If still in progress, an error indicating so will be returned. If the probing is finished, results will be returned in the NAIBRD_PB_LIVELIST_RESULTS struct.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetOperationMode (int32_t cardIndex, int32_t module, NAIBRD_PB_DPM_MASTER_STATE *p_outmasterState, NAIBRD_PB_DPM_OPERATION_MODE *p_outoperationMode)
 Responsible for returning the current mode of bus operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetStatistics (int32_t cardIndex, int32_t module, NAIBRD_PB_STATISTICS *p_outstatistics)
 Responsible for returning bus statistics.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetPSAKVersion (int32_t cardIndex, int32_t module, int firmwareVersionMaxLength, char *p_outfirmwareVersion, int32_t psakVersionMaxLength, char *p_outpsakVersion)
 Responsible for returning the version of the underlying Profibus Software Access Kit (Softing).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetLastAlarmData (int32_t cardIndex, int32_t module, int32_t slaveAddr, NAIBRD_PB_ALARM_DATA *p_outlastAlarmData)
 Responsible for returning the last alarm data that was detected.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetPowerEnableForSegments (int32_t cardIndex, int32_t module, uint32_t *p_outpowerEnable)
 Responsible for returning 32 bit value indicating which power supplies are currently enabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetTerminationEnableForSegments (int32_t cardIndex, int32_t module, uint32_t *p_outterminationEnable)
 Responsible for returning 32 bit value indicating which segments have termination enabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetReceiverEnableForSegments (int32_t cardIndex, int32_t module, uint32_t *p_outreceiverEnable)
 Responsible for returning 32 bit value indicating which segments have their receiver enabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetLockStatusForSegments (int32_t cardIndex, int32_t module, uint32_t *p_outlockStatus)
 Responsible for returning 32 bit value indicating which segments have been "locked" (i.e. forcibly taken offline)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetLastFunctionCallStatus (int32_t cardIndex, int32_t module, int32_t *p_outpbStatus)
 Responsible for returning the the status of the last Profibus request that was made.
 

Detailed Description


Function Documentation

◆ naibrd_PB_GetAlarmCounters()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetAlarmCounters ( int32_t cardIndex,
int32_t module,
int32_t slaveAddr,
NAIBRD_PB_ALARM_COUNTERS * p_outalarmCounters )

Responsible for returning alarm counter information for specified slave.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
slaveAddr: (Input) Address of slave target
p_outalarmCounters: (Output) Structure containing alarm counter information
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_PB_GetCPULoad()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetCPULoad ( int32_t cardIndex,
int32_t module,
NAIBRD_PB_CPU_LOAD * p_outcpuLoad )

Responsible for reporting the load of the CPU.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outcpuLoad: (Output) Pointer to structure containing CPU load information
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_PB_GetLastAlarmData()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetLastAlarmData ( int32_t cardIndex,
int32_t module,
int32_t slaveAddr,
NAIBRD_PB_ALARM_DATA * p_outlastAlarmData )

Responsible for returning the last alarm data that was detected.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
slaveAddr: (Input) Address of target slave
p_outlastAlarmData: (Output) Pointer to struct containing last alarm data info
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_FUNCTION_SPECIFIC_ERROR : caller can call naibrd_PB_GetLastFunctionCallStatus to get PB specific error.

◆ naibrd_PB_GetLastFunctionCallStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetLastFunctionCallStatus ( int32_t cardIndex,
int32_t module,
int32_t * p_outpbStatus )

Responsible for returning the the status of the last Profibus request that was made.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outpbStatus: (Output)32 bit value indicating PB status of last PB request
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_FUNCTION_SPECIFIC_ERROR : caller can call naibrd_PB_GetLastFunctionCallStatus to get PB specific error.

◆ naibrd_PB_GetLiveListResults()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetLiveListResults ( int32_t cardIndex,
int32_t module,
NAIBRD_PB_LIVELIST_RESULTS * p_outliveListResults )

Responsible for returning the results collected from making a call to naibrd_PB_KickoffGetLiveList. NOTE: The probing / data collection from the naibrd_PB_KickoffGetLiveList can take several minutes to complete. Caller can make repeated calls this function to see if task completed. If still in progress, an error indicating so will be returned. If the probing is finished, results will be returned in the NAIBRD_PB_LIVELIST_RESULTS struct.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outliveListResults: (Output) Pointer to struct containing the results of the bus probing for slaves.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_FUNCTION_SPECIFIC_ERROR : caller can call naibrd_PB_GetLastFunctionCallStatus to get PB specific error.

◆ naibrd_PB_GetLockStatusForSegments()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetLockStatusForSegments ( int32_t cardIndex,
int32_t module,
uint32_t * p_outlockStatus )

Responsible for returning 32 bit value indicating which segments have been "locked" (i.e. forcibly taken offline)

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outlockStatus: (Output)32 bit value indicating which segments have been locked: 1 indicates locked
  • D0 - Segment 1 locked
  • D1 - Segment 2 locked
  • D2 - Segment 3 locked
  • D3 - Segment 4 locked
  • D4 - Segment 5 locked
  • D5 - Segment 6 locked
  • D6 - Segment 7 locked
  • D7 - Segment 8 locked
  • D8 - Segment Aux locked
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_FUNCTION_SPECIFIC_ERROR : caller can call naibrd_PB_GetLastFunctionCallStatus to get PB specific error.

◆ naibrd_PB_GetMS0ConnectionStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetMS0ConnectionStatus ( int32_t cardIndex,
int32_t module,
int32_t slaveAddr,
NAIBRD_PB_CONNECTION_STATUS * p_outconnectionStatus )

Responsible for reporting the connection status.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
slaveAddr: (Input) Address of slave target
p_outconnectionStatus: (Output) Struct containing connection status information
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_PB_GetOperationMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetOperationMode ( int32_t cardIndex,
int32_t module,
NAIBRD_PB_DPM_MASTER_STATE * p_outmasterState,
NAIBRD_PB_DPM_OPERATION_MODE * p_outoperationMode )

Responsible for returning the current mode of bus operation.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outmasterState: (Output) Pointer to struct containing the current state of the master.
p_outoperationMode: (Output) Pointer to struct containing operationg mode of bus.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_FUNCTION_SPECIFIC_ERROR : caller can call naibrd_PB_GetLastFunctionCallStatus to get PB specific error.

◆ naibrd_PB_GetPowerEnableForSegments()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetPowerEnableForSegments ( int32_t cardIndex,
int32_t module,
uint32_t * p_outpowerEnable )

Responsible for returning 32 bit value indicating which power supplies are currently enabled.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outpowerEnable: (Output)32 bit value indicating which power supplies are enabled: 1 indicates enable
  • D0: Enables power for segments 1 and 2
  • D1: Enables power for segments 3 and 4
  • D2: Enables power for segments 5 and 6
  • D3: Enables power for segments 7 and 8
  • D16: Enables power for segment Aux
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_FUNCTION_SPECIFIC_ERROR : caller can call naibrd_PB_GetLastFunctionCallStatus to get PB specific error.

◆ naibrd_PB_GetPSAKVersion()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetPSAKVersion ( int32_t cardIndex,
int32_t module,
int firmwareVersionMaxLength,
char * p_outfirmwareVersion,
int32_t psakVersionMaxLength,
char * p_outpsakVersion )

Responsible for returning the version of the underlying Profibus Software Access Kit (Softing).

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
firmwareVersionMaxLength: (Input) Max number characters allowed to be used for firmware version .
p_outfirmwareVersion: (Output) Buffer containing detected firmware version.
psakVersionMaxLength: (Input) Max number characters allowed to be used for psak version .
p_outpsakVersion: (Output) Buffer containing detected psak version.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_FUNCTION_SPECIFIC_ERROR : caller can call naibrd_PB_GetLastFunctionCallStatus to get PB specific error.

◆ naibrd_PB_GetReceiverEnableForSegments()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetReceiverEnableForSegments ( int32_t cardIndex,
int32_t module,
uint32_t * p_outreceiverEnable )

Responsible for returning 32 bit value indicating which segments have their receiver enabled.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outreceiverEnable: (Output)32 bit value indicating which segments have receivers enabled: 1 indicates enable
  • D0 - Enables receiver for segment 1
  • D1 - Enables receiver for segment 2
  • D2 - Enables receiver for segment 3
  • D3 - Enables receiver for segment 4
  • D4 - Enables receiver for segment 5
  • D5 - Enables receiver for segment 6
  • D6 - Enables receiver for segment 7
  • D7 - Enables receiver for segment 8
  • D8 - Enables receiver for segment Aux
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_FUNCTION_SPECIFIC_ERROR : caller can call naibrd_PB_GetLastFunctionCallStatus to get PB specific error.

◆ naibrd_PB_GetSlaveDiagnostics()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetSlaveDiagnostics ( int32_t cardIndex,
int32_t module,
int32_t slaveAddr,
NAIBRD_PB_SLAVE_DIAGNOSTICS * p_outslaveDiagnostics )

Responsible for retrieving slave diagnostic information for a given slave.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
slaveAddr: (Input) Address of slave target
p_outslaveDiagnostics: (Output) Pointer to structure containing collected diagnostic information for given slave.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_PB_GetStatistics()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetStatistics ( int32_t cardIndex,
int32_t module,
NAIBRD_PB_STATISTICS * p_outstatistics )

Responsible for returning bus statistics.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outstatistics: (Output) Pointer to struct containing the collected statistics information.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_FUNCTION_SPECIFIC_ERROR : caller can call naibrd_PB_GetLastFunctionCallStatus to get PB specific error.

◆ naibrd_PB_GetTerminationEnableForSegments()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_GetTerminationEnableForSegments ( int32_t cardIndex,
int32_t module,
uint32_t * p_outterminationEnable )

Responsible for returning 32 bit value indicating which segments have termination enabled.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outterminationEnable: (Output)32 bit value indicating which segments have termination enabled: 1 indicates enable
  • D0: Enables termination for segment 1
  • D1: Enables termination for segment 2
  • D2: Enables termination for segment 3
  • D3: Enables termination for segment 4
  • D4: Enables termination for segment 5
  • D5: Enables termination for segment 6
  • D6: Enables termination for segment 7
  • D7: Enables termination for segment 8
  • D8: Enables termination for segment Aux
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_FUNCTION_SPECIFIC_ERROR : caller can call naibrd_PB_GetLastFunctionCallStatus to get PB specific error.

◆ naibrd_PB_KickoffGetLiveList()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_KickoffGetLiveList ( int32_t cardIndex,
int32_t module )

Responsible for Kicking off the probing of the entire bus for slaves. NOTE: This probing / data collection can take several minutes to complete. Caller can make repeated calls to naibrd_PB_GetLiveListResults to see if task completed. If still in progress, an error indicating so will be returned.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_PB_ResetAlarmCounters()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_ResetAlarmCounters ( int32_t cardIndex,
int32_t module,
int32_t slaveAddr )

Responsible for resetting alarm counters for the specified slave.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
slaveAddr: (Input) Address of slave target
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_PB_ResetMS0ConnectionCounters()

NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_ResetMS0ConnectionCounters ( int32_t cardIndex,
int32_t module,
int32_t slaveAddr )

Responsible for resetting connection counters for the given slave.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
slaveAddr: (Input) Address of slave target
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.