CSI Software Development Kit Beginner’s Guide Revision: 8/06 C o p y r i g h t © 2 0 0 2 - 2 0 0 6 C a m p b e l l S c i e n t i f i c , I n c .
CSI Software Development Kit Beginner’s Guide 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. Introduction...............................................................1-1 1.1 Background........................................................................................... 1-1 1.2 Advantages of using an SDK................................................................ 1-1 1.
CSI Software Development Kit Beginner’s Guide Table of Contents 5. BMP5 Direct SDK ..................................................... 5-1 5.1 BMP5 Direct SDK Overview ............................................................... 5-1 5.2 SimplePB Wrapper ............................................................................... 5-1 This is a blank page.
Section 1. Introduction 1.1 Background Campbell Scientific dataloggers process measurements made with a wide variety of sensors and store summaries and statistics of these measurements as data. Dataloggers carry out these operations based on instructions in a datalogger program. Users create these datalogger programs with CSI software such as Short Cut, Edlog and CRBasic Editor. Programs can be sent to dataloggers via a variety of communication channels (e.g. phone modem or RF).
Section 1. Introduction Figure 1-1 SDK products simplify the task of application development tremendously by encapsulating complexities inherent in client-server communications. 1.3 Overview of Current SDK Products Campbell Scientific offers several different SDK products. Each SDK product provides different advantages depending on the specific needs of the developer. 1.3.1 Current SDK Products 1.3.1.
Section 1. Introduction 1.3.1.2 LoggerNet Server SDK This software development kit contains six ActiveX controls and the LoggerNet server DLL (CORALIB3.DLL). A developer can use this SDK to create applications that can remotely connect to an existing LoggerNet installation or the included LoggerNet server DLL. Installation of this SDK includes source code of examples in Delphi 6.0, Visual Basic 6.0, and Visual C++ 8.0 MFC that start the LoggerNet server and use the included SDK controls.
Section 1. Introduction 1.3.2 SDK Comparison Table SDK Name LoggerNet SDK LoggerNet Server SDK PC9000 SDK BMP5 Direct SDK 1-4 Installed Items • Limited LoggerNet Server (coralib3d.dll) • Six ActiveX Control DLLs • Examples • Help File • Documentation • Full LoggerNet Server (coralib3.dll) • Six ActiveX Control DLLs • Examples • Help File • Documentation • PC9000 DLL • Windows Drivers • Examples • Documentation • SimplePB.
Section 2. LoggerNet SDK 2.1 LoggerNet Overview LoggerNet is developed around client-server architecture. LoggerNet’s clientserver technology is based on a server that communicates with a network of dataloggers via various communications technologies. The server listens for client requests, accepts the requests, and acknowledges to the client that a request has been received. The server fulfils this request and returns information to the client. Often a client makes several requests.
Section 2. LoggerNet SDK TABLE 2-1.
Section 2. LoggerNet SDK 2.4 How to Install SDK Controls on a Computer SDK controls are ActiveX DLLs (Dynamically Linked Libraries). DLLs contain code written in one of several computer languages (e.g., Visual C++ MFC in this case). DLLs are dynamically linked, meaning they are stored separately from the main application and accessed by the main application whenever needed. 2.4.1 How to Register SDK Controls on a PC You will find six DLLs in the SDK: CsiBrokerMap.dll, CsiDatalogger.dll, CsiDataSource.
Section 2. LoggerNet SDK 4. VB Main Menu | View | Toolbox Æ SDK control icons appear. You are now ready to start developing a client application using the SDK controls.
Section 3. LoggerNet Server SDK 3.1 LoggerNet Overview LoggerNet is developed around client-server architecture. LoggerNet’s clientserver technology is based on a server that communicates with a network of dataloggers via various communications technologies. The server listens for client requests, accepts the requests, and acknowledges to the client that a request has been received. The server fulfils this request and returns information to the client. Often a client makes several requests.
Section 3. LoggerNet Server SDK TABLE 3-1.
Section 3. LoggerNet Server SDK environment. Examples are included for the Visual Basic 6.0, Visual C++ 8.0 MFC and Delphi 6.0 development environments. 3.4 How to Install SDK Controls on a Computer SDK controls are ActiveX DLLs (Dynamically Linked Libraries). DLLs contain code written in one of several computer languages (e.g., Visual C++ MFC in this case). DLLs are dynamically linked, meaning they are stored separately from the main application and accessed by the main application whenever needed. 3.4.
Section 3. LoggerNet Server SDK 4. VB Main Menu | View | Toolbox Æ SDK control icons appear. You are now ready to start developing a client application using the SDK controls.
Section 4. PC9000 SDK 4.1 PC9000 SDK Overview The PC9000 SDK allows software developers to create custom datalogger application programs using such programming languages as Visual Basic or Delphi. The PC9000 SDK includes the latest PC9000 DLL that provides a full and varied set of datalogger control and data collection functions. The PC9000 SDK is tailored toward direct, high-speed, real-time communications between the PC and a single datalogger.
Section 4. PC9000 SDK If desired, PC9000.DLL can alternately be located in other directories; for example, some developers prefer to keep a copy of all key DLL files in the same subdirectory as the applications program that they create. By locating a DLL in the same directory as a custom program, multiple DLL versions can reside on the same machine at the same time. For custom, PC9000.
Section 5. BMP5 Direct SDK 5.1 BMP5 Direct SDK Overview The BMP5 Direct software development kit is for developers that want a simple way to create an application that communicates with any PakBus datalogger using only RS-232 or an intermediate communication that is transparent to RS-232 such as RF400 radios. The application created using the BMP5 Direct SDK will only be able to communicate with one datalogger at a time.
Section 5. BMP5 Direct SDK 5-2 GetTableNames() – used to query a datalogger for current table names and numbers GetDLLVersion() – used to return the version of SimplePB.DLL currently in use GetLastResults() – used to display the results of a previous command that currently exist in memory as a string so memory pointers do not need to be managed.
This is a blank page.
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.