public class RpLidarHighLevelDriver extends java.lang.Object implements RpLidarListener
| Modifier and Type | Field and Description | 
|---|---|
(package private) RpLidarScan | 
complete  | 
(package private) RpLidarLowLevelDriver | 
driver  | 
(package private) int | 
expectedCount  | 
(package private) boolean | 
initialized  | 
(package private) boolean | 
ready  | 
(package private) RpLidarScan | 
work  | 
| Constructor and Description | 
|---|
RpLidarHighLevelDriver()  | 
| Modifier and Type | Method and Description | 
|---|---|
private boolean | 
autoSetCollectionToScan()
Determine the number of measurements it needs to collect to approximately read in an entire scan using 
 | 
boolean | 
blockCollectScan(RpLidarScan scan,
                long timeout)
Returns the most recent complete scan which has been returned by this function. 
 | 
void | 
handleDeviceHealth(RpLidarHeath health)  | 
void | 
handleDeviceInfo(RpLidarDeviceInfo info)  | 
void | 
handleMeasurement(RpLidarMeasurement measurement)  | 
boolean | 
initialize(java.lang.String device,
          int totalCollect)
Connects to the LIDAR 
 | 
boolean | 
isInitialized()  | 
void | 
stop()
Disconnects and shuts down the connection to the LIDAR 
 | 
final RpLidarScan work
final RpLidarScan complete
volatile boolean ready
RpLidarLowLevelDriver driver
int expectedCount
volatile boolean initialized
public boolean initialize(java.lang.String device,
                          int totalCollect)
device - Which device the lidar is connected tototalCollect - How many measurements should it collect in a single scan.  If <= 0 it will automatically
                     determine the number in a complete scan and use that.private boolean autoSetCollectionToScan()
public void stop()
public boolean blockCollectScan(RpLidarScan scan, long timeout)
scan - (output) Where the complete scan is written totimeout - If > 0 then it will wait at most that amount of time for a complete scanpublic void handleMeasurement(RpLidarMeasurement measurement)
handleMeasurement in interface RpLidarListenerpublic void handleDeviceHealth(RpLidarHeath health)
handleDeviceHealth in interface RpLidarListenerpublic void handleDeviceInfo(RpLidarDeviceInfo info)
handleDeviceInfo in interface RpLidarListenerpublic boolean isInitialized()