RSeries astromech firmware
ReelTwoSMQ.h File Reference
#include "ReelTwo.h"
+ Include dependency graph for ReelTwoSMQ.h:

Go to the source code of this file.

Classes

class  SMQ
 Serial Message Queue. More...
 

Macros

#define USE_SMQ
 
#define SMQ_DEBUG_PRINTLN(s)
 
#define SMQ_DEBUG_PRINT(s)
 
#define SMQ_DEBUG_PRINTLN_HEX(s)
 
#define SMQ_DEBUG_PRINT_HEX(s)
 
#define SMQ_DEBUG_FLUSH(s)
 
#define 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 uint16_t smq_id
 
typedef void(* SMQMessageHandler) (class SMQ::Message &msg)
 

Macro Definition Documentation

◆ REELTWO_READY

#define REELTWO_READY ( )
Value:
{ \
if (!sSMQREADY) \
{ \
_REELTWO_READY_; \
SMQ_SERIAL.begin(DEFAULT_BAUD_RATE); \
sSMQ = &SMQ_SERIAL; \
SMQ_DEBUG_PRINTLN("Waiting for agent"); \
} \
}

◆ 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_PRINTLN

#define SMQ_DEBUG_PRINTLN (   s)

◆ SMQ_DEBUG_PRINTLN_HEX

#define SMQ_DEBUG_PRINTLN_HEX (   s)

◆ SMQMESSAGE

#define SMQMESSAGE (   topic,
  handler 
)
Value:
SMQMSG_FUNC_DECL(topic); \
SMQ::Message SMQMSG_##topic(SMQID(#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

Typedef Documentation

◆ msg_id

typedef uint16_t msg_id

◆ smq_id

typedef uint16_t smq_id

◆ SMQMessageHandler

typedef void(* SMQMessageHandler) (class SMQ::Message &msg)
SMQMSG_FUNC_DECL
#define SMQMSG_FUNC_DECL(topic)
Definition: ReelTwoSMQ.h:1633
DEFAULT_BAUD_RATE
#define DEFAULT_BAUD_RATE
Definition: ReelTwo.h:220
SMQID
#define SMQID(str)
Definition: ReelTwo.h:359
UNUSED_ARG
#define UNUSED_ARG(arg)
Definition: ReelTwo.h:25
SMQ::ready
static void ready()
Definition: ReelTwoSMQ.h:57