EasyVR3_LED_Library
protocol.h
- Committer:
- Xiaofei
- Date:
- 2015-10-22
- Revision:
- 0:8ec860bd579a
File content as of revision 0:8ec860bd579a:
#ifndef PROTOCOL_H #define PROTOCOL_H #define CMD_BREAK 'b' // abort recog or ping #define CMD_SLEEP 's' // go to power down #define CMD_KNOB 'k' // set si knob <1> #define CMD_MIC_DIST 'k' // set microphone (<1>=-1) distance <2> #define CMD_LEVEL 'v' // set sd level <1> #define CMD_LANGUAGE 'l' // set si language <1> #define CMD_TIMEOUT 'o' // set timeout <1> #define CMD_RECOG_SI 'i' // do si recog from ws <1> #define CMD_TRAIN_SD 't' // train sd command at group <1> pos <2> #define CMD_GROUP_SD 'g' // insert new command at group <1> pos <2> #define CMD_UNGROUP_SD 'u' // remove command at group <1> pos <2> #define CMD_RECOG_SD 'd' // do sd recog at group <1> (0 = trigger mixed si/sd) #define CMD_ERASE_SD 'e' // reset command at group <1> pos <2> #define CMD_NAME_SD 'n' // label command at group <1> pos <2> with length <3> name <4-n> #define CMD_COUNT_SD 'c' // get command count for group <1> #define CMD_DUMP_SD 'p' // read command data at group <1> pos <2> #define CMD_MASK_SD 'm' // get active group mask #define CMD_RESETALL 'r' // reset all commands and groups #define CMD_ID 'x' // get version id #define CMD_DELAY 'y' // set transmit delay <1> (log scale) #define CMD_BAUDRATE 'a' // set baudrate <1> (bit time, 1=>115200) #define CMD_QUERY_IO 'q' // configure, read or write I/O pin <1> of type <2> #define CMD_PLAY_SX 'w' // wave table entry <1-2> (10-bit) playback at volume <3> #define CMD_PLAY_DTMF 'w' // play (<1>=-1) dial tone <2> for duration <3> #define CMD_DUMP_SX 'h' // dump wave table entries #define CMD_DUMP_SI 'z' // dump si settings for ws <1> (or total ws count if -1) #define CMD_SEND_SN 'j' // send sonicnet token with bits <1> index <2-3> at time <4-5> #define CMD_RECV_SN 'f' // receive sonicnet token with bits <1> rejection <2> timeout <3-4> #define STS_MASK 'k' // mask of active groups <1-8> #define STS_COUNT 'c' // count of commands <1> (or number of ws <1>) #define STS_AWAKEN 'w' // back from power down mode #define STS_DATA 'd' // provide training <1>, conflict <2>, command label <3-35> (counted string) #define STS_ERROR 'e' // signal error code <1-2> #define STS_INVALID 'v' // invalid command or argument #define STS_TIMEOUT 't' // timeout expired #define STS_INTERR 'i' // back from aborted recognition (see 'break') #define STS_SUCCESS 'o' // no errors status #define STS_RESULT 'r' // recognised sd command <1> - training similar to sd <1> #define STS_SIMILAR 's' // recognised si <1> (in mixed si/sd) - training similar to si <1> #define STS_OUT_OF_MEM 'm' // no more available commands (see 'group') #define STS_ID 'x' // provide version id <1> #define STS_PIN 'p' // return pin state <1> #define STS_TABLE_SX 'h' // table entries count <1-2> (10-bit), table name <3-35> (counted string) #define STS_GRAMMAR 'z' // si grammar: flags <1>, word count <2>, labels... <3-35> (n counted strings) #define STS_TOKEN 'f' // received sonicnet token <1-2> // protocol arguments are in the range 0x40 (-1) to 0x60 (+31) inclusive #define ARG_MIN 0x40 #define ARG_MAX 0x60 #define ARG_ZERO 0x41 #define ARG_ACK 0x20 // to read more status arguments #endif //PROTOCOL_H