BowlerKernel
java-bowler
src
main
java
com
neuronrobotics
sdk
addons
irobot
CreateSensorRequest.java
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright 2010 Neuron Robotics, LLC
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
******************************************************************************/
15
package
com.neuronrobotics.sdk.addons.irobot;
16
17
import
java.util.HashMap;
18
import
java.util.Map;
19
20
// TODO: Auto-generated Javadoc
24
public
enum
CreateSensorRequest
{
25
27
ALL
(0x00),
28
30
IO
(0x01),
31
33
DRIVE
(0x02),
34
36
BATTERY
(0x03),
37
39
NONE
(0xFF);
40
42
private
byte
value
;
43
45
private
static
final
Map<Byte,CreateSensorRequest> lookup =
new
HashMap<Byte,CreateSensorRequest>();
46
52
private
CreateSensorRequest
(
int
val) {
53
value = (byte) val;
54
}
55
61
public
byte
getValue
() {
62
return
value;
63
}
64
71
public
static
CreateSensorRequest
get
(
byte
code) {
72
return
lookup.
get
(code);
73
}
74
75
/* (non-Javadoc)
76
* @see java.lang.Enum#toString()
77
*/
78
public
String
toString
(){
79
switch
(
this
){
80
case
ALL:
81
return
"All sensors"
;
82
case
IO:
83
return
"IO sensors sensors"
;
84
case
DRIVE:
85
return
"Drive sensors"
;
86
case
BATTERY:
87
return
"Battery sensors"
;
88
default
:
89
return
"Unknown, dont know how that would happen"
;
90
}
91
}
92
}
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest
Definition:
CreateSensorRequest.java:24
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.IO
IO
Definition:
CreateSensorRequest.java:30
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.NONE
NONE
Definition:
CreateSensorRequest.java:39
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.DRIVE
DRIVE
Definition:
CreateSensorRequest.java:33
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.toString
String toString()
Definition:
CreateSensorRequest.java:78
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.ALL
ALL
Definition:
CreateSensorRequest.java:27
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.getValue
byte getValue()
Definition:
CreateSensorRequest.java:61
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.BATTERY
BATTERY
Definition:
CreateSensorRequest.java:36
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.value
byte value
Definition:
CreateSensorRequest.java:42
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.get
static CreateSensorRequest get(byte code)
Definition:
CreateSensorRequest.java:71
com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.CreateSensorRequest
CreateSensorRequest(int val)
Definition:
CreateSensorRequest.java:52
Generated by
1.9.1