/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * UsbProConfigMessages.proto
 * Defines the protocol buffers used to configure the Usb Pro device
 * Copyright (C) 2005 Simon Newton
 */

package ola.plugin.usbpro;

message ParameterReply {
  required uint32 firmware_high = 1;
  required uint32 firmware = 2;
  required uint32 break_time = 3;
  required uint32 mab_time = 4;
  required uint32 rate = 5;
}

/*
 * Setting any one of these will update the widget, otherwise we just do a
 * read.
 */
message ParameterRequest {
  required uint32 port_id = 4;

  optional uint32 break_time = 1;
  optional uint32 mab_time = 2;
  optional uint32 rate = 3;
}

message SerialNumberReply {
  required string serial = 1;
}

message PortAssignmentReply {
  required uint32 port_assignment1 = 1;
  required uint32 port_assignment2 = 2;
}

message Request {
  enum RequestType {
    USBPRO_PARAMETER_REQUEST = 1;
    USBPRO_SERIAL_REQUEST = 2;
    USBPRO_PORT_ASSIGNMENT_REQUEST = 3;
  }
  required RequestType type = 1;
  optional ParameterRequest parameters = 2;
}

message Reply {
  enum ReplyType {
    USBPRO_PARAMETER_REPLY = 1;
    USBPRO_SERIAL_REPLY = 2;
    USBPRO_PORT_ASSIGNMENT_REPLY = 3;
  }
  required ReplyType type = 1;
  optional ParameterReply parameters = 2;
  optional SerialNumberReply serial_number = 3;
  optional PortAssignmentReply port_assignment = 4;
}
