[−][src]Crate novatel_oem6_api
Kubos API for interacting with NovAtel OEM6 High Precision GNSS Receivers
All work is done against an instantiated OEM6
struct.
More information about the device and it's behavior can be found in the following guides:
Examples
use novatel_oem6_api::*; use std::thread; use std::sync::mpsc::sync_channel; // Create communication channels to be used between the read thread and the main thread let (log_send, log_recv) = sync_channel(5); let (response_send, response_recv) = sync_channel(5); let (response_abbrv_send, response_abbrv_recv) = sync_channel(5); // Create the main connection to the device let oem = OEM6::new("/dev/ttyS5", BaudRate::Baud9600, log_recv, response_recv, response_abbrv_recv).unwrap(); // Clone the connection mutex for the read thread let rx_conn = oem.conn.clone(); // Start up a read thread to consume messages from the device thread::spawn(move || read_thread(&rx_conn, &log_send, &response_send, &response_abbrv_send)); // Request that the device send position information once per second oem.request_position(1.0, 0.0, false)?; // Continually read the log messages loop { let entry = oem.get_log()?; match entry { Log::BestXYZ(log) => { println!("Best XYZ Data:"); println!(" Position: {:?}", log.position); println!(" Velocity: {:?}", log.velocity); } _ => {}, } }
Modules
mock | Mock objects for use with unit tests |
Structs
BestXYZLog | Log message containing position information |
Component | Version information about a specific system component |
Connection | Wrapper for UART stream |
OEM6 | Structure for OEM6 device instance |
ReceiverStatusFlags | Receiver status flags |
RxStatusEventLog | Event/error log message |
VersionLog | Log message containing version information |
Enums
BaudRate | Serial port baud rates. |
Log | Supported log messages |
MessageID | Supported message types |
OEMError | Common Error for OEM Actions |
ResponseID | Response values returned after sending a command to the device. |
UartError | Custom errors for UART actions |
Functions
read_thread | Continually read messages from the OEM6 device |
Type Definitions
OEMResult | Custom error type for OEM6 operations. |