10 Reference
10.1 User Commands
This program provides a graphical engineering user interface
specifically for digital I/O devices in a LCU environment that
are controlled by the "acro" driver.
A panel is exposed which provides the functionality of the device
and the corresponding driver via control elements to the user.
User actions are immediately forwarded to the connected device,
and changes of the device status are immediately displayed on the
panel as well.
See the user manual for a detailed description of all panel
properties - unless they are anyhow intuitively accessible.
All arguments are optional. The environment and device can always be
selected from menus after start-up of the panel. If they are given
on the command-line, then the panel is immediately connected the the
specified environment/device.
environment - name of the LCU environment, e.g. "lte21"
device - name of the device, e.g. "/acro0"
firstSignal - first signal-number to be displayed in the panel (0)
nSignals - number of signals to be displayed in the panel (64)
Note that the arguments for firstSignal and nSignals can only be used
to reduce the size of the panel or eventually to speed up the inter-
preted monitoring loop. It is not possible to have multiple panels
with possibly different sets of signals connected to the same device
at the same time.
This program is intented ONLY for test and maintenance purposes.
It controls the device on the very lowest driver level.
=== BE AWARE THAT DIRECT DEVICE ACCESS MIGHT BE DANGEROUS ===
inducer(1), inducerServer(1),
AcroxDevice(n), AcroxSignal(n),
VLT-MAN-17210-0836 "Driver Engineering Interface - User Manual"
This program provides a graphical engineering user interface
specifically for analog I/O devices in a LCU environment that
are controlled by the "aio" driver.
A panel is exposed which provides the functionality of the device
and the corresponding driver via control elements to the user.
User actions are immediately forwarded to the connected device,
and changes of the device status are immediately displayed on the
panel as well.
See the user manual for a detailed description of all panel
properties - unless they are anyhow intuitively accessible.
All arguments are optional. The environment and device can always be
selected from menus after start-up of the panel. If they are given
on the command-line, then the panel is immediately connected the the
specified environment/device.
environment - name of the LCU environment, e.g. "lte21"
device - name of the device, e.g. "/aio0"
firstInputSignal - number of the first input signal to display
nOfInputSignals - number of input signals to display (4, 8 , 12 and 16)
Note that the arguments for firstInputSignal and nOfInputSignals can only
be used to reduce the size of the panel or eventually to speed up the inter-
preted monitoring loop. It is not possible to have multiple panels
with possibly different sets of signals connected to the same device
at the same time.
This program is intented ONLY for test and maintenance purposes.
It controls the device on the very lowest driver level.
=== BE AWARE THAT DIRECT DEVICE ACCESS MIGHT BE DANGEROUS ===
inducer(1), inducerServer(1),
AioxDevice(n) AioxInputLine(n) AioxOutputLine(n),
VLT-MAN-17210-0836 "Driver Engineering Interface - User Manual"
This program provides a graphical engineering user interface
specifically for IK320 encoder interface devices in a LCU environment
that are controlled by the "ikon" driver.
A panel is exposed which provides the functionality of the device
and the corresponding driver via control elements to the user.
User actions are immediately forwarded to the connected device,
and changes of the device status are immediately displayed on the
panel as well.
See the user manual for a detailed description of all panel
properties - unless they are anyhow intuitively accessible.
All arguments are optional. The environment and device can always be
selected from menus after start-up of the panel. If they are given
on the command-line, then the panel is immediately connected the the
specified environment/device.
environment - name of the LCU environment, e.g. "lte21"
device - name of the device, e.g. "/ikon0"
This program is intented ONLY for test and maintenance purposes.
It controls the device on the very lowest driver level.
=== BE AWARE THAT DIRECT DEVICE ACCESS MIGHT BE DANGEROUS ===
inducer(1), inducerServer(1),
IkonxDevice(n),
VLT-MAN-17210-0836 "Driver Engineering Interface - User Manual"
This program provides a graphical engineering user interface
specifically for time interface module devices in a LCU environment
that are controlled by the "tim" driver.
A panel is exposed which provides the functionality of the device
and the corresponding driver via control elements to the user.
User actions are immediately forwarded to the connected device,
and changes of the device status are immediately displayed on the
panel as well.
See the user manual for a detailed description of all panel
properties - unless they are anyhow intuitively accessible.
All arguments are optional. The environment and device can always be
selected from menus after start-up of the panel. If they are given
on the command-line, then the panel is immediately connected the the
specified environment/device.
environment - name of the LCU environment, e.g. "lte21"
device - name of the device, e.g. "/tim0"
This program is intented ONLY for test and maintenance purposes.
It controls the device on the very lowest driver level.
=== BE AWARE THAT DIRECT DEVICE ACCESS MIGHT BE DANGEROUS ===
inducer(1), inducerServer(1),
timxDevice(n), timxTimer(n),
VLT-MAN-17210-0836 "Driver Engineering Interface - User Manual"
10.2 File Formats
This file contains configuration options for applications of the
Inducer Test Access Panel Suite.
It is intended to pre-define default names and values to be used
by the application-programs and to adapt them to any changes in
environment-names.
To have a private copy of this file, copy it to either
"$INTROOT/config/inducer.config" or "$MODROOT/config/inducer.config".
Additionally you can have a copy in your home-directory as ~/.inducer,
which will be sourced after "inducer.config", whereby re-definitions
are possible.
VLTROOT - path of VLT root (mandatory)
INTROOT - path of integration root (optional)
MODROOT - path of module development root (optional)
Tcl variables used in inducer have hardcoded default values,
so they need not necessarily be defined here.
10.3 Tcl Library
InducerClass is used to inherit special features for the
implementation of objects to be used in "Inducer Panels".
All OPTIONS and METHODS of this class are then also available
in the objects that inherit from this class.
Options represent public variables of the object and can be set with:
<object-name> configure -<Option> <Value> ...
The following options are publicly available:
-wHelparea Object-name of short-help.
By default the panel-editor defined area is used.
(Note: this is a direct reference which may change!)
Methods represent procedures on the object and are invoked with:
<object-name> <Method> <Arguments> ...
The following methods are publicly available:
debugPrint ?<string>?
This can be called from the body of a method or config-body
of a public variable to print debugging information.
If the option `debugFlag' is enabled, then a line in the form:
(<object-name>) <method-name> <args>: <string>
is printed to standard-output, where "<object-name>" is the
name of the object and "<method-name> <args>" is the name of
the method from which the call was made and it's arguments.
If the call was not made from a method, this field is empty.
An optional "<string>" can also be printed.
NOTE: debugPrint can not be called from the body of a proc!
More methods: see VccDebug(n)
itcl_class AcroxSignal {
inherit FrameWidget InducerClass
#*# constructor
constructor { config } {
...
}
method abc {
debugPrint "..."
}
...
}
InducerDevice is used to inherit special features for the
implementation of Device objects to be used in "Inducer Panels".
All OPTIONS and METHODS of this class are then also available
in the objects that inherit from this class.
Device-specific methods shall be provided in the derived classes
which overload the mostly empty default-methods contained herein.
Options represent public variables of the object and can be set with:
<object-name> configure -<Option> <Value> ...
The following options are publicly available:
vEnv - enviroment name
vDev - device name
vMode - open-mode to be used: TEST, EXCLUSIVE, SHARED, READONLY
Methods represent procedures on the object and are invoked with:
<object-name> <Method> <Arguments> ...
The following methods are publicly available:
constructor ?<options>?
At the beginning of each device-specific class should be
a call of "InducerDevice::constructor". This creates an
InducerLine object that serves as a link to the inducerServer
task on the LCU. The object name is saved in the protected
variable `lineW'.
The following methods should be overloaded by the derived class
with appropriate device-specific actions. This base-class provides
only some default actions. If the required action is not available
for the specific device, then the method need not be overloaded.
GetVersion - must return the version-string of the program
InitDevice - must first call `InducerDevice::InitDevice' to open
the link to the device, then start the monitor task,
and possibly do specific actions.
Must return an empty string on success or an
error description.
ExitDevice - must stop the monitor task, and at the end call
`InducerDevice::ExitDevice' to close the link to
the device. Must return an empty string.
ResetDevice - must reset the connected device.
GetDeviceId - must retrieve and return a device-ID-string
to be displayed in the panel.
LoadDevice <data> - must restore the device-status from the string
`data' which is in the same format as from SaveDevice.
SaveDevice - must retrieve and return the device-status as a
a string which is suitable for LoadDevice.
Disconnect - requests that all further user interactions remain
local to the panel, neither are changes forwarded
to the device, nor is the panel updated from the
device. However, the channel is kept opened.
Resume - requests that the current panel settings are
forwared to the device in one go. After that the
normal operation and update policy is resumed.
inducerGetLib,
inducerGetDevices,
inducerGetTickRate,
inducerGetIoctlCommands,
inducerGetIoctlCmdNum,
inducerGetTools,
inducerGetToolArg
- get information in the inducer environment
inducerGetDevices Environment ?Filters?
inducerGetTickRate Environment
inducerGetIoctlCommands Device
inducerGetIoctlCmdNum CmdNameOrNumList
inducerGetTools Devices
inducerGetToolArg Device Tool
These procs are called by the inducer program.
inducerGetDevices - query the installed devices from a LCU
environment and return them as a list,
passing at least one of the optional filters
in `Filters' (e.g. {/acro* /aio*}).
Only devices with VLT conform names are
returned, matching the regexp "/[a-z]+[0-9]+"
inducerGetTickRate - query the system-clock-rate from the LCU
in ticks per second.
inducerGetIoctlCommands - query the command-literals for a given
device from the corresponding driver
header file. Returns a list-representation
for a cascaded menu, suitable for MakeMenu.
(same behaviour as in lcudrvTk)
inducerGetIoctlCmdNum - translate a command-literal(-list) into it's
corresponding number(-list). The literal must
be given without the driver-specific prefix,
e.g. "READ_BITS" (not "acroCMD_READ_BITS").
No translation is done if the literal does
not exist or if it is already a number.
inducerGetTools - query the tool-functions for a given list of
`Devices' from the corresponding driver
header file. Returns a list of functions.
(same behaviour as in lcudrvTk)
inducerGetToolArg - determines the proper argument for a tool
function `Tool' when applied on a specific
`Device'. This depends on the function's
argument declaration in the driver header
file, which can be:
- empty for a "void" argument declaration
- device-name if "name" is declared
- unit-number if "unit" or "axis" is declared
- else empty (unknown)
(same behaviour as in lcudrvTk)
Objects of the class InducerLine are used to connect from a
workstation Tcl-application - e.g. a Test Access Panel - to
the inducerServer task running on a LCU environment.
Several methods are provided to open/close a channel to a
LCU device and to send commands to it via ioctl.
A monitor facility to report changes in a device status is
also available, that invokes a user-script each time a change
is detected in the device.
Options represent public variables of the object and can be set with:
<object-name> configure -<Option> <Value> ...
The following options are publicly available:
-cPeriod <ticks>
The monitor-task on the LCU started by MonitorStart
polls the device periodically with the given interval.
The lower the value, the faster the update, but the
higher the load of the LCU.
Reasonable values are 20 to 100 ticks, default is 50.
Methods represent procedures on the object and are invoked with:
<object-name> <Method> <Arguments> ...
The following methods are publicly available:
Open { Environment Device Mode } ==> FileDes
Open a connection to `Device' on `Environment' in the
open-mode given by `Mode' which can be:
TEST, EXCLUSIVE, SHARED, READONLY
The file-descriptor used on the LCU is returned and stored
inside the object for later access (-1 if open failed).
Only one connection can be opened by the object at a time.
Any already opened connection is automatically closed before
opening the new one.
Close
Close the previously opened connection to the LCU.
No action if no channel was opened.
Ioctl { Cmdlist Arglist ?Sizlist? } ==> Result
send the commands in `Cmdlist', each one with each
argument contained in `Arglist' through the
previously opened channel.
Commands may be given either as numbers or driver-
literals without the driver-specific prefix,
e.g. "READ_BITS" (not "acroCMD_READ_BITS").
Arguments must be given as one integer or double or as
semicolon-separated values if more than one is needed,
for a specific driver-command, e.g. "3;-4553;0;33".
Each number corresponds to a struct-member.
The `Result' consists of a comma-separated list of
all the return-values of the executed ioctl-calls.
The format of each list-element corresponds to the
format of the respective argument, unless the optional
`Sizlist' is given. Then the number of struct-members
to be returned can be explicitly specified, where
the index in Sizlist corresponds to the index in
Cmdlist (very complicated, but fortunately rarely used).
Errors reported by the called driver are ignored.
Only the number of occured errors is returned as last
list-element in `Result'. Detailed information about
any errors is not provided.
IoctlTrap { Cmdlist Arglist ?Sizlist? } ==> Result
as before, but if the called driver reports an error,
then a dialog-box is exposed for acknowlegement.
MonitorStart { Cmdlist Arglist ?Sizlist? ?Script? }
start a monitor task on the LCU which periodically
compares the ioctl result. Everytime a change is
is detected, `Script' is executed with the new
ioctl-result as argument, in the same format as
returned by Ioctl. The parameters except for Script
are the same as in Ioctl.
The sample period is given by the option `cPeriod'.
MonitorStop
stop the monitor-task (see CAUTIONS).
MonitorCollector { Script Reply Errorflag Lastflag }
Used internally for collecting monitor-replies from the LCU.
Send { Env Com ?Par? } ==> Reply
Send the command `Com' with optional parameters `Par'
to the inducerServer running on the LCU environment `Env'.
The `Reply' of this command is returned.
An error-reply is trapped with a dialog-box for confirmation
and an empty string is returned in that case.
Note that multiple replies are not handled!
cTimeout <milliseconds>
Timeout value used for message-receive in proc `Send'.
Default is 5000 (5 seconds).
The MonitorStop method stops the monitor-task on the LCU in an
asynchronous fashion. It is not verified that the task has actually
terminated.
10.4 LCU Server
This panel provides two functions:
1. After selecting environment and device, the corresponding
device-specific test panel is started for the selected items.
2. After selecting an environment, the `VxWorks' and `Driver' menus
can be used to send commands to that LCU and display the replies.
inducerInit() is called from the boot script and initialises the
inducerServer command interpreter. Outputs to stdout inform about
success or failure.
If `priority' is zero or negative (e.g. omited from the shell input),
then the default value is taken as defined by inducerSERVER_PRIORITY.
STATUS inducerMemDrv(void)
STATUS inducerMemDevCreate(char *name, char *base, int length)
STATUS inducerMemDevDelete(char *name)
Driver for memory devices that allow to read/write directly from/into
memory by using I/O-system calls, e.g. to redirect output into memory.
It can be used for general purpose and is not exclusive to the
inducer module.
inducerMemDrv - install a memory driver
This routine initializes the memory driver. It must be called first,
before any other routine in the driver.
Repeated calls do nothing and return always OK.
inducerMemDevCreate - create a memory device
This routine creates a memory device. Memory for the device is simply
an absolute memory location beginning at <base>. The <length> parameter
indicates the size of memory.
For example, to create the device "/mem/cpu0/", a device for accessing
the entire memory of the local processor, the proper call would be:
memDevCreate ("/mem/cpu0/", 0, sysMemTop())
The device is created with the specified name, start location, and size.
To open a file descriptor to the memory, use open(). Specify a
pseudo-file name of the byte offset desired, or open the "raw" file at the
beginning and specify a position to seek to. For example, the following
call to open() allows memory to be read starting at decimal offset 1000.
-> fd = open ("/mem/cpu0/1000", O_RDONLY, 0)
Pseudo-file name offsets are scanned with "%d".
inducerMemDevDelete - delete a memory device
This routine deletes a memory device that was created before,
so that it can be created again with possibly other parameters.
Allocated resources are released. No malloc is used, so that dynamic
creation and deletion of devices does not produce fragmentation.
This driver is almost identically copied from the VxWorks `memDrv'.
It has been modified so that memory devices can now be dynamically
created and deleted without risking fragmentation due to internal
malloc calls.
OPEN - open a channel to a device
CLOSE - close a channel to a device
IOCTL - send command(s) with argument(s) to a device
MONITOR - process IOCTL periodically to monitor a device for changes
SETMON - set parameters for MONITOR
READ - (not implemeted yet)
WRITE - (not implemeted yet)
GETDEVS - get list of devices
GETTICK - get system-clock-rate in ticks per second
GETDBG - get mode for debugging outputs
SETDBG - set mode for debugging outputs
VERSION - get loaded module-version
EXEC - execute function and return its standard-output
EXIT - terminate
OPEN deviceName[,openMode]
==> fileDescriptor
CLOSE fileDescriptor
==> (empty)
IOCTL fileDescriptor,{commandNumber},{argumentString},{resultSize}
==> resultString{,resultString},nErrors
argumentString := member{;member}
member := integer|double
MONITOR fileDescriptor,{commandNumber},{argumentString},{resultSize}
==> resultString{,resultString},nErrors (repeated)
SETMON fileDescriptor,periodTicks
==> (empty)
GETDEVS ==> deviceName{,deviceName}
GETTICK ==> system-clock-rate
GETDBG ==> "On"|"Off"
SETDBG "On"|"Off"
==> (empty)
VERSION ==> @(#) inducer $Revision: 1.40 $ $Date: 1995/12/21 13:49:57 $
EXEC function[,arg1,...,arg10]
==> standard-output of the function
EXIT ==>
Quadralay Corporation http://www.webworks.com Voice: (512) 719-3399 Fax: (512) 719-3606 sales@webworks.com |