4.3.6 Interface conventions
OSI messages, enums, field messages, and field enums shall comply with OSI interface conventions. These conventions ensure that message definitions and the corresponding classes are consistently named and easy to read.
Message names shall use PascalCase.
message EnvironmentalConditions
{
}
Message field names shall use snake_case.
message EnvironmentalConditions
{
optional double atmospheric_pressure = 1;
}
Enum names shall use PascalCase.
message EnvironmentalConditions
{
optional double atmospheric_pressure = 1;
enum AmbientIllumination
{
}
}
Enum field names shall use UPPER_SNAKE_CASE. Enum fields shall always be prefixed with the name of the corresponding enum. The first enum field shall always use the suffix UNKNOWN. The second enum field shall always use the suffix OTHER.
message EnvironmentalConditions
{
optional double atmospheric_pressure = 1;
enum AmbientIllumination
{
AMBIENT_ILLUMINATION_UNKNOWN = 0;
AMBIENT_ILLUMINATION_OTHER = 1;
AMBIENT_ILLUMINATION_LEVEL1 = 2;
}
}