modm API documentation
modm::sab::Response Class Reference

Response object for an action call. More...

#include <modm/communication/sab/slave.hpp>

Public Member Functions

void error (uint8_t errorCode=ERROR_GENERAL_ERROR)
 Signal an error condition. More...
 
void send ()
 Send a response without any data.
 
void send (const void *payload, std::size_t length)
 Send a response with an attached payload. More...
 
template<typename T >
void send (const T &payload)
 Send a response with an attached payload.
 

Protected Member Functions

 Response (Transmitter *parent)
 
 Response (const Response &)
 
Response & operator= (const Response &)
 

Protected Attributes

Transmittertransmitter
 
bool triggered
 is used by abp::Slave to check that a response was send
 

Friends

template<typename I >
class Slave
 

Detailed Description

Response object for an action call.

Member Function Documentation

void modm::sab::Response::error ( uint8_t  errorCode = ERROR_GENERAL_ERROR)

Signal an error condition.

Parameters
errorCodeError code. Values below 0x20 are reserved for the system, feel free to use any other value for specific error conditions.
See also
modm::sab::Error
void modm::sab::Response::send ( const void *  payload,
std::size_t  length 
)

Send a response with an attached payload.

Parameters
payloadPointer to the payload
lengthNumber of bytes

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