skip book previous and next navigation links
go up to top of book: HP OpenVMS I/O User's Reference ManualHP OpenVMS I/O User's Reference Manual
go to beginning of appendix: Control Connection RoutinesControl Connection Routines
go to previous page: PDT$CANCEL  Cancel Queued Request PDT$CANCEL Cancel Queued Request
go to next page: PDT$DELETE  Delete a Pseudoterminal PDT$DELETE Delete a Pseudoterminal
end of book navigation links

PDT$CREATE -- Createa Pseudoterminal  



Creates a new pseudoterminal with a unique device name.

Format 

PDT$CREATE chan [,acmode] [,charbuff] [,bufflen] [,astadr] [,astprm]            [,ast_acmode], inadr

Returns 

OpenVMS
usage:
 cond_value
type : longword (unsigned)
access: write only
mechanism: by value

Arguments 

chan 



OpenVMS usage:
 channel
type : word (unsigned)
access: write only
mechanism: by value
Number of the channel that is assigned to the new pseudoterminal.This argument is the address of a word into which PTD$CREATE writesthe channel number. This channel is only intended to be used forPTD$XXX operations.

acmode 



OpenVMS usage:
 access_mode
type : longword (unsigned)
access: read only
mechanism: by value
Access mode to be associated with the channel. The most privilegedaccess mode is the access mode of the caller. I/O operations onthe channel can be performed only from equal and more privilegedaccess modes.

charbuff 



OpenVMS usage:
 device_characteristics
type : longword (unsigned)
access: read only
mechanism: by reference
Address of buffer containing the device characteristics. Thisinformation is used to set up the pseudoterminal's initial characteristics.This buffer can be 12, 16, or 20 bytes long.

Device Characteristics Buffer shows the formatof this buffer:  

Figure 1  Device Characteristics Buffer  
Device Characteristics Buffer

bufflen 



OpenVMS usage:
 word_unsigned
type : word (unsigned)
access: read only
mechanism: by value
Length of the characteristics buffer (either 12, 16, or 20bytes). This argument is required if you supply the charbuff argument.

astadr 



OpenVMS usage:
 ast_procedure
type : procedure value
access: call without stack unwinding
mechanism: by reference
AST service routine to be executed when the terminal connectiondeassigns the last channel to the pseudoterminal. This argumentis the procedure value of this routine. This is a repeating ASTand is active until the control connection deletes the pseudoterminal.

astprm 



OpenVMS usage:
 user_arg
type : longword (unsigned)
access: read only
mechanism: by value
AST parameter to be passed to the AST service routine specifiedby astadr.

ast_acmode 



OpenVMS usage:
 access_mode
type : longword (unsigned)
access: read only
mechanism: by value
Access mode for which the AST is to be declared. The mostprivileged access mode is the access mode of the caller. The resultingmode is the access mode at which the AST is declared.

inadr 



OpenVMS usage:
 address_range
type : longword (unsigned)
access: read only
mechanism: by reference
Address of a two-longword array containing the starting andending virtual addresses in the virtual address space of the process(either P0 or P1 regions) to be used as I/O buffers. The array contains,in order, the starting and ending virtual addresses. The addressessupplied to inadr must expressan integral number of CPU-specific pages. The lower address mustbe on a CPU-specific page boundary, and the higher address mustbe one less than a CPU-specific page boundary. Together these addressesform a range from lowest to highest bytes. The pages must alreadyexist and must be fully contained in either P0 or P1 space. Allpages in the range must:

Description 

PTD$CREATE creates a new pseudoterminal with a unique devicename. This device name is in the form FTAn:,where n is the unit number.

When a pseudoterminal is created, it inherits the currentsystem terminal default attributes unless you specify an alternateset of characteristics.

ReturnValues 

SS$_NORMAL
Normal successful completion.
SS$_ACCVIO
Unable to read one of the arguments.
SS$_BADPARAM
Bad Parameter Value.
SS$_EXBYTLM
Insufficient BYTLM to create device or map buffers.
SS$_EXQUOTA
Insufficient quota to create device.
SS$_EXASTLM
Insufficient AST quota for notification AST.
SS$_INSFMEM
Insufficient memory to create device.
SS$_INSFWSL
Insufficient working set limit to map buffers.
SS$_IVSECFLG
Invalid process or global section flags.
SS$_NOPRIV
No privilege for attempted operation.
SS$_PAGPNWNVIO
Page owner violation.
SS$_VA_IN_USE
Virtual address already in use.


go to previous page: PDT$CANCEL  Cancel Queued Request PDT$CANCEL Cancel Queued Request
go to next page: PDT$DELETE  Delete a Pseudoterminal PDT$DELETE Delete a Pseudoterminal