JeVois
1.17
JeVois Smart Embedded Machine Vision Toolkit
|
Share this page: |
|
|
|
 |
 |
|
Go to the documentation of this file.
39 115200, { 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200,
40 230400, 460800, 921600, 1000000, 1152000, 1500000, 2000000,
41 2500000, 3000000, 3500000, 4000000 }, ParamCateg);
45 "8N1", boost::regex(
"^[5-8][NEO][12]$"), ParamCateg);
57 "avoid blocking when writing messages to serial-over-USB port and the host is "
58 "not listening to it. Note that even when drop is false, we will still drop "
59 "data after repeated attempts to send it, and will report an error (as opposed to "
60 "silently dropping when drop is true).",
68 "CRLF is for 0x0d 0x0a [\\r\\n]; Zero is for 0x00 [\\0]; Sloppy accepts any of "
69 "CR, LF, CRLF, 0xd0 (issued by some keyboards instead of Return), and Zero as input "
70 "and issues CRLF in outputs.",
71 LineStyle::Sloppy, LineStyle_Values, ParamCateg);
78 TerminalMode::Plain, TerminalMode_Values, ParamCateg);
85 public Parameter<serial::devname, serial::baudrate, serial::format, serial::flowsoft,
86 serial::flowhard, serial::drop, serial::linestyle, serial::mode>
97 void setBlocking(
bool blocking, std::chrono::milliseconds
const & timeout);
100 void toggleDTR(std::chrono::milliseconds
const & dur);
107 bool readSome(std::string & str)
override;
117 void writeString(std::string
const & str)
override;
123 int read(
void * buffer,
const int nbytes);
129 int read2(
void * buffer,
const int nbytes);
134 void write(
void const * buffer,
const int nbytes);
139 void writeNoCheck(
void const * buffer,
const int nbytes);
144 void fileGet(std::string
const & abspath);
149 void filePut(std::string
const & abspath);
162 void writeInternal(
void const * buffer,
const int nbytes,
bool nodrop =
false);
163 std::string readStringInternal();
165 termios itsSavedState;
166 std::string itsPartialString;
168 int itsWriteOverflowCounter;
void setBlocking(bool blocking, std::chrono::milliseconds const &timeout)
Set the access to blocking or not.
Interface to a serial port.
void sendBreak(void)
transmit continuous stream of zero-valued bits for specific duration.
Magnetometer sampling or Off to disable or Once to only get one measurement You can repeatedly set this parameter to Once to obtain repeated measurements at your own pace In JeVois you need to alternate between Off and Once In FIFO mode
JEVOIS_DECLARE_PARAMETER(thresh1, double, "First threshold for hysteresis", 50.0, ParamCateg)
Serial(std::string const &instance, UserInterface::Type type)
Constructor.
JEVOIS_DEFINE_ENUM_CLASS(CameraSensor,(any)(ov9650)(ov2640)(ov7725)(ar0135)(imx290))
Enum for different sensor models.
bool readSome(std::string &str) override
Read some bytes if available, and return true and a string when one is complete.
Abstract base class for a string-based user interface.
void postInit() override
Called after all sub-Components are init()ed.
std::string readString()
Read a string, using the line termination convention of serial::linestyle.
A category to which multiple ParameterDef definitions can belong.
Type of detection output format
void filePut(std::string const &abspath)
Receive a file from the host and write it to the local microSD.
void toggleDTR(std::chrono::milliseconds const &dur)
Set the DTR mode off momentarily.
int read2(void *buffer, const int nbytes)
Attempt to read up to nbytes from serial port into the buffer.
void writeString(std::string const &str) override
Write a string, using the line termination convention of serial::linestyle.
void flush(void)
Flush all inputs.
virtual ~Serial()
destructor
Type
Enum for the interface type.
void write(void const *buffer, const int nbytes)
Write bytes to the port.
void postUninit() override
Called after all sub-Components are uninit()ed.
UserInterface::Type type() const override
Return our port type, here Hard or USB.
void fileGet(std::string const &abspath)
Send a file from the local microSD to the host computer.
void writeNoCheck(void const *buffer, const int nbytes)
Write bytes to the port - does not wait for buffer to be emptied.
int read(void *buffer, const int nbytes)
Attempt to read up to nbytes from serial port into the buffer.