VTScada Value Types

The following table lists the value types used in VTScada. When referring to these in code, you should use the predefined constants rather than the type numbers. The general usage is:

Cast(Val, \#VtypeText)

Type Constant Name Name Description
0 #VTypeStatus Boolean Logical data type, stores two states: TRUE (non-zero, usually 1) or FALSE (0).
1 #VTypeShort Short, 16-bit signed Integer data type storing values from -32768 to 32767
2 #VTypeLong Long, 32-bit signed Integer data type storing values from -2147483648 to 2147483647
3 #VTypeDouble Double precision floating point Values range from about -10^308 through +10^308
4 #VTypeText Text

A sequence of bytes of a specified length. This may be either of:

i) An arbitrary sequence of bytes, of the sort that (for example) MakeBuff generates and BuffRead consumes.

ii) A sequence of bytes consisting of characters of a particular encoding. Since the release of VTScada version 11.5 these normally are encoded in UTF-8, in which case some characters require multiple bytes to encode.

5 #VTypeVariable Variable A handle to the data represented by a variable declaration, not to any particular instantiation of that declaration. Can be used to access variable metadata (type information, for example) or default values.
6 #VTypeFunction Function A pointer to the code for a particular function within a VTScada statement. Used by functions such as GetOneParmText to manipulate the code itself.
Used when compiling and editing script code, not for typical VTScada programs.
7 #VTypeObject Object value An instance of a module
8 #VTypeStream Stream A handle to a stream (of which there are several types). See Streams.
9 #VTypeModTree Module tree A handle to the modules in a state diagram
10 #VTypeStateDgrm State diagram A graphical depiction of VTScada code
11 #VTypeModule Module The code and variables that make up a unit of a VTScada program. See Modules.
12 #VTypeModState Code Value (a)
Module and state
A handle to a state within a module. See States.
13 #VTypeModStateStmnt Code Value (b)
Module, state, and statement
A handle to a statement within a state. Cannot refer to any arbitrary function, as type 6 can. See Statements and Graphic Objects.
14 #VTypeRefParm Reference parameter When a steady-state call is made to a module, each of the actual parameters in the call is "bound" to its corresponding formal parameter.
15 <undefined> Array Refers to an entire list of consecutive data values. Each data value has a consecutively numbered index address and may be any VTScada value.
See Array Variables
16 #VTypePath Path A series of vertex values. See Path Variables.
17 #VTypeTraj Trajectory A combination of a Normalize value and a Path value. See Trajectory Variables.
18 #VTypeRotate Rotate Specifies a rotation amount, measured in degrees, around a point. See Rotate Variables
19 #VTypeBrush Brush Brush values are used in layered graphics statements that paint areas of the screen with a uniform color or pattern. See the Brush function.
20 #VTypePen Pen Pen values are used in layered graphics statements that draw lines. Defines the color, style and thickness of a line. See the Pen function.
21 #VTypeNormalize Normalize A graphical scaling value. See Normalize.
22 #VTypePoint Point A location, stored as an (X, Y) pair. See Point.
23 #VTypeVertex Vertex A group of three Point values. See Vertex.
24 #VTypeTransform Transform A transformation matrix, used to map coordinates from one area of the screen to another.
Can only be obtained from the GetTransform function. Used by the GetPathBound function.
25 #VTypeCodePtr Code pointer A handle to an active graphics statement in a particular module or state. Similar to type 13, but with the additional information of the module instance as represented by value type 7.
26 #VTypePtr Pointer Stores data by reference instead of by value, allowing, for example, multiple values to reference the same piece of data as opposed to multiple copies of the data.
27 #VTypeEditor Editor A handle to an editor object, as created by MakeEditor.
28 #VTypeParseStack Parser stack Used by the compiler to allow the compilation to be suspended in the middle of a statement to handle specific code sections such as I/O addresses.
29 #VTypeTag Tag (Unused) Intended to provide engine-level support for scaled variables that could be implemented using a GUI.
30 #VTypeBitmap Bitmap A handle to an image object as returned from MakeBitmap.
31 #VTypeFont Font A handle to a font object, as returned by the Font function.
32 #VTypeVTSdb VTScada database A handle to the VTScada database as returned by the DBSystem function.
33 #VTypeODBCHndl ODBC Handle Provides a connection to an ODBC database.
34 #VTypeSAPIStrm SAPI text-to-speech stream A type of stream for use with Speech Application Programming Interfaces
35 #VTypeComClient COM Client Interface An object that provides an interface to a COM client application
36 #VTypeCryptoProv Cryptographic Provider A handle to the particular cryptographic service provider that includes the key specification to use.
37 #VTypeCryptoKey Cryptographic Key May be either a Session Keys or a Public/Private Key. See Cryptographic Keys.
38 #VTypeDLLhandle DLL Handle A pointer to a structure returned from the LoadDLL function. Used to call functions within the DLL that was loaded. See DLL.
39 #VTypeDeflateHandle ZLib Compression Handle Used by the Deflate function
40 #VTypeThread Thread Handle A script-level hook to the data structure used to represent a thread in a dump
41 #VTypeBreakWatch Source Debugger Breakpoint Handle References a set location in the source debugger. See Working with Breakpoints and Data Breakpoints
42 #VTypeMiniDumpHandle Minidump Data Handle A pointer to a data structure that holds information from a crash dump
43 #VTypeTimeStamp Timestamp A numeric representation of time, measured in seconds since January 1, 1970
44 #VTypeXMLproc XML Processor Handle Serves as a conduit between an XML document and an application. See VTScada Engine XML API
45 #VTypeTypeDefinition
Dynamic Module Definition Deprecated. A handle to the definition of a form of module used as a data container. Created by the MakeType function. This storage is used almost exclusively for handling XML and cannot contain script code (unlike other forms of Module).
46 #VTypeTypeInstance Dynamic Module Instance Deprecated. An instance of a dynamic module, created using the MakeTypeInstance function. This is an object value (type 7) that can only be used to store data - it cannot contain or execute script. Typically these are used when generating module trees for delivery via XML. It is a form of data container, however in general structures (defined by the Struct function) and Dictionaries (type 47) are more efficient and convenient for this role.
47 #VTypeDictionary Dictionary A key-based data container of flexible size, used either on its own to hold volatile data collections or in the definition of structures (see Structures).
ValueType will not return this value unless the dictionary is a "pure" dictionary. A pure dictionary is one for which the root value has not been set. Otherwise, it returns the ValueType of the dictionary's root instead. See Dictionaries
48 #VTypeComProperty COM Property A value exposed by a COM Interface "object". This may be accessed similarly to a typical VTScada value but is maintained by the COM object, not the VTScada engine.
49 <undefined> Module in Context Contains both a module value and an instance of the context module where scope should be resolved.
Normally, scope will be the parent object in which the Module was declared. A Module in Context is used for widgets and plug-ins in VTScada where the widget is declared in AppRoot.SRC, but linked into a tag type such that the widget becomes a Module in Context in the tag instance. References to variables in the widget will then refer to variables in the tag rather than to variables in AppRoot where the widget was declared.
If a Module In Context value is called in steady-state, the parent instance will provide the associated context.
50 #VTypeHistorianHandle Historian Connection Handle For the VTScada proprietary data store, this will be invalidated on an "out of disk space" error, or on loss of access to the file storage. For other databases, this will be invalidated on any connection loss.
51 #VTypeXMLNode Dictionary Structure A WEB_XML_ADDRESS that points to a WEB_XML_NODE. When ValueType() runs against a value and finds a WEB_XML_ADDRESS it treats it the same as a WEB_VALUE_ADDRESS, which sits in front of an array or structure. It then searches through the *_ADDRESS to find what it points to and returns the type of that item, in this case an USER_XML_NODE
52 #VTypePPPHandle PPP Connection Handle. May be passed into the function, PPPStatus() to obtain an information structure.
May be passed to the function, CloseStream() to forcibly close off a connection. Passing it into CloseStream completely invalidates the handle and all data associated with it.(see: PPPStatus and CloseStream)
53 #VTypeProtobufHandle Protobuf Handle Created by the ProtobufParse function and used by the functions ProtobufEncode, ProtobufDecode, and ProtobufInstantiate
54 #VTypeBubbleHandle Bubble Handle Returned by the function, Bubble. Used by a parent bubble to reference its child bubble in calls to BubbleSend, BubbleReceive, and RunInBubble.
55 #VTypeVOIPAcctHandle VoIP account handle  
56 #VTypeVOIPCallHandle VoIP call handle  
57 #VTypeWebBrowser Web browser A handle to an embedded web browser.