# VectorNav C++ Library: include/vn/packetfinder.h Source File

packetfinder.h
#ifndef _VNPROTOCOL_UART_PACKETFINDER_H_
#define _VNPROTOCOL_UART_PACKETFINDER_H_
#include "nocopy.h"
#include "vntime.h"
#include "packet.h"
#if PYTHON
#include "vn/util/boostpython.h"
#endif
namespace vn {
namespace protocol {
namespace uart {
class vn_proglib_DLLEXPORT PacketFinder : private util::NoCopy
{
public:
typedef void (*ValidPacketFoundHandler)(void* userData, Packet& packet, size_t runningIndexOfPacketStart, xplat::TimeStamp timestamp);
PacketFinder();
explicit PacketFinder(size_t internalReceiveBufferSize);
~PacketFinder();
void processReceivedData(char data[], size_t length);
void processReceivedData(char data[], size_t length, xplat::TimeStamp timestamp);
#if PYTHON
void processReceivedData(boost::python::list data);
#endif
void registerPossiblePacketFoundHandler(void* userData, ValidPacketFoundHandler handler);
void unregisterPossiblePacketFoundHandler();
#if PYTHON
boost::python::object* register_packet_found_handler(/*boost::python::object* callable*/ PyObject* callable);
//void register_packet_found_handler(boost::python::object* callable);
#endif
private:
struct Impl;
Impl *_pi;
};
}
}
}
#endif
nocopy.h
vn::protocol::uart::PacketFinder
Helps with management of communication with a sensor using the UART protocol.
Definition: packetfinder.h:25
vn::xplat::TimeStamp
Definition: vntime.h:10
vn::util::NoCopy
Identifies a derived class as being unable to be copied and prevents copy attempts.
Definition: nocopy.h:21
vn
Definition: attitude.h:8
vn::protocol::uart::Packet
Structure representing a UART packet received from the VectorNav sensor.
Definition: packet.h:16