Vector - CAPL - CAPL编程常见关键字说明

本文介绍了CAPL编程中的关键字,如symbol和P-blocks,以及CAN总线的相关概念,包括接受过滤、错误状态(如ActiveState和BusOffState)以及数据帧和错误帧。此外,还提到了CANoe和CANalyzer工具在CAN网络开发和分析中的应用。
摘要由CSDN通过智能技术生成

        每一门计算语言都会有它们各自的特色,也会有一些专用的关键字、关键词,我们想要更好的学习、去编辑开发这门语言,第一步我们就需要去了解、去学习它们一些专用的关键字和词,今天我们主要介绍下这CAPL开发常见的一些关键字词。

CAPL关键字

CAPL关键字 英文解释中文解释
* symbolA wildcard symbol used to replace the parameter(s) in an on key or on message event procedure to represent all keys or all message respectively. For example, all keystrokes on the keyboard will execute this one and only on key event procedure:
on key *
{
...
}

P-blocks (program blocks in CANoe and CANalyzer), by default, stop the message traffic unless an on message event procedure is defined to pass all the messages like this:
on message *
{
  output(this);
}
“一种通配符,用于替换按键或消息事件过程中的参数,分别表示所有按键或所有消息。例如,键盘上的所有击键都将执行此且仅在按键事件过程中:
on key *
{
  ...
}
默认情况下,P 块(CANoe 和 CANalyzer 中的程序块)会停止消息流量,除非定义消息事件过程来传递所有消息,如下所示:
在消息中 *
on message *
{
  output(this);
}
Acceptance filterAcceptance filtering implements a pair of mask and code which allow message objects (hardware buffers) to receive messages with a range of IDs instead of all or no IDs. This gives the application the flexibility to receive a wide assortment of specific messages from the bus.
Because of just one pair of mask and code, unwanted message IDs may still pass the hardware filtering; therefore, these unwanted messages have to be filtered in the software application (CANalyzer or CANoe).
The controller observes all messages on the CAN bus and stores any message that matches the pair of mask and code. It is possible to accept just one ID, no IDs, or all IDs.
接受过滤实现了一对掩码和代码,允许消息对象(硬件缓冲区)接收具有一系列 ID(而不是所有 ID 或没有 ID)的消息。 这使应用程序能够灵活地从总线接收各种特定消息。
由于只有一对掩码和代码,不需要的消息ID仍然可能通过硬件过滤; 因此,必须在软件应用程序(CANalyzer 或 CANoe)中过滤这些不需要的消息。
控制器观察 CAN 总线上的所有消息并存储与掩码和代码对匹配的任何消息。 可以只接受一个 ID,也可以不接受任何 ID,也可以接受所有 ID。
Acknowledge
(ACK)
CAN provides a global acknowledge field which tells the transmitter that at least one - although not saying how many or which ones - of the network nodes received the message properly, or, alternatively, that none were received. This field is simply one bit in the CAN message. Because CAN is based on broadcast communication, all nodes must respond with an acknowledged signal if they have not detected an error.CAN 提供了一个全局确认字段,它告诉发送器至少有一个(尽管没有说明有多少个或哪些)网络节点正确接收到了消息,或者没有收到任何消息。 该字段只是 CAN 消息中的一位。 由于 CAN 基于广播通信,因此如果没有检测到错误,所有节点都必须以确认信号进行响应。
Active State1. The state of a CAN controller after it is initialized, and whenever the transmit and receive error counters are less than or equal to 95. The error counters are incremented accordingly due to the type of error frames. If either error counters exceed 95, the CAN controller is in the Warning Limit State, follow by the Passive State, and finally Bus Off State.
2. The electrical state of a bus wire that results when one or more nodes transmit the "dominant" bus condition by "turning on" their physical layer transmit circuit. Alternate names: Active, Dominant. Refer to the designated physical layer specification for signal levels.
1. CAN 控制器初始化后的状态,每当发送和接收错误计数器小于或等于 95 时。错误计数器根据错误帧的类型相应递增。 如果任一错误计数器超过 95,则 CAN 控制器处于警告限制状态,然后是被动状态,最后是总线关闭状态。
2. 当一个或多个节点通过“打开”其物理层发送电路来发送“主导”总线状况时产生的总线线路的电气状态。 别名:活跃、主导。 有关信号电平,请参阅指定的物理层规范。
Analysis blockThe Analysis Branch of the Measurement Setup window in both CANalyzer and CANoe contains six analysis blocks by default, each responsible for its analysis functions. For example, the Graphics block is an analysis block that is used to graph received signals. The analysis blocks come with its own window except the Logging block that is only used for logging bus traffic.CANalyzer 和 CANoe 中测量设置窗口的分析分支默认包含六个分析块,每个分析块负责其分析功能。 例如,图形模块是一个分析模块,用于绘制接收信号的图形。 除了仅用于记录总线流量的记录块之外,分析块都有自己的窗口。
APIApplication Programmable Interface.
The calling conventions (Interface) by which an application program gains access to system resources and other services, often for the purpose of sending and receiving data. An API is defined at the source code level and provides a level of abstraction between the application and the kernel (or other privileged utilities) to ensure the portability of the code.
应用程序可编程接口。
应用程序访问系统资源和其他服务的调用约定(接口),通常用于发送和接收数据。 API 在源代码级别定义,并在应用程序和内核(或其他特权实用程序)之间提供抽象级别,以确保代码的可移植性。
Array1. A program data structure that contains a fixed maximum number of elements of the same data type which are referenced directly by means of an index, or subscript. The elements in a multidimensional array are ordered on N dimensions (N >= 1). Each element is accessed by N indices, each of which represents the element’s position within that dimension. Arrays are used in Vector’s CAPL as if they are used in C.
2. Another name for a matrix, which is an array of quantities or elements in a prescribed form. A matrix is usually capable of being subject to a mathematical operation using an operator or another matrix. A matrix of circuit elements can be capable of performing functions such as code conversion. The matrix elements may be diodes, transistors, magnetic cores, or other binary devices.
1. 一种程序数据结构,包含固定最大数量的相同数据类型的元素,这些元素通过索引或下标直接引用。 多维数组中的元素在 N 维 (N >= 1) 上排序。 每个元素由 N 个索引访问,每个索引代表该元素在该维度内的位置。 数组在 Vector 的 CAPL 中使用就像在 C 中使用一样。
2. 矩阵的别称,是按规定形式排列的数量或元素的数组。 矩阵通常能够使用运算符或另一个矩阵进行数学运算。 电路元件矩阵能够执行诸如代码转换之类的功能。 矩阵元件可以是二极管、晶体管、磁芯或其他二进制器件。
ASCIIAmerican Standard Code for Information Interchange.
A seven-bit code, intended as a U.S. standard (ANSI X3.4) for interchanging information among communications devices. The code represents characters as binary numbers, used on most microcomputers, computer terminals, and printers. In addition to printable characters, the ASCII code includes control characters to indicate carriage return, backspace, and so on. The first 32 values are reserved for control codes, with the remaining 96 available for graphics (alphabetic, numeric, and special characters). Several 8-bit variants exist; see ISO 646.
美国标准信息交换码。
七位代码,旨在作为美国标准 (ANSI X3.4),用于在通信设备之间交换信息。 该代码将字符表示为二进制数,用于大多数微型计算机、计算机终端和打印机。 除了可打印字符之外,ASCII 代码还包括表示回车、退格等的控制字符。 前 32 个值保留用于控制代码,其余 96 个可用于图形(字母、数字和特殊字符)。 存在多种 8 位变体; 参见 ISO 646。
AttributeA common characteristic of a database object (network, node, message, signal, environment variable, and so on.) that is used to represent the relationship of that object type. An attribute is defined by its name, data type, value range, and default value.数据库对象(网络、节点、消息、信号、环境变量等)的共同特征,用于表示该对象类型的关系。 属性由其名称、数据类型、值范围和默认值定义。
Baud rateThe total number of bits transmitted per unit of time.每单位时间传输的总位数。
BitA single digit in the binary (base-2) number system (binary digit). A single character in a binary number.
These digits are represented electronically in the computer by pulses of electricity. These pulses are generated by electric circuits, which are either on or off. Usually a circuit that is on represents the binary number 1, while a circuit that is off represents the number 0. One bit is thus a single pulse in a coded group of pulses. Combinations of enough of these 1s and 0s can represent any kind of data.
二进制(以 2 为基数)数字系统中的单个数字(二进制数字)。 二进制数中的单个字符。
这些数字在计算机中通过电脉冲以电子方式表示。 这些脉冲由打开或关闭的电路产生。 通常,打开的电路代表二进制数 1,而关闭的电路代表数字 0。因此,一位是编码脉冲组中的单个脉冲。 足够多的 1 和 0 的组合可以代表任何类型的数据。
BusA set of conductor logic lines (wires, PCB tracks, parallel circuit or connectors in an integrated circuit) that transfers data by electric impulses as logic signals from one connected component or functional unit to any other.
Another word for data transfer medium or physical layer.
一组导体逻辑线(电线、PCB 轨道、并行电路或集成电路中的连接器),通过电脉冲将数据作为逻辑信号从一个连接的组件或功能单元传输到任何其他组件或功能单元。
数据传输介质或物理层的另一种说法。
Bus Off StateA CAN controller state that occurs when the Transmit Error Counter (TEC) reaches a value of 256. This transition is usually caused by controller failure or extreme error bursts resulted in error frames. The CAN controller within this state is disconnected from the bus by setting it in a state of high resistance. During this condition, the CAN controller can be reset by the application (usually after certain amount of idle time) or by a hardware reset. The reset will set the transmit and receive error counter to zero and the CAN controller state to be Active (see Active State). The hardware interface cards used by CANalyzer and CANoe can only be reset when the measurement is restarted in the software. Another method is by calling either the resetCAN() or resetCANEx() functions in CAPL.当传输错误计数器 (TEC) 达到值 256 时出现的 CAN 控制器状态。这种转换通常是由控制器故障或导致错误帧的极端错误突发引起的。 在此状态下,CAN 控制器通过将其设置为高阻状态来与总线断开。 在此情况下,CAN 控制器可以通过应用程序(通常在一定量的空闲时间之后)或通过硬件重置来重置。 复位会将发送和接收错误计数器设置为零,并将 CAN 控制器状态设置为活动(请参阅活动状态)。 CANalyzer和CANoe使用的硬件接口卡只有在软件中重新启动测量时才能重置。 另一种方法是调用CAPL 中的resetCAN() 或resetCANEx() 函数。
ByteA group of 8 bits, representing any of 256 values. A byte may represent a single binary number, 8 bits of a longer binary number, two decimal digits, one decimal digit with plus or minus sign, or a graphic character (for example, a letter, a number or any symbol).
A standard CAN message contains anywhere from 0 byte to a maximum of 8 bytes.
一组 8 位,代表 256 个值中的任意一个。 一个字节可以表示单个二进制数、8 位的较长二进制数、两位十进制数字、一位带有加号或减号的十进制数字或一个图形字符(例如,字母、数字或任何符号)。
标准 CAN 消息包含从 0 字节到最多 8 字节的任意字节。
CANThe Controller Area Network (CAN) is a serial communications protocol that efficiently supports distributed real-time control with a very high level of data integrity.控制器局域网 (CAN) 是一种串行通信协议,可有效支持具有极高数据完整性的分布式实时控制。
CAN controllerThe chip or integrated silicon (with the microcontroller) that processes the CAN protocol. It interconnects the microcontroller to the Physical Layer.处理 CAN 协议的芯片或集成芯片(带有微控制器)。 它将微控制器与物理层互连。
CAN_HThe CAN_H bus wire of a differential connection is fixed to a mean voltage level during the recessive state and is driven in a positive voltage direction during the dominant bit state.差分连接的 CAN_H 总线线在隐性状态期间固定为平均电压电平,并在显性位状态期间沿正电压方向驱动。
CAN_LThe CAN_L bus wire of a differential connection is fixed to a mean voltage level during the recessive state and is driven in a negative voltage direction during the dominant bit state.差分连接的 CAN_L 总线线路在隐性状态期间固定为平均电压电平,并在显性位状态期间沿负电压方向驱动。
CANalyzerA powerful tool use to observe, analyze, and supplement data traffic on a distributed CAN network.一个强大的工具,用于观察、分析和补充分布式 CAN 网络上的数据流量。
CANdb1. First generation database editor before CANdb++ use to build *.dbc files.
2. The formats of a *.dbc file. Sometime Vector’s database (*.dbc) files are called CANdb files.
1. CANdb++之前的第一代数据库编辑器用于构建*.dbc文件。
2. *.dbc 文件的格式。 有时 Vector 的数据库 (*.dbc) 文件称为 CANdb 文件。
CANdb++A database editor used to build or modify database (*.dbc) files.用于构建或修改数据库 (*.dbc) 文件的数据库编辑器。
CANoeA powerful tool that supports the entire development process of distributed CAN networks, from planning to testing. It features model creation, simulation, functional testing and analysis.一个强大的工具,支持分布式 CAN 网络的整个开发过程,从规划到测试。 它具有模型创建、仿真、功能测试和分析的特点。
CAPLCAN Access Programming Language.
A programming language based on C used in CANoe and CANalyzer for node emulation and analysis.
CAN 访问编程语言。
CANoe和CANalyzer中使用的基于C的编程语言,用于节点仿真和分析。
CRCCyclic Redundancy Check.
A specialized 15-bit checksum (every message has this field) that provides the ability to detect serial communication transfer errors and increase the reliability of data transfers.
The CRC computation uses a digital serial data single bit error detection algorithm. It is derived from a cyclic redundancy code.
循环冗余校验。
专用的 15 位校验和(每条消息都有此字段),能够检测串行通信传输错误并提高数据传输的可靠性。
CRC 计算使用数字串行数据单位错误检测算法。 它源自循环冗余码。
Data frameA standard (11-bit ID) or extended (29-bit ID) message frame that carries 0 to 8 bytes of data. An extended message may consist of more than one data frame because it has more than 8 data bytes. A data frame cannot exceed 8 data bytes.携带 0 到 8 字节数据的标准(11 位 ID)或扩展(29 位 ID)消息帧。 扩展消息可能包含多个数据帧,因为它具有超过 8 个数据字节。 一个数据帧不能超过8个数据字节。
Data Length Code
(DLC)
A 4-bit field within the Control Field that defines the number of data bytes in a CAN data frame.
The DLC bits can code data lengths from 0 to 8 bytes; other values are not permitted.
控制字段中的 4 位字段,定义 CAN 数据帧中的数据字节数。
DLC位可以编码0到8字节的数据长度; 不允许使用其他值。
DatabaseA look-up table that symbolizes the data traffic on a CAN network. In a database, you can define the nodes, messages, signals, and their associations for a given CAN network.表示 CAN 网络上数据流量的查找表。 在数据库中,您可以定义给定 CAN 网络的节点、消息、信号及其关联。
ECUThe acronym for Electronic Control Unit. It consists of the microcontroller and all of the components comprising the functionality of a node.电子控制单元的缩写。 它由微控制器和构成节点功能的所有组件组成。
Environment variableVariables defined in a database that is capable of exchanging information between CAPL
programs, CAPL programs and user-defined panels, and CAPL programs and a third party application utilizing CANoe’s COM interface.
数据库中定义的变量能够在 CAPL 之间交换信息
程序、CAPL 程序和用户定义面板,以及 CAPL 程序和利用 CANoe COM 接口的第三方应用程序。
Error frameA frame responded to an error on the CAN bus with either six dominant bits or six recessive bits.帧用六个显性位或六个隐性位响应 CAN 总线上的错误。
EventAn action denoted by an object to code the response. Events are caused by a key pressed, a change in the CAN controller state, a message, and so forth.由对象表示的操作,用于对响应进行编码。 事件是由按下的按键、CAN 控制器状态的变化、消息等引起的。
Event procedureA block of CAPL code that is executed when an event occurs.
CAPL permits the definition of event procedures for several different kinds of events, such as on message, on key, on errorframe, on timer, etc.
事件发生时执行的 CAPL 代码块。
CAPL 允许为几种不同类型的事件定义事件过程,例如消息、按键、错误帧、计时器等。
GatewayA node used to interconnect the transfer of data between two physically separate networks that use two different protocols. As differentiated from a bridge, a gateway acts as a protocol-to-protocol converter.用于在使用两种不同协议的两个物理上独立的网络之间互连数据传输的节点。 与网桥不同,网关充当协议到协议转换器。
Identifiers (ID)A field in a message that contains network address information. The 11 or 29-bit identifier is usually unique in a closed CAN network and is used to define a message and the data it carries.消息中包含网络地址信息的字段。 11位或29位标识符在封闭的CAN网络中通常是唯一的,用于定义消息及其携带的数据。
MessageA block of data (formatted into a collection of signals) transmitted over the CAN bus in one or more data frames. It is associated with a unique CAN identifier.在一个或多个数据帧中通过 CAN 总线传输的数据块(格式化为信号集合)。 它与唯一的 CAN 标识符相关联。
Network1. A distributed system capable of supporting communications between two or more nodes.
2. A method of interconnecting a collection of two or more distributed processing subsystems, devices, computers, sensors, and actuators with the intended purpose of sharing information.
1. 能够支持两个或多个节点之间通信的分布式系统。
2.一种将两个或多个分布式处理子系统、设备、计算机、传感器和执行器的集合互连起来以达到共享信息的目的的方法。
Node1. A key physical and functional element of a distributed embedded system, usually located within a module that supports the physical interconnection to a shared media and allows data communication according to a designated protocol.
2. An electronic subsystem or circuit used to interconnect a module to a network.
1. 分布式嵌入式系统的关键物理和功能元件,通常位于支持与共享媒体的物理互连并允许根据指定协议进行数据通信的模块内。
2. 用于将模块互连到网络的电子子系统或电路。
PanelA graphical interface built within the Panel Editor, used to provide user inputs to a CAPL program and/or to display data received from the CAN bus.面板编辑器中内置的图形界面,用于向 CAPL 程序提供用户输入和/或显示从 CAN 总线接收的数据。
Panel EditorAn editor used to build panels.用于构建面板的编辑器。
Passive StateA CAN controller state that arises when the TEC (transmit error counter) or REC (receive error counter) reaches or exceeds 128.当 TEC(发送错误计数器)或 REC(接收错误计数器)达到或超过 128 时出现的 CAN 控制器状态。
ProtocolA set of rules supporting the transfer of information between two entities, nodes, or OSI layers concerning the format and content of messages to be exchanged. In general, a protocol will govern the format of messages, the precedence among messages, generating checking information and flow control, as well as actions to be taken in the event of errors.一组规则,支持在两个实体、节点或 OSI 层之间传输有关要交换的消息的格式和内容的信息。 一般来说,协议将管理消息的格式、消息之间的优先级、生成检查信息和流控制,以及发生错误时要采取的操作。
Remote frameA message frame transmitted on the CAN bus to request the transmission of a Data Frame with the same identifier.在 CAN 总线上传输的消息帧,用于请求传输具有相同标识符的数据帧。
SignalIndependent data spaces that occupy the data field of a data frame. The size of a signal range from 1 bit to 32 bits.占据数据帧的数据字段的独立数据空间。 信号的大小范围为 1 位到 32 位。
This keywordA local variable used to reference the message within an on message event, the key within an on key event, and the environment variable within an ‘on envvar’ event.用于引用 on message 事件中的消息、on key 事件中的键以及“on envvar”事件中的环境变量的局部变量。
Time stampA time given by the CAN controller when a message changes state. The time stamp can reference when the message is transmitted, received, or requested to transmit.当消息改变状态时 CAN 控制器给出的时间。 时间戳可以参考消息何时被发送、接收或请求发送。
Transport protocolA set of rules to support information transfer by breaking long messages into a series of shorter messages to accommodate network protocol requirements. If the receiver is not capable of managing the entire transfer because of microcontroller resource limitations, some form of “flow control” mechanism may be appropriate to control the overall transfer process.通过将长消息分解为一系列较短消息来支持信息传输的一组规则,以适应网络协议要求。 如果接收器由于微控制器资源限制而无法管理整个传输,则某种形式的“流控制”机制可能适合控制整个传输过程。
Value tableUsed to assign symbolic names to signal or environment variable values.用于将符号名称分配给信号或环境变量值。
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

车载网络测试

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值