base_msgs.proto
: contains all base messages that can compose the top-level messages
hytech_msgs.proto
: contains all messages that will show up on foxglove / be sent individually at any point.
PLEASE REFER TO THIS WHEN DOCUMENTING!
Messages, Fields, Services (and their methods), Enums (and their values), Extensions, and Files can be documented. Generally speaking, comments come in 2 forms: leading and trailing.
Leading comments
Leading comments can be used everywhere.
/**
* This is a leading comment for a message
*/
message SomeMessage {
// this is another leading comment
string value = 1;
}
NOTE: File level comments should be leading comments on the syntax directive.
Trailing comments
Fields, Service Methods, Enum Values and Extensions support trailing comments.
enum MyEnum {
DEFAULT = 0; // the default value
OTHER = 1; // the other value
}
Excluding comments
If you want to have some comment in your proto files, but don't want them to be part of the docs, you can simply prefix
the comment with @exclude
.
Example: include only the comment for the id
field
/**
* @exclude
* This comment won't be rendered
*/
message ExcludedMessage {
string id = 1; // the id of this message.
string name = 2; // @exclude the name of this message
/* @exclude the value of this message. */
int32 value = 3;
}