64
V1.2 | 2018-05-09 Vector Webinar Professional Development of Diagnostic Sequences

2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

V1.2 | 2018-05-09

Vector Webinar

Professional Development of Diagnostic Sequences

Page 2: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

2

u Introduction

Runtime Environment

Development Environment

Diagnostic Sequences

User Interaction

Tips & Tricks

Help & Documentation

Agenda

Page 3: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

3

Vector Diagnostics Scripting Library

Introduction

u .NET based library for diagnostic sequences

u Vector Diagnostic Scripting Library (VDS Library)

u Author diagnostic sequences in any .NET based language> C#

> VB.NET

u Features

u Interaction with ECUs using diagnostics (request / response)

u Interaction with an user using dialogs (value input / confirmation)

Page 4: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

4

Interoperability

Introduction

u Works in Vector Diagnostic Test Tools

u Indigo

u CANoe

u CANape

u vScriptDiagnostics on VN8810

u vFlash (Custom Actions)

Page 5: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

5

Application areas

Introduction

u Learning of pedal / window positions

u Documentation of vehicle ECUs (ID data) and their state (fault memory)

u Read out ECU identification data and print it

u Diagnostic Logger

u OBD Logger

u … and much more!

Page 6: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

6

Introduction

u Runtime Environment

Development Environment

Diagnostic Sequences

User Interaction

Tips & Tricks

Help & Documentation

Agenda

Page 7: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

7

u Execute scripts in Script Runner

u Open Script Manager

u Load script

u Open Script Runner

u Execute script

Indigo

Runtime Environment

Page 8: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

8

u Execute scripts via command line interface

u No user interface

u Indigo.exe [IndigoProjectFile] [ScriptName] /log [LogFilePath]

u Return values

u 0: Success

u 100: Loading project failed

u 200: Script is missing

u 300: Error on script execution

u 400: Communication error

u 500: Invalid command line arguments

u 1000: Unknown error

Indigo

Runtime Environment

Page 9: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

9

Vector VN8810 Intelligent Diagnostic Device

Runtime Environment

Page 10: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

10

Vector VN8810 Intelligent Diagnostic Device

Runtime Environment

VN8810

Kernel

Windows

WLAN / LAN

vScriptDiagnostics

Buttons, LEDs, ...

u Project/data supply

u Action documentation

u Vehicle reports

WLANu Control execution

u Select project

u Provide user input

u Visualize results

XL driver

u Control execution

VDSProjects

User Libraries

ECU

Page 11: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

11

u Import diagnostic sequences in CANape

u Tools | Task Manager

u .NET scripts

u Insert | .NET Scripts | Insert …

CANape

Runtime Environment

Page 12: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

12

CANoe

Runtime Environment

u Import diagnostic sequences in CANoe

u View | Automation Sequences

u .NET Snippets

Page 13: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

13

vFlash

Runtime Environment

u vFlash Custom Actions

u PreFlash Actions

u PostFlash Actions

u Attributes = Parameters passed to script

Page 14: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

14

Introduction

Runtime Environment

u Development Environment

Diagnostic Sequences

User Interaction

Tips & Tricks

Help & Documentation

Agenda

Page 15: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

15

Code Editors

Development Environment

u Microsoft Visual Studio 201x (recommended)

u Microsoft Visual C# Express 201x (recommended)

u https://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx

u Microsoft Visual Studio Community 2013

u https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx

u SharpDevelop

u http://www.icsharpcode.net/opensource/sd/

u Notepad

Page 16: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

16

Visual Studio Extension

Development Environment

u Professional development environment for diagnostic sequences

u Extension for Microsoft Visual Studio 2015/2017 Professional

Page 17: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

17

Visual Studio Extension

Development Environment

u Features

u Providing IntelliSense for qualifier based on the diagnostic databases> ECU, services, requests, parameters, ..

u Debugging capabilities> Debug VDS Scripts like C# code using all features of Microsoft Visual Studio

u Deployment on VN8810 > Generation of Indigo Pack&Go projects

u Diagnostic Trace> Visualizing diagnostic communication on the bus system

u Code Analyzers> Applying best practices of VDS script authorings (e.g. cleaning up objects,

checking conversions, …)

Page 18: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

18

Visual Studio Extension

Development Environment

Professional software development consists of testing code via unit tests

Plan

Code

BuildTest

Release

Deploy

Page 19: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

19

Visual Studio Extension

Development Environment

Professional software development consists of testing code via unit tests

u Execution of unit tests against diagnostic sequences

u Inside the development environment (Visual Studio)

u In continous integration systems (e.g. Jenkins, CruiseControl, ..)

Page 20: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

20

Visual Studio Extension

Development Environment

Professional software development consists of testing code via unit tests

u The VDS extension for Visual Studio provides support for common unittest frame works

u Examples: NUnit, MSTest, XUnit, …

u Generation of test code incl. test execution environment

Page 21: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

21

Visual Studio Extension

Development Environment

u Test execution possible on

u real targets (ECUs / vehicle),

u (semi-)automatically generated simulations (based on the diagnosticdatabases)

u in-memory (e.g. for continous integration systems)

Page 22: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

22

Visual Studio Extension

Development Environment

u Mocking Framework for Vector Diagnostics Scripting Library

u For „endoscopic“ testing in unit tests mocking frameworks are required> Stimulating special conditions like communication errors, invalid conversions, …

> VDS extension also provides an extensive mocking framework

Injecting Communication Error

The next time „VIN_Read“ is executed, a communication error is returned instead ofthe response from an ECU.

Page 23: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

23

Introduction

Runtime Environment

Development Environment

u Diagnostic Sequences

User Interaction

Tips & Tricks

Help & Documentation

Agenda

Page 24: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

24

u Vector.Diagnostics.dll

u Library for diagnostic objects (ECUs, requests, responses, …)

u Vector.Tools.dll

u Tool specific objects (Logging output, …)

u Vector.Scripting.UI.dll

u User interaction (Dialogs)

u (only Indigo / CANoe)

u Vector.Scripting.dll

u Execution.Wait()

u Vector.Indigo.Scripting.FaultMemory.dll (Indigo only)

u Convenient fault memory API

Assembly Overview

Diagnostic Sequences

Page 25: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

25

Class Diagram

Diagnostic Sequences

class Vector Diagnostics Scripting Library

Application

+ GenerateSecurityKey(Ecu, byte[], byte, string, byte[]*): GenerateSecurityKeyResult

+ GetEcu(string): Ecu

+ GetEcu(): Ecu

+ GetEcuByLogicalLink(string): Ecu

IDisposable

IEquatable

Ecu

+ ActivateTesterPresent(bool): bool

+ Close(): void

+ CreateRequest(string): Request

+ CreateRequest(byte[]): Request

+ CreateRequestsBySemantic(string): RequestCollection

+ Dispose(): void

+ Equals(Ecu): bool

+ Equals(object): bool

+ GetHashCode(): int

+ IdentifyAndSelectVariant(): string

+ IdentifyVariant(): string

+ IsTesterPresentActive(): bool

+ SelectVariant(string): VariantSelectionResult

+ ToString(): string

+ Unlock(byte): SecurityAccessResult

+ Unlock(byte, string): SecurityAccessResult

IDisposable

Parameter

{leaf}

+ Dispose(): void

+ GetParameter(string): Parameter

+ SetIterationCount(uint): bool

+ ToString(): string

IMessage

Request

{leaf}

+ Dispose(): void

+ GetParameter(string): Parameter

+ Send(): SendResult

+ SendAsynchronous(): SendResult

+ ToString(): string

IMessage

Response

{leaf}

+ Dispose(): void

+ GetParameter(string): Parameter

+ ToString(): string

IDisposable

SendResult

{leaf}

+ Dispose(): void

+ WaitAll(int, SendResult[]): WaitResult

+ WaitAll(SendResult[]): WaitResult

+ WaitAny(int, int*, SendResult[]): WaitResult

+ WaitAny(int*, SendResult[]): WaitResult

IDisposable

Value

{leaf}

+ Dispose(): void

+ GetBytes(): byte[]

+ Set(Int32): bool

+ Set(UInt32): bool

+ Set(Double): bool

+ Set(String): bool

+ Set(byte[]): bool

+ ToDouble(): Double

+ ToInt32(): Int32

+ ToString(): String

+ ToUInt32(): UInt32

«enumeration»

SendStatus

Ok = 0

InvalidRequest = 1

CommunicationError = 2

FailedResponseParse = 3

UnexpectedResponse = 4

AsynchronousTransactionPending = 5

«enumeration»

SecurityAccessResult

NoResult = 0

Success = 1

InvalidSeedKeyDll = 10

CommunicationError = 11

NegativeResponse = 12

Failure = 100

«enumeration»

GenerateSecurityKeyResult

NoResult = 0

Success = 1

InvalidSeedKeyDll = 10

InvalidVariant = 11

InvalidSecurityLevel = 12

Failure = 100

ApplicationException

DiagnosticException

+ DiagnosticException(ExceptionType)

+ DiagnosticException()

+ DiagnosticException(string)

+ DiagnosticException(string, Exception)

Page 26: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

26

Working with ECUs

Diagnostic Sequences

u Vector.Diagnostics.Application class

Accessing the first ECU in the project / configuration

Accessing an ECU by qualifier

Ecu ecu = Application.GetEcu();

Ecu ecu = Application.GetEcu("MyEcuQualifier");

Page 27: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

27

Accessing diagnostic requests

Diagnostic Sequences

u Working with requests

Creating a request by qualifier

Creating a request by pdu

string serviceQualifier = "VIN_Read";

Request request = ecu.CreateRequest(serviceQualifier);

var pdu = new byte[] {0x22, 0xF1, 0x90};

Request request = ecu.CreateRequest(pdu);

Page 28: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

28

Send data to ECU and evaluate response

Diagnostic Sequences

SendResult result = request.Send();

u Sending a request to an ECU

u Handle communication errors

if (result.Status == SendStatus.CommunicationError)

{

// Handle communication error

}

Page 29: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

29

Send data to ECU and evaluate response

Diagnostic Sequences

u Accessing response(s)

if (result.Status == SendStatus.Ok)

{

Response response = result.Response;

// Access response parameter

foreach (Response response in result.Responses)

{

// Access response parameter

}

}

Page 30: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

30

Send data to ECU and evaluate response

Diagnostic Sequences

u Working with response data

u Accessing raw data

byte[] rawResponseData = response.Pdu;

Page 31: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

31

Send data to ECU and evaluate response

Diagnostic Sequences

u Working with response data

u Accessing parameters via qualifier

u Accessing parameters using the parameter collection

Parameter parameter = response.GetParameter("VIN");

ParameterCollection parameters = response.Parameters;

foreach (Parameter parameter in parameters)

{

// process parameter values

}

Page 32: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

32

Send data to ECU and evaluate response

Diagnostic Sequences

u Working with parameters

u Name

u Qualifier

u Description

u Unit

string parameterName = parameter.Name;

string qualifier = parameter.Qualifier;

string description = parameter.Description;

string parameterUnit = parameter.Unit;

Page 33: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

33

Send data to ECU and evaluate response

Diagnostic Sequences

u Working with parameters

u Value

Value value = parameter.Value;

// Accessing raw parameter value

byte[] rawData = value.GetBytes();

// Accessing physical / symbolic parameter value

double valueAsDouble = value.ToDouble();

int valueAsInt32 = value.ToInt32();

uint valueAsUInt32 = value.ToUInt32();

string valueAsString = value.ToString();

Page 34: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

34

Reading Data From An ECU

Diagnostic Sequences

u Example: Reading VIN from ECU

Page 35: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

35

Security Access: Unlocking ECUs

Diagnostic Sequences

u Unlock ECU in level 0x01

u Unlock ECU in level 0x01 using an additional option string

SecurityAccessResult result = ecu.Unlock(0x01);

SecurityAccessResult result = ecu.Unlock(0x01, "OptionString");

Page 36: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

36

Security Access: Unlocking ECUs

Diagnostic Sequences

u Error / success handling

public enum SecurityAccessResult

{

NoResult = 0,

Success = 1,

InvalidSeedKeyDll = 10,

CommunicationError = 11,

NegativeResponse = 12,

Failure = 100,

}

Page 37: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

37

Security Access: Unlocking ECUs

Diagnostic Sequences

u Unlocking ECU in specified security level

GenerateSecurityKeyResult result =

Application.GenerateSecurityKey(

ecu,

seed,

securityLevel,

option,

out key);

Page 38: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

38

Security Access: Unlocking ECUs

Diagnostic Sequences

u Error Handling

public enum GenerateSecurityKeyResult

{

NoResult = 0,

Success = 1,

InvalidSeedKeyDll = 10,

InvalidVariant = 11,

InvalidSecurityLevel = 12,

Failure = 100,

}

Page 39: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

39

Indigo Extension: Access Fault Memory

Diagnostic Sequences

u Reading DTCs

// Get current ECU

Ecu ecu = Application.GetEcu();

// Read fault memory from ECU

DtcCollection dtcCollection = DtcReader.ReadDtcs(ecu);

foreach (Dtc dtc in dtcCollection)

{

Output.WriteLine("DTC Code: " + dtc.ErrorCode);

Output.WriteLine("DTC Text: " + dtc.ErrorText);

Output.WriteLine("DTC Status: 0x" + BitConverter.ToString(dtc.Status));

}

Page 40: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

40

Indigo Extension: Access Fault Memory

Diagnostic Sequences

u Reading Environment Data for DTCs

// Read environment data for the DTC

DtcInfoCollection snapshotRecords = DtcReader.ReadSnapshotRecord(ecu, dtc);

// Write environment data to output

foreach (DtcInfo snapshotRecord in snapshotRecords)

{

Output.WriteLine(snapshotRecord.Name + ": " + snapshotRecord.Value + snapshotRecord.Unit);

}

Page 41: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

41

Indigo/VN88 Extension: Vector.Diagnostics.Obd

Diagnostic Sequences

u Convenience API for reading out OBD data from the vehicle

u Supported OBD Data

u OBD Discovery

u Read Powertrain Diagnostic Data (Mode $01)

u Access OBD Fault Memory (Mode $02, $03, $07, $0A)

u Read Info Type Data like VIN, .. (Mode $09)

u Read On-Board Monitoring Test Results (Mode $06)

u Supported Standards

u OBD II (SAE J1979 / ISO 15031)

u WWH-OBD (ISO 27145)

Page 42: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

42

Indigo/VN88 Extension: Vector.Diagnostics.Obd

Diagnostic Sequences

u Use Cases

u Create customized OBD reports

u OBD Logger / Diagnostic Logger

u Collect OBD fleet data via VN8810

u and much more!

Page 43: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

43

Indigo/VN88 Extension: Vector.Diagnostics.Obd

Diagnostic Sequences

u OBD Discovery

u Start OBD Discovery

u Determine if OBD discovery was successful

DiscoveryResult result = ObdDiscovery.Discover();

if (result.Status == ResultStatus.Success)

{

// OBD Discovery successful ...

}

else

{

// OBD Discovery failed ...

}

Page 44: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

44

Indigo/VN88 Extension: Vector.Diagnostics.Obd

Diagnostic Sequences

u OBD Discovery

u Determine OBD standard used by the ECU

if (result.ObdType == ObdType.OBD2)

{

// Handle OBD 2 ECUs ..

}

else if (result.ObdType == ObdType.WWHOBD)

{

// Handle WWH-OBD ECUs ..

}

Page 45: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

45

Indigo/VN88 Extension: Vector.Diagnostics.Obd

Diagnostic Sequences

u OBD Discovery

u Accessing the functional group for sending OBD requests

ObdFunctionalGroup funcGroup = result.ObdFunctionalGroup;

Page 46: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

46

Indigo/VN88 Extension: Vector.Diagnostics.Obd

Diagnostic Sequences

u Accessing OBD Fault Memory

u Reading OBD DTCs

u Possible values for ObdDtcType enumeration

var ecuDtcCollection = funcGroup.ReadObdFaultMemory(ObdDtcType.All);

[Flags]

public enum ObdDtcType

{

None = 0,

Confirmed = 3,

Pending = 7,

Permanent = 10,

All = Confirmed | Pending | Permanent

}

Page 47: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

47

Indigo/VN88 Extension: Vector.Diagnostics.Obd

Diagnostic Sequences

u Accessing OBD Fault Memory

u Clear DTCs

funcGroup.ClearFaultMemory();

Page 48: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

48

Indigo/VN88 Extension: Vector.Diagnostics.Obd

Diagnostic Sequences

u Reading Mode $01 Data

u Retrieving supported OBD PIDs from ECUs

u Reading OBD PID data

u Accessing the supported OBD PIDs via enumeration

var supportedPids = funcGroup.ReadSupportedPids();

var obdPidEcuDataCollection = funcGroup.ReadObdPid( ObdPidCategory.PID_01_MonitorStatusSinceDtcsCleared);

ObdPidCategory

Page 49: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

49

Indigo/VN88 Extension: Vector.Diagnostics.Obd

Diagnostic Sequences

u Reading Mode $09 Data

u Retrieving supported OBD InfoTypes from ECUs

u Reading OBD InfoType data

u Accessing the supported OBD InfoTypes via enumeration

var supportedInfoTypes = funcGroup.ReadSupportedInfoTypes();

var obdInfoTypeEcuCollection = funcGroup.ReadObdInfoType(ObdInfoTypeCategory.InfoType_04_CalibrationId);

ObdInfoTypeCategory

Page 50: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

50

Introduction

Runtime Environment

Development Environment

Diagnostic Sequences

u User Interaction

Tips & Tricks

Help & Documentation

Agenda

Page 51: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

51

Dialog Types

User Interaction

u Confirmation Dialogs

ConfirmationResult result =

ConfirmationDialog.Show(

"This is a message",

"This is the caption",

ConfirmationDialogButtons.OKCancel);

Page 52: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

52

Dialog Types

User Interaction

u Input Dialogs

u Simple Data Input

DataEntryResult result =

DataEntryDialog.Show(

"This is a message",

"This is the caption",

"Additional information.",

ref value);

Page 53: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

53

Dialog Types

User Interaction

u Input Dialogs

u Input Validation: Allow values in a range

DataEntryResult result =

DataEntryDialog.Show(

"This is a message",

"This is the caption",

"Additional information.", rangeCollection,

ref value);

Page 54: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

54

Dialog Types

User Interaction

u Input Dialogs

u Input Validation: Allow values in a range

DataEntryResult result =

DataEntryDialog.Show(

"This is a message",

"This is the caption",

"Additional information.", rangeCollection,

ref value);

List<Range<int>> ranges = new List<Range<int>>();

ranges.Add(new Range<int>(1,4));

var rangeCollection = new RangeCollection<int>(ranges);

Page 55: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

55

Dialog Types

User Interaction

u Input Dialogs

u Input Validation: Regular Expression

DataEntryResult result =

DataEntryDialog.Show(

"This is a message",

"This is the caption",

"Additional information.",

ref value,

@"^[A-Fa-f0-9]{2}$");

Page 56: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

56

Dialog Types

User Interaction

u Input Dialogs

u Value Selection

DataEntryResult result =

DataEntryDialog.Show(

"Please select one value:",

"Data Input",

"Choose a value.",

ref value,

defaultIndex, valueTable);

Page 57: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

57

Dialog Types

User Interaction

u Input Dialogs

u Value Selection

DataEntryResult result =

DataEntryDialog.Show(

"Please select one value:",

"Data Input",

"Choose a value.",

ref value,

defaultIndex, valueTable);

List<string> values = new List<string> { "My First Value", "My Second Value" };

ValueTable<string> valueTable = new ValueTable<string>(values);

Page 58: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

58

Introduction

Runtime Environment

Development Environment

Diagnostic Sequences

User Interaction

u Tips & Tricks

Help & Documentation

Agenda

Page 59: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

59

Script Recording

Tips & Tricks

u Script Recorder

Page 60: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

60

Script Recording

Tips & Tricks

u Generate Script Template for Copy & Paste

Page 61: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

61

Debugging

Tips & Tricks

u How to debug diagnostic sequences?

u Prerequisites> Microsoft Visual C# Express / Microsoft Visual Studio

> Indigo

u Indigo> Script Manager

> Context Menu | Edit

> Indigo prepares Visual Studio solution and debugging environment

u Visual Studio> Simply press Debug | Start Debugging (F5)

Page 62: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

62

Introduction

Runtime Environment

Development Environment

Diagnostic Sequences

User Interaction

Tips & Tricks

u Help & Documentation

Agenda

Page 63: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

63

u API Description> Vector.Diagnostics:

VDSLibrary.chm

> Vector.Scripting.UI: Vector.Scripting.UI.chm

u Getting Started> <CANoe|CANape|Indigo>\Docs\

VDS_Library_QuickStart.pdf

u Examples> Reading Variant Coding:

> <CANoe|CANape|Indigo>\Examples\CodingReader.cs

API Documentation / Getting Started / Examples

Help & Documentation

Page 64: 2018-05-09 Professional Development of Diagnostic Sequences · Development Environment Professional software development consists of testing code via unit tests u Execution of unit

64 © 2016. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V1.2 | 2018-05-09

Author:Abramowitsch, RalfVector Germany

For more information about Vectorand our products please visit

www.vector.com