Tornado API Reference : WTX Tcl Library

wtxtclEnum [Tcl]

NAME

wtxtclEnum [Tcl] - mappings to/from strings to WTX enumeration constants

TCL PROCEDURES

wtxEnumToString - convert a numeric WTX constant to symbolic form
wtxEnumFromString - convert a WTX constant to numeric form
wtxEnumList - list all WTX constant types known
wtxEnumInfo - show the mapping between WTX constant names and numeric values

DESCRIPTION

this library contains all the Tcl enum facilities. Those routines allow manipulte the WTX enumarate types.

SEE ALSO

wtxtclEnum


WTX Tcl Library : Tcl Procedures

wtxEnumToString

NAME

wtxEnumToString - convert a numeric WTX constant to symbolic form

LOCALE

WTX Tcl

SYNOPSIS

wtxEnumToString type value

DESCRIPTION

This command converts value to its string form in the domain of the given WTX enumerated type.

RETURNS

The string name of the enumerated constant value, in the domain of the enumeration type. If type is one of the WTX types that have values that can be or'ed together, the resulting string will have names separated by the | character; if there are bits set in the original value that do not have names, these are shown in hexadecimal at the end of the result.

EXAMPLE

To find out what context type is indicated by the number 4:

tcl>wtxEnumToString CONTEXT_TYPE 4
 CONTEXT_TASK

SEE ALSO

wtxtclEnum, wtxtcl, wtxEnumFromString, wtxEnumInfo, wtxEnumList


WTX Tcl Library : Tcl Procedures

wtxEnumFromString

NAME

wtxEnumFromString - convert a WTX constant to numeric form

LOCALE

WTX Tcl

SYNOPSIS

wtxEnumFromString type string

DESCRIPTION

This command converts string to its numeric form in the domain of the given WTX enumerated type.

RETURNS

A number representing the numeric value of the WTX constant. For those WTX constants that can be or'ed together, the | character can be used in string.

EXAMPLE

tcl>wtxEnumFromString LOAD_FLAG  LOAD_CORE_FILE|LOAD_ALL_SYMBOLS
0x46

SEE ALSO

wtxtclEnum, wtxtcl, wtxEnumToString, wtxEnumInfo, wtxEnumList


WTX Tcl Library : Tcl Procedures

wtxEnumList

NAME

wtxEnumList - list all WTX constant types known

LOCALE

WTX Tcl

SYNOPSIS

wtxEnumList

DESCRIPTION

This command returns the names of all the WTX enumerated types known to wtxtcl. These are string values that can be given to wtxtcl commands that implement protocol requests using enumerated-type arguments.

EXAMPLE

To see the names of the enumerated parameters that wtxtcl understands:

tcl>wtxEnumList
 ACTION_TYPE CONTEXT_TYPE EVENT_TYPE REG_SET_TYPE...

SEE ALSO

wtxtclEnum, wtxtcl, wtxEnumInfo, wtxEnumFromString, wtxEnumToString


WTX Tcl Library : Tcl Procedures

wtxEnumInfo

NAME

wtxEnumInfo - show the mapping between WTX constant names and numeric values

LOCALE

WTX Tcl

SYNOPSIS

wtxEnumInfo enumType

DESCRIPTION

This command returns the mapping between the names of WTX constants and their numeric values. Those wtxtcl commands that take WTX enumerated types (see the WTX Protocol reference) can use either string or numeric form. The mapping between the string and numeric forms of WTX constants can be inspected with this command.

EXAMPLE

To find out what values can be used for a CONTEXT_TYPE argument:

wtxtcl.ex>wtxEnumInfo CONTEXT_TYPE
 CONTEXT_SYSTEM 0x1
 CONTEXT_GROUP 0x2
 CONTEXT_ANY 0x3
 CONTEXT_TASK 0x4
 CONTEXT_ANY_TASK 0x5
 CONTEXT_ISR 0x6
 CONTEXT_ISR_ANY 0x7

SEE ALSO

wtxtclEnum, wtxtcl, wtxEnumList, wtxEnumFromString, wtxEnumToString