Class CanandgyroDetails.Stg
java.lang.Object
com.reduxrobotics.sensors.canandgyro.CanandgyroDetails.Stg
- Enclosing class:
- CanandgyroDetails
Settings.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Acceleration frame period (ms)static final int
Angular position frame period (ms)static final int
Angular velocity frame period (ms)static final int
Device-specific type identifierstatic final int
Firmware versionstatic final int
Serial numberstatic final int
Set (normed) quaternion assuming negative Wstatic final int
Set (normed) quaternion assuming positive Wstatic final int
Set yawstatic final int
Status frame period (ms)static final int
Yaw angle frame period (ms)static int[]
List of settings to fetch for. -
Method Summary
Modifier and TypeMethodDescriptionstatic long
constructAccelerationFramePeriod
(int accelerationFramePeriod) Constructs a ACCELERATION_FRAME_PERIOD setting.static long
constructAngularPositionFramePeriod
(int angularPositionFramePeriod) Constructs a ANGULAR_POSITION_FRAME_PERIOD setting.static long
constructAngularVelocityFramePeriod
(int angularVelocityFramePeriod) Constructs a ANGULAR_VELOCITY_FRAME_PERIOD setting.static long
constructDeviceType
(int deviceType) Constructs a DEVICE_TYPE setting.static long
constructFirmwareVersion
(int firmwarePatch, int firmwareMinor, int firmwareYear) Constructs a FIRMWARE_VERSION setting.static long
constructSerialNumber
(long serialNumber) Constructs a SERIAL_NUMBER setting.static long
constructSetPoseNegativeW
(int x, int y, int z) Constructs a SET_POSE_NEGATIVE_W setting.static long
constructSetPosePositiveW
(int x, int y, int z) Constructs a SET_POSE_POSITIVE_W setting.static long
constructSetYaw
(float yaw, int wraparound) Constructs a SET_YAW setting.static long
constructStatusFramePeriod
(int statusFramePeriod) Constructs a STATUS_FRAME_PERIOD setting.static long
constructYawFramePeriod
(int yawFramePeriod) Constructs a YAW_FRAME_PERIOD setting.static int
extractAccelerationFramePeriod
(long field) Extracts Acceleration frame period (ms) from AccelerationFramePeriod.static int
extractAngularPositionFramePeriod
(long field) Extracts Angular position frame period (ms) from AngularPositionFramePeriod.static int
extractAngularVelocityFramePeriod
(long field) Extracts Angular velocity frame period (ms) from AngularVelocityFramePeriod.static int
extractDeviceType
(long field) Extracts Device-specific type identifier from DeviceType.static int
extractFirmwareVersion_FirmwareMinor
(long field) Extracts Firmware version minor number from FirmwareVersion.static int
extractFirmwareVersion_FirmwarePatch
(long field) Extracts Firmware version patch number from FirmwareVersion.static int
extractFirmwareVersion_FirmwareYear
(long field) Extracts Firmware version year from FirmwareVersion.static long
extractSerialNumber
(long field) Extracts Serial number from SerialNumber.static int
extractSetPoseNegativeW_X
(long field) Extracts Quaternion x term from SetPoseNegativeW.static int
extractSetPoseNegativeW_Y
(long field) Extracts Quaternion y term from SetPoseNegativeW.static int
extractSetPoseNegativeW_Z
(long field) Extracts Quaternion z term from SetPoseNegativeW.static int
extractSetPosePositiveW_X
(long field) Extracts Quaternion x term from SetPosePositiveW.static int
extractSetPosePositiveW_Y
(long field) Extracts Quaternion y term from SetPosePositiveW.static int
extractSetPosePositiveW_Z
(long field) Extracts Quaternion z term from SetPosePositiveW.static int
extractSetYaw_Wraparound
(long field) Extracts Wraparound counter from SetYaw.static float
extractSetYaw_Yaw
(long field) Extracts Yaw angle (f32 between [-pi..pi) degrees) from SetYaw.static int
extractStatusFramePeriod
(long field) Extracts Status frame period (ms) from StatusFramePeriod.static int
extractYawFramePeriod
(long field) Extracts Yaw angle frame period (ms) from YawFramePeriod.
-
Field Details
-
kYawFramePeriod
public static final int kYawFramePeriodYaw angle frame period (ms)- See Also:
-
kAngularPositionFramePeriod
public static final int kAngularPositionFramePeriodAngular position frame period (ms)- See Also:
-
kAngularVelocityFramePeriod
public static final int kAngularVelocityFramePeriodAngular velocity frame period (ms)- See Also:
-
kAccelerationFramePeriod
public static final int kAccelerationFramePeriodAcceleration frame period (ms)- See Also:
-
kSetYaw
public static final int kSetYawSet yaw- See Also:
-
kSetPosePositiveW
public static final int kSetPosePositiveWSet (normed) quaternion assuming positive W- See Also:
-
kSetPoseNegativeW
public static final int kSetPoseNegativeWSet (normed) quaternion assuming negative W- See Also:
-
kDeviceType
public static final int kDeviceTypeDevice-specific type identifier- See Also:
-
kFirmwareVersion
public static final int kFirmwareVersionFirmware version- See Also:
-
kSerialNumber
public static final int kSerialNumberSerial number- See Also:
-
kStatusFramePeriod
public static final int kStatusFramePeriodStatus frame period (ms)- See Also:
-
settingsAddresses
public static int[] settingsAddressesList of settings to fetch for.
-
-
Method Details
-
extractYawFramePeriod
public static int extractYawFramePeriod(long field) Extracts Yaw angle frame period (ms) from YawFramePeriod.- Parameters:
field
- data bitfield- Returns:
- YAW_FRAME_PERIOD as a uint:16
-
extractAngularPositionFramePeriod
public static int extractAngularPositionFramePeriod(long field) Extracts Angular position frame period (ms) from AngularPositionFramePeriod.- Parameters:
field
- data bitfield- Returns:
- ANGULAR_POSITION_FRAME_PERIOD as a uint:16
-
extractAngularVelocityFramePeriod
public static int extractAngularVelocityFramePeriod(long field) Extracts Angular velocity frame period (ms) from AngularVelocityFramePeriod.- Parameters:
field
- data bitfield- Returns:
- ANGULAR_VELOCITY_FRAME_PERIOD as a uint:16
-
extractAccelerationFramePeriod
public static int extractAccelerationFramePeriod(long field) Extracts Acceleration frame period (ms) from AccelerationFramePeriod.- Parameters:
field
- data bitfield- Returns:
- ACCELERATION_FRAME_PERIOD as a uint:16
-
extractSetYaw_Yaw
public static float extractSetYaw_Yaw(long field) Extracts Yaw angle (f32 between [-pi..pi) degrees) from SetYaw.- Parameters:
field
- data bitfield- Returns:
- yaw as a float:32
-
extractSetYaw_Wraparound
public static int extractSetYaw_Wraparound(long field) Extracts Wraparound counter from SetYaw.- Parameters:
field
- data bitfield- Returns:
- wraparound as a sint:16
-
extractSetPosePositiveW_X
public static int extractSetPosePositiveW_X(long field) Extracts Quaternion x term from SetPosePositiveW.- Parameters:
field
- data bitfield- Returns:
- x as a sint:16
-
extractSetPosePositiveW_Y
public static int extractSetPosePositiveW_Y(long field) Extracts Quaternion y term from SetPosePositiveW.- Parameters:
field
- data bitfield- Returns:
- y as a sint:16
-
extractSetPosePositiveW_Z
public static int extractSetPosePositiveW_Z(long field) Extracts Quaternion z term from SetPosePositiveW.- Parameters:
field
- data bitfield- Returns:
- z as a sint:16
-
extractSetPoseNegativeW_X
public static int extractSetPoseNegativeW_X(long field) Extracts Quaternion x term from SetPoseNegativeW.- Parameters:
field
- data bitfield- Returns:
- x as a sint:16
-
extractSetPoseNegativeW_Y
public static int extractSetPoseNegativeW_Y(long field) Extracts Quaternion y term from SetPoseNegativeW.- Parameters:
field
- data bitfield- Returns:
- y as a sint:16
-
extractSetPoseNegativeW_Z
public static int extractSetPoseNegativeW_Z(long field) Extracts Quaternion z term from SetPoseNegativeW.- Parameters:
field
- data bitfield- Returns:
- z as a sint:16
-
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
-
constructYawFramePeriod
public static long constructYawFramePeriod(int yawFramePeriod) Constructs a YAW_FRAME_PERIOD setting.- Parameters:
yawFramePeriod
- Yaw angle frame period (ms) (uint:16)- Returns:
- message data as long
-
constructAngularPositionFramePeriod
public static long constructAngularPositionFramePeriod(int angularPositionFramePeriod) Constructs a ANGULAR_POSITION_FRAME_PERIOD setting.- Parameters:
angularPositionFramePeriod
- Angular position frame period (ms) (uint:16)- Returns:
- message data as long
-
constructAngularVelocityFramePeriod
public static long constructAngularVelocityFramePeriod(int angularVelocityFramePeriod) Constructs a ANGULAR_VELOCITY_FRAME_PERIOD setting.- Parameters:
angularVelocityFramePeriod
- Angular velocity frame period (ms) (uint:16)- Returns:
- message data as long
-
constructAccelerationFramePeriod
public static long constructAccelerationFramePeriod(int accelerationFramePeriod) Constructs a ACCELERATION_FRAME_PERIOD setting.- Parameters:
accelerationFramePeriod
- Acceleration frame period (ms) (uint:16)- Returns:
- message data as long
-
constructSetYaw
public static long constructSetYaw(float yaw, int wraparound) Constructs a SET_YAW setting.- Parameters:
yaw
- Yaw angle (f32 between [-pi..pi) degrees) (float:32)wraparound
- Wraparound counter (sint:16)- Returns:
- message data as long
-
constructSetPosePositiveW
public static long constructSetPosePositiveW(int x, int y, int z) Constructs a SET_POSE_POSITIVE_W setting.- Parameters:
x
- Quaternion x term (sint:16)y
- Quaternion y term (sint:16)z
- Quaternion z term (sint:16)- Returns:
- message data as long
-
constructSetPoseNegativeW
public static long constructSetPoseNegativeW(int x, int y, int z) Constructs a SET_POSE_NEGATIVE_W setting.- Parameters:
x
- Quaternion x term (sint:16)y
- Quaternion y term (sint:16)z
- Quaternion z term (sint:16)- Returns:
- message data as long
-
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
-