Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message definitions for the parameter component #241

Merged
merged 12 commits into from
Aug 17, 2022
36 changes: 36 additions & 0 deletions proto/ignition/msgs/parameter.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package ignition.msgs;
ivanpauno marked this conversation as resolved.
Show resolved Hide resolved
option java_package = "com.ignition.msgs";
option java_outer_classname = "ParameterProtos";

/// \ingroup ignition.msgs
/// \interface Parameter
/// \brief Representation of a parameter, used to request to set a parameter.

import "google/protobuf/any.proto";

message Parameter
{
/// \brief Parameter name.
string name = 1;

/// \brief Serialized parameter value.
google.protobuf.Any value = 2;
};
34 changes: 34 additions & 0 deletions proto/ignition/msgs/parameter_declaration.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package ignition.msgs;
option java_package = "com.ignition.msgs";
option java_outer_classname = "ParameterDeclarationProtos";

/// \ingroup ignition.msgs
/// \interface ParameterDeclaration
/// \brief Representation of a parameter declaration.

message ParameterDeclaration
{
/// \brief Parameter name.
string name = 1;

/// \brief Parameter type, i.e. the associated protobuf type.
string type = 2;
};
33 changes: 33 additions & 0 deletions proto/ignition/msgs/parameter_declarations.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package ignition.msgs;
option java_package = "com.ignition.msgs";
option java_outer_classname = "ParameterDeclarationsProtos";

/// \ingroup ignition.msgs
/// \interface ParameterDeclarations
/// \brief Collection of parameter declarations.

import "ignition/msgs/parameter_declaration.proto";

message ParameterDeclarations
{
/// \brief Parameter declarations.
repeated ParameterDeclaration parameter_declarations = 1;
};
36 changes: 36 additions & 0 deletions proto/ignition/msgs/parameter_error.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package ignition.msgs;
option java_package = "com.ignition.msgs";
option java_outer_classname = "ParameterErrorProtos";

/// \ingroup ignition.msgs
/// \interface ParameterError
/// \brief Parameter server errors for declare or set parameter.

message ParameterError
{
enum Type {
NO_ERROR = 0;
ALREADY_DECLARED = 1;
INVALID_TYPE = 2;
NOT_DECLARED = 3;
}
Type data = 1;
};
31 changes: 31 additions & 0 deletions proto/ignition/msgs/parameter_name.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package ignition.msgs;
option java_package = "com.ignition.msgs";
option java_outer_classname = "ParameterNameProtos";

/// \ingroup ignition.msgs
/// \interface ParameterName
/// \brief Parameter name, used as a request to get a parameter.

message ParameterName
{
/// \brief Parameter name.
string name = 1;
};
33 changes: 33 additions & 0 deletions proto/ignition/msgs/parameter_value.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";
package ignition.msgs;
option java_package = "com.ignition.msgs";
option java_outer_classname = "ParameterValueProtos";

/// \ingroup ignition.msgs
/// \interface ParameterValue
/// \brief Representation of a parameter value, used as a response to get a parameter.

import "google/protobuf/any.proto";

message ParameterValue
{
/// \brief Serialized protobuf message.
google.protobuf.Any data = 1;
};