forked from rosjava/rosjava_bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rosjava#70 from exo-core/action-generation
Action generation
- Loading branch information
Showing
8 changed files
with
282 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
message_generation/src/main/java/org/ros/internal/message/MessageGenerationTemplate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (C) 2012 Google Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package org.ros.internal.message; | ||
|
||
/** | ||
* @author [email protected] (Arne Peters) | ||
*/ | ||
public interface MessageGenerationTemplate { | ||
|
||
/** | ||
* @return returns this {@link Message} as a {@link RawMessage} | ||
*/ | ||
public String applyTemplate(String messageSource); | ||
} |
36 changes: 36 additions & 0 deletions
36
...src/main/java/org/ros/internal/message/action/ActionGenerationTemplateActionFeedback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (C) 2012 Google Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package org.ros.internal.message.action; | ||
|
||
import org.ros.internal.message.MessageGenerationTemplate; | ||
|
||
/** | ||
* @author [email protected] (Arne Peters) | ||
*/ | ||
public class ActionGenerationTemplateActionFeedback implements MessageGenerationTemplate { | ||
|
||
/** | ||
* @return returns this {@link Message} as a {@link RawMessage} | ||
*/ | ||
public String applyTemplate(String messageSource) { | ||
return "# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======\n" + | ||
"\n" + | ||
"Header header\n" + | ||
"actionlib_msgs/GoalStatus status\n" + | ||
messageSource + "Feedback feedback"; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...ion/src/main/java/org/ros/internal/message/action/ActionGenerationTemplateActionGoal.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (C) 2012 Google Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package org.ros.internal.message.action; | ||
|
||
import org.ros.internal.message.MessageGenerationTemplate; | ||
|
||
/** | ||
* @author [email protected] (Arne Peters) | ||
*/ | ||
public class ActionGenerationTemplateActionGoal implements MessageGenerationTemplate { | ||
|
||
/** | ||
* @return returns this {@link Message} as a {@link RawMessage} | ||
*/ | ||
public String applyTemplate(String messageSource) { | ||
return "# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======\n" + | ||
"\n" + | ||
"Header header\n" + | ||
"actionlib_msgs/GoalID goal_id\n" + | ||
messageSource + "Goal goal"; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...n/src/main/java/org/ros/internal/message/action/ActionGenerationTemplateActionResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (C) 2012 Google Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package org.ros.internal.message.action; | ||
|
||
import org.ros.internal.message.MessageGenerationTemplate; | ||
|
||
/** | ||
* @author [email protected] (Arne Peters) | ||
*/ | ||
public class ActionGenerationTemplateActionResult implements MessageGenerationTemplate { | ||
|
||
/** | ||
* @return returns this {@link Message} as a {@link RawMessage} | ||
*/ | ||
public String applyTemplate(String messageSource) { | ||
return "# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======\n" + | ||
"\n" + | ||
"Header header\n" + | ||
"actionlib_msgs/GoalStatus status\n" + | ||
messageSource + "Result result"; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...ation/src/main/java/org/ros/internal/message/action/ActionGenerationTemplateFeedback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (C) 2012 Google Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package org.ros.internal.message.action; | ||
|
||
import org.ros.internal.message.MessageGenerationTemplate; | ||
|
||
/** | ||
* @author [email protected] (Arne Peters) | ||
*/ | ||
public class ActionGenerationTemplateFeedback implements MessageGenerationTemplate { | ||
|
||
/** | ||
* @return returns this {@link Message} as a {@link RawMessage} | ||
*/ | ||
public String applyTemplate(String messageSource) { | ||
return "# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======\n" + | ||
"#feedback definition\n" + | ||
messageSource; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...eneration/src/main/java/org/ros/internal/message/action/ActionGenerationTemplateGoal.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (C) 2012 Google Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package org.ros.internal.message.action; | ||
|
||
import org.ros.internal.message.MessageGenerationTemplate; | ||
|
||
/** | ||
* @author [email protected] (Arne Peters) | ||
*/ | ||
public class ActionGenerationTemplateGoal implements MessageGenerationTemplate { | ||
|
||
/** | ||
* @return returns this {@link Message} as a {@link RawMessage} | ||
*/ | ||
public String applyTemplate(String messageSource) { | ||
return "# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======\n" + | ||
"#goal definition" + | ||
messageSource; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...eration/src/main/java/org/ros/internal/message/action/ActionGenerationTemplateResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (C) 2012 Google Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package org.ros.internal.message.action; | ||
|
||
import org.ros.internal.message.MessageGenerationTemplate; | ||
|
||
/** | ||
* @author [email protected] (Arne Peters) | ||
*/ | ||
public class ActionGenerationTemplateResult implements MessageGenerationTemplate { | ||
|
||
/** | ||
* @return returns this {@link Message} as a {@link RawMessage} | ||
*/ | ||
public String applyTemplate(String messageSource) { | ||
return "# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======\n" + | ||
"#result definition" + | ||
messageSource; | ||
} | ||
} |