You are on page 1of 28

Schlumberger

DataLink2
Programmers Guide and Reference
Version 3.0
DataLink2 Programmers Guide and Reference

Intentionally Blank
DataLink2 Programmers Guide and Reference

Legal Information
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
This work contains the confidential and proprietary trade secrets of Schlumberger
and may not be copied or stored in an information retrieval system, transferred, used,
distributed, translated or retransmitted in any form or by any means, electronic or
mechanical, in whole or in part, without the express written permission of the
copyright owner.

Trademarks and Service Marks


"Schlumberger", the Schlumberger logotype, and the products and services described
herein are either trademarks, trade names or service marks of Schlumberger and its
licensors, or are the property of their respective owners. These marks may not be
copied, imitated or used, in whole or in part, without the express prior written
permission of Schlumberger. In addition, covers, page headers, custom graphics,
icons, and other design elements may be service marks, trademarks, and/or trade
dress of Schlumberger, and may not be copied, imitated, or used, in whole or in part,
without the express prior written permission of Schlumberger.

A complete list of Schlumberger marks may be viewed at the Schlumberger Oilfield


Services Marks page: http://www.hub.slb.com/index.cfm?id=id32083

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference

Table of Contents
Legal Information .......................................................................................................................... 3
Table of Contents ........................................................................................................................... 4
Introduction to DataLink2 ............................................................................................................ 6
Before You Begin ........................................................................................................................ 6
DataLink2 Workflow ..................................................................................................................... 7
Interacting with DataLink2 ........................................................................................................... 7
Client application Specific Interaction......................................................................................... 7
User Specific Interaction.............................................................................................................. 7
Interaction Available to Both Parties ........................................................................................... 8
Getting Started ............................................................................................................................... 8
Installation ................................................................................................................................... 8
Project Setup ................................................................................................................................ 8
Test Harness Application......................................................................................................... 8
Custom Project Setup .............................................................................................................. 8
Configuration .......................................................................................................................... 8
Basic Workflow .............................................................................................................................. 8
Creating a DataLink2 Instance..................................................................................................... 9
Hooking Up to DataLink2 Events................................................................................................ 9
Working with Requested Data Descriptions .............................................................................. 10
Explicit vs. Implicit RDDs ..................................................................................................... 10
Creating an Index Value for an RDD .................................................................................... 10
Creating RDDs ...................................................................................................................... 11
Requested Data Validation .................................................................................................... 11
Specifying a Dispatch Delegate for RDDs ............................................................................ 12
Initializing DataLink2 ................................................................................................................ 12
UI Mode................................................................................................................................. 13
Silent Mode............................................................................................................................ 13
Consuming DataLink2 Data....................................................................................................... 13
Working with DataLink2 State ................................................................................................... 14
Saving State Information ........................................................................................................... 14
Loading State Information ......................................................................................................... 15
Loading Connection Information .......................................................................................... 16
Working with DataLink2 in Silent Mode ................................................................................... 16
Requirements ............................................................................................................................. 16
Initializing and Starting Transfer ............................................................................................... 16
Deployment and Upgrade ............................................................................................................ 17
Data Sanitization .......................................................................................................................... 17
Example Client Applications ....................................................................................................... 18
DataLink2 Test Harness............................................................................................................. 18
DataLink2 Recorder................................................................................................................... 19
Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference

Appendix A DataLink2 API ..................................................................................................... 21


Custom Exceptions .................................................................................................................... 21
Custom Event Arguments .......................................................................................................... 21
Enumerations ............................................................................................................................. 22
IData Interfaces.......................................................................................................................... 23
IDataLink2 Interface .................................................................................................................. 24
IDataDescription Interfaces ....................................................................................................... 25
State Interfaces........................................................................................................................... 26
Other Interfaces.......................................................................................................................... 26
Appendix B DataLink2 Assemblies ......................................................................................... 27
DataLink2 Merge Modules ........................................................................................................ 27
DataLink2 Assemblies ............................................................................................................... 27
Backend (RT source) Related Assemblies ................................................................................. 27
DataLink2 Configuration Files .................................................................................................. 27
DataLink2 Documents ............................................................................................................... 27
Dependencies (3rd party Assemblies)........................................................................................ 27

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 6

Introduction to DataLink2
DataLink2 simplifies the delivery of real-time drilling data to Windows platform
applications, by providing an Applications Programmer Interface (API) to access real-
time source applications such as InterACT, IDEAL, and in the future, Horizon. In
addition, DataLink2 enabled client applications can provide the end user with a
consistent and intelligent User Interface (UI) for establishing connections to real-time
sources.

DataLink2 solves issues for three sets of users the end users, the application
development teams, and the real-time source teams. The issues solved for each user
group are:

For the end users, DataLink2 provides a common UI and ultimately a multitude of
adapters that can intelligently connect to a source of real-time drilling data. In future
versions of DataLink2 it is proposed that updates of adapters and the interface will
be directly initiated through the interface.

For the application development teams, DataLink2 provides a common API that is
completely independent of the real-time source being accessed. Time is no longer
an issue as it relates to developing a UI that enables users to connect to a real-time
source. DataLink2 provides all UI for the end users connection.

For the real-time source teams, only one connection to provide real-time data needs
to be addressed and by working closely with the real-time source team, the
DataLink2 interface will allow all DataLink2 enabled client applications to access the
data, as if it were any other real-time source.

Before You Begin


DataLink2 has been developed using Microsoft .Net (C# language). Its intended
clients are .NET, COM and/or MFC applications. Application developers should be
familiar with the .NET architecture. Developers are expected to have Visual Studio
2005 installed, along with the .NET framework 2.0 for DataLink2 Version 3. DataLink2 is
supported on Windows 2000 and Windows XP.

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 7

DataLink2 Workflow
DataLink2 will query for and transfer data in response to requests for data by the
client application. The client application defines the constraints for the queried data
by supplying DataLink2 with one or more Requested Data Descriptions (RDD). An RDD
is an object whose properties define the constraints of the data DataLink2 will query
for.

DataLink2 will then connect to a specified source and query for all available data
channels based on these constraints. These available data channels are then mapped
to their respective RDDs.

DataLink2 then begins transferring data for all mapped available data channels. The
client application can consume this data by hooking up to events that notify when the
data for each mapped available data channel comes in.

Interacting with DataLink2


DataLink2 can interact with the real time application, its users, or a mixture of the two.
However, there are some differences in the responsibilities and availability of
interaction between both parties and DataLink2.

Client application Specific Interaction


The client application interacts with DataLink2 through properties, methods, and
events.

The client application is strictly responsible for instantiating an instance of DataLink2


and specifying its requested data. It is also responsible for hooking up to events to
consume the transferred data.

The client application cannot specify a source, provide source specific information, or
map available data channels to a requested data. It can, however, save source
specific state information that users cannot save.

User Specific Interaction


Users interact with DataLink2 through the use of its UI.

Users can select a source and provide connection information for that source.

Users have the capability to adjust the mappings between available data channels
and requested data provided by the client application, or map additional available
data channels to certain types of requested data through the use of the UI.

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 8

Interaction Available to Both Parties


There is some functionality that is available to both parties. Both parties have the
ability to load / save connection and mapping information provided by the user
through the use of the UI. Also, both parties are able to initiate data transfer, given
that the necessary information is provided.

Getting Started
Installation
Execute the Slb.DataLink2.SDKInstaller.msi. The installer will provide DataLink2
assemblies, the DataLink2 merge module (to be included in the client applications
.msi), DataLink2 Recorder and the Test Application.

Project Setup

Test Harness Application


You can use the DataLink2 Test Application to launch DataLink2 as an example and to
illustrate the capabilities of DataLink2. The DataLink2 Recorder may also be used as
an example application.

Custom Project Setup


You will need to copy the assembly files for the DataLink2 API and the assembly for
each adapter used by DataLink2 into your projects bin directory. You will then need to
add a reference to the DataLink2 API from within your project.

Configuration
You will need to include the necessary configuration for the Microsoft Enterprise
Library in your client applications configuration file. This configuration can be found
in DataLink2 TestHarness applications application configuration file.
(TestHarness.exe.config)

Basic Workflow
This section will walk through the basic workflow for interacting with DataLink2. We
will provide simple code examples that would be implemented in the client
application.

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 9

Creating a DataLink2 Instance


In your Class member declare an IDataLink2 member object as follows:

private IDataLink2 dl2Instance = null;

To demonstrate how to create an instance of DataLink2 we will add a button, Launch


DataLink2 to the form and implement the btnLaunchDataLink2_Click event with
the following code:

private void btnLaunchDataLink2_Click(object sender,


System.EventArgs e)
{
// if an instance already exists, deinitialize it
if (dl2Instance != null)
dl2Instance.Deinitialize();

// Create an instance of DataLink2


dl2Instance = DataLink2Factory.CreateInstance();

// Hook up to DataLink2 events

// Create requested data


// Hook up to Requested Data Events
// Initialize DataLink2
}

Hooking Up to DataLink2 Events


Most events for IDataLink2 are provided by the IDataLink2StateNotifier interface.
Each event is implemented using the generic EventHandler delegate, offered by the
.NET 2.0 framework. For more information on the events provided by the
IDataLink2StateNotifier interface, read Appendix C.

We will hookup to the TransferStateChanged event. This event fires when either the
user begins transfer in the UI or if the client application begins transfer through the
Start method provided by IDataLink2.

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 10

private void btnLaunchDataLink2_Click(object sender,


System.EventArgs e)
{
// if an instance already exists, deinitialize it
if (dl2Instance != null)
dl2Instance.Deinitialize();

// Create an instance of DataLink2


dl2Instance = DataLink2Factory.CreateInstance();

// Hook up to DataLink2 events


dl2Instance.TransferStateChange +=
new EventHandler<TransferStateChangeEventArgs>(
dl2Instance_TransferStateChange);
// Create requested data
// Hook up to Requested Data Events
// Initialize DataLink2
}

Working with Requested Data Descriptions


As discussed in the DataLink2 Workflow section, the client application provides
DataLink2 with RDDs to specify the kind of data it would like to receive.

Explicit vs. Implicit RDDs


There are two types of RDDs Explicit and implicit. The differences between the two
are in how they are mapped to available data channels.

Explicit RDDs
An explicit RDD is the more specific of the two. It requires the definition of a code,
type, and index type. This type of RDD can map to only a single available data
channel. If an available data channel is found with the same code, type, and index
type DataLink2 will automatically map it to the explicit RDD.

Implicit RDDs
An implicit RDD is the least specific of the two. It requires only the type and the index
type, and cannot have a code. An implicit RDD can have multiple available data
channels with the same type and index type mapped to it. However, mapping to
implicit RDDs is considered additional data and is not mapped automatically. Mapping
to this type of RDD is left up to the user, by using the UI.

Creating an Index Value for an RDD


The IRequestedDataDescription interface has two properties (FromIndex and
ToIndex) of type IIndexValue, an interface provided by the API. IDataLink2 provides
a factory method to create an object that implements IIndexValue. The following
code illustrates how to use the factory method:

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 11

double toDepthIndex = 0;
IIndexedValue indexedValue =
dl2Instance.CreateIndexedValue(toDepthIndex, "ft");

Creating RDDs
The client application specifies its requested data by using the factory methods
provided by the IRequestedDataHandler interface implemented by IDataLink2.

Creating an Explicit RDD


The following illustrates how to create an explicit requested data description using
the factory methods provided by the IRequestedDataHandler interface:

IRequestedDataDescription rdd1 =
dl2Instance.CreateRequestedData("HKLD",
EDataType.Log,
EIndexType.Time);

rdd1.Name = "Requested data for HKLD";

Creating an Implicit RDD


The following illustrates how to create an implicit requested data description using
the factory methods provided by the IRequestedDataHandler interface:

IRequestedDataDescription rdd2 =
dl2Instance.CreateRequestedData(EDataType.Any,
EIndexType.Any);

rdd2.Name = "Requested data for all additional data";

Requested Data Validation


When creating requested data descriptions, there are validation rules the client
application must follow. If any of these rules are broken when a requested data
description is created, a RequestedDataException will be thrown.

All requested data descriptions must be unique. If a requested data description is


explicit, it must have a unique code type and index type. If it is implicit, it must have a
unique type and index type. Explicit and implicit requested data descriptions with the
same type and index type are not considered duplicates.

The type and index type of a requested data description is also validated. A requested
data descriptions type can never be of type Unspecified. Also, if a requested data
descriptions type is Any, its index type must be of Any as well. Also, if the type is Log
or Image, the index type cannot be Unspecified.

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 12

Specifying a Dispatch Delegate for RDDs


The IRequestedDataDescription interface provides the DispatchDelegate
property that is of type EventHandler<DataDispatchEventArgs>. The client
application can specify a delegate of this type to receive incoming data for this RDD.

Assigning a Delegate through the RDD


To assign a delegate through a requested data description, simply use the
DispatchDelegate property.

rdd1.DispatchDelegate =
new EventHandler<DataDispatchEventArgs>(rdd1_DataDispatch);

Assigning a Delegate to Multiple RDDs


To assign a delegate to multiple RDDs that have already been given to DataLink2, the
client application can use the AssignDelegate method provided by the
IRequestedDataHandler interface. The AssignDelegate method can either add
the delegate to each RDD given to DataLink2, to all RDDs with a specific type, or to
those that have a specific type and index type.

The following illustrates how to add a delegate to all RDDs:

dl2Instance.AssignDelegate(
new EventHandler<DataDispatchEventArgs>(rdds_DataDispatch));

The following illustrates how to add a delegate to all RDDs that are of type Log:

dl2Instance.AssignDelegate(EDataType.Log,
new EventHandler<DataDispatchEventArgs>(logs_DataDispatch));

The following illustrates how to add a delegate to all RDDs that are of type Any and of
index type Any:

dl2Instance.AssignDelegate( EDataType.Any, EIndexType.Any,


new EventHandler<DataDispatchEventArgs>(rdds_DataDispatch));

Initializing DataLink2
Now that the instance has valid requested data, the client application can initialize
DataLink2. Initializing DataLink2 commits how DataLink2 will be used. DataLink2 has
two modes of interaction A UI mode and a silent mode. The following code
illustrates how to initialize DataLink2:

// Initialize DataLink2 (UI mode)


bool silentMode = false;
dl2Instance.Initialize(silentMode);

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 13

UI Mode
UI mode provides a user interface for DataLink2 that allows users of the client
application to connect to a source, to edit data mapping, and to begin data transfer.
In this mode, the client application is still able to interact with DataLink2. This allows
the client to save DataLink2s state or to begin transfer.

Silent Mode
Silent mode is intended to allow the client application to interact with DataLink2
without prompting the user for input. To use this workflow, DataLink2 must be run at
least once to allow the user to connect to a source. The client application can then
save all DataLink2 state information for future use.

For further information, read the Working with DataLink2 in Silent Mode section.

Consuming DataLink2 Data


While transferring, DataLink2 will dispatch batches of data to the dispatch delegates
specified by the client application (See Section Specifying a Dispatch Delegate for
RDDs). Batches of data are grouped by the dispatch delegate, meaning that if multiple
RDDs use the same dispatch delegate, a single batch would contain data points for
each RDD.

The event argument of a dispatch delegate is of type DataDispatchEventArgs. The


Data property consists of the batched data and is of type IData[]. Each item in this
array can be cast to the appropriate data type. For more information on interfaces
that inherit IData, see IData Interfaces section.

The following illustrates consuming log data for log RDDs:

private void logs_DataDispatch(object sender,


DataDispatchEventArgs e)
{
string output;

foreach(ILogData data in e.Data)


{
output = String.Format("{0} {1}, {2} {3}",
data.Value.Index,
data.Value.IndexUnit,
data.Value.Value,
data.Value.Unit);

Console.Writeline(output);
}
}

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 14

The following illustrates consuming data for RDDs of various types:

private void rdds_DataDispatch(object sender,


DataDispatchEventArgs e)
{
foreach (IData data in e.Data)
{
if (data is ILogData)
HandleLogs(data as ILogData);
else if (data is IImageData)
HandleImages(data as IImageData);
else if (data is ISurveyData)
HandleSurveys(data as ISurveyData);
}
}

Working with DataLink2 State


The client application is able to save the state of DataLink2, either to make it easier
for the client to use the UI, or to be able to use silent mode for future sessions. There
are three types of state that a client application can load / save: connection
information, source specific information, and mapping information. The following
sections will discuss how to handle each piece of state information.

Saving State Information


All saving methods are provided by the IDataLink2StateSaver interface. There are
three properties for each piece of state information. Each property is of the type
IStateSaver.

The IStateSaver interface provides three overloads for the Save method. The first
method receives no arguments and is used to save state internally. The second uses
an out parameter of type ISerializedSourceObject, allowing the client application
to serialize the state information as they see fit. The third overload allows the user to
give any stream, leaving the serialization to DataLink2. The interface also provides the
Saving and Saved events, to notify the client application that information is about to
or has been saved. Each piece of state information is saved the same way.

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 15

The following illustrates how to save mapping information using the overload with an
out parameter and a file stream:

string path = @"C:\DataLink2\StateInfo\mappingInfo.dlm";

IStateSaver saver = dl2Instance.MappingInfoSaver;

using (Stream stream = new FileStream(path,


FileMode.CreateNew))
{
BinaryFormatter bf = new BinaryFormatter();

ISerializedSourceObject item;

if (saver.Save(out item))
bf.Serialize(stream,
item);
}

Loading State Information


All loading methods are provided by the IDataLink2StateLoader interface. There
are three properties for each piece of state information. Each property is of the type
IStateLoader.

The IStateLoader interface provides two overloads for the Load method. The first
method receives an argument of type ISerializedSourceObject. The second is of
type Stream.

Note: The Stream overload can only be used if the Stream overload of the
Save method was used to save state information.

The following illustrates how to load mapping information from the example above:

string path = @"C:\DataLink2\StateInfo\mappingInfo.dlm";

IStateSaver saver = dl2Instance.MappingInfoSaver;

BinaryFormatter bf = new BinaryFormatter();

using (Stream stream = new FileStream(path,


FileMode.CreateNew))
{
ISerializedSourceObject item =
(ISerializedSourceObject)bf.Deserialize(stream);

dl2instance.MappingInfoLoader.Load(item);
}

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 16

Loading Connection Information


Loading connection information is treated differently, since it is Schlumberger policy
not to persist passwords. When loading connection information, the client application
must cast the ISerializedConnectionObject to ISerializedConnectionObject.
This will expose the SupportsCredentials property. The client application can then
prompt the user for a password for the connection.

The following example illustrates how to change the password of a loaded


connection info object.

string path = @"C:\DataLink2\StateInfo\connectionInfo.dlm";

IStateSaver saver = dl2Instance.MappingInfoSaver;

BinaryFormatter bf = new BinaryFormatter();

using (Stream stream = new FileStream(path,


FileMode.CreateNew))
{
ISerializedSourceObject item =
(ISerializedSourceObject)bf.Deserialize(stream);

ISerializedConnectionObject conn =
item as ISerializedConnectionObject;

if (conn != null && conn.SupportsCredentials)


conn.Password = MethodToGetPassword();

dl2instance.MappingInfoLoader.Load(item);
}

Working with DataLink2 in Silent Mode


Silent mode is intended to allow the client application to interact with DataLink2
without prompting the user for input. To use this workflow, DataLink2 must be run at
least once to allow the user to connect to a source. The client application can then
save all DataLink2 state information for future use.

Requirements
The client application must have saved all DataLink2 state information in a prior
session. The client application must then load all state information with the correct
credentials, if needed.

Initializing and Starting Transfer


To use silent mode, the client application must initialize DataLink2 to use silent mode,
then initiate transfer.

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 17

The following example illustrates how to initialize and initiate transfer:

try
{
//Load mapping info using some method that
//returns a Stream / ISerializedSourceObject
this.dl2.MappingInfoLoader.Load(
MethodToLoadMappingInfo() );

//Load connection info using some method that


//returns a Stream / ISerializedSourceObject
this.dl2.ConnectionInfoLoader.Load(
MethodToLoadConnectionInfo() );

//Load source specific info using some method that


//returns a Stream / ISerializedSourceObject
this.dl2.SourceInfoLoader.Load(
MethodToLoadSourceInfo() );

this.dl2.Initialize(true);
this.dl2.Start();
}
catch (ConnectionFailureException e)
{
MessageBox.Show(e.Message, Resources.DialogTitle);
}
catch (Exception e)
{
MessageBox.Show(e.Message, Resources.DialogTitle);
}

Deployment and Upgrade


DataLink2 provides three merge modules for incorporation into the Windows
Installer(s) of DataLink2 enabled client applications. For deployment, the applications
.msi must incorporate all three merge modules (See Appendix B).

It is proposed for future releases of DataLink2 to provide functionality directly from


the interface to initiate adapter updates and interface updates; this is currently not
available in DataLink2 version 3.0.

Data Sanitization
The Sanitize Data functionality enables the user to correct a mismatch in naming
standards for units and/or channel codes. If the source and the real-time application
differ in the way they refer to a given unit or channel-code, the real-time application
can address this by providing a sanitizing file.

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 18

The sanitizing file resides in a subdirectory under the real-time application installation
directory. (<installation directory>\DataLink2\Sanitizing Info\) The Xml
Schema is provided in the SDK (SanitizingSchema.xsd)

Example Client Applications


DataLink2 provides the application programmer with 2 example applications that will
demonstrate various scenarios with DataLink2 integration.

DataLink2 Test Harness


The test harness (TestHarness.exe) is provided for testing purposes only. It enables
you to start DataLink2 from several different scenarios and to print out the real-time
data that it receives from DataLink2 once the data transfer is started.

Figure 1 - DataLink2 Test Application

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 19

DataLink2 Recorder
The Recorder (Recorder.exe) provides the programmer with a way to record data
from the real-time source and then simulate a real-time source with the Simulator
adapter.

Figure 2 Recorder Application

Provide a location of the recorder output file to be created. Click Start and the
DataLink2 interface will launch. The recorder output file will not be written to until the
recording is stopped. The output file can then be used with the Simulator adapter
(Reset
Reset will cancel the current connection and return the recorder to its initial state).

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 20

Appendices

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 21

Appendix A DataLink2 API


Custom Exceptions

Name Description
Thrown if a list of adapters for sources could
AdapterException
not be loaded internally
Thrown by IDataLink2.Start when connection
ConnectionFailureException
fails.
Thrown by the DataLink2Factory when the
DataLink2CreationException
creation of the DataLink2 instance fails.
Thrown if de-serialization of an
SourceObjectException
ISerializedSourceObject fails.
InitializationException Thrown if Start is called before Initialize
Thrown by IDataLink2.CreateRequestedData
when an invalid IRequestedDataDescription is
RequestedDataException
passed, or if IDataLink2.Initialize is called and
no Requested data was given.
Thrown by IDataLink2.AddConnection when an
SourceException
invalid source is selected.
Thrown if there is no network connection to
NetworkUnavailableException
connect to a source when one is needed.

Custom Event Arguments

Name Event

ConnectionStateChangeEventArgs IDataLink2Notifier.ConnectionStateChanged

DataDispatchEventArgs IRequestedDataDescription.DataDispatch

StatusChangeEventArgs IDataLink2Notifier.StatusChanged

DL2ExceptionEventArgs IDataLink2Notifier.Error

TransferStateChangeEventArgs IDataLink2Notifier.TransferStateChanged

NewChannelEventArgs IDataLink2Notifier.NewChannel

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 22

Enumerations

EAdapterTransferState EIndexType
Enum Enum

Waiting Time
Starting MD
Transferring TVD
Suspended Any
Reconnecting Unspecified

EDataDescriptionType EOperationType
Enum Enum

RequestedDataDescription Append
AvailableDataDescription Update
Delete

EDataType ERiskType
Enum Enum

Log Risk
Survey Event
Image NearMiss
Text BestPractice
Risk LessonsLearned
Any Other
Unspecified Unknown

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 23

IData Interfaces

IData
Interface

Properties

IRiskData ILogData ISurveyData


Interface Interface Interface
IData IData IData

Properties Properties Properties

IImageData
Interface
IData

Properties

ITextData
Interface
IData

Properties

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 24

IDataLink2 Interface

IDataLink2SourceHandler
Interface

Properties IDataLink2StateNotifier IDataLink2UIHandler


Interface Interface

Methods Events Properties

Methods

IRequestedDataHandler IDataLink2StateLoader IDataLink2StateSaver


Interface Interface Interface

Methods Properties Properties

IDataLink2
Interface
IDataLink2StateNotifier
IDataLink2SourceHandler
IRequestedDataHandler
IDataLink2StateSaver
IDataLink2StateLoader
IDataLink2UIHandler

Properties

Methods

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 25

IDataDescription Interfaces

IDataDescription
Interface

Properties

IAvailableDataDescription IRequestedDataDescription
Interface Interface
IDataDescription IDataDescription

Properties Properties
Description

FromIndex

Name
ToIndex
Unit

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 26

State Interfaces

IStateSaver ISerializedSourceObject
Interface Interface
ICloneable
Methods
Properties

Events

ISerializedConnectionObject
Interface
ISerializedSourceObject

IStateLoader
Interface Properties

Methods

Other Interfaces

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 27

Appendix B DataLink2 Assemblies


DataLink2 Merge Modules
Slb.DataLink2.Components.msm
Slb.DataLink2.3rdParty.EnterpriseLibrary.msm
Slb.DataLink2.3rdParty.NetAdvantage.msm

DataLink2 Assemblies
Slb.DataLink2.Adapter.Ideal.dll Slb.DataLink2.Tools.InterACTFileUpl
Slb.DataLink2.Adapter.Simulator.dll oad.dll
Slb.DataLink2.Adapter.WitsmlApi.dll Slb.DataLink2.Tools.InterACTFileUpl
Slb.DataLink2.Adapter.Streaming.dll oad.Resources.dll
Slb.DataLink2.API.dll Recorder.exe
Slb.DataLink2.Common.dll TestHarness.exe
Slb.DataLink2.Kernel.dll
Backend (RT source) Related Assemblies
Interop.iaFileTransferHelper.dll AppDirect.dll
Interop.iaPubClient.dll iaFileTransferHelper.dll
Interop.APPDIRECTLib.dll iaPubClient.dll
Interop.SlbDataInterface.dll SlbDataInterface.exe
DataLink2 Configuration Files
Slb.DataLink2.Adapter.Ideal.dll.config
Slb.DataLink2.Adapter.WitsmlApi.dll.config
Slb.DataLink2.Kernel.DLL.config
TestHarness.exe.config
Recorder.exe.config

DataLink2 Documents
DataLink2_V3_API.pdf
DataLink2_V3_User_Guide.pdf
SanitizingSchema.xsd

Dependencies (3rd party Assemblies)


Infragistics 5.2 NetAdvantage 2006 Volume 1
Microsoft EnterpriseLibrary version 2.0

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.
DataLink2 Programmers Guide and Reference 28

Private
Copyright 2006 Schlumberger, Unpublished Work. All rights reserved.

You might also like