Home > Lucent Technologies > Communications System > Lucent Technologies DEFINITY Enterprise Communications Server Release 6 CallVisor PC ASAI Instructions Manual

Lucent Technologies DEFINITY Enterprise Communications Server Release 6 CallVisor PC ASAI Instructions Manual

Here you can view all the pages of manual Lucent Technologies DEFINITY Enterprise Communications Server Release 6 CallVisor PC ASAI Instructions Manual. The Lucent Technologies manuals for Communications System are available online for free. You can easily download all the documents as PDF.

Page 121

Introduction to ASAI
Issue  3  May 1998
3-13
The programmer is not restricted to a specific number of capabilities that can be 
supported on a given communication path; however, he or she is restricted to a 
single node for all capabilities on a given path.
C_RT_ENDx
C_RT_REQx
C_RT_SELx
C_SV_CONFx
C_SV_REQx
C_VQ_CONFx
C_VQ_REQx
C_VQ_RESPx
Table 3-6. Classification of ASAI Capabilities  — Continued
Acknowledged Unacknowledged
Init. Cont. Term. Init. Cont. Term. 

Page 122

Introduction to ASAI
3-14Issue  3  May 1998  

Page 123

Issue  3  May 19984-1
4
ASAI Library Functions
The ASAI library functions provide the application program with an easy method 
of sending and receiving information (in the form of ASAI capabilities) to and from 
the ECS. Before you can send or receive information, however, you must 
establish a communication path. This is a two-step procedure, requiring you to 
first open a path, using asai_open(), and then to identify the ECS link over 
which your program will communicate. The ECS is identified by a...

Page 124

ASAI Library Functions
4-2Issue  3  May 1998 
It is possible to process more than one ASE on a communication path; however, 
each communication path can be used to service only a single node. Thus, if an 
application wishes to use a communication path to send service requests, all the 
requests must be made to the same destination node as that of the initiating 
capability. If an application wishes to use a communication path to receive 
capabilities, requests must come via the port used to receive the...

Page 125

ASAI Library Functions
Issue  3  May 1998
4-3
asai_open( )
The asai_open() function is the first of the library functions that your program 
calls. This function opens a communication path (stream) and returns file 
descriptor fd if the call is successful; the function returns -1 if the call fails.
asai_open() requires two arguments; pathname and ndelay_flag. The 
pathname is /dev/asai/asai or a machine name for CV/LAN.
The ndelay_flag determines whether you will be operating in synchronous 
mode with...

Page 126

ASAI Library Functions
4-4Issue  3  May 1998 
asai_errval ( )
When an error occurs, an error value is made available in the variable 
asai_errno of data type long. Once asai_errno is set, its value is not reset 
by successful function calls. If an error is returned by an ASAI library function, 
there is state transition, either for the communication path or for the instance of 
communication. asai_errval() lets you specify an error message that is 
written to the standard error device along with the...

Page 127

ASAI Library Functions
Issue  3  May 1998
4-5
Figure 4-3. Using asai_errval (), Example 2
Note that the colon (:) included as part of the message in Figure 4-2 on page 4-4 
is not necessary. The message written to standard error consists of your specified 
message, a colon, and then the ASAI message. For a full listing of the ASAI error 
messages, see Chapter 7, ‘‘Error Messages.’’
asai_errval returns 0 on success and -1 on failure. The sample code at the 
end of this chapter uses a conditional call to...

Page 128

ASAI Library Functions
4-6Issue  3  May 1998 
asai_set_env( )
After opening a communication path, the next step is to establish an environment 
that will support your program. The asai_set_env() function enables you to set 
one characteristic at a time. You 
must set the node identifier using the 
C_NODE_ID characteristic, if you are going to establish new association.
asai_set_env() has two mandatory and one optional arguments. The file 
descriptor and the characteristic to be set are mandatory....

Page 129

ASAI Library Functions
Issue  3  May 1998
4-7
You may also need to specify that the application is to function as a server for an 
ECS routing and maintenance requests. A single application can function as a 
server for more than one node on a single file descriptor. (A node can be equated 
to a link or port on an ASAI connection.) Note that each node will allow only one 
server for each kind of service. To do this, set the num_node field of the 
server_type_t structure to the number of nodes the...

Page 130

ASAI Library Functions
4-8Issue  3  May 1998 
You should also include the routing (C_RT_SER) server in order to receive route 
requests.
The sample code at the end of this chapter calls asai_set_env () on line 57, in 
Figure 4-9.
NOTE:
Be aware that each call to asai_set_env overwrites the previous value(s) 
on a per-characteristic basis. 
Start reading Lucent Technologies DEFINITY Enterprise Communications Server Release 6 CallVisor PC ASAI Instructions Manual

Related Manuals for Lucent Technologies DEFINITY Enterprise Communications Server Release 6 CallVisor PC ASAI Instructions Manual

All Lucent Technologies manuals