SingingCat  0
application
command.h
1 #ifndef COMMAND_H
2 #define COMMAND_H
3 #include "stdint.h"
4 
5 // commands
6 // I ponder:
7 // copying the uint8_ts from the ringbuffer into the commandbuf has
8 // the advantage that, if I keep receiving, I won't break on overflows.
9 // however, it's obviously a memory hog!
10 typedef struct command {
11  uint8_t encoding;
12  uint8_t local_flags;
13  int index;
14  long sender;
15  long recipient;
16  long target;
17  uint8_t sourcedev;
18  uint8_t connid;
19  //int parsepos; /**< helper var for the command parser */
20  uint8_t parserstate;
21  uint8_t invalid;
22  int com;
23  uint8_t flags;
24  uint8_t argctr;
25  // uint16_t argsizes[COMMAND_MAXARGS]; /* length of each arg in argbuf */
26  //uint8_t argtypes[COMMAND_MAXARGS]; /* type of each arg in argbuf. compatibility includes 0xFF for a non-encoded one (old-style), otherwise it is encoded, see readme.txt for possible encodings. if encoded get_arg() will return pointer to encoded binary buf. get_arg */
27  char argbuf[256];
28 } _command;
29 
30 #define COMFLAGS_ACK 0x01
31 #define COMFLAGS_SUCCESS 0x02
32 #define COMFLAGS_DATA 0x04
33 #define COMFLAGS_FORWARDED 0x08
34 // set for any command sent, if module has powersave mode turned on
35 #define COMFLAGS_POWERSAVE 0x10
36 #endif
int com
Definition: command.h:22
uint8_t parserstate
Definition: command.h:20
long target
Definition: command.h:16
uint8_t connid
Definition: command.h:18
uint8_t sourcedev
Definition: command.h:17
uint8_t invalid
Definition: command.h:21
uint8_t encoding
Definition: command.h:11
long recipient
Definition: command.h:15
int index
Definition: command.h:13
uint8_t flags
Definition: command.h:23
uint8_t argctr
Definition: command.h:24
long sender
Definition: command.h:14