pamoja for TypeScript - v0.1.17
    Preparing search index...

    Class MissionSender

    Holds a plan and answers a receiver's requests for its items.

    Index
    • Creates a sender for a plan bound for a target vehicle, with no items yet.

      Parameters

      • targetSystem: number

        The receiving system's id.

      • targetComponent: number

        The receiving component's id.

      • OptionalmissionType: number | null

        The MAV_MISSION_TYPE of the plan; defaults to the main mission.

      Returns MissionSender

    • get length(): number

      The number of items in the plan.

      Returns number

    • Appends an item to the plan.

      The sender stamps the sequence number, target ids, and mission type onto each item as it is handed out, so the item need only carry its content: command, frame, position, and parameters. Build one by field name with the MISSION_ITEM_INT schema.

      Parameters

      • item: Buffer

        The item, as a MISSION_ITEM_INT message or its payload.

      Returns void

    • Handles an incoming frame, if it is one this transfer answers.

      A MISSION_REQUEST_LIST is answered with the count, a MISSION_REQUEST_INT (or the older MISSION_REQUEST) with the item asked for, and a request past the end of the plan with a MISSION_ACK reporting an invalid sequence. A MISSION_ACK from the receiver ends the transfer.

      Parameters

      Returns SenderStep | null

      The step taken, or null if the frame carries a message this transfer does not handle.