• 热门标签

当前位置: 主页 > 航空资料 > 国外资料 >

时间:2010-08-18 09:13来源:蓝天飞行翻译 作者:admin
曝光台 注意防骗 网曝天猫店富美金盛家居专营店坑蒙拐骗欺诈消费者

setqlogon(<flags>);
This command uses <flags> bits to control functions in the EPIC hardware.
Bit 0 controls logging of the EPIC command flow
Bit 1 controls logging of the input queue and interrupt queue (XQ) entries (bit 7 = 1)
to DEBUG buffer. Entries are CMD/Data BYTE(1)
Bit 2 controls trap time logging routines (this will put a code of 000A in the debug
buffer)
Bit 3 traps EXCESSIVE time hogging routines ( > ½ second) and puts a code of
0009 in DEBUG buffer.
Bit 4 allows user control of test point 2 (TP2). TP2 can be turned on with exec(138)
and off with exec(139) command. This is useful to see if a point in your program
was hit without having to stop and check the debug buffer breakpoints.
4.3.4 Pre Processor Directives
#ifdef <keyword> if <keyword>
#else
#endef
48
This is a preprocessor directive and it allows you to conditionally include procedure
statements or functions in your EPL code. Statement between the #ifdef and
matching #endef are executed if <keyword> is defined. The #else command allows
you to include statements following the #else if the
previous #ifdef was false.
#ifndef <keyword> if <keyword>
#else
#endef
This is a preprocessor directive and it allows you to conditionally include procedure
statements or functions in your EPL code. Statement between the #ifndef and
matching #endef are executed if <keyword> is not defined. The #else command
allows you to include statements following the #else if the
previous #ifndef was false.
4.3.5 Macros
#macro <macro name>(<parameter1,parameter2,parameter3,....)
Macro body
#endmac
#expand <macro name>(parameter list)
The macro command allows you to use macros in your EPL project. A macro
defines a block of code that starts with the #macro <macro name>(<parameter1,
parameter2, parameter3,....) directive and terminates with the #endmac directive.
The macro must be expanded by the #expand directive.
Example
#macro TypeHello(key1,key2,key3,key4,key5)
keyhit(key1);
keyhit(key2);
keyhit(key3);
keyhit(key4);
keyhit(key5);
testvar = 23;
#endmac
//The line:
#expand TypeHello(h,e,l,l,o)
//Will send:
hello
//And set variable testvar to 23
4.3.6 Data Types
49
Flag <flagname>[=][true,false];
This data type declares a flag <flag> that must be a unique flag identifier. The initial
value of <flag> is undefined unless it is initialized to “true” or “false”.
Example:
flag testFlag1;
flag testFlag2 = true;
var|var8|byte <variable name>[=] [initial value];
This data type declares an 8 bit (byte) variable <variable name> that must be a
unique variable identifier. The value of <variable name> is undefined until it is
specified.
byte testByte1;
byte testByte1 = 0x35;
var16|word <variable name>[=] [initial value];
This data type declares a 16 bit (word) variable <variable name> that must be a
unique variable identifier. The value of <variable name> is undefined until it is
specified.
word testWord1;
word testWord2 = 23512;
rvar(<name>,<lower limit>,<upper limit>,<preset value>,[wrap flag]);
This data type declares a rotary variable. Rotary variables are unique since they
have the ability to wrap around (wrap flag set to “false”) if the <lower limit> or
<upper limit> is reached. If the wrap flag is set to “true”, the rvar will not rotate, but
will stay within the specified bounds. An example for rotary variable “test” with
lower limit = 10 and upper limit = 359, and a preset of 100:
rvar(test,10,359,100, false);
if test=358 and 2 is added to it, the new value = 10 (358+1=359, 359+1=10)
rvar(test,000,255,000,true);
if test = 200 and we add 100,
test will = 255 because 200+100 is greater than 255 so test is set to the upper limit.
bcd <name>[=] [initial value];
This data type declares a binary coded decimal in the form: SNNNNNNN.FFF; S is
the sign (not implemented yet); NNNNNNN it the number part, and FFFF is the
fractional part.
random
This command allows you to assign a random number to a variable. A different
random number can be generated every ½ second. Example:
testByte == random;
4.3.7 Device Descriptors
50
Device descriptor syntax
#pragma hid_rpt_snd x
This device descriptor will send x number of the devices starting with device0 (the
first one described). For example, #pragma hid_rpt_snd 7 will send devices 0-6 to
 
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:航空资料18(15)