// Copyright (c) 2022 Boston Dynamics, Inc.  All rights reserved.
//
// Downloading, reproducing, distributing or otherwise using the SDK Software
// is subject to the terms and conditions of the Boston Dynamics Software
// Development Kit License (20191101-BDSDK-SL).

syntax = "proto3";

package bosdyn.api.spot_cam;

option java_outer_classname = "PowerProto";

import "google/protobuf/wrappers.proto";
import "bosdyn/api/header.proto";

// Power on or off of components of the SpotCam.
message PowerStatus {
    //these switches are 'true' for power-on, 'false' for power-off
    google.protobuf.BoolValue ptz = 2;
    google.protobuf.BoolValue aux1 = 3;
    google.protobuf.BoolValue aux2 = 4;
    google.protobuf.BoolValue external_mic = 5;
}

// Request component power status.
message GetPowerStatusRequest {
    // Common request header.
    bosdyn.api.RequestHeader header = 1;
}

// Provides the power status of all components.
message GetPowerStatusResponse {
    // Common response header.
    bosdyn.api.ResponseHeader header = 1;
    //status indicates the power status of the controllable devices
    //'true' for power-on, 'false' for power-off
    PowerStatus status = 2;
}

// Turn components on or off.
message SetPowerStatusRequest {
    // Common request header.
    bosdyn.api.RequestHeader header = 1;
    //status indicates the requested power status of the controllable devices
    //'true' for power-on, 'false' for power-off
    PowerStatus status = 2;
}

// Result of turning components on or off.
message SetPowerStatusResponse {
    // Common response header.
    bosdyn.api.ResponseHeader header = 1;
    //status indicates the requested changes upon success
    //'true' for power-on, 'false' for power-off
    PowerStatus status = 2;
}

// Turn components off and then back on without needing two separate requests.
message CyclePowerRequest {
    // Common request header.
    bosdyn.api.RequestHeader header = 1;
    //status indicates the devices for which cycle-power is requested
    //'true' for cycle-power, else no effect
    //power cycle will not be performed on a given device if its state is power-off prior to this call
    PowerStatus status = 2;
}

// Result of power cycling components.
message CyclePowerResponse {
    // Common response header.
    bosdyn.api.ResponseHeader header = 1;
    //status indicates the power status of the controllable devices after a successful power cycle
    //'true' for power-on, 'false' for power-off
    PowerStatus status = 2;
}
