Layer1PacketEncoder<P> class
abstract
第一层(Layer1)数据包编码器抽象接口(通用)
说明:
- 采用泛型参数以避免与具体协议模型绑定
- P 表示第一层数据包模型类型(例如某协议的 Packet 类型)
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
calculateChecksum(
List< int> data) → int - 计算数据的校验和
-
encode(
P packet) → List< int> - 将包模型 P 编码为字节序列
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requiresLongFrame(
P packet) → bool - 根据包模型 P 判断是否需要使用长帧模式(如协议支持)
-
toString(
) → String -
A string representation of this object.
inherited
-
validatePacket(
P packet) → void - 验证包模型 P 的有效性
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited