Corascript.serverconnect(), Name, Description – Campbell Scientific LoggerNet Server SDK User Manual

Page 74: Com return values, Corascript.serverdisconnect(), 3 events, Corascript_onscriptcomplete()

Advertising
background image

Section 15. CsiCoraScript Control Reference

CoraScript.serverConnect()

Name

CoraScript.serverConnect()

Description

This method attempts to connect to the LoggerNet server using the values in
the previously set properties: serverName, serverPort, serverLogonName, and
serverLogonPassword. This method triggers

onServerConnectStarted()

if

the connection is successful, or

onServerConnectFailure

() if the connection

fails.

COM Return Values

Table of Possible Values

Code Meaning

S_OK

Success: Normal return

E_CSI_FAIL

Error: Unexpected error

CoraScript.serverDisconnect()

Name

CoraScript.serverDisconnect()

Description

This method will disconnect from the LoggerNet server and will set the

serverConnected

state to FALSE. This method should only be called when

the value of

serverConnected

, is TRUE. Otherwise, this method will return

E_CSI_NOT_CONNECTED

.

COM Return Values

Table of Possible Values

Code Meaning

S_OK

Success: Normal return

15.1.3 Events

CoraScript_onScriptComplete()

Name

onScriptComplete(Long asyncID, String result)

Description

This event displays the results from the method CoraScript.executeScript().
However, this event is only activated when an asyncID other than “0” is passed
to that method.

15-4

Advertising