MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MiniR4SmartCamReader Class Reference

A class for reading data from mVision camera. More...

#include <MiniR4SmartCamReader.h>

Public Member Functions

 MiniR4SmartCamReader ()
 
 ~MiniR4SmartCamReader ()
 
void Begin (void)
 Initializes the serial communication with the smart camera.
 
int SmartCamReader (unsigned int *data, unsigned int timeout=500)
 Reads data from the smart camera.
 

Public Attributes

bool hasReceivedValidData = false
 Flag to indicate if valid data has been received.
 

Detailed Description

A class for reading data from mVision camera.

This class provides functionality to initialize the mVision communication and read valid data from the mVision.

Definition at line 18 of file MiniR4SmartCamReader.h.

Constructor & Destructor Documentation

◆ MiniR4SmartCamReader()

MiniR4SmartCamReader::MiniR4SmartCamReader ( )
inline

Definition at line 22 of file MiniR4SmartCamReader.h.

◆ ~MiniR4SmartCamReader()

MiniR4SmartCamReader::~MiniR4SmartCamReader ( )
inline

Definition at line 23 of file MiniR4SmartCamReader.h.

Member Function Documentation

◆ Begin()

void MiniR4SmartCamReader::Begin ( void )
inline

Initializes the serial communication with the smart camera.

Definition at line 30 of file MiniR4SmartCamReader.h.

◆ SmartCamReader()

int MiniR4SmartCamReader::SmartCamReader ( unsigned int * data,
unsigned int timeout = 500 )
inline

Reads data from the smart camera.

This function waits for data from the smart camera and returns the decoded data if it is valid. It uses a timeout to prevent blocking indefinitely.

Parameters
dataPointer to an array where the received data will be stored.
timeoutTime in milliseconds to wait for data (default is 500).
Returns
The number of data items read, or a negative error code: -1 if timeout occurred, -2 if data is incomplete, -3 if checksum validation fails.

Definition at line 46 of file MiniR4SmartCamReader.h.

Member Data Documentation

◆ hasReceivedValidData

bool MiniR4SmartCamReader::hasReceivedValidData = false

Flag to indicate if valid data has been received.

Definition at line 25 of file MiniR4SmartCamReader.h.


The documentation for this class was generated from the following file: