NAME

Rivl_ValueType, Rivl_RGB, Rivl_GetValueType, Rivl_NameOfValueType - Signal value types

SYNOPSIS

#include <rivl.h>
Rivl_ValueType
Rivl_GetValueType (interp, name, valueTypePtr)
char
*Rivl_NameOfValueType (valueType)

ARGUMENTS

Tcl_Interp *interp (in)
The Tcl interpreter.
char *name (in)
String containing a value type name.
Rivl_ValueType *valueTypePtr (out)
Pointer to location in which to store value type corresponding to name.
Rivl_ValueType valueType (in)
Value type.

DESCRIPTION

The value type of a signal is the C type that you get by sampling the signal at a point. The types are listed below.
Name		Tag		C Type

byte		RIVL_BYTE	unsigned char
gray		RIVL_GRAY	unsigned char
short		RIVL_SHORT	short 
long		RIVL_LONG	long 
float		RIVL_FLOAT	float 
double		RIVL_DOUBLE	double 
rgb		Rivl_RGB	Rivl_RGB
ptr		RIVL_PTR	void *
The name is the string used to refer to the type in Tcl. The tag is a constant of type Rivl_ValueType. Note that gray and RIVL_GRAY are aliases for byte and RIVL_BYTE.

The only C type which is not standard is Rivl_RGB. This is defined by:

typedef struct {
    unsigned char r, g, b;
} Rivl_RGB;
Rivl_GetValueType places in *valueTypePtr the value type corresponding to name. Under normal circumstances the return value is TCL_OK and interp is unused. If name doesn't contain one of the valid value type names, then an error message is stored in interp->result, TCL_ERROR is returned, and *valueTypePtr is unmodified.

Rivl_NameOfValueType is the logical inverse of Rivl_GetValueType. Given a value type it returns the corresponding name in a static string.