Log out user (UILOGOUT)

This command logs out the current user and switches to the standard user.

Input

Syntax: UILOGOUT

Output

{RESULT}

Command Response Description
0 Command was processed successfully
1 Execute not successful
2 Incorrect syntax
3 Serious error during execution
4 Function not active or manually deactivated
9 EasySightPro® will be closed

Example

Logs out the current user.

Responses:

  • 0 = Command response (processing OK)

Copy
UILOGOUT
0

Powershell

Copy
Function Send-TCPMessage
    Param
            [Parameter(Mandatory=$true, Position=0)]
            [ValidateNotNullOrEmpty()] 
            [string] 
            $EndPoint
        , 
            [Parameter(Mandatory=$true, Position=1)]
            [int]
            $Port
        , 
            [Parameter(Mandatory=$true, Position=2)]
            [string]
            $Message
    ) 
    Process {
        # Setup connection 
        $IP = [System.Net.Dns]::GetHostAddresses($EndPoint
        $Address = [System.Net.IPAddress]::Parse($IP
        $Socket = New-Object System.Net.Sockets.TCPClient($Address,$Port
    
        # Setup stream wrtier 
        $Stream = $Socket.GetStream() 
        $Writer = New-Object System.IO.StreamWriter($Stream)

        # Write message to stream
        $Message | % {
            $Writer.WriteLine($_)
            $Writer.Flush()
        }
    
        # Give EasySightPro a chance to process the command
        # This example does no read back the answer!
        Start-Sleep -Seconds 1.5

        # Close connection and stream
        $Stream.Close()
        $Socket.Close()
    }
}

# Sende Anmeldung als Benutzer 'Demo'
Send-TCPMessage -Endpoint 127.0.0.1 -Port 21 -Message "UILOGINDemo;E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"

# Sende Abmeldung
Send-TCPMessage -Endpoint 127.0.0.1 -Port 21 -Message "UILOGOUT"