SingingCat 0
application
queue.h
1#ifndef QUEUE_H
2#define QUEUE_H
3#include <command-parser.h>
4#include <command-handler.h>
5void queue_init();
7void print_outbound_queue();
8struct command *alloc_command();
9struct command *alloc_command_with_minfree();
10void free_commands(int index);
11void free_command(struct command *com);
12int send_data(struct command *com, const char *format, ...);
13struct command *get_data_reply(struct command *com);
14void process_command(struct command *com);
15int send_command_reply_with_args(struct command *com, byte flags, const char *format, ...);
16int send_command_reply(struct command *com, byte flags);
17int send_command_fw_info(struct command *com, int err);
18
19int deliver_command(struct command *com, pkt_callback);
20
23
24int send_command(struct command *com);
25int send_command_quietly(struct command *com);
27#endif
int process_queue_reply(struct command *com)
process a reply
Definition: queue.c:326
int send_command_reply_with_args(struct command *com, byte flags, const char *format,...)
send a reply to a command
Definition: queue.c:588
void free_commands(int index)
free commands by index (-1 for all)
Definition: queue.c:181
int send_command(struct command *com)
send a command to another module (or broadcast)
Definition: queue.c:374
void free_command(struct command *com)
free a command
Definition: queue.c:200
int deliver_command(struct command *com, pkt_callback)
deliver a command to a module
Definition: queue.c:651
int get_outbound_command_count_important()
return number of commands to be delivered (apart from announce/noop)
Definition: queue.c:813
int send_command_reply(struct command *com, byte flags)
send a reply to a command
Definition: queue.c:562
void clear_outbound_queue()
clear the outbound queue any commands within the queue are silently discarded
Definition: queue.c:87
void process_command(struct command *com)
command is parsed, now execute it
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 ...
Definition: queue.c:271
int send_data(struct command *com, const char *format,...)
send the format string as data in response to command "com"
Definition: queue.c:294
void process_command_queue()
this gets called when we got some cpu cycles spare we then send out commands and timeout other comman...
Definition: queue.c:682
struct command * alloc_command()
allocate a free command
Definition: queue.c:173
int send_command_fw_info(struct command *com, int err)
send a reply to a command
Definition: queue.c:533
int com
Definition: command.h:22
int index
Definition: command.h:13
uint8_t flags
Definition: command.h:23