RSeries astromech firmware
ReelTwoSMQ32.h File Reference
#include "ReelTwo.h"
#include <esp_now.h>
#include <WiFi.h>
+ Include dependency graph for ReelTwoSMQ32.h:

Go to the source code of this file.

Classes

struct  SMQAddress
 
struct  SMQLMK
 
struct  SMQAddressKey
 
struct  SMQHost
 
struct  SMQRecvMsg
 
class  SMQ
 Serial Message Queue. More...
 

Macros

#define USE_SMQ
 
#define USE_SMQ32
 
#define SMQ_HOSTNAME   "Generic"
 
#define SMQ_DEBUG_PRINTLN(s)
 
#define SMQ_DEBUG_PRINT(s)
 
#define SMQ_DEBUG_PRINTF(...)
 
#define SMQ_DEBUG_PRINTLN_HEX(s)
 
#define SMQ_DEBUG_PRINT_HEX(s)
 
#define SMQ_DEBUG_FLUSH(s)
 
#define SMQ_ADDR_HEX_STR   "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx"
 
#define SMQ_ADDR_HEX_ARR(addr)   addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
 
#define SMQ_ADDR_HEX_PTR(addr)   &addr[0], &addr[1], &addr[2], &addr[3], &addr[4], &addr[5]
 
#define SMQ_MAX_KEYLEN   ESP_NOW_KEY_LEN
 
#define SMQ_BEACON_BROADCAST_INTERVAL   1000
 
#define SMQ_HOST_LOST_TIMEOUT   10000
 
#define SMQ_MAX_PAIRED_HOSTS   20
 
#define SMQ_MINIMUM_KEY_LEN   8
 
#define SMQ_PAIRING_TIMEOUT   2*60*1000
 
#define WIFI_CHANNEL   1
 
#define QUEUE_SIZE   10
 
#define MAX_MSG_SIZE   250
 
#define SMQ_MAX_HOST_NAME   13
 
#define REELTWO_READY()   _REELTWO_READY_
 
#define SMQMSG_FUNC_DECL(topic)   static void SMQHandler_##topic(SMQ::Message& msg)
 
#define SMQMESSAGE(topic, handler)
 

Typedefs

typedef uint16_t msg_id
 
typedef uint32_t smq_id
 
typedef void(* SMQMessageHandler) (class SMQ::Message &msg)
 

Variables

SMQ sSMQ
 

Macro Definition Documentation

◆ MAX_MSG_SIZE

#define MAX_MSG_SIZE   250

◆ QUEUE_SIZE

#define QUEUE_SIZE   10

◆ REELTWO_READY

#define REELTWO_READY ( )    _REELTWO_READY_

◆ SMQ_ADDR_HEX_ARR

#define SMQ_ADDR_HEX_ARR (   addr)    addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]

◆ SMQ_ADDR_HEX_PTR

#define SMQ_ADDR_HEX_PTR (   addr)    &addr[0], &addr[1], &addr[2], &addr[3], &addr[4], &addr[5]

◆ SMQ_ADDR_HEX_STR

#define SMQ_ADDR_HEX_STR   "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx"

◆ SMQ_BEACON_BROADCAST_INTERVAL

#define SMQ_BEACON_BROADCAST_INTERVAL   1000

◆ SMQ_DEBUG_FLUSH

#define SMQ_DEBUG_FLUSH (   s)

◆ SMQ_DEBUG_PRINT

#define SMQ_DEBUG_PRINT (   s)

◆ SMQ_DEBUG_PRINT_HEX

#define SMQ_DEBUG_PRINT_HEX (   s)

◆ SMQ_DEBUG_PRINTF

#define SMQ_DEBUG_PRINTF (   ...)

◆ SMQ_DEBUG_PRINTLN

#define SMQ_DEBUG_PRINTLN (   s)

◆ SMQ_DEBUG_PRINTLN_HEX

#define SMQ_DEBUG_PRINTLN_HEX (   s)

◆ SMQ_HOST_LOST_TIMEOUT

#define SMQ_HOST_LOST_TIMEOUT   10000

◆ SMQ_HOSTNAME

#define SMQ_HOSTNAME   "Generic"

◆ SMQ_MAX_HOST_NAME

#define SMQ_MAX_HOST_NAME   13

◆ SMQ_MAX_KEYLEN

#define SMQ_MAX_KEYLEN   ESP_NOW_KEY_LEN

◆ SMQ_MAX_PAIRED_HOSTS

#define SMQ_MAX_PAIRED_HOSTS   20

◆ SMQ_MINIMUM_KEY_LEN

#define SMQ_MINIMUM_KEY_LEN   8

◆ SMQ_PAIRING_TIMEOUT

#define SMQ_PAIRING_TIMEOUT   2*60*1000

◆ SMQMESSAGE

#define SMQMESSAGE (   topic,
  handler 
)
Value:
SMQMSG_FUNC_DECL(topic); \
SMQ::Message SMQMSG_##topic(STRID(#topic), SMQHandler_##topic); \
SMQMSG_FUNC_DECL(topic) { UNUSED_ARG(msg) handler }

◆ SMQMSG_FUNC_DECL

#define SMQMSG_FUNC_DECL (   topic)    static void SMQHandler_##topic(SMQ::Message& msg)

◆ USE_SMQ

#define USE_SMQ

◆ USE_SMQ32

#define USE_SMQ32

◆ WIFI_CHANNEL

#define WIFI_CHANNEL   1

Typedef Documentation

◆ msg_id

typedef uint16_t msg_id

◆ smq_id

typedef uint32_t smq_id

◆ SMQMessageHandler

typedef void(* SMQMessageHandler) (class SMQ::Message &msg)

Variable Documentation

◆ sSMQ

SMQ sSMQ
STRID
#define STRID(str)
Definition: ReelTwo.h:361
SMQMSG_FUNC_DECL
#define SMQMSG_FUNC_DECL(topic)
Definition: ReelTwoSMQ32.h:2521
UNUSED_ARG
#define UNUSED_ARG(arg)
Definition: ReelTwo.h:25