-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOrderInfo.proto
128 lines (105 loc) · 3.57 KB
/
OrderInfo.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/***************************************************************************
* OrderInstruction.proto - LLSF Protocol - Order Instruction message
*
* Created: Mon Feb 25 11:37:09 2013
* Copyright 2013 Tim Niemueller [www.niemueller.de]
****************************************************************************/
/* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* - Neither the name of the authors nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
syntax = "proto2";
package llsf_msgs;
import "Team.proto";
import "Time.proto";
import "ProductColor.proto";
option java_package = "org.robocup_logistics.llsf_msgs";
option java_outer_classname = "OrderInfoProtos";
message UnconfirmedDelivery {
enum CompType {
COMP_ID = 2000;
MSG_TYPE = 45;
}
required uint32 id = 1;
required Team team = 2;
required Time delivery_time = 3;
}
message Order {
enum CompType {
COMP_ID = 2000;
MSG_TYPE = 42;
}
// Ordered product type
enum Complexity {
C0 = 0;
C1 = 1;
C2 = 2;
C3 = 3;
}
// ID and requested product of this order
required uint32 id = 1;
required Complexity complexity = 2;
required BaseColor base_color = 3;
repeated RingColor ring_colors = 4;
required CapColor cap_color = 5;
// Quantity requested and delivered
required uint32 quantity_requested = 6;
required uint32 quantity_delivered_cyan = 7;
required uint32 quantity_delivered_magenta = 8;
// Start and end time of the delivery
// period in seconds of game time
required uint32 delivery_period_begin = 9;
required uint32 delivery_period_end = 10;
// The gate to deliver to, defaults to any
// (non-defunct, i.e. non-red light) gate
required uint32 delivery_gate = 11;
repeated UnconfirmedDelivery unconfirmed_deliveries = 12;
required bool competitive = 13;
}
message OrderInfo {
enum CompType {
COMP_ID = 2000;
MSG_TYPE = 41;
}
// The current orders
repeated Order orders = 1;
}
message SetOrderDelivered {
enum CompType {
COMP_ID = 2000;
MSG_TYPE = 43;
}
required Team team_color = 1;
required uint32 order_id = 2;
}
message ConfirmDelivery {
enum CompType {
COMP_ID = 2000;
MSG_TYPE = 46;
}
required uint32 delivery_id = 1;
required bool correct = 2;
}