#include <SeaNet.hpp>
Base class for RS232 SeaNet devices The class has to be initialized with the right device type which is used as communictaion check
| sea_net::SeaNet::~SeaNet |
( |
| ) |
|
| void sea_net::SeaNet::clear |
( |
| ) |
|
Overloaded from iodrivers_base::Driver
| int sea_net::SeaNet::extractPacket |
( |
uint8_t const * |
buffer, |
|
|
size_t |
buffer_size |
|
) |
| const |
|
protectedvirtual |
| SeaNetPacket const & sea_net::SeaNet::getSeaNetPacket |
( |
| ) |
const |
Returns the structure holding the last received packet
| void sea_net::SeaNet::getVersion |
( |
VersionData & |
version, |
|
|
int |
timeout |
|
) |
| |
extracts the software version of the device from a mtVersionData package
call this function if readPacket returns mtVersionData
| bool sea_net::SeaNet::hasPendingData |
( |
| ) |
const |
Checks whether data has been requested but not received yet
Some operations (e.g. configure()) cannot be called if it is the case. For these operations, if you don't know whether data has been requested, you must check whether hasPendingData() returns true and call receiveData() first.
| bool sea_net::SeaNet::isFullDublex |
( |
int |
timeout | ) |
|
| bool sea_net::SeaNet::isFullDuplex |
( |
int |
timeout | ) |
|
Returns if the remote device is configured as full duplex or half duplex
| void sea_net::SeaNet::openSerial |
( |
std::string const & |
port, |
|
|
int |
baudrate = 115200 |
|
) |
| |
Opens a serial port and sets it up to a sane configuration.
Throws UnixError on error
| void sea_net::SeaNet::openURI |
( |
std::string const & |
uri | ) |
|
Overloaded from iodrivers_base::Driver
Reads one packat from I/O and returns the packet type
The packet's content can be retrieved by the SeaNetPacket API on the value returned by getSeaNetPacket
- Parameters
-
| timeout | the timeout in milliseconds |
- Returns
- the packet type
| void sea_net::SeaNet::reboot |
( |
int |
timeout | ) |
|
Reboots the Device and waits for a mtAlive package be careful this takes a while and even if you receive mtAlives the device my be in a state where it does not accept mtHeadCommands
| void sea_net::SeaNet::receiveData |
( |
int |
timeout | ) |
|
Wait for the beam data requested by requestData to be received
- Parameters
-
| timeout | the timeout in milliseconds |
| void sea_net::SeaNet::requestData |
( |
| ) |
|
Request the sonar to acquire one beam
Calling this method will fail until the corresponding data packet has been received.
The timeout is the default write timeout
| void sea_net::SeaNet::setWriteTimeout |
( |
uint32_t |
timeout | ) |
|
| void sea_net::SeaNet::waitForPacket |
( |
PacketType |
type, |
|
|
int |
timeout |
|
) |
| |
| void sea_net::SeaNet::writeHeadCommand |
( |
HeadCommand & |
hc, |
|
|
int |
timeout |
|
) |
| |
|
protected |
| bool sea_net::SeaNet::has_pending_data |
|
protected |
The documentation for this class was generated from the following files:
- /build/rock-master-18.09-drivers-sonar-tritech-0.20170427/src/SeaNet.hpp
- /build/rock-master-18.09-drivers-sonar-tritech-0.20170427/src/SeaNet.cpp