Skip to content
Snippets Groups Projects
Commit 68dd0171 authored by Petteri Aimonen's avatar Petteri Aimonen
Browse files

Switch the example project to use the new .options file

parent a1cec46b
No related branches found
No related tags found
No related merge requests found
# This file defines the nanopb-specific options for the messages defined
# in fileproto.proto.
#
# If you come from high-level programming background, the hardcoded
# maximum lengths may disgust you. However, if your microcontroller only
# has a few kB of ram to begin with, setting reasonable limits for
# filenames is ok.
#
# On the other hand, using the callback interface, it is not necessary
# to set a limit on the number of files in the response.
ListFilesRequest.path max_size:128
FileInfo.name max_size:128
import "nanopb.proto";
// This defines protocol for a simple server that lists files.
//
// If you come from high-level programming background, the hardcoded
// maximum lengths may disgust you. However, if your microcontroller only
// has a few kB of ram to begin with, setting reasonable limits for
// filenames is ok.
//
// On the other hand, using the callback interface, it is not necessary
// to set a limit on the number of files in the response.
// See also the nanopb-specific options in fileproto.options.
message ListFilesRequest {
optional string path = 1 [default = "/", (nanopb).max_size = 128];
optional string path = 1 [default = "/"];
}
message FileInfo {
required uint64 inode = 1;
required string name = 2 [(nanopb).max_size = 128];
required string name = 2;
}
message ListFilesResponse {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment