From: Steinar H. Gunderson Date: Thu, 17 Mar 2016 01:05:59 +0000 (+0100) Subject: Better comments and enums in the proto file. X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=6f00ea1c0fa32f3c1923e7e29a70cfc0d8dc1cc5;ds=sidebyside Better comments and enums in the proto file. --- diff --git a/src/hashprobe.proto b/src/hashprobe.proto index 5df9b9c5..393553e9 100644 --- a/src/hashprobe.proto +++ b/src/hashprobe.proto @@ -1,15 +1,21 @@ syntax = "proto3"; - message HashProbeRequest { string fen = 1; } message HashProbeResponse { bool found = 1; - int32 move = 2; - int32 value = 3; - int32 eval = 4; + int32 move = 2; // See types.h + int32 value = 3; // Dynamic eval (may be inexact, see the "bound" field) + int32 eval = 4; // Static eval int32 depth = 5; - int32 bound = 6; + + enum ValueBound { + BOUND_NONE = 0; + BOUND_UPPER = 1; + BOUND_LOWER = 2; + BOUND_EXACT = 3; + }; + ValueBound bound = 6; } service HashProbe { diff --git a/src/main.cpp b/src/main.cpp index ee0f135a..b6639f26 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -57,7 +57,7 @@ public: response->set_value(entry->value()); response->set_eval(entry->eval()); response->set_depth(entry->depth()); - response->set_bound(entry->bound()); + response->set_bound(HashProbeResponse::ValueBound(entry->bound())); } return Status::OK; }