Class CanandDeviceDetails.Stg

java.lang.Object
com.reduxrobotics.canand.CanandDeviceDetails.Stg
Enclosing class:
CanandDeviceDetails

public static class CanandDeviceDetails.Stg extends Object
Settings.
  • Field Details

    • kDeviceType

      public static final int kDeviceType
      Device-specific type identifier
      See Also:
    • kFirmwareVersion

      public static final int kFirmwareVersion
      Firmware version
      See Also:
    • kSerialNumber

      public static final int kSerialNumber
      Serial number
      See Also:
    • kStatusFramePeriod

      public static final int kStatusFramePeriod
      Status frame period (ms)
      See Also:
    • settingsAddresses

      public static int[] settingsAddresses
      List of settings to fetch for.
  • Method Details

    • extractDeviceType

      public static int extractDeviceType(long field)
      Extracts Device-specific type identifier from DeviceType.
      Parameters:
      field - data bitfield
      Returns:
      DEVICE_TYPE as a uint:16
    • extractFirmwareVersion_FirmwarePatch

      public static int extractFirmwareVersion_FirmwarePatch(long field)
      Extracts Firmware version patch number from FirmwareVersion.
      Parameters:
      field - data bitfield
      Returns:
      firmware_patch as a uint:8
    • extractFirmwareVersion_FirmwareMinor

      public static int extractFirmwareVersion_FirmwareMinor(long field)
      Extracts Firmware version minor number from FirmwareVersion.
      Parameters:
      field - data bitfield
      Returns:
      firmware_minor as a uint:8
    • extractFirmwareVersion_FirmwareYear

      public static int extractFirmwareVersion_FirmwareYear(long field)
      Extracts Firmware version year from FirmwareVersion.
      Parameters:
      field - data bitfield
      Returns:
      firmware_year as a uint:16
    • extractSerialNumber

      public static long extractSerialNumber(long field)
      Extracts Serial number from SerialNumber.
      Parameters:
      field - data bitfield
      Returns:
      SERIAL_NUMBER as a buf:48
    • extractStatusFramePeriod

      public static int extractStatusFramePeriod(long field)
      Extracts Status frame period (ms) from StatusFramePeriod.
      Parameters:
      field - data bitfield
      Returns:
      STATUS_FRAME_PERIOD as a uint:16
    • constructDeviceType

      public static long constructDeviceType(int deviceType)
      Constructs a DEVICE_TYPE setting.
      Parameters:
      deviceType - Device-specific type identifier (uint:16)
      Returns:
      message data as long
    • constructFirmwareVersion

      public static long constructFirmwareVersion(int firmwarePatch, int firmwareMinor, int firmwareYear)
      Constructs a FIRMWARE_VERSION setting.
      Parameters:
      firmwarePatch - Firmware version patch number (uint:8)
      firmwareMinor - Firmware version minor number (uint:8)
      firmwareYear - Firmware version year (uint:16)
      Returns:
      message data as long
    • constructSerialNumber

      public static long constructSerialNumber(long serialNumber)
      Constructs a SERIAL_NUMBER setting.
      Parameters:
      serialNumber - Serial number (buf:48)
      Returns:
      message data as long
    • constructStatusFramePeriod

      public static long constructStatusFramePeriod(int statusFramePeriod)
      Constructs a STATUS_FRAME_PERIOD setting.
      Parameters:
      statusFramePeriod - Status frame period (ms) (uint:16)
      Returns:
      message data as long