LoggerNet Server Software Development Kit Version 4.1 Programmer’s Reference Revision: 12/11 C o p y r i g h t © 2 0 0 4 - 2 0 1 1 C a m p b e l l S c i e n t i f i c , I n c . All rights reserved; no part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronics, mechanical, photocopying, recording, or otherwise without either the prior written permission of the Publisher.
Campbell Scientific, Inc. Software SDK End User License Agreement (EULA) NOTICE OF AGREEMENT: Please carefully read this EULA. By installing or using this software, you are agreeing to comply with the terms and conditions herein. If you do not want to be bound by this EULA, you must promptly return the software, any copies, and accompanying documentation in its original packaging to Campbell Scientific or its representative.
7) If the software program you develop requires you, your customer, or a third party to use additional licensable software from Campbell Scientific, that software must be purchased from Campbell Scientific or its representative under the terms of its separate EULA. 8) This license allows you to redistribute the ActiveX (dll) controls and the communication DLL with the software developed using the LoggerNet Server SDK.
application. This information should appear on the first window the user will see. WARRANTIES: The following warranties are in effect for ninety (90) days from the date of shipment of the original purchase.
There is no written or implied warranty provided with the LoggerNet Server SDK software other than as stated herein. Developer agrees to bear all warranty responsibility of any derivative products distributed by Developer. TERMINATION: Any license violation or breach of Agreement will result in immediate termination of the developer's rights herein and the return of all LoggerNet Server SDK materials to Campbell Scientific, Inc.
LoggerNet Server Software Development Kit Table of Contents PDF viewers note: These page numbers refer to the printed version of this document. Use the Adobe Acrobat® bookmarks tab for links to specific sections. 1. LoggerNet Server SDK Overview ............................1-1 1.1 Purpose of the LoggerNet Server SDK................................................. 1-1 1.2 Requirements ........................................................................................ 1-1 1.2.
LoggerNet Software Development Kit Table of Contents 4.4 CsiCoraScript Interface......................................................................... 4-4 4.4.1 Properties..................................................................................... 4-4 4.4.2 Methods....................................................................................... 4-4 4.4.3 Events .......................................................................................... 4-4 5.
LoggerNet Software Development Kit Table of Contents 8. CsiDatalogger ...........................................................8-1 8.1 Purpose of the CsiDatalogger Control .................................................. 8-1 8.2 Connecting to the Server....................................................................... 8-1 8.3 Datalogger Interface ............................................................................. 8-1 8.3.1 Properties ......................................................
LoggerNet Software Development Kit Table of Contents 12. CsiLogMonitor Control........................................ 12-1 12.1 Purpose of the CsiLogMonitor Control............................................. 12-1 12.2 CsiLogMonitor Interface................................................................... 12-2 12.2.1 Properties................................................................................. 12-2 12.2.2 Methods............................................................................
LoggerNet Software Development Kit Table of Contents 17. CsiDatalogger Control Reference .......................17-1 17.1 Datalogger Interface ......................................................................... 17-1 17.1.1 Properties ................................................................................ 17-1 17.1.2 Methods................................................................................... 17-6 17.1.3 Events.....................................................................
LoggerNet Software Development Kit Table of Contents A.2.10 Collection Enabled .................................................................. A-4 A.2.11 Last Data Collection ................................................................ A-4 A.2.12 Next Data Collection ............................................................... A-4 A.2.13 Last Collect Attempt................................................................ A-4 A.2.14 Collection State .................................................
Section 1. LoggerNet Server SDK Overview 1.1 Purpose of the LoggerNet Server SDK The LoggerNet Server Software Development Kit (SDK) provides a method to communicate with a datalogger network through ActiveX® controls. These controls provide an abstraction to the server messaging and datalogger communication protocols.
Section 1. LoggerNet Server SDK Overview NOTE The C#.NET and VB.NET example code targets the x86 compilation platform to facilitate proper functionality on 64-bit versions of Windows®. Any new projects created on 64-bit platforms should use this compiler directive, since the ActiveX® controls in the SDK must run in a 32-bit process on 64-bit machines to work properly. 1.3 Included Components 1.3.
Section 1. LoggerNet Server SDK Overview the controls. The standard installation program will register the SDK control DLLs. 1.3.2.1 Adding a Control to a Visual Basic Project 1. Start Visual Basic. 2. Create a new project ( File -> New Project ) and select the project of your choice. "Standard EXE" would be a good choice. 3. Add "Components" to your project (Project -> Components...). Check the controls that you would like to add to the project and click "OK". 4.
Section 1. LoggerNet Server SDK Overview 5. A confirmation message similar to one below will appear. Click on Yes. 6. A new window titled Information (not shown) will appear informing you that the package has been installed. 7. Finally you will be asked to save the changes. Click on Yes. 8. Follow the same procedure to obtain the other two ActiveX controls as icons on the ActiveX palette in Delphi. 1.3.2.3 Adding a Control to a .
Section 2. CsiServer Control 2.1 Purpose of the CsiServer Control The CsiServer Control allows the user to start and stop the included, LoggerNet server DLL (CORALIB3.DLL). All SDK controls must connect to and use a LoggerNet server to communicate with Campbell Scientific dataloggers. Therefore, a LoggerNet server must be running on the network before the included examples or any custom SDK software will function.
Section 2. CsiServer Control 2.2.1 Properties • • • • • • • • applicationWorkDir As String buildDate As String (read-only) logFileDir As String serverStarted As Boolean (read-only) serverVersion As String (read-only) serverWorkDir As String (Required) tcpPort As Integer tcpPortEx As Long • • startServer() stopServer() • onServerFailure(String Reason) 2.2.2 Methods 2.2.
Section 3. Developing an Application Using the CsiServer Control 3.1 Purpose This section shows by example how to build an application using the SDK CsiServer control. The application’s functions are: 1. Start the LoggerNet server (CORALIB3.DLL). 2. Stop the LoggerNet server (CORALIB3.DLL). 3.2 Using the CsiServer Control 3.2.1 Getting Started with the CsiServer Control The CsiServer SDK control (an ActiveX object) starts and stops the LoggerNet server (CORALIB3.DLL).
Section 3. Developing an Application Using the CsiServer Control CsiLogMonitor 1.0 Type Library CsiServer 1.0 Type Library Check the box next to the CsiServer 1.0 Type Library, click Apply, and then close the window. Now an icon for the CsiServer control and other common controls will appear in the toolbox. 3.2.2 CsiServer Control Application Example Begin creating an application that will start and stop the LoggerNet server.
Section 3. Developing an Application Using the CsiServer Control In order to stop the LoggerNet server, use the method stopServer(). A basic example of code used to stop the LoggerNet server is found in the following table: Private Sub cmdStop_Click() 'Stop the LoggerNet Server If CsiServer.serverStarted Then CsiServer.stopServer txtServer.Text = "Server Stopped" cmdStop.Enabled = False cmdStart.Enabled = True Else txtServer.
Section 3.
Section 4. CsiCoraScript Control 4.1 Purpose of the CsiCoraScript Control The CsiCoraScript control provides the power to administer the LoggerNet server. There are many different settings and commands available with this control. Specific LoggerNet server functions and tasks are set by passing CoraScript commands to the LoggerNet server.
Section 4. CsiCoraScript Control 4.3.1 Setting up a Network Some of the commands that can be used when initially setting up a datalogger network on the LoggerNet server include: • add-device – used to add root ports, dataloggers, and telecommunication devices to the network map. • set-device-setting – used to change settings of specific devices in the network map. • delete-branch – used to remove a device and any children of a device from the network map.
Section 4. CsiCoraScript Control 4.3.2.1 Table-Data Dataloggers The LoggerNet server, by default, creates a collect area for the Public or InLocs table of table-data dataloggers such as the CR9000 or CR10X-TD.
Section 4. CsiCoraScript Control Collect area names must always be unique. Therefore, if an attempt is made to create a collect area with exactly the same name as a collect area that already exists, the LoggerNet server will automatically index the name of the collect area being created. For example, if collect area InLocsArea already exists and an attempt is made to create another collect area with the same name, the LoggerNet server will automatically name the new collect area InLocsArea1.
Section 5. Developing an Application Using the CsiCoraScript Control 5.1 Purpose This section shows an example of how to build an application using the CsiCoraScript control. The application’s functions are: 1. Connect to a running LoggerNet server 2. Execute CoraScript commands to administer the LoggerNet server. 5.2 Using the CsiCoraScript Control 5.2.
Section 5. Developing an Application Using the CsiCoraScript Control Check the box next to the CsiCoraScript 1.0 Type Library, click Apply, and then close the window. Now an icon for the CsiCoraScript control and other common controls will appear in the toolbox. 5.2.2 CsiCoraScript Control Application Example You are now ready to begin creating an application that executes CoraScript commands with the LoggerNet server. An example of a user interface that accomplishes this task is shown in Figure 5-1.
Section 5. Developing an Application Using the CsiCoraScript Control Private Sub cmdConnect_Click() 'Connect using the default logon settings. CsiCoraScript.serverName = txtServerAddress CsiCoraScript.serverPort = txtServerPort CsiCoraScript.serverLogonName = txtUsername CsiCoraScript.serverLogonPassword = txtPassword 'The following attempts to connect to the LoggerNet server 'and calls the event onServerConnectStarted()if the connection 'starts or the event onServerConnectFailure()if it fails.
Section 5.
Section 6. CsiBrokerMap Control 6.1 Purpose of the CsiBrokerMap Control The CsiBrokerMap control gives developers access to the broker map, which is the list of brokers or dataloggers known by the LoggerNet server. This control also keeps track of all tables on each of the brokers including the table definitions or columns. This table information is derived from the collect areas that are known by the LoggerNet server.
Section 6. CsiBrokerMap Control 6.3 How Collections Work The CsiBrokerMap uses the concept of collections in its implementation. Collections provide layers of objects and a standard way to access those objects. There are two basic ways to look at collections. The Visual Basic (VB) view describes how a VB programmer would view a collection, which is simpler than for Delphi or Visual C++. 6.3.1 Visual Basic View of Collections The CsiBrokerMap collections are simply three levels of grouped items.
Section 6. CsiBrokerMap Control 6.4 CsiBrokerMap Interfaces The following interfaces are included in the CsiBrokerMap control: • • • • • • • Broker BrokerMap BrokerCollection Column ColumnCollection Table TableCollection 6.4.1 BrokerMap Interface See the Reference Section for detailed descriptions of these properties, methods, and events. 6.4.1.
Section 6. CsiBrokerMap Control 6.4.2.2 Methods • • item(id) As Broker _NewEnum() (GetEnumerator() in .NET) 6.4.3 Broker Interface See the Reference Section for descriptions of these properties and methods. 6.4.3.1 Properties • • • • • id As Long name As String type As BrokerType datalogger_type as String allStarted as Boolean • • tables() As Object start_expansion() 6.4.3.2 Methods 6.4.4 Table Collection Interface See the Reference Section for descriptions of these properties and methods. 6.4.4.
Section 6. CsiBrokerMap Control 6.4.6 ColumnCollection Interface See the Reference Section for descriptions of these properties and methods. 6.4.6.1 Properties • count As Long • • item(id) As Column _NewEnum() (GetEnumerator() in .NET) 6.4.6.2 Methods 6.4.7 Column Interface See the Reference Section for descriptions of these properties. 6.4.7.
Section 6.
Section 7. Developing an Application Using the CsiBrokerMap Control 7.1 Purpose This section shows by example how to build an application using the CsiBrokerMap SDK control. The application’s stated functions are: 1. Display names of all stations in the current network. 2. Upon selection of any single station, display tables associated with that station's currently running program. 3. Upon selection of any single table, display all fields (columns) included in that table.
Section 7. Developing an Application Using the CsiBrokerMap Control 2. Start a new project (File | New Project | Standard EXE | OK). This will open a new, blank form. 3. View the toolbox for this new project (VB 6 Main Menu | View | Toolbox). 4. Right click on the toolbox area and then on the word Components to open the component window. If the SDK controls are registered on your PC, the following CSI components will appear: CsiBrokerMap 1.0 Type Library CsiCoraScript 1.0 Type Library CsiDatalogger 1.
Section 7. Developing an Application Using the CsiBrokerMap Control Now that the interface has been designed, the code can be organized to accomplish the requirements of the application. The control must be started using the correct parameters to connect with a LoggerNet server. A basic example of code used to accomplish this task is listed in the table below: Private Sub cmdConnect_Click() 'Assign the connection parameters BrokerMap.serverName = txtServerAddress.Text BrokerMap.serverPort = txtServerPort.
Section 7. Developing an Application Using the CsiBrokerMap Control "." & t.Name & "." & c.Name, c.Name) Next End If Next End If Next Else MsgBox "You must first select to display the Stations." End If End Sub Add additional functionality, error handling, and objects as necessary to meet the specific requirements of your application. Complete examples using the CsiBrokerMap control are included in the LoggerNet SDK installation.
Section 8. CsiDatalogger 8.1 Purpose of the CsiDatalogger Control The CsiDatalogger control allows the developer to manage datalogger functions through the LoggerNet server. The basic managerial functions of this control include: sending a program to the datalogger, retrieving a program from the datalogger, checking the clock on the datalogger as well as setting it to the current time, setting variable values, and performing manual polls of the datalogger.
Section 8. CsiDatalogger 8.3.
Section 9. Developing an Application Using the Datalogger Control 9.1 Purpose This section illustrates the use of the CsiDatalogger control. This control interacts with dataloggers through the LoggerNet server to perform managerial tasks. These tasks require a connection with the specified datalogger.
Section 9. Developing an Application Using the Datalogger Control 2. Start a new project (File | New Project | Standard EXE | OK). This will open a new, blank form. 3. View the toolbox for this new project (VB 6 Main Menu | View | Toolbox). 4. Right click on the toolbox area and then on the word Components to open a component window. If the SDK controls are registered on your PC, the following CSI components will appear: CsiBrokerMap 1.0 Type Library CsiCoraScript 1.0 Type Library CsiDatalogger 1.
Section 9. Developing an Application Using the Datalogger Control Now that the interface has been designed, the code can be organized to accomplish the requirements of the application. The control must connect with the LoggerNet server using the correct parameters and the serverConnect() method. A basic example of code used to accomplish this task is listed in the table below: Private Sub cmdConnect_Click() 'Set the connection parameters DataLogger.serverName = txtServerAddress DataLogger.
Section 9. Developing an Application Using the Datalogger Control Private Sub cmdDataloggerConnect_Click() 'Create an active connection to the datalogger so that a 'new connection isn't required for every transaction If DataLogger.serverConnected Then If DataLogger.loggerConnected Then WriteMessage "Already connected to datalogger" CmdDataloggerConnect.Enabled = False cmdDataloggerDisconnect.Enabled = True Else DataLogger.
Section 9. Developing an Application Using the Datalogger Control Private Sub cmdCheck_Click() 'Check the clock on the datalogger. If DataLogger.clockBusy Then WriteMessage "Clock check already in progress" Else If DataLogger.serverConnected Then DataLogger.clockCheckStart WriteMessage "Clock Check Started" Else WriteMessage "Not connected to the LoggerNet server" End If End If End Sub Private Sub cmdSet_Click() 'Set the clock on the If DataLogger.
Section 9. Developing an Application Using the Datalogger Control Private Sub cmdDataStart_Click() 'Begin a manual poll to retrieve data If DataLogger.serverConnected Then DataLogger.manualPollStart WriteMessage "Manual Poll Started" Else WriteMessage "Not connected to the LoggerNet server" End If End Sub Private Sub cmdDataStop_Click() 'Try to cancel a manual poll that is in progress. If DataLogger.serverConnected Then DataLogger.
Section 9. Developing an Application Using the Datalogger Control Private Sub cmdRetrieve_Click() 'Get the current program from the datalogger If DataLogger.serverConnected Then DataLogger.
Section 9.
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.
Section 10. CsiDataSource Control 10.3 CsiDataSource Interfaces The following interfaces are used in the CsiDataSource control: • DSource – the controlling interface • Advisor - created through the DSource interface to monitor certain data columns on a specified station and table. • Record - received in the event onAdviseRecord. A record is a collection of values that contain data. • Value - contains the name and value of a single column. 10.3.
Section 10. CsiDataSource Control 10.3.2.
Section 10. CsiDataSource Control 10.3.5 Record See the Reference Section for descriptions of these properties, methods, and events. 10.3.5.1 Properties • • • • • fileMarkNo As Long recordNo As Long timeStamp As Date valuesCount As Long nanoSeconds as Long • • item(id) as value _NewEnum() (GetEnumerator() in .NET) 10.3.5.2 Methods 10.3.6 RecordCollection 10.3.6.1 Properties • Count As Long • • Item(id, record) _NewEnum() (GetEnumerator() in .NET) 10.3.6.2 Methods 10.3.
Section 11. Developing an Application Using the CsiDataSource Control 11.1 Purpose The CsiDataSource control primarily monitors data residing in the LoggerNet server data cache. The LoggerNet server data cache is a location where the server stores collected datalogger records. The control can also be used to see measurements performed in real-time; for example, values being recorded for input locations in mixed-array dataloggers.
Section 11. Developing an Application Using the CsiDataSource Control 3. View the toolbox for this new project (VB 6 Main Menu | View | Toolbox). 4. Right click on the toolbox area and then on the word Components to open a component window. If the SDK controls are registered on your PC, the following CSI components will appear: CsiBrokerMap 1.0 Type Library CsiCoraScript 1.0 Type Library CsiDatalogger 1.0 Type Library CsiDataSource 1.0 Type Library CsiLogMonitor 1.0 Type Library CsiServer 1.
Section 11. Developing an Application Using the CsiDataSource Control Now that the interface has been designed, the code can be organized to accomplish the requirements of the application. The control must connect with the LoggerNet server using the correct parameters and the connect() method. If the connection succeeds, the onControlReady() event will be called.
Section 11. Developing an Application Using the CsiDataSource Control Private Sub DSource_onAdviseRecord(ByVal myAdvisor As Object, _ ByVal myRecord As Object) 'Declare Variables Dim val As Value Dim rec As Record Set rec = myRecord 'Display the WriteMessage WriteMessage WriteMessage WriteMessage WriteMessage WriteMessage Advisor and record information to the user "" "OnAdvise ready event occurred" "Advisor Name: " & CurrentAdvisor.advisorName "FileMarkNo. " & rec.fileMarkNo "RecordNo. " & rec.
Section 12. CsiLogMonitor Control 12.1 Purpose of the CsiLogMonitor Control The CsiLogMonitor Control provides access to log message from the LoggerNet server. The log messages stream to this control as a text string. Use this control to display log messages or to monitor events as they occur on the server and call other operations or programs based on these LoggerNet server events.
Section 12. CsiLogMonitor Control 12.2 CsiLogMonitor Interface See the Reference section in this manual for detailed descriptions of these properties, methods, and events. 12.2.
Section 13. Developing an Application Using the CsiLogMonitor Control 13.1 Purpose This section shows an example of how to build an application using the CsiLogMonitor control. The application’s functions are: 1. Connect to a running LoggerNet server 2. Monitor the LoggerNet server transaction and communication logs. 13.2 Using the CsiLogMonitor Control 13.2.
Section 13. Developing an Application Using the CsiLogMonitor Control Check the box next to the CsiLogMonitor 1.0 Type Library, click Apply, and close the window. An icon for the CsiLogMonitor control will appear in the toolbox. 13.2.2 CsiLogMonitor Control Application Example You are now ready to begin creating an application that monitors log messages from the LoggerNet server. An example of a user interface that accomplishes this task is shown in Figure 13-1.
Section 13. Developing an Application Using the CsiLogMonitor Control Private Sub cmdConnect_Click() 'Connect using the default logon settings. CsiLogMonitor.serverName = txtServerAddress CsiLogMonitor.serverPort = txtServerPort CsiLogMonitor.serverLogonName = txtUsername CsiLogMonitor.serverLogonPassword = txtPassword 'Start the connection to the LoggerNet server CsiLogMonitor.serverConnect Exit Sub If the connection succeeds, the onServerConnectStarted() event gets triggered.
Section 13. Developing an Application Using the CsiLogMonitor Control Stop monitoring logs with the commLogMonitorStop() and tranLogMonitorStop() events. You can check for active log monitoring by checking the commLogMonitorBusy and tranLogMonitorBusy properties or this control. Private Sub cmdStop_Click() If CsiLogMonitor.commLogMonitorBusy Then CsiLogMonitor.commLogMonitorStop End If If CsiLogMonitor.tranLogMonitorBusy Then CsiLogMonitor.
Section 14. CsiServer Control Reference 14.1 Server Interface 14.1.1 Properties Server.applicationWorkDir Name Server.applicationWorkDir As String Description This property gives the location where the LoggerNet server data files are stored and must be set before starting the LoggerNet. If this property needs to be changed after the LoggerNet server has been started, call stopServer(), set the new location, and then call startServer().
Section 14. CsiServer Control Reference Server.logFileDir Name Server.logFileDir As String Description This property specifies the location where the LoggerNet server writes log files and must be set before starting the LoggerNet server. If this property needs to be changed after the LoggerNet server has been started, call stopServer(), set the new location, and then call startServer(). By default the log file directory will be placed in the LoggerNet server working directory.
Section 14. CsiServer Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_FAIL Error: Unexpected error E_CSI_NOT_STARTED Error: The LoggerNet server is not started Server.serverWorkDir Name Server.serverWorkDir As String (Required) Description This required property must be specified before starting the LoggerNet server and describes the location of the LoggerNet server configuration files.
Section 14. CsiServer Control Reference Server.tcpPortEx Name Server.tcpPortEx As Long Description This property sets the TCP port that the LoggerNet server will use when listening for client connections and must be set before starting the LoggerNet server. LoggerNet uses TCP port 6789 by default This property accepts the full range of valid TCP port numbers 1 – 65535. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return 14.1.2 Methods Server.startServer() Name Server.
Section 14. CsiServer Control Reference Server.stopServer() Name Server.stopServer() Description This method will stop the limited LoggerNet server (CORALIB3.DLL). COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return 14.1.3 Events Server_onServerFailure() Name onServerFailure(String reason) Description This event gets triggered when the LoggerNet server started by the Server control fails.
Section 14.
Section 15. CsiCoraScript Control Reference 15.1 CoraScript Interface 15.1.1 Properties CoraScript.serverConnected Name CoraScript.serverConnected As Boolean (read-only) Description This Boolean property describes the state of the connection between the CoraScript control and the LoggerNet server. The property returns TRUE if the connection exists. Otherwise, the property returns FALSE. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return CoraScript.
Section 15. CsiCoraScript Control Reference CoraScript.serverLogonPassword Name CoraScript.serverLogonPassword As String Valid Values If security is enabled on the target LoggerNet server, this string must be the password associated with the account named by CoraScript.serverLogonName. Default Value The default value for this property is an empty string. This property will only affect the operation of the control if security is enabled on the LoggerNet server.
Section 15. CsiCoraScript Control Reference CoraScript.serverPort Name CoraScript.serverPort As Long Description Specifies the TCP port number that the LoggerNet server is using on the hosting computer. The valid range for this property is port 1 to port 65535. The default value for this property is port 6789, which is the default port number assigned for the LoggerNet server. The default value for this property will connect to a LoggerNet server port in most cases.
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.
Section 15. CsiCoraScript Control Reference CoraScript_onServerConnectStarted() Name onServerConnectStarted() Description The control has connected to the LoggerNet server. CoraScript_onServerConnectFailure() Name onServerConnectFailure(server_failure_type server_failure) Description An error has occurred that caused the connection to the LoggerNet server to fail for this control. Table of Possible failure codes.
Section 15.
Section 16. CsiBrokerMap Control Reference 16.1 BrokerMap Interface 16.1.1 Properties BrokerMap.serverName Name BrokerMap.serverName As String Description Specifies the TCP/IP interface address for the computer that is hosting the LoggerNet server. This string must be formatted either as a fully qualified Internet machine domain name or as an IP address string. An example of a valid machine domain name address is www.campbellsci.com. An example of a valid IP address string is 63.255.173.183.
Section 16. CsiBrokerMap Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_BUSY Error: Attempt to set serverLogonName while connected to the LoggerNet server BrokerMap.serverLogonPassword Name BrokerMap.serverLogonPassword As String Valid Values If security is enabled on the target LoggerNet server, this string must be a valid password associated with the account described in the serverLogonName property.
Section 16. CsiBrokerMap Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_BUSY Error: Attempt to set serverPort while connected to the LoggerNet server E_CSI_INVALIDARG Error: The port value is invalid (out of range) BrokerMap.autoExpand Name BrokerMap.autoExpand As Boolean Description This setting determines if the broker will automatically expand to include all brokers and tables or if the Broker.
Section 16. CsiBrokerMap Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal Return 16.1.2 Methods BrokerMap.Brokers() Name BrokerMap.Brokers() As Object Description Use this method to iterate through the Brokers and return a Broker Collection. BrokerMap.finish() Name BrokerMap.finish() Description This method tells the control to discontinue sending events or changes to the brokers, which holds the current broker map in a static format for your application.
Section 16. CsiBrokerMap Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_ALREADY_CONNECTED Error: Already connected to the LoggerNet server E_CSI_BAD_HOST_OR_PORT Error: Cannot connect. Property serverName or serverPort possibly wrong 16.1.3 Events BrokerMap_onAllStarted() Name onAllStarted() Description This event is a result of invoking the start() method.
Section 16. CsiBrokerMap Control Reference BrokerMap_onFailure() Name onFailure(BrokerMapFailureType failure_code) Description When the BrokerMap control fails, an error from the following table will be returned with this event: Table of Failure Codes Name Value Description failure_unknown 0 The cause of the failure could not be determined failure_connection_failed 1 The connection has failed.
Section 16. CsiBrokerMap Control Reference BrokerMap_onTableDeleted() Name onTableDeleted(Object Broker, Object Table) Description This event gets called when a table is deleted from a broker in the broker map. The table that was deleted will be returned as a broker object and table object with this event. BrokerMap_onTableChanged() Name onTableChanged(Object Broker, Object Table) Description This event executes when a Table in a Broker changes.
Section 16. CsiBrokerMap Control Reference 16.2.2 Methods BrokerCollection.Item() Name BrokerCollection.Item(id) As Broker Description A Broker can be referenced by an integer, a long, or by the name of the Broker (a string). If the number is less than zero or is greater than the number of brokers minus one, then the COM error E_CSI_ARRAY_OUT_OF_BOUNDS will be returned. If the broker cannot be found by name, then the COM error E_CSI_NOT_FOUND will be returned.
Section 16. CsiBrokerMap Control Reference BrokerCollection._NewEnum() Name BrokerCollection._NewEnum() — Return the next broker in the broker map sequence. Important This method is only intended for use with the Visual Basic programming language. Visual Basic programmers do not need to access this method directly but can use it indirectly with the For Each loop. This method is included in the documentation to explain why the method exists, but, again, it is not accessed directly.
Section 16. CsiBrokerMap Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return. Broker.type Name Broker.type As BrokerType — The type of the broker (read only). Description This read-only property returns the type of the broker.
Section 16. CsiBrokerMap Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Broker.allStarted Name Broker.allStarted As Boolean Description Set to TRUE when all the tables for the broker have been reported. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return 16.3.2 Methods Broker.Tables() Name Broker.
Section 16. CsiBrokerMap Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal Return 16.4 TableCollection Interface 16.4.1 Properties TableCollection.Count Name TableCollection.Count As Long Description This property returns the number of tables in a TableCollection COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return 16.4.2 Methods TableCollection.Item() Name TableCollection.
Section 16. CsiBrokerMap Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_ARRAY_OUT_OF_BOUNDS Error: Array subscript out of bounds E_CSI_NOT_FOUND Error: Table not found by name in the broker map E_CSI_FAIL Error: Wrong variant type passed or unexpected error Visual Basic Return Type Table Example By number: long iterator For iterator = 0 to BrokerMap.Broker("cr9000").Tables.Count – 1 Debug.Print BrokerMap.Brokers("cr9000").Tables.
Section 16. CsiBrokerMap Control Reference 16.5 Table Interface 16.5.1 Properties Table.interval Name Table.interval As Long Description The time interval between records. If the table is event-driven, a value of zero will be used. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Table.name Name Table.name As String Description This read-only property returns the name of the table.
Section 16. CsiBrokerMap Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Table.size Name Table.size As Long Description This property returns the number of records that can be stored in this table. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return 16.5.2 Methods Table.Columns() Name Table.Columns() As Object Description This method is used as a reference for a ColumnCollection to get the columns of a table.
Section 16. CsiBrokerMap Control Reference Table.start_expansion Name Table.start_expansion() Description If the BrokerMap autoExpand property has been set to FALSE, use this method to access the list of Columns for a Table within a Broker. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal Return 16.6 ColumnCollection Interface 16.6.1 Properties ColumnCollection.Count Name ColumnCollection.
Section 16. CsiBrokerMap Control Reference Prototypes ColumnCollection.Item(Number) - Array index. ColumnCollection.Item(String) - Table name. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_ARRAY_OUT_OF_BOUNDS Error: Array out of bounds E_CSI_NOT_FOUND Error: Column not found in broker map by name E_CSI_FAIL Error: Wrong variant type passed or unexpected error Visual Basic Return Type Column Examples (1) Dim myColumn as Column BrokerMap.
Section 16. CsiBrokerMap Control Reference 16.7 Column Interface 16.7.1 Properties Column.description Name Column.description As String Description This read-only property returns a description of the column. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Column.name Name Column.name As String Description This read-only property returns the name of the column. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Column.
Section 16. CsiBrokerMap Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Column.type Name Column.type As CsiDataTypeCode Description This read-only property identifies the type of data for the column.
Section 16.
Section 16. CsiBrokerMap Control Reference Column.writable Name Column.writable As Long Description This property is read-only and describes whether or not this column can be changed or set by using the variableSet() method as described in the CsiDatalogger Control.
Section 16.
Section 17. CsiDatalogger Control Reference 17.1 Datalogger Interface 17.1.1 Properties Datalogger.clockBusy Name Datalogger.clockBusy As Boolean Description This property describes the state of the control concerning clock transactions. If a clock check or a clock set is currently executing, clockBusy returns TRUE, and any attempt to execute another clock check or clock set will return an error. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Datalogger.
Section 17. CsiDatalogger Control Reference Datalogger.loggerName Name Datalogger.loggerName As String Valid Values Specifies the datalogger or station name that will be accessed. This property must match one of the actual datalogger device names in the LoggerNet server network map. Default Value The default value for this property is an empty string.
Section 17. CsiDatalogger Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Datalogger.programSendBusy Name Datalogger.programSendBusy As Boolean Description This Boolean property describes the state of the LoggerNet server in relation to the method programSendStart(). If the LoggerNet server is currently sending a program to the datalogger, then this property will return TRUE.
Section 17. CsiDatalogger Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Datalogger.serverLogonName Name Datalogger.serverLogonName As String Valid Values If security is enabled on the target LoggerNet server, this property must be one of the account names recognized by the LoggerNet server.
Section 17. CsiDatalogger Control Reference Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_BUSY Error: The property cannot be set while a connection to the LoggerNet server is present Datalogger.serverName Name Datalogger.serverName As String Description This property specifies the TCP/IP interface address for the computer hosting the LoggerNet server. This string must be formatted either as a fully qualified Internet machine domain name or as an IP address string.
Section 17. CsiDatalogger Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_INVALIDARG Error: The port value is invalid E_CSI_BUSY Error: Attempt to set serverPort while connected to the LoggerNet server 17.1.2 Methods Datalogger.clockCancel() Name Datalogger.clockCancel() Description This method should be called to cancel either a clockCheckStart(), or a clockSetStart().
Section 17. CsiDatalogger Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_BUSY Error: Clock communication is busy servicing a request E_CSI_FAIL Error: Unexpected error E_CSI_NOT_CONNECTED Error: Not connected to the LoggerNet server Datalogger.clockSetStart() Name Datalogger.clockSetStart() Description This method should be called to set the date and time on the specified datalogger to the date and time of the LoggerNet server.
Section 17. CsiDatalogger Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Datalogger.loggerConnectStart() Name Datalogger.
Section 17. CsiDatalogger Control Reference Datalogger.manualPollCancel() Name Datalogger.manualPollCancel() Description This method should be called to cancel a manualPollStart() command. If the manual poll was successfully cancelled, then the event onManualPollComplete(), will return a cancellation code. If the manualPollCancel() was called too late in the manual poll process, then the event onManualPollComplete(), will return either a success or failure code instead.
Section 17. CsiDatalogger Control Reference Datalogger.programReceiveCancel() Name Datalogger.programReceiveCancel() Description This method attempts to cancel the programReceiveStart() command. Mixedarray dataloggers will not recognize this request and will continue to transfer their program even though the datalogger control is no longer receiving it. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Datalogger.programReceiveStart() Name Datalogger.
Section 17. CsiDatalogger Control Reference Datalogger.programSendCancel() Name Datalogger.programSendCancel() Description This method attempts to cancel the programSendStart() method. The program send process can be cancelled if it has not already begun. Otherwise, the method will be ignored. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Datalogger.programSendStart() Name Datalogger.
Section 17. CsiDatalogger Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_BUSY Error: A previous call to programSendStart() has not completed E_CSI_FAIL Error: Unexpected error E_CSI_NOT_CONNECTED Error: Not connected to the LoggerNet server Datalogger.selectiveManualPollCancel Name Datalogger.selectiveManualPollCancel() Description This method should be called to cancel a selectiveManualPollStart() command.
Section 17. CsiDatalogger Control Reference Datalogger.serverConnect() Name Datalogger.serverConnect() Description This method attempts to connect to the LoggerNet server using the previously set properties: serverName, serverPort, serverLogonName, and serverLogonPassword. This method triggers onServerConnectStarted or onServerConnectFailure depending on its success or failure.
Section 17. CsiDatalogger Control Reference Parameters successful: Describes whether a clock set or clock check succeeded. response_code: The following list describes the possible response codes from a clock transaction: Table of response code values.
Section 17.
Section 17.
Section 17. CsiDatalogger Control Reference Datalogger_onManualPollComplete() Name onManualPollComplete(Boolean successful, manual_poll_outcome_type response_code) — A response from the server upon the completion of a manual poll transaction. Description A response from the LoggerNet server upon the completion of a manual poll. Parameters success: Describes whether the manual poll was successful. response_code:The following list describes the possible response codes from a manual poll transaction.
Section 17. CsiDatalogger Control Reference Enumeration Name Value Description mp_outcome_communication_disabled 9 Indicates that LoggerNet has been set up not to communicate with this datalogger. Enable communications before attempting communication with the datalogger.
Section 17. CsiDatalogger Control Reference Datalogger_onProgramReceiveComplete() Name onProgramReceiveComplete(Boolean successful, prog_receive_outcome_type response_code) Description This event gets called when the method programReceiveStart() has completed. Parameters successful: Describes if the program was retrieved successfully. response_code: Table of possible response codes.
Section 17. CsiDatalogger Control Reference Enumeration Name Value Description pr_failure_cannot_open_file 9 Indicates that the file could not be opened for writing.
Section 17. CsiDatalogger Control Reference Parameters successful: Describes if the programSendStart was successful. response_code: Found in the table of possible response codes. compile_result: Result string from the datalogger. Table of possible response codes.
Section 17.
Section 17. CsiDatalogger Control Reference Datalogger_onProgramSent() Name onProgramSent() Description This event returns notification when the program has been sent but gets called before the program has been compiled on the datalogger and table definitions have been retrieved.
Section 17.
Section 17.
Section 17.
Section 18. CsiDataSource Control Reference 18.1 DSource Interface 18.1.1 Properties DSource.logonName Name DSource.logonName As String Description Specifies the account name that should be used to when connecting to the LoggerNet server. If security is enabled on the target LoggerNet server, this string must be one of the account names recognized by the LoggerNet server.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return. E_CSI_BUSY Error: Attempt to set serverLogonPassword while connected to the LoggerNet server. DSource.serverName Name DSource.serverName As String Description This property specifies the TCP/IP interface address for the computer hosting the LoggerNet server. This string must be formatted either as a fully qualified Internet machine domain name or as an IP address string.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return. E_CSI_BUSY Error: Cannot write to this property because there is a connection to the LoggerNet server. E_CSI_INVALIDARG Error: Value out of range. DSource.state Name DSource.state As data_source_state Description This property describes the state of the control in regards to a connection with the LoggerNet server.
Section 18. CsiDataSource Control Reference Default Value This property is set to FALSE by default. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return 18.1.2 Methods DSource.connect() Name DSource.connect() Description This method allows you to connect to the LoggerNet server. When you invoke this method, the control will attempt to connect to the specified LoggerNet server. If it succeeds, you will receive the event onControlReady.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_NOT_CONNECTED Error: The control is not connected to the LoggerNet server and therefore cannot create any advisors. Connect to the LoggerNet server first E_FAIL Error: An unexpected error has occurred Visual Basic Example Dim myAdvisor As new advisor Set myAdvisor = DSource.createAdvisor DSource.disconnect() Name DSource.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return DSource_onAdviseRecord() Name onAdviseRecord(Object myAdvisor, Object myRecord) Description This event returns notification of newly acquired data from an advisor. If records are not being acquired, the advisor will not display them.
Section 18. CsiDataSource Control Reference Enumeration Name Value Description csiAdvisorFailureInvalidLogon 2 Indicates that this control was unable to logon to the LoggerNet server because either the logonName or logonPassword property is incorrect csiAdvisorFailureInvalidStationName 3 Indicates that the datalogger device named by stationName is not found in the server's network map at the time the Advisor is started.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return DSource_onControlFailure() Name onControlFailure(csidsFailureCode failure_code) Description This event is triggered when an error has occurred that affects the control as a whole. Table of possible failure codes.
Section 18. CsiDataSource Control Reference DSource_onControlReady() Name onControlReady() Description This event is triggered when a connection to the server has been established and is a result of invoking the connect() method. Once this event has been called, advisors can be created and started.
Section 18. CsiDataSource Control Reference Enumeration Name Value Description vo_outcome_column_read_only 5 Indicates that the column sent is readonly vo_outcome_invalid_table_name 6 Indicates that the table name was not found on the datalogger vo_outcome_invalid_column_name 7 Indicates that the column name was not found on the datalogger vo_outcome_invalid_subscript 8 Indicates that the index of the variable was invalid.
Section 18. CsiDataSource Control Reference Description This event notification returns a block of records delivered by LoggerNet to an active advisor. The sendRecordBlocks property must be set to TRUE and the table specified in the advisor must be enabled for collection for this event to work. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return 18.2 Advisor Interface 18.2.1 Properties Advisor.advisorName Name Advisor.
Section 18. CsiDataSource Control Reference Enumeration Name Value Description csidsOrderLoggedWithHoles 2 The records will be sent in the order they were logged in the datalogger. This order is determined by the record number (which is assigned by the datalogger) and the file mark number (which is assigned by the server) to create a unique key for each record.
Section 18. CsiDataSource Control Reference Notes This property can be read at any time but can only be set when the state of the property is advisorStopped. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return. E_CSI_BUSY Error: The Advisor is started and already accessing the LoggerNet server data Advisor.startFileMarkNo Name Advisor.
Section 18. CsiDataSource Control Reference Advisor.startIntervalSeconds Name Advisor.startIntervalSeconds As Long Description This property specifies the number of seconds back from the newest record in the table to collect when the value of startOption is set to csidsStartRelativeToNewest. Valid Values A valid value must either be zero or a positive integer. Default Value The default value for this property is 0 (meaning select the newest record).
Section 18. CsiDataSource Control Reference Table of possible csidsStartOptionType values Enumeration Name Value Description csidsStartAtRecordId 1 The first record will be the record identified by startFileMarkNo and startRecordNo. If no such record exists in the table, the record that is closest and newer than the specified record will be selected. csidsStartAtTimeStamp 2 The first record that has a time stamp equal to the time stamp specified by the startDate will be selected.
Section 18. CsiDataSource Control Reference Advisor.startRecordNo Name Advisor.startRecordNo As Long Description This property, in conjunction with the property startFileMarkNo, specifies the first record to be sent when the value of startOption is equal to csidsStartAtRecordId. Any value can be assigned to this property. Default Value The default value for this property is 0. Notes This property can be read at any time but can only be set when the state of the property is advisorStopped.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_BUSY Error: The Advisor is started and already accessing the LoggerNet server data Advisor.state Name Advisor.state As advisor_state Description This property returns the current state of the advisor.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_BUSY Error: The Advisor is started and already accessing the LoggerNet server data Advisor.tableName Name Advisor.tableName As String Description This property describes the name of the table in the LoggerNet server being monitored by the advisor.
Section 18. CsiDataSource Control Reference Advisor.maxRecordsPerBlock Name Advisor.maxRecordsPerBlock As Long Description This property sets the maximum number of records that will be included in a block of records received from LoggerNet if the sendRecordBlocks property is set to TRUE. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_BUSY Error: The Advisor is started and already accessing the LoggerNet server data 18.2.2 Methods Advisor.columns Name Advisor.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_ALREADY_CONNECTED Error: This advisor has already been started E_FAIL Error: An unexpected error has occurred Advisor.stop() Name Advisor.stop() Description This method will stop the advisor from monitoring the LoggerNet data cache for transactions. When an advisor is stopped, its properties can be modified.
Section 18. CsiDataSource Control Reference Advisor.variableSetStart() Name Advisor.variableSetStart(String column_name, String value) As Long Description This method sets a variable in the specified datalogger. The event onVariableSetComplete() will be called upon the completion of variableSetStart(). This method should only be called when the state dataSourceConnected is TRUE and an advisor has been started. If not, this method will return E_CSI_NOT_CONNECTED.
Section 18. CsiDataSource Control Reference 18.3 DataColumnCollection Interface 18.3.1 Properties DataColumnCollection.count Name DataColumnCollection.count As Long Description This property returns the number of DataColumns in the collection. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return 18.3.2 Methods DataColumnCollection.add() Name DataColumnCollection.add(String column_name) Description This method adds a column name to the collection of DataColumns.
Section 18. CsiDataSource Control Reference DataColumnCollection.addAll() Name DataColumnCollection.addAll() Description This method adds all of the columns for the defined station and table to the DataColumnCollection. If any previous columns existed in the collection for this advisor, they will be cleared out before the new DataColumns are added. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return DataColumnCollection.find() Name DataColumnCollection.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_INVALIDARG Error: An incorrect Variant type was passed. Expecting a numerical value E_CSI_ARRAY_OUT_OF_BOUNDS Error: The numerical index was out of the bounds of the array. Please specify a value from zero (0) to Count - 1 E_CSI_FAIL Error: An unexpected error has occurred DataColumnCollection.remove() Name DataColumnCollection.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return DataColumnCollection._NewEnum() Name DataColumnCollection._NewEnum() Important This method is only intended for use with the Visual Basic programming language. Visual Basic programmers do not need to access this method directly. They use it indirectly by using the collections with the For Each loop.
Section 18. CsiDataSource Control Reference unique key for each record. This property can take on any value from 0 to 2147483647. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Record.nanoSeconds Name Record.nanoSeconds As Long Description This read-only property returns the sub-second resolutions of the timestamp associated with the current record. This property can take on any value from 0 to 2147483647.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return Record.valuesCount Name Record.valuesCount As Long Description This read-only property returns the number of values in this record. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return 18.5.2 Methods Record.Item() Name Record.Item(id) As Value Description This method returns a reference to a value found by the specified ID.
Section 18. CsiDataSource Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_ARRAY_OUT_OF_BOUNDS Error: Array out of bounds E_CSI_NOT_FOUND Error: Couldn't find the broker by name in the broker map E_CSI_FAIL Error: Wrong variant type passed to this method or unexpected error Visual Basic Return Type value Example Number value (like an array): Long iterator For iterator = 0 to myRecord.Count – 1 ... = myRecord(iterator).
Section 18. CsiDataSource Control Reference 18.6 RecordCollection 18.6.1 Properties RecordCollection.Count Name RecordCollection.Count As Long Description The number of values in the collection COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal Return 18.6.2 Methods RecordCollection.Item() Name RecordCollection.Item(Value id, Record ppIRecord) Description This method is used to iterate through the values by the specified index ID.
Section 18. CsiDataSource Control Reference 18.7 Value Interface 18.7.1 Properties Value.columnName Name Value.columnName As String Description This property returns the name of the column. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return. Value.value Name Value.value As Variant Description This property returns the actual data value. COM Return Values Table of Possible Values 18-30 Code Meaning S_OK Success: Normal return.
Section 19. CsiLogMonitor Control Reference 19.1 LogMonitor Interface 19.1.1 Properties LogMonitor.commLogMonitorBusy Name LogMonitor.commLogMonitorBusy As Boolean Description This Boolean property describes the state of the LogMonitor control accessing communication logs on the LoggerNet server. The property returns TRUE if the communication logs are being accessed. Otherwise, the property returns FALSE. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return LogMonitor.
Section 19. CsiLogMonitor Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_INVALIDARG Error: The number must be one or greater E_CSI_BUSY Error: Attempting to set this property while the logs are being actively monitored LogMonitor.serverConnected Name LogMonitor.serverConnected As Boolean Description This Boolean property describes the state of the connection between the LogMonitor control and the LoggerNet server.
Section 19. CsiLogMonitor Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_BUSY Error: The property cannot be set while a connection to the LoggerNet server is present LogMonitor.serverLogonPassword Name LogMonitor.serverLogonPassword As String Description This property specifies the password that should be used when connecting to the LoggerNet server.
Section 19. CsiLogMonitor Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_BUSY Error: Attempt to set serverName while connected to the LoggerNet server LogMonitor.serverPort Name LogMonitor.serverPort As Long Description This property specifies the TCP port number that the LoggerNet server is using on the hosting computer. The valid range for this property is port 1 to port 65535.
Section 19. CsiLogMonitor Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return LogMonitor.tranLogRecordsBack Name LogMonitor.tranLogRecordsBack As Long Description The LoggerNet server maintains a transaction log history buffer that can be accessed using this property. When the tranLogMonitorStart() method is called, by default 100 historical log files will be retrieved from the LoggerNet server.
Section 19. CsiLogMonitor Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_FAIL Error: Unexpected error E_CSI_NOT_CONNECTED Error: Not Connected to the LoggerNet server E_CSI_BUSY Error: Log monitoring is already active LogMonitor.commLogMonitorStop() Name LogMonitor.commLogMonitorStop() Description This method will stop active monitoring of the communication logs on the LoggerNet server.
Section 19. CsiLogMonitor Control Reference COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return E_CSI_FAIL Error: Unexpected error LogMonitor.serverDisconnect() Name LogMonitor.serverDisconnect() Description This method will disconnect from the LoggerNet server and will set the serverConnected state to FALSE. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return LogMonitor.tranLogMonitorStart() Name LogMonitor.
Section 19. CsiLogMonitor Control Reference LogMonitor.tranLogMonitorStop() Name LogMonitor.tranLogMonitorStop() Description This method will stop active monitoring of the transaction logs on the LoggerNet server. COM Return Values Table of Possible Values Code Meaning S_OK Success: Normal return 19.1.
Section 19. CsiLogMonitor Control Reference Table of Possible failure codes.
Section 19. CsiLogMonitor Control Reference Description This event indicates there was an error with the connection to the LoggerNet server. This event triggers when an error has occurred that affects the control as a whole. Table of Possible failure codes.
Section 19. CsiLogMonitor Control Reference Description This event indicates an error has occurred while trying to retrieve transaction log entries from the LoggerNet server. This event triggers when an error has occurred that affects the method that monitors the transaction logs on the LoggerNet server. Table of Possible failure codes.
Section 19.
Appendix A. Server and Device Operational Statistics Tables The LoggerNet server and devices in the network map maintain statistics that help to describe their operation. These statistics are made available to the clients in a collection of tables associated with a special data broker of type “__Statistics__”. The LoggerNet server guarantees that there is only one data broker of this type available. Each device in the network map is represented by two tables in the Statistics data broker.
Appendix A. Server and Device Operational Statistics Tables Description: Records the total number of retires that the device experienced during the ten-minute interval. This counter is incremented by one for every “W” record that appears in the communication status log and is associated with the device. A.2 Device Standard Statistics The name of the standard statistics table associated with a device is the result of appending the string “_std” to the device name.
Appendix A. Server and Device Operational Statistics Tables Applies To: All Device Types Description: A running total of the number of communication attempts that have been made for the device since the device was stared or the statistic was last reset. A.2.6 Communication Status Column Name: “Communication Status” Column Definition Description: “Comm Status” Type: Byte Enumeration Applies To: All Device Types Description: Describes the current communication state of the device.
Appendix A. Server and Device Operational Statistics Tables A.2.10 Collection Enabled Column Name: “Collection Enabled” Column Definition Description: “Coll Enabled” Type: Boolean Applies To: 21X, CR7X, CR10, CR10X, CR500, CR510, CR23X, CR10T, CR10X-TD, CR510-TD, CR23X-TD, CR9000, CR5000, CR10X-PB, CR510PB, CR23X-TP, CR205, CR210, CR215, CR1000, CR3000, CR800, and CR850. Description: Set to true to indicate that the scheduled collection is enabled for the datalogger. A.2.
Appendix A. Server and Device Operational Statistics Tables Applies To: 21X, CR7X, CR10, CR10X, CR500, CR510, CR23X, CR10T, CR10X-TD, CR510-TD, CR23X-TD, CR9000, CR5000, CR10X-PB, CR510PB, CR23X-TP, CR205, CR210, CR215, CR1000, CR3000, CR800, and CR850. Description: The current state of scheduled collection for the datalogger. The following values are defined: 1. Normal – The normal collection schedule is active 2. Primary – The primary retry schedule is active 3.
Appendix A. Server and Device Operational Statistics Tables Applies To: 21X, CR7X, CR10, CR10X, CR500, CR510, CR23X, CR10T, CR10X-TD, CR510-TD, CR23X-TD, CR9000, CR5000, CR10X-PB, CR510PB, CR23X-TP, CR205, CR210, CR215, CR1000, CR3000, CR800, and CR850. Description: The number of values in holes that need to be collected from the datalogger. A.2.
Appendix A. Server and Device Operational Statistics Tables A.2.20 Polling Active Column Name: “Polling Active” Column Definition Description: “Polling Active” Type: Boolean Applies To: All datalogger devices Description: Reflects whether there is presently a polling operation that is active for the device. A value of true indicates that some sort of polling is taking place. A.2.
Appendix A. Server and Device Operational Statistics Tables Type: uint4 Applies To: 21X, CR7, CR10, CR10X, CR500, CR510, CR23X Description: Relays the datalogger interface version as given in the datalogger’s response to the “A” command. A.2.
Appendix A. Server and Device Operational Statistics Tables shut itself down because its supply voltage has been to low. This information is read from the “A” command. A.2.31 Low Five Volts Error Count Column Name: “Low_5v” Column Definition Description: “Low 5v” Type: uint4 Applies To: CR23X Description: Reports the number of times the CR23X +5 volt supply has been reported below five volts. This information is read from the “A” command result. A.2.
Appendix A. Server and Device Operational Statistics Tables There is only one row defined for the table. The statistics available in this table are as follows: A.3.1 Disc Space Available Column Name: “DiscSpaceAvail” Column Definition Description: “Disc Space Avail” Type: int8 Description: Relays how many bytes are free on the volume where the server’s working directory resides. A.3.
Campbell Scientific Companies Campbell Scientific, Inc. (CSI) 815 West 1800 North Logan, Utah 84321 UNITED STATES www.campbellsci.com • info@campbellsci.com Campbell Scientific Africa Pty. Ltd. (CSAf) PO Box 2450 Somerset West 7129 SOUTH AFRICA www.csafrica.co.za • cleroux@csafrica.co.za Campbell Scientific Australia Pty. Ltd. (CSA) PO Box 444 Thuringowa Central QLD 4812 AUSTRALIA www.campbellsci.com.au • info@campbellsci.com.au Campbell Scientific do Brazil Ltda.