syntax = "proto2";

import "dccl/option_extensions.proto";
import "jaiabot/messages/engineering.proto";
import "jaiabot/messages/hub.proto";
import "jaiabot/messages/jaia_dccl.proto";
import "jaiabot/messages/metadata.proto";
import "jaiabot/messages/mission.proto";

package jaiabot.protobuf;

/****************************************************************
 * No need to set restrictions on these messages because they are
 * not being sent over the radio.
 *****************************************************************/

message ClientToPortalMessage
{
    option (dccl.msg) = {
        unit_system: "si"
    };

    optional Engineering engineering_command = 1;
    optional Command command = 2;
    optional CommandForHub command_for_hub = 3;
    optional bool ping = 4;
    optional string client_id = 5;
}

message PortalToClientMessage
{
    option (dccl.msg) = {
        unit_system: "si"
    };

    optional BotStatus bot_status = 1;
    optional Engineering engineering_status = 2;
    optional HubStatus hub_status = 3;
    optional TaskPacket task_packet = 4;
    optional DeviceMetadata device_metadata = 5;

    // For sending a bot's currently active mission back to all the clients, so
    // they can update their GUI to show the active missions for each bot
    optional MissionPlan active_mission_plan = 6;
    optional ContactUpdate contact_update = 7;
    optional CommandCommsResult command_comms_result = 8;

    optional Command remote_command = 9;
}
