MySensors Library & Examples  2.3.2-62-ge298769
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PJONSimpleSwitch< Strategy > Class Template Reference

Detailed Description

template<class Strategy>
class PJONSimpleSwitch< Strategy >

Definition at line 63 of file PJONSimpleSwitch.h.

+ Collaboration diagram for PJONSimpleSwitch< Strategy >:

Public Member Functions

 PJONSimpleSwitch (uint8_t bus_count, PJON< Strategy > *const buses[], uint8_t default_gateway=PJON_NOT_ASSIGNED)
 
 PJONSimpleSwitch (PJON< Strategy > &bus0, PJON< Strategy > &bus1, uint8_t default_gateway=PJON_NOT_ASSIGNED)
 
 PJONSimpleSwitch (PJON< Strategy > &bus0, PJON< Strategy > &bus1, PJON< Strategy > &bus2, uint8_t default_gateway=PJON_NOT_ASSIGNED)
 
void begin ()
 
void loop ()
 
void connect_buses (uint8_t bus_count_in, PJON< Strategy > *const buses_in[], uint8_t default_gateway_in=PJON_NOT_ASSIGNED)
 
uint8_t get_callback_bus () const
 
PJON< Strategy > & get_bus (const uint8_t ix)
 

Static Public Member Functions

static void receiver_function (uint8_t *payload, uint16_t length, const PJON_Packet_Info &packet_info)
 
static void error_function (uint8_t code, uint16_t data, void *custom_pointer)
 

Protected Member Functions

void connect (uint8_t bus_count_in, PJON< Strategy > *const buses_in[], uint8_t default_gateway_in, void *custom_pointer, PJON_Receiver receiver, PJON_Error error)
 
uint8_t find_attached_bus_with_id (const uint8_t *bus_id, const uint8_t, uint8_t &start_bus)
 
void send_packet (const uint8_t *payload, const uint16_t length, const uint8_t receiver_bus, const uint8_t sender_bus, bool &ack_sent, const PJON_Packet_Info &packet_info)
 
void forward_packet (const uint8_t *payload, const uint16_t length, const uint8_t receiver_bus, const uint8_t sender_bus, bool &ack_sent, const PJON_Packet_Info &packet_info)
 
uint8_t find_bus_with_id (const uint8_t bus_id[], const uint8_t device_id, uint8_t &start_bus)
 
void dynamic_receiver_function (uint8_t *payload, uint16_t length, const PJON_Packet_Info &packet_info)
 
void dynamic_error_function (uint8_t code, uint16_t data)
 

Protected Attributes

uint8_t bus_count = 0
 
uint8_t default_gateway = PJON_NOT_ASSIGNED
 
uint8_t current_bus = PJON_NOT_ASSIGNED
 
PJON< Strategy > * buses [PJON_ROUTER_MAX_BUSES]
 

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