SESSION

Concept Link IconSee alsoConcept Link IconExample

For session management.

WebVue support - Yes.

Mode

Mnemonic

Syntax

0 TRACE 1
1 GETCURRENTID 2
2 GETTYPE 2
3 GETWEBBROWSER 3
4 GETWEBOS 3
5 GETWEBDEVICETYPE 3
6 GETWEBCLIENTIP 3

Syntax 1

IntVal = SESSION(Mode, SubMode);

Return type: INTEGER.

Argument

Meaning

SubMode

Either "ON" or "OFF". Type STR.

Execution

Mode

Mnemonic

Action

0

TRACE

Activate or deactivate diagnostic messages associated with session management.

Return: always 1.

Syntax 2

IntVal = SESSION(Mode);

Return type: INTEGER.

Execution

Mode

Mnemonic

Action

1

GETCURRENTID

Return the session Id in which the program is executed.

Return: the session Id.

2 GETTYPE

Return the session type in which the program is executed.

Return:

-1 = Error (unknown session type)

1 = PcVue desktop Client User Interface

100 = WebVue

101 = TouchVue

102 = SnapVue

103 = WebScheduler

104 = Web Services Toolkit client

Syntax 3

StrVal = SESSION(Mode);

Return type: STR.

Execution

Mode

Mnemonic

Action

3

GETWEBBROWSER

Returns the web browser name the session is running on.

4 GETWEBOS Returns the operating system name the session is running on.
5 GETWEBDEVICETYPE Returns the device type the session is running on, either "desktop" or "mobile".
6 GETWEBCLIENTIP Returns the IP address of the web client the session is running on. If the client is not on the same network as the server, it will return the IP of the router or NAT device nearest to the server.
These modes return an empty string when called in a context other than a web session. If they are called from a web session but are unable to detect the type, browser or operating system the method returns "Unknown".