当前位置:网站首页>CAPL学习之路-以太网函数
CAPL学习之路-以太网函数
2022-06-22 03:43:00 【jasonj33】
对象
可以定义多种以太网相关的对象类型,和定义数据类型一样
ethernetErrorPacket
定义一条以太网错误帧,用在on ethernetErrorPacket里,当接收到错误帧时,就可以赋值给它,然后读取错误帧的某些信息
- 语法
ethernetErrorPacket gErrorPacket
- 属性

可以在外部定义,在“on ethernetErrorPacket *”里用this赋值给它,这样就可以获取它的属性了。或者可以直接在“on ethernetErrorPacket *”里用this获取属性
ethernetPacket
创建以太网数据包对象,通过属性来设置或获取以太网数据包数据,包括报文协议层里的字段
创建ethernetPacket对象,设置属性里的字段,调用函数,可以组装自己想要的以太网报文
示例:
ethernetPacket txPacket;
int i;
txPacket.msgChannel = 1;
txPacket.source =边栏推荐
猜你喜欢

Fluentd语法配置

Cloud native architecture (02) - what is cloud native

Beifu TwinCAT sets the scanning cycle and operation cycle method of PLC

Mysql 45讲学习笔记(一)一条sql语句的执行

How to implement dart asynchrony

3DE position of moving object

Intranet penetration

Larave 数据库备份 定时任务

SSM住院管理系统

Wireshark packet analysis Wireshark 0051 pcap
随机推荐
Mqtt of NLog custom target
How to implement dart asynchrony
Replacement has 2 rows, data has 0, to solve how R language dynamically generates dataframes
Beifu twincat3 ads error query list
LOCAL=NO
svn高效管理怎么实现
Sword finger offer 68 - I. nearest common ancestor of binary search tree
Force buckle: implement a queue with two stacks
NLog自定义Target之MQTT
云原生架构(03)-架构
Seven thousand word explanation of Alibaba cloud's new generation cloud computing architecture cipu
Dart异步是怎么实现
Beifu TwinCAT sets the scanning cycle and operation cycle method of PLC
TCL华星发布全球首款0.016Hz超低频OLED穿戴设备屏
Quickly master asp Net authentication framework identity - user registration
SSM based blog system [with background management]
Pointer and pointer of pointer
【第23天】给定一个长度为 n 的数组,返回删除第 X 位元素后的数组 | 数组删除操作
Invalid character found in request destination. Valid characters are defined in RFC 7230 and RFC 3986
How to write a detailed and professional software function test report