You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning("The name of a parameter has to follow the ROS naming conventions: Capital letters are not recommended", null, INVALID_NAME);
59
-
}
60
-
}
61
-
}
54
+
for (i :0 ..< parameter.name.length) {
55
+
val c = parameter.name.charAt(i)
56
+
if (Character.isUpperCase(c)) {
57
+
val remaining = parameter.name.substring(i)
58
+
if (!remaining.contains(".")) {
59
+
warning("The name of a parameter has to follow the ROS naming conventions: Capital letters are not recommended", null, INVALID_NAME);
60
+
}
61
+
}
62
+
}
62
63
}
63
64
64
65
/* Customize Syntax Error Messages */
@@ -142,4 +143,24 @@ class RosValidator extends AbstractRosValidator {
142
143
// // allow the use of numbers
143
144
//
144
145
146
+
publicstaticvalINVALID_VALUE='invalidValue'
147
+
@Check
148
+
defvoidCheckQoS (QualityOfServiceqos){
149
+
CheckDuration(qos.leaseDuration)
150
+
CheckDuration(qos.lifespan)
151
+
CheckDuration(qos.deadline)
152
+
}
153
+
154
+
defvoidCheckDuration(Stringduration)
155
+
{
156
+
if(duration !='infinite'&& duration !==null){
157
+
try{
158
+
Integer.parseInt(duration)
159
+
}
160
+
catch (NumberFormatException e){
161
+
error("Durations of lease_duration, lifespan, deadline should be specified as a string of nanoseconds which can convert to int, or as infinite", null, INVALID_VALUE)
0 commit comments