类 Structures.EcGroupConfigHelper

java.lang.Object
com.darra.ethercat.data.Structures.EcGroupConfigHelper
封闭类:
Structures

public static class Structures.EcGroupConfigHelper extends Object
组配置辅助方法 — 对应 C# EcGroupConfigHelper. 操作 主站状态.group_config_raw 中每组 20 字节的配置数据。

[审计修复 2026-05-20] 每组尺寸 8 → 20 字节, 与 C 端 (2026-04-24 扩展) / C# GroupConfigSize=20 同步. 补齐 per-group WKC 访问器 (offset 8/10/12/16). 布局: [enabled:1][cycle_divider:1][expected_wkc:2][slave_count:2] [frame_repeat_eligible:1][reserved:1][actual_wkc:2][consecutive_miss:2] [total_frames:4][mismatch_frames:4]

  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static int
    getGroupActualWKC(byte[] groupConfigRaw, int group)
    获取组实际 WKC (本周期 receive_processdata_group 结果, 小端).
    static int
    getGroupConsecutiveMiss(byte[] groupConfigRaw, int group)
    获取组连续 WKC 不足次数 (actual_wkc < expected_wkc, 小端).
    static int
    getGroupCycleDivider(byte[] groupConfigRaw, int group)
    获取组周期分频器
    static boolean
    getGroupEnabled(byte[] groupConfigRaw, int group)
    获取组是否启用
    static int
    getGroupExpectedWKC(byte[] groupConfigRaw, int group)
    获取组期望 WKC (小端)
    static boolean
    getGroupFrameRepeatEligible(byte[] groupConfigRaw, int group)
    获取组帧重复资格 (ETG.1500 5.4.3)
    static long
    getGroupMismatchFrames(byte[] groupConfigRaw, int group)
    获取组累计 WKC 不匹配帧数 (小端 uint32, 上层用 & 0xFFFFFFFFL 还原无符号).
    static int
    getGroupSlaveCount(byte[] groupConfigRaw, int group)
    获取组从站数量 (小端)
    static long
    getGroupTotalFrames(byte[] groupConfigRaw, int group)
    获取组累计 TX 帧数 (小端 uint32, 上层用 & 0xFFFFFFFFL 还原无符号).
    static void
    setGroupCycleDivider(byte[] groupConfigRaw, int group, int divider)
    设置组周期分频器
    static void
    setGroupEnabled(byte[] groupConfigRaw, int group, boolean enabled)
    设置组启用状态
    static void
    setGroupFrameRepeatEligible(byte[] groupConfigRaw, int group, boolean eligible)
    设置组帧重复资格 (ETG.1500 5.4.3)

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • EcGroupConfigHelper

      public EcGroupConfigHelper()
  • 方法详细资料

    • getGroupEnabled

      public static boolean getGroupEnabled(byte[] groupConfigRaw, int group)
      获取组是否启用
    • setGroupEnabled

      public static void setGroupEnabled(byte[] groupConfigRaw, int group, boolean enabled)
      设置组启用状态
    • getGroupCycleDivider

      public static int getGroupCycleDivider(byte[] groupConfigRaw, int group)
      获取组周期分频器
    • setGroupCycleDivider

      public static void setGroupCycleDivider(byte[] groupConfigRaw, int group, int divider)
      设置组周期分频器
    • getGroupExpectedWKC

      public static int getGroupExpectedWKC(byte[] groupConfigRaw, int group)
      获取组期望 WKC (小端)
    • getGroupSlaveCount

      public static int getGroupSlaveCount(byte[] groupConfigRaw, int group)
      获取组从站数量 (小端)
    • getGroupFrameRepeatEligible

      public static boolean getGroupFrameRepeatEligible(byte[] groupConfigRaw, int group)
      获取组帧重复资格 (ETG.1500 5.4.3)
    • setGroupFrameRepeatEligible

      public static void setGroupFrameRepeatEligible(byte[] groupConfigRaw, int group, boolean eligible)
      设置组帧重复资格 (ETG.1500 5.4.3)
    • getGroupActualWKC

      public static int getGroupActualWKC(byte[] groupConfigRaw, int group)
      获取组实际 WKC (本周期 receive_processdata_group 结果, 小端).
    • getGroupConsecutiveMiss

      public static int getGroupConsecutiveMiss(byte[] groupConfigRaw, int group)
      获取组连续 WKC 不足次数 (actual_wkc < expected_wkc, 小端).
    • getGroupTotalFrames

      public static long getGroupTotalFrames(byte[] groupConfigRaw, int group)
      获取组累计 TX 帧数 (小端 uint32, 上层用 & 0xFFFFFFFFL 还原无符号).
    • getGroupMismatchFrames

      public static long getGroupMismatchFrames(byte[] groupConfigRaw, int group)
      获取组累计 WKC 不匹配帧数 (小端 uint32, 上层用 & 0xFFFFFFFFL 还原无符号).