| modm API documentation
    | 
#include <modm/communication/sab/master.hpp>
| Static Public Member Functions | |
| static void | initialize () | 
| template<typename T > | |
| static void | query (uint8_t slaveAddress, uint8_t command, const T &payload, uint8_t responseLength) | 
| Start a new query with a payload.  More... | |
| static void | query (uint8_t slaveAddress, uint8_t command, const void *payload, uint8_t payloadLength, uint8_t responseLength) | 
| static void | query (uint8_t slaveAddress, uint8_t command, uint8_t responseLength) | 
| Start a new query without any payload. | |
| static bool | isQueryCompleted () | 
| static bool | isSuccess () | 
| Check if the last query could be performed successfully.  More... | |
| static uint8_t | getErrorCode () | 
| Check error code.  More... | |
| template<typename T > | |
| static const T * | getResponse () | 
| static const uint8_t * | getResponse () | 
| static void | update () | 
| Protected Types | |
| enum | QueryStatus { IN_PROGRESS, SUCCESS, ERROR_RESPONSE = 0x40, ERROR_TIMEOUT = 0x41, ERROR_PAYLOAD = 0x42 } | 
| Static Protected Attributes | |
| static Interface | interface | 
| static QueryStatus | queryStatus | 
| static uint8_t | expectedResponseLength | 
| static modm::ShortTimeout | timer | 
| static constexpr std::chrono::milliseconds | timeout {10} | 
| timeout value in milliseconds | |
Requires modm::Clock to be implemented.
| 
 | protected | 
| Enum Values | Documentation | 
|---|---|
| IN_PROGRESS | Query in progress. | 
| SUCCESS | Response successfully received. | 
| ERROR_RESPONSE | Error in the received message. | 
| ERROR_TIMEOUT | No message received within the timeout window. | 
| ERROR_PAYLOAD | Wrong payload size. | 
| 
 | static | 
Check error code.
Only valid if isQueryCompleted() returns true while isSuccess() returns false.
| 
 | static | 
Check if the last query could be performed successfully.
Only valid if isQueryCompleted() returns true.
true if the query was successful. Use getResponse() to access the result. | 
 | static | 
Start a new query with a payload.
| slaveAddress | |
| command | |
| payload | |
| responseLength | Expected payload length of the response |