Teledyne-lecroy USB Script Decode Manual Manuel d'utilisateur Page 1

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Équipement Teledyne-lecroy USB Script Decode Manual. Teledyne LeCroy USB Script Decode Manual User Manual [fr] Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 90
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 0
PROTOCOL SOLUTIONS GROUP
3385
SCOTT BLVD
S
ANTA CLARA, CA 95054
CATC Scripting Language
Reference Manual
for
CATC
USB Analyzers
A Scripting Language for Voyager, Advisor T3, and
CATC USBTracer, USBMobile, and USBAdvisor
USB Protocol Analyzers
Manual Version 1.1
For all software versions
December 2010
Vue de la page 0
1 2 3 4 5 6 ... 89 90

Résumé du contenu

Page 1 - USB Analyzers

PROTOCOL SOLUTIONS GROUP 3385 SCOTT BLVD SANTA CLARA, CA 95054 CATC Scripting Language Reference Manual for CATC USB Analyzers A Scripting L

Page 2 - Copyright

4CHAPTER 2CATC Scripting Language for USB ValuesEscape SequencesThese are the available escape sequences in CSL:ListsA list can hold zero or more piec

Page 3 - TABLE OF CONTENTS

5CHAPTER 2CATC Scripting Language for USB Valuesresult = null;VariablesVariables are used to store information, or data, that can be modified. A varia

Page 4

6CHAPTER 2CATC Scripting Language for USB Valueswill create a local variable called Local, which will only be visible within thefunction Function. Add

Page 5

7CHAPTER 3CATC Scripting Language for USB ExpressionsCHAPTER 3: EXPRESSIONSAn expression is a statement that calculates a value. The simplest type of

Page 6

8CHAPTER 3CATC Scripting Language for USB Expressionsx=10Value_of_x = select {x<5:"Lessthan 5";x>=5:"Greater than or equal to 5&q

Page 7 - CHAPTER 1: INTRODUCTION

9CHAPTER 4CATC Scripting Language for USB OperatorsCHAPTER 4: OPERATORSAn operator is a symbol that represents an action, such as addition or subtract

Page 8 - CHAPTER 1

10CHAPTER 4CATC Scripting Language for USB OperatorsThe associative operator () is used to group parts of the expression, forcing thoseparts to be eva

Page 9 - CHAPTER 2: VALUES

11CHAPTER 4CATC Scripting Language for USB Operators=+=-=*=/=%=>>=<<=&=^= |=Right to leftOperator Symbol AssociativityTable 4.1: Opera

Page 10 - Raw Bytes

12CHAPTER 4CATC Scripting Language for USB OperatorsOperatorSymbolDescriptionOperandTypesResultTypesExamplesIndex Operator[] Index orsubscriptRaw Byte

Page 11 - Variables

13CHAPTER 4CATC Scripting Language for USB OperatorsEquality Operators== Equal Integer-integer Integer 2==2String-string Integer "three" ==

Page 12 - Constants

CATC Scripting Language for USB LeCroy Corporation ii Document Disclaimer The information contained in this document has been carefully chec

Page 13 - CHAPTER 3: EXPRESSIONS

14CHAPTER 4CATC Scripting Language for USB OperatorsBitwise Logical Operators~ BitwisecomplementInteger-integer Integer ~0b11111110 = 0b00000001&

Page 14 - CHAPTER 3

15CHAPTER 4CATC Scripting Language for USB OperatorsAssignment Operators (continued)&= Bitwise ANDassignmentInteger-integer Integer a = 0b11111110

Page 15 - CHAPTER 4: OPERATORS

16CHAPTER 4CATC Scripting Language for USB Operators

Page 16 - CHAPTER 4

17CHAPTER 5CATC Scripting Language for USB CommentsCHAPTER 5: COMMENTSComments may be inserted into scripts as a way of documenting what the scriptdoe

Page 17

18CHAPTER 5CATC Scripting Language for USB Comments

Page 18 - Arithmetic Operators

19CHAPTER 6CATC Scripting Language for USB KeywordsCHAPTER 6: KEYWORDSKeywords are reserved words that have special meanings within the language. They

Page 19 - Logical Operators

20CHAPTER 6CATC Scripting Language for USB Keywords

Page 20 - Assignment Operators

21CHAPTER 7CATC Scripting Language for USB StatementsCHAPTER 7: STATEMENTSStatements are the building blocks of a program. A program is made up of lis

Page 21 - List Operators

22CHAPTER 7CATC Scripting Language for USB Statementsif(3-3||2-2)Trace ( "Yes" );else Trace ( "No" );will cause “No” to be printed

Page 22

23CHAPTER 7CATC Scripting Language for USB StatementsThe examplefor(x=2;x<5;x=x+1)Trace ( x, "\n" );would output234The example above work

Page 23 - CHAPTER 5: COMMENTS

iiiCATC Scripting Language for USB Table of ContentsTABLE OF CONTENTSTableofContents ... iii1 Introduction ...

Page 24 - CHAPTER 5

24CHAPTER 7CATC Scripting Language for USB StatementsTrace ( HiThere() );...HiThere(){a = "Hi there";return a;b = "Goodbye";return

Page 25 - CHAPTER 6: KEYWORDS

25CHAPTER 7CATC Scripting Language for USB Statements...<last_statement>;}An example of a compound statement is{x=2;x+3;}It's also possible

Page 26 - CHAPTER 6

26CHAPTER 7CATC Scripting Language for USB Statements

Page 27 - CHAPTER 7: STATEMENTS

27CHAPTER 8CATC Scripting Language for USB PreprocessingCHAPTER 8: PREPROCESSINGThe preprocessing command %include can be used to insert the contents

Page 28 - CHAPTER 7

28CHAPTER 8CATC Scripting Language for USB Preprocessing

Page 29

29CHAPTER 9CATC Scripting Language for USB ContextCHAPTER 9: CONTEXTThe context is the mechanism by which transaction data is passed in and out of the

Page 30 - Compound Statements

30CHAPTER 9CATC Scripting Language for USB Context

Page 31

31CHAPTER 10CATC Scripting Language for USB FunctionsCHAPTER 10: FUNCTIONSA function is a named statement or a group of statements that are executed a

Page 32

32CHAPTER 10CATC Scripting Language for USB Functionsthe parameter x will be assigned to 1, and the parameter y will be assigned to null,resulting in

Page 33 - CHAPTER 8: PREPROCESSING

33CHAPTER 11CATC Scripting Language for USB PrimitivesCHAPTER 11: PRIMITIVESPrimitive functions are called similarly to regular functions, but they ar

Page 34 - CHAPTER 8

ivCATC Scripting Language for USB Table of Contents8 Preprocessing ...279 Context ...

Page 35 - CHAPTER 9: CONTEXT

34CHAPTER 11CATC Scripting Language for USB PrimitivesCommentsFormat is used to control the way that arguments will print out. The format stringmay co

Page 36 - CHAPTER 9

35CHAPTER 11CATC Scripting Language for USB Primitives• A space will insert a space before a positive signed integer. This only works with theconversi

Page 37 - CHAPTER 10: FUNCTIONS

36CHAPTER 11CATC Scripting Language for USB Primitivesresult = C # The result is given inhexadecimal. The result in binary is 1100.In the call to GetN

Page 38 - CHAPTER 10

37CHAPTER 11CATC Scripting Language for USB PrimitivesResolve()Resolve( <symbol_name string>)Return valueThe value of the symbol. Returns null i

Page 39 - CHAPTER 11: PRIMITIVES

38CHAPTER 11CATC Scripting Language for USB Primitives

Page 40 - Format Conversion Characters

39CHAPTER 12CATC Scripting Language for USB Decoder PrimitivesCHAPTER 12: DECODERPRIMITIVESAbort()Abort()Return valueAn integer that should be passed

Page 41 - GetNBits()

40CHAPTER 12CATC Scripting Language for USB Decoder PrimitivesReturn valueNone.CommentsAdds a display cell to the current output context. Cells are di

Page 42 - NextNBits()

41CHAPTER 12CATC Scripting Language for USB Decoder PrimitivesAddCell( "Warning", "Value5", "Warning cell",0x00BB22, _WA

Page 43 - Resolve()

42CHAPTER 12CATC Scripting Language for USB Decoder PrimitivesExample# Creates a data cell with 2 dwords (32-bit integers)of data.AddDataCell( '0

Page 44 - CHAPTER 11

43CHAPTER 12CATC Scripting Language for USB Decoder PrimitivesAddSeparator()AddSeparator(<additional_info any>, ...)Return valueNone.CommentsCre

Page 45 - PRIMITIVES

vCATC Scripting Language for USB Table of Contents14USBDecoders...55DecoderFiles ...

Page 46 - CHAPTER 12

44CHAPTER 12CATC Scripting Language for USB Decoder PrimitivesReturn valueNone.CommentsBegins a cell block and adds a block header cell. This is a spe

Page 47 - AddDataCell()

45CHAPTER 12CATC Scripting Language for USB Decoder Primitives# This cell will be displayed when the red group iscollapsed:AddCell( "Red is"

Page 48 - AddEvent()

46CHAPTER 12CATC Scripting Language for USB Decoder PrimitivesThe output of the example is:Complete()Complete()Return valueAn integer that should be p

Page 49 - BeginCellBlock()

47CHAPTER 12CATC Scripting Language for USB Decoder PrimitivesEndCellBlock()EndCellBlock()Return valueNone.CommentsEnds a cell block that was started

Page 50

48CHAPTER 12CATC Scripting Language for USB Decoder PrimitivesPeekNBits()PeekNBits(<bit_count integer>)Return valueNone.CommentsReads bit_count

Page 51

49CHAPTER 12CATC Scripting Language for USB Decoder PrimitivesReturn valueAn integer that should be passed back to the application unchanged.CommentsT

Page 52 - Complete()

50CHAPTER 12CATC Scripting Language for USB Decoder Primitives

Page 53 - GetBitOffset()

51CHAPTER 13CATC Scripting Language for USB ModulesCHAPTER 13: MODULESModules are a collection of functions and global data dedicated to decoding acer

Page 54 - Pending()

52CHAPTER 13CATC Scripting Language for USB ModulesModule DataThere are several standard global variables that should be defined in a modulewhich are

Page 55 - Reject()

53CHAPTER 13CATC Scripting Language for USB ModulesIconOptional. File name of an icon to display on the toolbar. Must be a 19x19 pixelbitmap file.Exam

Page 56

viCATC Scripting Language for USB Table of ContentsPrepareZeroFieldForDlg() ...67PrepareFieldForDlgExt() ...

Page 57 - CHAPTER 13: MODULES

54CHAPTER 13CATC Scripting Language for USB Modules

Page 58 - Module Data

55CHAPTER 14CATC Scripting Language for USB USB DecodersCHAPTER 14: USB DECODERSDecoding scripts for the CATC USB Analyzers can now be written in the

Page 59 - CHAPTER 13

56CHAPTER 14CATC Scripting Language for USB USB DecodersWhen UsbScriptDecodeType=1, the decoding for the colored fields of the tracedisplay are handle

Page 60

57CHAPTER 14CATC Scripting Language for USB USB DecodersUsbEndpTypeVal ue s: “Bulk” or “Interrupt”. Used to distinguish transfer types of theendpoints

Page 61 - CHAPTER 14: USB DECODERS

58CHAPTER 14CATC Scripting Language for USB USB Decodersthe Mass Storage Class provides for Protocol 0x50 for Bulk-Only Trans-port, and Protocol 0 for

Page 62 - CHAPTER 14

59CHAPTER 14CATC Scripting Language for USB USB DecodersUsbReqStrValue: This will contain the string you build up for the Request portion ofthe Reques

Page 63

60CHAPTER 14CATC Scripting Language for USB USB DecodersUsbDecExtraInfoBytePosValue: The byte offset in this transfer where the information byte poten

Page 64

61CHAPTER 14CATC Scripting Language for USB USB Decoders...tooltip = normal_tooltip + WARNING_SIGN +error_tooltip;Add...Cell( caption, value, tooltip,

Page 65

62CHAPTER 14CATC Scripting Language for USB USB Decodersset Global_BitField_offset = 0; # global variablethat contains the offset, in bits, from the b

Page 66

63CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsSaves the global field settings. Can be used in conjunction withRestoreFieldSettings()

Page 67 - Global Variables

1CHAPTER 1CATC Scripting Language for USB IntroductionCHAPTER 1: INTRODUCTIONCATC Scripting Language (CSL) was developed to create scripts that would

Page 68 - Common Functions

64CHAPTER 14CATC Scripting Language for USB USB DecodersExampleval = Find(AttrIDValue_Table, PacketType);ShowDataBlock()ShowDataBlock(len, no_cells)Co

Page 69

65CHAPTER 14CATC Scripting Language for USB USB DecodersExampleif(in.Expanded) Warning("Bad value", "This is exampleof Warning-cell.&qu

Page 70

66CHAPTER 14CATC Scripting Language for USB USB DecodersAddSimplePLCell("LID", Format("%d", LID_number ),tooltip + AddWarningToolt

Page 71

67CHAPTER 14CATC Scripting Language for USB USB DecodersExampleIncFieldOffset( 64 );PrepareFieldForDlg()PrepareFieldForDlg(field_name, str_value, tool

Page 72 - IncFieldOffset(len)

68CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsZeroField means that the field to be added to out.FieldsList is not a datafield. Rathe

Page 73 - and field length

69CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsWrites passed data to out.FieldList as a special field called ‘CAPTION’.ExampleAddCapt

Page 74 - AddCaptionToDlg()

70CHAPTER 14CATC Scripting Language for USB USB DecodersExampleAddDataBlockToDlg(72);CheckBadDataLength()CheckBadDataLength()CommentsChecks offset fro

Page 75

71CHAPTER 14CATC Scripting Language for USB USB DecodersExamplePeekNBits_(16);GetNBits_()GetNBits_(offset, len)CommentsThis is a redefinition of the G

Page 76

72CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsExtracts a bit (bit_needed)fromsource.ExampleGetBit(3, peek_value);AddCaptionCell()Add

Page 77 - Comments

73CHAPTER 14CATC Scripting Language for USB USB DecodersAddPayLoadCell()AddPayLoadCell(caption, text, tooltip, addparam)CommentsDraws a payload cell.

Page 78

2CHAPTER 1CATC Scripting Language for USB Introduction

Page 79

74CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsDraws a monocolor cell that is similar to the usual payload cell except that both theu

Page 80

75CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsUsed to begin new group of cells and a table in dialog view that allows the tooltipto

Page 81

76CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsCreates a monocolored cell. It is intended to be used to start a new group of cellsand

Page 82

77CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsCreates a monocolored cell. It is intended to be used to start a new group of cellsbut

Page 83

78CHAPTER 14CATC Scripting Language for USB USB DecodersAddSimpleCellMonoCap()AddSimpleCellMonoCap(caption, text, tooltip, addparam)CommentsA ‘simple’

Page 84

79CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsUsed instead of AddPayLoadCell() for cells in group. ‘Block’ payload cellsuse view set

Page 85

80CHAPTER 14CATC Scripting Language for USB USB DecodersComments‘Block’ payload cells use view settings contained in global view setting variableVS. T

Page 86

81CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsUsed to start a new group of cells and table in dialog view, similarly toAddPLCellMono

Page 87

82CHAPTER 14CATC Scripting Language for USB USB DecodersCommentsUsed to determine whether an item defined with view_setting is shown.ExampleShowDataBl

Page 88

83CHAPTER 14CATC Scripting Language for USB USB Decoders(UnsignedCompare(AttModifier, low_limit) < 0) ||(UnsignedCompare(AttModifier, high_limit) &

Page 89 - from beginning of

3CHAPTER 2CATC Scripting Language for USB ValuesCHAPTER 2: VALUESThere are five value types that may be manipulated by a script: integers, strings,lis

Page 90 - How to Contact LeCroy

CATC Scripting Language for USB LeCroy Corporation 84 How to Contact LeCroy Type of Service Contract Call for technical support… US and Cana

Commentaires sur ces manuels

Pas de commentaire