RC5 Demo
|
Class representing a RC5 telegram. More...
#include <rc5telegram.h>
Classes | |
union | ProtocolDataUnit |
Public Member Functions | |
RC5Telegram (uint16_t bits=0) | |
operator uint16_t () const | |
Bit | getFieldBit (void) const |
void | setFieldBit (Bit state) |
Bit | getToggleBit (void) const |
void | setToggleBit (Bit state) |
uint8_t | getAddress (void) const |
void | setAddress (uint8_t address) |
uint8_t | getCode (void) const |
void | setCode (uint8_t code) |
Private Attributes | |
ProtocolDataUnit | m_pdu |
Internal buffer holding the protocol data unit. More... | |
Class representing a RC5 telegram.
Internally it stores data in a bitfield that matches the binary layout of the RC5 protocol data units. It provides getters and setters for both, a raw bit pattern (as uint16_t) and individual elements (e.g. address or code). Thus it can be also used for preparing a RC5 telegram for transmission (even though this isn't used in this demo).
|
inline |
Constructor that optionally initializes from a bit pattern.
[in] | bits | Pattern to initialize with |
|
inline |
Getter for address.
|
inline |
Getter for code.
|
inline |
Getter for field bit.
|
inline |
Getter for toggle bit.
|
inline |
Cast operator for converting telegram into bit pattern.
|
inline |
Setter for address.
[in] | address | Address to set |
|
inline |
Setter for code.
[in] | code | Code to set |
|
inline |
Setter for field bit.
[in] | state | State of field bit to set |
|
inline |
Setter for toggle bit.
[in] | state | State of toggle bit to set |
|
private |
Internal buffer holding the protocol data unit.