JM9 XRCU Board 0.1.2
Libraries API Reference
Loading...
Searching...
No Matches
JM9_packer Class Reference

JM9 UART packet packer. More...

#include <Jason.h>

Public Member Functions

 JM9_packer (HardwareSerial &init_uart, const uint8_t init_start_byte)
 Creates a packer.
 
bool send (const uint8_t *const tx_buf, const uint8_t tx_buf_len)
 Creates and sends a packet.
 

Public Attributes

HardwareSerialuart
 The underlying UART object.
 

Detailed Description

JM9 UART packet packer.

This packer can pack data into packets and send the packets through a UART bus.

Author
YH Choi @ JM9

Constructor & Destructor Documentation

◆ JM9_packer()

JM9_packer::JM9_packer ( HardwareSerial & init_uart,
const uint8_t init_start_byte )

Creates a packer.

Parameters
init_uartthe UART object to write this packet to
init_start_bytethe start byte of each packet

Member Function Documentation

◆ send()

bool JM9_packer::send ( const uint8_t *const tx_buf,
const uint8_t tx_buf_len )

Creates and sends a packet.

Parameters
tx_bufthe array of bytes to be sent
tx_buf_lenthe number of bytes to be sent
Returns
true if packet is successfully sent, false otherwise

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