您现在的位置是:首页 > 教程 > CAPL编程手册
推荐星级:
  • 1
  • 2
  • 3
  • 4
  • 5

CAPL编程手册

更新时间:2019-11-13 22:03:36 大小:3M 上传用户:lwwbxj查看TA发布的资源 标签:CAPL 下载积分:2分 评价赚积分 (如何评价?) 打赏 收藏 评论(3) 举报

资料介绍

资料详细介绍CAPL编程手册相关的语法

部分文件列表

文件名 大小
CAPL编程手册.pdf 3M

部分页面预览

(完整内容请下载后查看)
CAPL Function Reference Manual  
CANalyzer  
CANoe  
the art of engineering  
CAPL Function Reference Manual  
November 23, 2004  
Second printing  
the art of engineering  
�� � � ��� � � �� � � � �  
Vector CANtech, Inc.  
Suite 550  
39500 Orchard Hill Place  
Novi, MI 48375  
USA  
Preface  
© 2004, 2005 Vector CANtech, Inc  
Novi, Michigan 48375 USA  
The authors and publishers have used their best efforts in preparing this book. These  
efforts include development, research, and testing of the theories, principles, and  
programming sample code so as to determine their effectiveness. The authors and/or  
publishers make no warranty, expressed or implied, with regard to the sample code  
or to any other documentation contained in this book. The authors and/or publishers  
shall not be liable in any event for incidental or consequential damages in connection  
with, or arising out of, the furnishing, performance, or use of the sample code or any  
of the contents of this book.  
All rights reserved.  
No part of this book may be reproduced, in any form or by any means, without  
express permission in writing from Vector CANtech, Inc.  
2
Preface  
Table of Contents  
CAPL Function Reference Manual....................................................................1  
Table of Contents..............................................................................................3  
Preface .................................................................................................................7  
About This Book................................................................................................7  
Organization......................................................................................................7  
Acknowledgments .............................................................................................7  
Tell Us What You Think!....................................................................................8  
Guide to the Use of This Book ..............................................................................9  
The Main Entry Function ...................................................................................9  
Obsolete............................................................................................................9  
Syntax ...............................................................................................................9  
Description ........................................................................................................9  
Parameter..........................................................................................................9  
Returns..............................................................................................................9  
Availability .......................................................................................................10  
Observation.....................................................................................................10  
Recommendation ............................................................................................10  
Branch Compatibility .......................................................................................10  
Related Functions ...........................................................................................11  
Example ..........................................................................................................11  
The CAPL Functions...........................................................................................12  
abs...............................................................................................................13  
atol...............................................................................................................14  
beep.............................................................................................................15  
callAllOnEnvVar...........................................................................................16  
cancelTimer .................................................................................................17  
canOffline.....................................................................................................18  
canOnline.....................................................................................................19  
canSetChannelAcc ......................................................................................20  
canSetChannelMode ...................................................................................21  
canSetChannelOutput..................................................................................22  
cos...............................................................................................................23  
elCount ........................................................................................................24  
enableControl ..............................................................................................25  
exp...............................................................................................................26  
fileClose.......................................................................................................27  
fileGetBinaryBlock .......................................................................................28  
fileGetString.................................................................................................29  
fileGetStringSZ ............................................................................................31  
fileName.......................................................................................................33  
filePutString .................................................................................................34  
fileReadArray...............................................................................................35  
fileReadFloat................................................................................................37  
FileReadInt ..................................................................................................38  
3
Preface  
FileReadString.............................................................................................39  
fileRewind ....................................................................................................41  
fileWriteBinaryBlock.....................................................................................42  
fileWriteFloat................................................................................................44  
fileWriteInt....................................................................................................45  
fileWriteString ..............................................................................................46  
getBusContext .............................................................................................47  
getBusNameContext....................................................................................48  
getCardType................................................................................................49  
getCardTypeEx............................................................................................50  
getChipType ................................................................................................52  
getDrift .........................................................................................................53  
getFirstCANdbName....................................................................................54  
getJitterMax .................................................................................................55  
getJitterMin ..................................................................................................56  
getLocalTime ...............................................................................................57  
getLocalTimeString......................................................................................58  
getMessageAttrInt........................................................................................59  
getMessageName........................................................................................60  
getNextCANdbName ...................................................................................61  
getProFileArray............................................................................................62  
getProFileFloat ............................................................................................64  
getProFileInt ................................................................................................66  
getProFileString...........................................................................................68  
getStartdelay................................................................................................70  
getValue.......................................................................................................71  
getValueSize................................................................................................72  
halt...............................................................................................................73  
inport............................................................................................................74  
inportLPT .....................................................................................................75  
inspect .........................................................................................................76  
isExtId..........................................................................................................77  
isStatisticAcquisitionRunning.......................................................................78  
isStdId..........................................................................................................79  
keypressed ..................................................................................................80  
ltoa...............................................................................................................81  
makeRGB ....................................................................................................82  
mkExtId........................................................................................................83  
msgBeep......................................................................................................84  
openFileRead ..............................................................................................85  
openFileWrite...............................................................................................86  
outport..........................................................................................................87  
outportLPT...................................................................................................88  
output...........................................................................................................89  
putValue.......................................................................................................90  
putValueToControl.......................................................................................91  
4
Preface  
random.........................................................................................................92  
replayResume..............................................................................................93  
replayStart ...................................................................................................94  
replayState...................................................................................................95  
replayStop....................................................................................................96  
replaySuspend.............................................................................................97  
resetCan ......................................................................................................98  
resetCanEx..................................................................................................99  
runError......................................................................................................100  
seqFileClose..............................................................................................101  
seqFileGetBlock.........................................................................................102  
seqFileGetLine...........................................................................................103  
seqFileGetLineSZ......................................................................................104  
seqFileLoad ...............................................................................................105  
seqFileRewind ...........................................................................................106  
setBtr .........................................................................................................107  
setBusContext ...........................................................................................108  
setCanCabsMode......................................................................................109  
setControlBackColor..................................................................................110  
setControlForeColor...................................................................................111  
setControlProperty.....................................................................................112  
setDrift .......................................................................................................113  
setFilePath.................................................................................................114  
setJitter ......................................................................................................115  
setLogFileName.........................................................................................116  
setMsgTime ...............................................................................................117  
setOcr ........................................................................................................118  
setPortBits .................................................................................................119  
setPostTrigger ...........................................................................................121  
setPreTrigger.............................................................................................122  
setStartDelay .............................................................................................123  
setTimer.....................................................................................................124  
setWriteDbgLevel ......................................................................................125  
setWritePath ..............................................................................................126  
sin..............................................................................................................127  
snprintf.......................................................................................................128  
sqrt.............................................................................................................129  
startLogging...............................................................................................130  
startStatisticAcquisition..............................................................................131  
stop............................................................................................................132  
stopLogging ...............................................................................................133  
stopStatisticAcquisition ..............................................................................134  
strlen..........................................................................................................135  
strncat........................................................................................................136  
strncmp......................................................................................................137  
strncpy .......................................................................................................138  
5
Preface  
swapDWord ...............................................................................................139  
swapInt ......................................................................................................140  
swapLong ..................................................................................................141  
swapWord..................................................................................................142  
sysExit .......................................................................................................143  
sysMinimize ...............................................................................................144  
timeDiff.......................................................................................................145  
timeNow.....................................................................................................146  
timeNowFloat.............................................................................................147  
trigger.........................................................................................................148  
valOfId .......................................................................................................149  
write ...........................................................................................................150  
writeClear...................................................................................................151  
writeCreate ................................................................................................152  
writeDbgLevel............................................................................................153  
writeDestroy...............................................................................................154  
writeEx.......................................................................................................155  
writeLineEx ................................................................................................156  
writeProFileFloat........................................................................................157  
writeProFileInt............................................................................................158  
writeProFileString ......................................................................................159  
writeTextBkgColor .....................................................................................160  
writeTextColor............................................................................................161  
writeToLog.................................................................................................162  
writeToLogEX ............................................................................................164  
Compatibility Chart............................................................................................166  
Availability Chart ...............................................................................................170  
6
Preface  
Preface  
The CAPL Functions Reference Manual presents a complete description of all 150 functions  
of the Vector CAN Application Programming Language (CAPL), the programming language  
foundation of Vector CANoe and CANalyzer – two of Vector's most popular development  
tools. CAPL is a rich, robust tool used to extend the power of CANoe and CANalyzer beyond  
the tool’s interfaces and to customize tool functionality to the user’s requirements.  
About This Book  
This book assumes that the programming experience level of the user includes individuals  
with some experience in the C programming language, in addition to those with C coding  
experience, who wish to use this as a reference book to CAPL functions.  
This material is suitable for college programs that focus on electrical engineering, computer  
engineering, computer science, distributed control systems and distributed embedded  
systems that use the CAN protocol. The target audience is engineering students, faculty,  
practicing engineers, and electronic technicians.  
Organization  
This book is organized into two major sections. The second section, the main section,  
consists of approximately one page devoted to every function in the CAPL programming  
language. It includes the syntax of the function, a description, any parameters, any value  
returned by the function, compatibility, references to related functions, and a code example of  
how the function is used ina CAPL program. The first section explains these sections in  
more detail.  
Acknowledgments  
The original creator of CAPL is Dr. Helmut Schelling, who also developed and authored the  
first compiler and first editor for the CAPL programming language.  
Jurgen Kluser incorporated the data structural elements of the CAPL programming language  
into the Vector CANdb database tool. Additionally, those who participated in continuing the  
development of the CAPL programming language equally deserve credit, and these  
individuals include Thomas Riegraf and the CANoe/CANalyzer development teams.  
On the authoring side, it is important to recognize several individuals who have made  
significant contributions to this book, including Jun Lin, Tom Guthrie, and Mike Alexander.  
Preface  
Tell Us What You Think!  
We believe that you, the reader, are the most important person of all, since it is you who will  
benefit from reading this book. We value your input, and we would like to know what we're  
doing right, what we could do better, what things you think are important that we haven't  
covered, and any other comments you might have.  
You can fax, e-mail or write us directly to let us know what you did or didn't like about this  
book – as well as what we can do to make our books better.  
When you write, please include the title of this book, as well as your name and phone or fax  
number. We will carefully review your comments and share them with the authors and editors  
who worked on the book.  
E-mail:  
Address: 39500 Orchard Hill Place Novi, MI USA 48375  
Fax: 248-449-9704  
8

全部评论(3)

  • 2021-05-28 14:59:20DeanandYaxi

    全英文版,有canoe这个软硬件的可以学一学,没有canoe这个东西的话,这文档,对你来说基本没有。

  • 2020-07-20 09:01:04heql

    是一直想找的资料

  • 2020-07-15 12:06:45asila7015

    有用

上传资源 上传优质资源有赏金

  • 打赏
  • 30日榜单

推荐下载