Section 10. csidatasource control, 1 purpose of the csidatasource control, 2 connecting to the server – Campbell Scientific LoggerNet-SDK Software Development Kit User Manual

Page 51

Advertising
background image

Section 10. CsiDataSource Control

10.1 Purpose of the CsiDataSource Control

The CsiDataSource control allows an application to monitor data collected
through the LoggerNet server. These sessions that monitor data are know as
Advisors. Advisors display data collected in the LoggerNet server data cache.
This control can have multiple advisor sessions with a single server connection.

This control requires that the LoggerNet server collect data for the same tables
or final storage areas that are being monitored. If you start an advisor on a
table that is not being collected by the LoggerNet server, you will not receive
any onAdviseRecord events. An exception to this rule occurs if you are
monitoring input locations on a mixed-array datalogger. When you create an
advisor for an input location on a mixed-array datalogger, a temporary data
cache is created. Then, with the advisor ready, enabling scheduled collection
with the datalogger will return records to the advisor.

The CsiBrokerMap control is often used in conjunction with this control to
display what tables and columns can be monitored. Additionally, the
CsiDatalogger control can also be used to issue a manual data poll and collect
records from the datalogger.

10.2 Connecting to the Server

There are two basic actions required to connect to the LoggerNet server:

1. Set server properties:

• serverName - The name or IP address of the LoggerNet server. The

default value is

localhost

.

serverPort - The port on which the LoggerNet server is running. The
default value is

6789

• logonName (Optional) - If security has been enabled on the server, a

valid logon name is required.

• logonPassword (Optional) - If security has been enabled on the

server, the correct password for a valid logon name is required.

2. Invoke

the

connect()

method.

10-1

Advertising