TOC PREV NEXT INDEX

Put your logo here!


9 REFERENCE

9.1 Functions

Man-pages of all public driver functions in alphabetical order.

9.1.1 ikonClose(3)
NAME
ikonClose - Close a channel to a ikon device


SYNOPSIS
#include "ikon.h"
int ikonClose(int channel)



DESCRIPTION
This routine is called when a channel of a ikon device shall be
closed. It represents a interface routine between the special
ikon driver routines and the general lcudrv driver routines.

channel - channel to be closed


RETURN VALUES
lcudrvOK - successful completion
lcudrvERROR_INVALID_ARGUMENT - invalid channel number
lcudrvERROR_NO_CHANNEL - channel was not open


SEE ALSO
ikonOpen(3), ikonIoctl(3),
lcudrvClose(3),
open(2), close(2), ioctl(2),
IK320 Driver User Manual (VLT-MAN-ESO-17210-0806)




- - - - - -
Last change: 08/03/96-20:23

9.1.2 ikonCore(1)
NAME
ikonCore,
ikonCoreSave, ikonCoreLoad - load/save core-data of ikon devices


SYNOPSIS
int ikonCoreSave(const char *devName, const char *fileName)
int ikonCoreSaveX1(const char *devName, const char *fileName)
int ikonCoreSaveX2(const char *devName, const char *fileName)
int ikonCoreLoad(const char *devName, const char *fileName)
int ikonCoreSaveFd(int devFd, int fileFd, int what)
int ikonCoreLoadFd(int devFd, int fileFd, int dummy)


DESCRIPTION
ikonCoreSave: save device core to file

The function opens the specified device and file,
reads all parameters and correction tables from the device,
and saves this information in text format to the file.
The correction table for a channel will not be saved when
parameter P6.x indicates disabled correction (x = 1,2).
The number of records to save is indicated by parameter P8.x.

ikonCoreSaveX1: dto., but save only correction table X1
ikonCoreSaveX2: dto., but save only correction table X2
Usage of these two function is discouraged, since parameters
and table data always belong together.

ikonCoreLoad: load device core from file

The function opens the specified device and file, parses the
file (which should be in the same format as from ikonCoreSave),
and writes all information contained in the file to the device.

ikonCoreSaveFd: save device core using given file-descriptors

Same as ikonCoreSave, except that device and file are not opened,
but the given file-descriptors are used to transfer the data.

ikonCoreLoadFd: load device core using given file-descriptors

Same as ikonCoreLoad, except that device and file are not opened,
but the given file-descriptors are used to transfer the data.


PARAMETERS
devName - name of the device to be loaded/saved,
open-mode will be lcudrvOPEN_EXCLUSIVE.

fileName - name of the file to be loaded/saved,
open-mode will be O_RDONLY or O_WRONLY,
when NULL, then stdin or stdout will be used, respectively.

devFd - open file-descriptor to the ikon device.
fileFd - open file-descriptor to an external file.

what - specifies which information shall be saved:
0: all, i.e. parameters and both correction tables
1: only correction table X1
2: only correction table X1
3: both correction tables
4: only parameters


FILE FORMAT
The accessed file shall consist of lines in the following format:

# <comment>
P <param-spec> <param-value> # <comment>
U [# <comment>]
C<channel> <record> <coeff_1> ... <coeff_8> <bcc>
C<channel> CRC <crc>

where:
P key for parameter
U key for parameter update
C key for correction table record
<comment> any comment-text until the end of line
<param-spec> parameter specifier in dot-notation, eg. 1.2
<param-value> parameter value in float notation, eg. 1024
<channel> channel identifier, one digit (1 or 2)
<record> record number in %hi notation, eg. 0x03ab
<coeff_N> 16-bit coefficient in %hi notation, eg. 0xD4FF
<bcc> 16-bit block-check-character in %hi notation
<crc> 16-bit CRC checksum of table in %hi notation
%hi means short integer format for sscanf


RETURN VALUES
lcudrvOK - successful completion
lcudrvERROR - general error (file I/O, format)
ikonERROR_... - error occured in called sub-function

Error information is also logged.


CAUTIONS
These functions are not fully consistent with the normal VxWorks
driver interface, ie. they are not called indirectly via system call.
When they are used programmatically, then the driver code must
be loaded before the module that is using it.


SEE ALSO
IK320 Driver User Manual (VLT-MAN-ESO-17210-0806)




- - - - - -
Last change: 08/03/96-20:23

9.1.3 ikonDevCreate(3)
NAME
ikonDevCreate - Add a device to the ikon driver


SYNOPSIS
#include "ikon.h"
int ikonDevCreate(const char *devName,
void *baseAddrA24,
void *baseAddrA16,
int intrNumber,
int intrLevel,
int initialP30,
int versionHW,
const char *versionSW,
const char *coreFile)



DESCRIPTION
This function is called at startup once for each device to be installed.
It adds a device to the driver, making it available for subsequent open
operations.

devName - device name (must be "/ikonX" X>=0, e.g. "/ikon0")

baseAddrA24 - VMEbus base address of the board in the A24 standard
address space [0x00000000..0x00ffffff]
(upper 8 address-bits are ignored, but should be zero)
0xffffffff: map board space into main memory for simulation

baseAddrA16 - VMEbus base address of the board in the A16 short I/O
address space [0x0000..0xffff]
(upper 16 address-bits are ignored, but should be zero)
0xffffffff: map board space into main memory for simulation

intrNumber - interrupt-vector-number for internal use [32..255]
The vector will be connected to an internal handler.
Note that bits 5-7 must be equal to bit 13-15 of baseAddrA16,
see IK320 hardware manual.
0: for simulation

intrLevel - interrupt-level [1..7]
The interrupt-level will be enabled.
0: for simulation

initialP30 - initial value of board parameter P30.1,
see IK320 hardware manual, possible values: 1,2,3

versionHW - board hardware-version to be compared,
16-bit integer, e.g. 0x0000
or -1 if no comparison shall be done.

versionSW - board software-version to be compared,
12-byte string, e.g. "246 118 01"
or NULL if no comparison shall be done.

coreFile - name of a file to be loaded with `ikonCoreLoad',
or NULL to skip it.


FILES
When specified, then the file given by `coreFile' is read.
Its contents should have been created with `ikonCoreSave'.


RETURN VALUES
lcudrvOK - successful completion
lcudrvERROR - there is a general VxWorks I/O error

lcudrvERROR_NO_DRIVER - ikon driver not installed
lcudrvERROR_INVALID_DEVICE - invalid device name or device number
lcudrvERROR_DEVICE_EXISTS - device already installed
lcudrvERROR_NO_SEMAPHORE - failed to create semaphore
lcudrvERROR_NO_MEMORY - failed to create object in memory
lcudrvERROR_TIMEOUT - failed to take semaphore before timeout
lcudrvERROR_INVALID_ARGUMENT - one of the arguments is not valid



CAUTIONS
Exactly one device in the address group (dependent on baseAddrA16)
must generate a DTACK upon an access of the group-latch address.
This is tested during device installation.
The corresponding jumper must therefore be set on one board.


SEE ALSO
ikon(4),
ikonTools(1), ikonCoreLoad(1), ikonCoreSave(1),
ikonDrv(3), ikonOpen(3), ikonClose(3), ikonIoctl(3),
iosLib(1), iosDevAdd(2), open(2), close(2), ioctl(2),
IK320 Driver User Manual (VLT-MAN-ESO-17210-0806)




- - - - - -
Last change: 08/03/96-20:23

9.1.4 ikonDrv(3)
NAME
ikonDrv - Install the ikon driver


SYNOPSIS
#include "ikon.h"
int ikonDrv(int devices, int channels, int timeout)



DESCRIPTION
This function installs the ikon device driver.
It is called only once at startup. It hooks up the various
I/O service calls to the diver's functions, assigns the driver number,
and adds the driver to the driver table.

devices - number of supported devices by the driver
channels - number of channels that can be simultanously opened
timeout - access timeout value (in ticks) or NO_WAIT or WAIT_FOREVER



RETURN VALUES
lcudrvOK - driver successfully installed
lcudrvERROR_DRIVER_EXISTS - the driver is already installed
lcudrvERROR_NO_MEMORY - there is not enough memory for dynamic
data structures
lcudrvERROR_INVALID_ARGUMENT - the value of one of the parameters is
out of range



SEE ALSO
ikonDevCreate(3), ikonOpen(3), ikonClose(3), ikonIoctl(3),
lcudrvInitDCT(3),
iosLib(1), iosDrvInstall(2), open(2), close(2), ioctl(2),
IK320 Driver User Manual (VLT-MAN-ESO-17210-0806)




- - - - - -
Last change: 08/03/96-20:23

9.1.5 ikonIoctl(3)
NAME
ikonIoctl - Send a control command to a ikon device


SYNOPSIS
#include "ikon.h"
int ikonIoctl(int channel, int command, void *argument)



DESCRIPTION
This routine is called when a control command is send to a ikon
device via ioctl(). It validates the command request, performs a
semphore protection if required and calls the command procedure to
be executed.

channel - channel number as returned by the ikonOpen() function
command - number identifying the operation to be performed by the
driver (as defined in 'ikonCommands.h')
argument - address of the command argument or NULL if no argument is
used. For commands needing multiple arguments it is the
address of a specific data structure.


RETURN VALUES
lcudrvOK - successful completion
lcudrvERROR_INVALID_ARGUMENT - invalid channel number
lcudrvERROR_CHANNEL_NOT_OPEN - channel was not open
lcudrvERROR_INVALID_COMMAND - command code invalid
lcudrvERROR_ACCESS_CONFLICT - insufficient access rights
lcudrvERROR_TIMEOUT - failed to take semaphore before timeout




SEE ALSO
ikonOpen(3), ikonClose(3)
lcudrvCheckChannel(3),
open(2), close(2), ioctl(2),
IK320 Driver User Manual (VLT-MAN-ESO-17210-0806)




- - - - - -
Last change: 08/03/96-20:23

9.1.6 ikonOpen(3)
NAME
ikonOpen - Open a channel to a ikon device


SYNOPSIS
#include "ikon.h"
int ikonOpen ( void *device, char *remainder, int mode, int *status )



DESCRIPTION
This function is installed in the I/O-system of VxWorks and is
called via open() when a channel to a ikon device shall be opened.
It represents an interface routine between the ikon driver
routines and the general lcudrv driver routines.

device - pointer to the descriptor of the required device
remainder - remainder of the device name; should be blank
mode - open mode, specifiying the access to the device
status - pointer to the returned status value (NULL: not returned)


RETURN VALUES
channel number (> 0) - successful completion
lcudrvERROR - error (detailed in '*status')

In '*status':
lcudrvERROR_INVALID_DEVICE - remainder not blank/invalid name
lcudrvERROR_ACCESS_CONFLICT - open mode not consistent
lcudrvERROR_NO_CHANNEL - no more channel available
lcudrvERROR_INVALID_OPEN_MODE - unknown open mode


SEE ALSO
ikonClose(3), ikonIoctl(3),
lcudrvOpen(3),
open(2), close(2), ioctl(2),
IK320 Driver User Manual (VLT-MAN-ESO-17210-0806)




- - - - - -
Last change: 08/03/96-20:23

9.1.7 ikonTools(1)
NAME
ikonTools,
ikonVersion, ikonDevShow, ikonDataShow, ikonParamShow, ikonPosShow
- Tool functions of the ikon driver


SYNOPSIS
ikonVersion
ikonDevShow [<device-name>[,more[,reset]]]
ikonPosShow <device-number-or-name>
ikonDataShow <device-number-or-name>
ikonParamShow <device-number-or-name>


DESCRIPTION
These tools functions are intended to be called directly from the
VxWorks shell. They print some information to the LCU console.

ikonVersion - Print the version of the driver
ikonDevShow - Print the list of devices with install-parameters,
or detailed info if specific device is given,
with increasing verbosity depending on `more';
error indicators can be cleared with `reset'.
ikonPosShow - Print the current positions
ikonDataShow - Print the board's DPRAM data area
ikonParamShow - Print the board's DPRAM parameter area

<device-number-or-name> is either the full device-name as a string
or the integer number contained in the name.


RETURN VALUES
OK (0) or ERROR (-1) for invalid arguments.


SEE ALSO
ikonDrv(3), ikonDevCreate(3), ikonOpen(3), ikonClose(3), ikonIoctl(3),
IK320 Driver User Manual (VLT-MAN-ESO-17210-0806)




- - - - - -
Last change: 08/03/96-20:23



Quadralay Corporation
http://www.webworks.com
Voice: (512) 719-3399
Fax: (512) 719-3606
sales@webworks.com
TOC PREV NEXT INDEX