Function createPlainObjectFromMotionMasterMessage

  • Converts a MotionMasterMessage instance into a plain JavaScript object with full defaults and JSON-compatible values.

    The conversion uses MotionMasterMessage.toObject with options that:

    • Convert bytes fields to standard arrays.
    • Include default values for missing fields.
    • Initialize empty arrays for repeated fields and empty objects for map fields.
    • Include virtual oneof properties indicating which field is set.
    • Apply JSON-compatible conversions (e.g., NaN and Infinity to strings).

    Returns

    A plain object representation of the message with all fields populated and JSON-safe.

    Example

    const plainObject = createPlainObjectFromMotionMasterMessage(message);
    console.log(plainObject.status); // → fully populated status object

    Remarks

    • Useful for logging, serialization, or transferring messages over standard JSON APIs.
    • Ensures that all optional, repeated, and map fields are represented in the resulting object.

    Parameters

    Returns IMotionMasterMessage

Generated using TypeDoc