acl_info_c
status.i4.v = acl_info_c(command_text.i1a.r, command_length.i4.v,
options.u4.v, symbol_names.i1p.r,
num_symbols.i4.r, read_devices.i1p.r,
num_read_devs.i4.r, set_devices.i1p.r,
num_set_devs.i4.r, error_string.i1a.r
[,subst_strings.i1p.r] [,num_subst_str.i4.r]
[,device_info.sp.r] [,num_device_info.i4.r]
[,string_info.sp.r] [,num_string_info.i4.r])
This routine parses Accelerator Command Language (ACL) commands
and returns information about devices accessed as well as symbols
created. The commands are ASCII strings with one command per
string. Each line should be terminated by a new line or null
character.
command_text ASCII commands to parse
command_length total length of command text (If a value of zero
is passed for this argument, the command text will
be treated as a single null terminated string.)
options execution options
(ACL_OPT_NONE -> no options selected, parse and
execute the code,
ACL_OPT_COMPILED_CODE -> passed code has already been
compiled by a call to
'acl_compile_c')
symbol_names returned array of symbols created
(ACL_SYMBOL_NAME_LEN + 1 characters per entry)
(This memory is allocated by this routine and should
not be freed by the caller.)
num_symbols returned number of symbols created
read_devices returned array of devices which will be read
(DEVICE_NAME_LEN characters per entry)
(This memory is allocated by this routine and should
not be freed by the caller.)
num_read_devs returned number of devices which will be read
set_devices returned array of devices which may be set
(DEVICE_NAME_LEN characters per entry)
(This memory is allocated by this routine and should
not be freed by the caller.)
num_set_devs returned number of devices which may be set
error_string returned error string (Allow at least 133 characters.)
(A value of NULL can be passed for this argument
if this information is not needed.)
[subst_strings] returned array of substitute strings
(9 characters per entry)
(This memory is allocated by this routine and should
not be freed by the caller.)
[num_subst_str] returned number of substitute strings
[device_info] returned device argument descriptors
(This memory is allocated by this routine and
should NOT be freed by the caller.)
(default is NULL)
[num_device_info] returned number of device argument descriptors
(default is NULL)
[string_info] returned string argument descriptors
(This memory is allocated by this routine and
should NOT be freed by the caller.)
(default is NULL)
[num_string_info] returned number of string argument descriptors
(default is NULL)
This function returns ACNET status values as follows:
CLIB_OK success
CLIB_INVARG null pointer passed for "command_text"
argument or passed information is not
compiled code when ACL_OPT_COMPILED_CODE
specified
CLIB_MEMFAIL failed in allocating dynamic memory
CLIB_SYNTAX syntax error
CLIB_INVSIZ command line too long
otherwise other ACNET format error code
This function requires the following include files:
cbslib_h, acnet_errors.h
Related functions:
intro_acl, acl_execute_c, acl_file_execute_c, acl_file_read_c,
acl_file_write_c, acl_compile_c, acl_free_c, acl_read_symbol_c,
acl_read_symbol_info_c, acl_read_symbol_names, acl_delete_symbol,
acl_cancel_requests_c, acl_set_symbol_c, acl_default_data_source_c,
acl_log_file_c, acl_default_script_path_c, acl_script_is_executing,
acl_register_host_request_func, acl_unregister_host_request_func,
acl_translate_command_string
C usage:
static const char command_text[] = "set B:HB812 700.0";
char error_string[133];
char *symbol_names;
char *read_devices;
char *set_devices;
char *subst_strings;
int status;
int command_length = 0;
int num_symbols;
int num_read_devices;
int num_set_devices;
int num_subst_str;
int num_device_info;
int num_string_info;
unsigned int options = ACL_OPT_NONE;
ACL_ARG_INFO *device_info;
ACL_ARG_INFO *string_info;
status = acl_info_c(command_text,command_length,options,&symbol_names,
&num_symbols,&read_devices,&num_read_devices,
&set_devices,&num_set_devices,error_string,
&subst_strings,&num_subst_str,&device_info,
&num_device_info,&string_info,&num_string_info);