|
AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
A class containing the data for a single SPI transaction. More...
#include <spi_transaction_frame.hpp>
Public Member Functions | |
| SPITransactionFrame (const std::vector< std::uint8_t > *txBuffer, bool read=false) | |
| Construct a new SPITransactionFrame object. | |
| bool | read_byte (std::size_t index, std::uint8_t &byte) const |
| Read a byte from the response buffer. | |
| bool | read_bytes (std::size_t index, std::uint8_t *buffer, std::size_t length) const |
| Read multiple bytes from the response buffer. | |
| std::vector< std::uint8_t > & | get_rx_buffer () |
| Get the buffer to store the response in. | |
| const std::vector< std::uint8_t > * | get_tx_buffer () const |
| Get the buffer to transmit. | |
| bool | get_is_read () const |
| Get whether the interface should read the response to the write operation. | |
Private Attributes | |
| const std::vector< std::uint8_t > * | txBuffer |
| The buffer to transmit. | |
| const bool | read |
| If true, the plugin will read the response to the write operation. | |
| std::vector< std::uint8_t > | rxBuffer |
| The buffer to store the response in. | |
A class containing the data for a single SPI transaction.
Definition at line 23 of file spi_transaction_frame.hpp.
| isobus::SPITransactionFrame::SPITransactionFrame | ( | const std::vector< std::uint8_t > * | txBuffer, |
| bool | read = false ) |
Construct a new SPITransactionFrame object.
| [in] | txBuffer | A pointer to the buffer to transmit |
| [in] | read | If true, the plugin will read the response to the write operation |
Definition at line 17 of file spi_transaction_frame.cpp.
| bool isobus::SPITransactionFrame::get_is_read | ( | ) | const |
Get whether the interface should read the response to the write operation.
Definition at line 83 of file spi_transaction_frame.cpp.
| std::vector< std::uint8_t > & isobus::SPITransactionFrame::get_rx_buffer | ( | ) |
Get the buffer to store the response in.
Definition at line 73 of file spi_transaction_frame.cpp.
| const std::vector< std::uint8_t > * isobus::SPITransactionFrame::get_tx_buffer | ( | ) | const |
Get the buffer to transmit.
Definition at line 78 of file spi_transaction_frame.cpp.
| bool isobus::SPITransactionFrame::read_byte | ( | std::size_t | index, |
| std::uint8_t & | byte ) const |
Read a byte from the response buffer.
| [in] | index | The index of the byte to read |
| [in,out] | byte | The byte to store the read value in |
Definition at line 28 of file spi_transaction_frame.cpp.
| bool isobus::SPITransactionFrame::read_bytes | ( | std::size_t | index, |
| std::uint8_t * | buffer, | ||
| std::size_t | length ) const |
Read multiple bytes from the response buffer.
| [in] | index | The index of the first byte to read |
| [in,out] | buffer | The buffer to store the bytes in |
| [in] | length | The number of bytes to read |
Definition at line 51 of file spi_transaction_frame.cpp.
|
private |
If true, the plugin will read the response to the write operation.
Definition at line 60 of file spi_transaction_frame.hpp.
|
private |
The buffer to store the response in.
Definition at line 61 of file spi_transaction_frame.hpp.
|
private |
The buffer to transmit.
Definition at line 59 of file spi_transaction_frame.hpp.