|
SingingCat 0
application
|
code to queue outbound commands. this is the "normal" way of sending out commands More...
#include <main-header.h>#include <queue.h>#include <command-parser.h>#include <command-handler.h>#include <multiram.h>#include <routing.h>#include <config.h>#include "espressif/esp8266_cloud.h"#include <ti1101.h>#include <route_command.h>#include "metrics/metrics.h"Go to the source code of this file.
Data Structures | |
| struct | queue_entry |
Macros | |
| #define | COM_QUEUE_SIZE 80 |
| #define | COMMAND_AGE_BEFORE_GC 120 |
| maximum amount of time a packet may remain allocated More... | |
| #define | MAX_COM_RETRIES 30 |
| #define | SEND_BUF_RESERVED1 1 |
| #define | SEND_BUF_RESERVED2 2 |
| #define | SEND_COM_FAILED_TO_ENCODE 7 |
| #define | SEND_COM_INVALID 13 |
| #define | SEND_COM_NOT_ENCODED 12 |
| #define | SEND_COM_STILL_INVALID 14 |
| #define | SEND_DEVICE_BUSY -113 |
| #define | SEND_FAILURE_NODEV 16 |
| #define | SEND_NO_CLOUD 3 |
| #define | SEND_NO_RECIPIENT 6 |
| #define | SEND_NO_TARGET 5 |
Typedefs | |
| typedef struct queue_entry | _queue_entry |
Functions | |
| struct command * | alloc_command () |
| allocate a free command More... | |
| struct command * | alloc_command_with_minfree (int minfree) |
| void | clear_outbound_queue () |
| clear the outbound queue any commands within the queue are silently discarded More... | |
| int | deliver_command (struct command *com, pkt_callback cb) |
| deliver a command to a module More... | |
| void | free_command (struct command *com) |
| free a command More... | |
| void | free_commands (int index) |
| free commands by index (-1 for all) More... | |
| struct command * | get_data_reply (struct command *com) |
| allocates and initializes a packet to be send as "data" to the command typically you'd add some data to it and pass it to send_command(). after send_command() you'll need to free it More... | |
| int | get_outbound_command_count_important () |
| return number of commands to be delivered (apart from announce/noop) More... | |
| void | print_outbound_queue () |
| void | process_command_queue () |
| this gets called when we got some cpu cycles spare we then send out commands and timeout other commands and so on More... | |
| int | process_queue_reply (struct command *ack) |
| process a reply More... | |
| void | queue_init () |
| void | request_route (long nodeid) |
| send an arp request (equivalent) More... | |
| int | send_command (struct command *com) |
| send a command to another module (or broadcast) More... | |
| int | send_command_fw_info (struct command *com, int err) |
| send a reply to a command More... | |
| int | send_command_quietly (struct command *com) |
| int | send_command_reply (struct command *com, byte flags) |
| send a reply to a command More... | |
| int | send_command_reply_with_args (struct command *com, byte flags, const char *format,...) |
| send a reply to a command More... | |
| int | send_data (struct command *com, const char *format,...) |
| send the format string as data in response to command "com" More... | |
code to queue outbound commands. this is the "normal" way of sending out commands
Definition in file queue.c.