Go to the documentation of this file.
12 #if P1_HAVE_STD_FUNCTION
13 # include <functional>
14 #endif // P1_HAVE_STD_FUNCTION
19 namespace fusion_engine {
50 #if P1_HAVE_STD_FUNCTION
51 using MessageCallback =
53 #endif // P1_HAVE_STD_FUNCTION
121 #if P1_HAVE_STD_FUNCTION
129 callback_ = callback;
131 #endif // P1_HAVE_STD_FUNCTION
170 #if P1_HAVE_STD_FUNCTION
171 MessageCallback callback_;
172 #endif // P1_HAVE_STD_FUNCTION
196 int32_t
OnByte(
bool quiet);
void(*)(void *context, const messages::MessageHeader &header, const void *payload) RawMessageCallback
P1_EXPORT void WarnOnError(bool enabled)
Enable/disable warnings for CRC and "message too large" failures.
FusionEngineFramer & operator=(const FusionEngineFramer &)=delete
P1_EXPORT ~FusionEngineFramer()
Library portability helper definitions.
P1_EXPORT void SetMessageCallback(RawMessageCallback callback, void *context)
Specify a function to be called when a message is framed.
P1_EXPORT FusionEngineFramer()=default
Construct a framer instance with no buffer allocated.
uint32_t current_message_size_
FusionEngineFramer & operator=(FusionEngineFramer &&)=delete
void ClearManagedBuffer()
Free the buffer_ if it's being managed internally.
RawMessageCallback raw_callback_
P1_EXPORT void Reset()
Reset the framer and discard all pending data.
GNSS signal and frequency type definitions.
uint32_t Resync()
Perform a resynchronization operation starting at buffer_[1].
Frame and validate incoming FusionEngine messages.
P1_EXPORT size_t OnData(const uint8_t *buffer, size_t length_bytes)
Process incoming data.
FusionEngineFramer(FusionEngineFramer &&)=delete
FusionEngineFramer(const FusionEngineFramer &)=delete
P1_EXPORT void SetBuffer(void *buffer, size_t capacity_bytes)
Set the buffer to use for message framing.
uint32_t next_byte_index_
P1_EXPORT FusionEngineFramer(size_t capacity_bytes)
Construct a framer instance with an internally allocated buffer.
Point One FusionEngine output message common definitions.
int32_t OnByte(bool quiet)
Process a single byte.
void * raw_callback_context_