Dtl_def_avail – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 176

API Library of Routines
Appendix B
DTL_DEF_AVAIL
B-45
Returns the number of data definitions that can be added to the DTL
data-definition table.
C Syntax
#include <copro.h>
unsigned DTL_DEF_AVAIL (num_avail)
unsigned *num_avail;
Parameters
num_avail
Contains the number of data definitions remaining in the
data-definition table.
Description
Use the DTL_DEF_AVAIL function to determine the number of data
definitions available in the calling task’s table of data definitions. The
function calculates the difference between the number of entries defined by
DTL_INIT and the number of successful data definitions made using
DTL_C_DEFINE and returns the results in the num_avail parameter.
Returns
Status
Symbolic Name
Meaning
0
DTL_SUCCESS
Operation successful
19
DTL_E_NO_INIT
DEFINE table not initialized
C Example
unsigned status;
unsigned num_avail;
.
.
.
status = DTL_DEF_AVAIL (&num_avail);
printf (“%d definitions available\n”,num_avail);
DTL_DEF_AVAIL