Fix comment formatting

pull/7/head
Sacha Weatherstone 2020-12-13 19:19:41 +11:00
rodzic 8729bad7f6
commit 0cd66bf527
4 zmienionych plików z 863 dodań i 642 usunięć

1276
mesh.proto

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,29 +1,37 @@
syntax = "proto3";
/** This file documents protobufs that are being considered but are not yet in use
*/
/*
* This file documents protobufs that are being considered but are not yet in use
*/
/**
Placeholder for data we will eventually set during initial programming. This
will allow us to stop having a load for each region.
*/
/*
* Placeholder for data we will eventually set during initial programming. This
* will allow us to stop having a load for each region.
*/
message ManufacturingData {
/// center frequency for the radio hardware that was stuffed
uint32 fradioFreq = 1;
/// TBEAM, HELTEC, etc...
/*
* center frequency for the radio hardware that was stuffed
*/
uint32 fradioFreq = 1;
/*
* TBEAM, HELTEC, etc...
*/
string hw_model = 2;
// Hardware version number
/*
* Hardware version number
*/
string hw_version = 3;
/**
This code is written during manfacturing time and allows users to confirm that
the initial manufacturing tests succeeded.
0 means no test performed.
1 means all tests passed
negative numbers indicate particular error codes
*/
/*
* This code is written during manfacturing time and allows users to confirm that
* the initial manufacturing tests succeeded.
*
* 0 means no test performed.
* 1 means all tests passed
* negative numbers indicate particular error codes
*/
sint32 selftest_result = 4;
}

Wyświetl plik

@ -4,76 +4,83 @@ option java_package = "com.geeksville.mesh";
option java_outer_classname = "Portnums";
option optimize_for = LITE_RUNTIME;
/**
For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a
unique 'portnum' for their application.
If you are making a new app using meshtastic, please send in a pull request to add your 'portnum' to this
master table. PortNums should be assigned in the following range:
0-63 Core Meshtastic use, do not use for third party apps
64-127 Registered 3rd party apps, send in a pull request that adds a new entry to portnums.proto to
register your application
256-511 Use one of these portnums for your private applications that you don't want to register publically
1024-66559 Are reserved for use by IP tunneling (see FIXME for more information)
All other values are reserved.
Note: This was formerly a Type enum named 'typ' with the same id #
We have change to this 'portnum' based scheme for specifying app handlers for particular payloads.
This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically.
*/
/*
* For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a unique 'portnum' for their application.
*
* If you are making a new app using meshtastic, please send in a pull request to add your 'portnum' to this master table.
* PortNums should be assigned in the following range:
*
* 0-63 Core Meshtastic use, do not use for third party apps
* 64-127 Registered 3rd party apps, send in a pull request that adds a new entry to portnums.proto to
* register your application
* 256-511 Use one of these portnums for your private applications that you don't want to register publically
* 1024-66559 Are reserved for use by IP tunneling (see FIXME for more information)
*
* All other values are reserved.
*
* Note: This was formerly a Type enum named 'typ' with the same id #
*
* We have change to this 'portnum' based scheme for specifying app handlers for particular payloads.
* This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically.
*/
enum PortNum {
/** Deprecated: do not use in new code (formerly called OPAQUE)
A message sent from a device outside of the mesh, in a form the mesh
does not understand
NOTE: This must be 0, because it is documented in IMeshService.aidl to be so
*/
/*
* Deprecated: do not use in new code (formerly called OPAQUE)
* A message sent from a device outside of the mesh, in a form the mesh does not understand
* NOTE: This must be 0, because it is documented in IMeshService.aidl to be so
*/
UNKNOWN_APP = 0;
/** a simple UTF-8 text message, which even the little micros in the mesh
can understand and show on their screen eventually in some circumstances
even signal might send messages in this form (see below)
Formerly called CLEAR_TEXT */
/*
* A simple UTF-8 text message, which even the little micros in the mesh
* can understand and show on their screen eventually in some circumstances
* even signal might send messages in this form (see below)
* Formerly called CLEAR_TEXT
*/
TEXT_MESSAGE_APP = 1;
/** a message receive acknowledgement, sent in cleartext - allows radio to
show user that a message has been read by the recipient, optional
Note: this concept has been removed for now. Once READACK is implemented, use the
new packet type/port number stuff?
@exclude
CLEAR_READACK = 2;
*/
/** Reserved for built-in GPIO/example app.
See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number
*/
/*
* A message receive acknowledgement, sent in cleartext - allows radio to
* show user that a message has been read by the recipient, optional
*
* Note: this concept has been removed for now. Once READACK is implemented, use the
* new packet type/port number stuff?
*
* @exclude
*
* CLEAR_READACK = 2;
*
* Reserved for built-in GPIO/example app.
* See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number
*/
REMOTE_HARDWARE_APP = 2;
/** The built-in position messaging app.
See Position for details on the message sent to this port number.
*/
/*
* The built-in position messaging app.
* See Position for details on the message sent to this port number.
*/
POSITION_APP = 3;
/** The built-in user info app.
See User for details on the message sent to this port number.
*/
/*
* The built-in user info app.
* See User for details on the message sent to this port number.
*/
NODEINFO_APP = 4;
/** Provides a 'ping' service that replies to any packet it receives. Also this serves as a
small example plugin.
*/
/*
* Provides a 'ping' service that replies to any packet it receives. Also this serves as a small example plugin.
*/
REPLY_APP = 32;
/** Private applications should use portnums >= 256. To simplify initial development and testing you can use "PRIVATE_APP"
in your code without needing to rebuild protobuf files (via bin/regin_protos.sh) */
/*
* Private applications should use portnums >= 256. To simplify initial development and testing you can use "PRIVATE_APP"
* in your code without needing to rebuild protobuf files (via bin/regin_protos.sh)
*/
PRIVATE_APP = 256;
/** 1024-66559 Are reserved for use by IP tunneling (see FIXME for more information) */
/*
* 1024-66559 Are reserved for use by IP tunneling (see FIXME for more information)
*/
IP_TUNNEL_APP = 1024;
}

Wyświetl plik

@ -4,49 +4,65 @@ option java_package = "com.geeksville.mesh";
option java_outer_classname = "RemoteHardware";
option optimize_for = LITE_RUNTIME;
/** A example app to show off the plugin system. This message is used for REMOTE_HARDWARE_APP PortNums.
Also provides easy remote access to any GPIO.
In the future other remote hardware operations can be added based on user interest
(i.e. serial output, spi/i2c input/output).
FIXME - currently this feature is turned on by default which is dangerous because no security yet (beyond the
channel mechanism). It should be off by default and then protected based on some TBD mechanism (a special channel
once multichannel support is included?)
*/
/* A example app to show off the plugin system. This message is used for REMOTE_HARDWARE_APP PortNums.
*
* Also provides easy remote access to any GPIO.
*
* In the future other remote hardware operations can be added based on user interest (i.e. serial output, spi/i2c input/output).
*
* FIXME - currently this feature is turned on by default which is dangerous because no security yet (beyond the channel mechanism).
* It should be off by default and then protected based on some TBD mechanism (a special channel once multichannel support is included?)
*/
message HardwareMessage {
enum Type {
/** Unset/unused */
/*
* Unset/unused
*/
UNSET = 0;
/** Set gpio gpios based on gpio_mask/gpio_value */
/*
* Set gpio gpios based on gpio_mask/gpio_value
*/
WRITE_GPIOS = 1;
/** We are now interested in watching the gpio_mask gpios. If the selected gpios change, please broadcast
GPIOS_CHANGED.
Will implicitly change the gpios requested to be INPUT gpios.
*/
/*
* We are now interested in watching the gpio_mask gpios.
* If the selected gpios change, please broadcast GPIOS_CHANGED.
*
* Will implicitly change the gpios requested to be INPUT gpios.
*/
WATCH_GPIOS = 2;
/** The gpios listed in gpio_mask have changed, the new values are listed in gpio_value */
/*
* The gpios listed in gpio_mask have changed, the new values are listed in gpio_value
*/
GPIOS_CHANGED = 3;
/** Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated */
/*
* Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated
*/
READ_GPIOS = 4;
/** A reply to READ_GPIOS. gpio_mask and gpio_value will be populated */
/*
* A reply to READ_GPIOS. gpio_mask and gpio_value will be populated
*/
READ_GPIOS_REPLY = 5;
}
/** What type of HardwareMessage is this? */
/*
* What type of HardwareMessage is this?
*/
Type typ = 1;
/** What gpios are we changing. Not used for all MessageTypes, see MessageType for details */
/*
* What gpios are we changing. Not used for all MessageTypes, see MessageType for details
*/
uint64 gpio_mask = 2;
/** For gpios that were listed in gpio_mask as valid, what are the signal levels for those gpios.
Not used for all MessageTypes, see MessageType for details */
/*
* For gpios that were listed in gpio_mask as valid, what are the signal levels for those gpios.
* Not used for all MessageTypes, see MessageType for details
*/
uint64 gpio_value = 3;
}