[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
The graPHIGS Programming Interface : Subroutine Reference
GPEPD - Emulate Physical Device
GPEPD
(wsid,
category,
device,
value) |
Purpose
Use
GPEPD
to emulate input from a physical device to one or
more logical input devices.
The set of logical input devices which will receive this physical
input is fixed.
The physical device must first be disabled before it can
be emulated through this subroutine.
An error is generated otherwise.
If you are using
physical device emulation on the X workstation,
refer to
The graPHIGS Programming Interface: Technical Reference
Parameters
wsid -- specified by user, fullword integer
Workstation identifier.
category -- specified by user, fullword integer
Physical device category
(1=BUTTON, 2=SCALAR, 3=2D_VECTOR
)
device -- specified by user, fullword integer
Physical device number (>=1)
value -- specified by user, array of fullword integers
Input values.
This array contains a list of values that are to
be passed to the measure mapping process of the logical input devices
that receive their input from the specified physical device.
The length and content of this array is determined by the category
of physical input device as follows:
Category |
Number of values to be passed in |
1=BUTTON |
1 |
2=SCALAR |
1 |
3=2D_VECTOR |
2 |
If the physical device generates
absolute values,
then the specified
value must be in the
range defined for the physical input device.
To determine the range for the physical input device,
use Inquire Physical Device Characteristics
(GPQPDC)
subroutine.
If the physical device generates
relative values,
then the specified
value can by any positive or negative
integer which represents increments of physical motion.
The value is used to compute a
change
in the measure of the logical device
using the following formula:
Logical Range
high
- Logical Rangelow
----------------------------------------------------------------------------------- x value
#of Physical Device Increments Unit of Physical Motion x #Units of Physical Motion
The change
is then added to the
current measure of the logical device.
If the result exceeds a limit of the range,
then the measure is set to that limit.
Logical Range
Specified on the Initialize Device subroutine
call.
It is the range of physical input values that
the logical device can input.
Unit of Physical Motion
For a dial physical
device, a unit of physical motion equals one turn of the dial
(unless this is changed by the Initialize
Valuator
[GPINVL]
[page
GPINVL - Initialize Valuator]
subroutine)
For a relative vector device,
the WDT range of the device's physical motion equals
the amount
of motion necessary to move the cursor from
one edge of the screen to its opposite edge.
Note: For keyboard physical devices,
if the
value is between
0 and 255,
the workstation's primary character set
is used to interpret the
value
Error Codes
- 25
- SPECIFIED WORKSTATION DOES NOT EXIST
- 38
- WORKSTATION HAS ONLY OUTPUT CAPABILITIES
- 140
- DEVICE NUMBER < ONE OR DEVICE NOT AVAILABLE
- 160
- PHYSICAL INPUT DEVICE CATEGORY IS INVALID
- 161
- PHYSICAL INPUT VALUE IS INVALID
- 162
- PHYSICAL INPUT DEVICE HAS NOT BEEN DISABLED
Related Subroutines
- GPPDMO
- Set Physical Device Mode
- GPQPDC
- Inquire Physical Device Characteristics
- GPQSPD
- Inquire Source Physical Device
RCP code
201344770
(X'0C004702')
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]