接口 IMailboxProtocol
public interface IMailboxProtocol
邮箱协议统一接口 (对齐 C#
Unified mailbox protocol interface (aligned with C#
IMailboxProtocol).
Unified mailbox protocol interface (aligned with C#
IMailboxProtocol).
实现类 / Implementations: CoE, FoE, SoE, AoE, EoE, VoE, FSoE.
-
方法概要
修饰符和类型方法说明long最后一次邮箱事务的协议层错误码 (CoE=SDO Abort, FoE=FoE Error, SoE=SoE Error, 等). 0 表示无错误或不适用.最后一次邮箱事务的统一状态.协议名称 ("CoE" / "FoE" / "SoE" / "AoE" / "EoE" / "VoE" / "FSoE").byte协议类型 (ECT_MBXT_*): AoE=0x01, EoE=0x02, CoE=0x03, FoE=0x04, SoE=0x05, FSoE=0x08, VoE=0x0F.邮箱统计快照 (当前会话). native 层未就绪时返回MailboxStatistics.empty().boolean从站是否支持本协议 (通常读 SII mbx_proto 位).void重置邮箱统计计数器. native 层未就绪时为 no-op.
-
方法详细资料
-
getProtocolType
byte getProtocolType()协议类型 (ECT_MBXT_*): AoE=0x01, EoE=0x02, CoE=0x03, FoE=0x04, SoE=0x05, FSoE=0x08, VoE=0x0F.
Protocol type constant (ECT_MBXT_*). -
getProtocolName
String getProtocolName()协议名称 ("CoE" / "FoE" / "SoE" / "AoE" / "EoE" / "VoE" / "FSoE").
Protocol name literal. -
isSupported
boolean isSupported()从站是否支持本协议 (通常读 SII mbx_proto 位).
Whether the slave supports this mailbox protocol (usually via SII mbx_proto bits). -
getLastStatus
MailboxStatus getLastStatus()最后一次邮箱事务的统一状态. 初始为MailboxStatus.PENDING.
Status of the most recent mailbox transaction; initial value isMailboxStatus.PENDING. -
getLastErrorCode
long getLastErrorCode()最后一次邮箱事务的协议层错误码 (CoE=SDO Abort, FoE=FoE Error, SoE=SoE Error, 等). 0 表示无错误或不适用.
Protocol-level error code of the last transaction (CoE SDO abort, FoE error code, SoE error, etc.). Zero means no error or not applicable. -
getStatistics
MailboxStatistics getStatistics()邮箱统计快照 (当前会话). native 层未就绪时返回MailboxStatistics.empty().
Mailbox statistics snapshot. ReturnsMailboxStatistics.empty()when the native bindings are not yet available. -
resetStatistics
void resetStatistics()重置邮箱统计计数器. native 层未就绪时为 no-op.
Reset mailbox statistics counters. A no-op when the native bindings are not yet available.
-