• 热门标签

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

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

The “INIT” procedure is a special procedure that is executed whenever a project is
downloaded to EPIC USB. The “:INIT” label must be spelled with capitol letters and
appear in your EPL code. I place the :INIT procedure in my <name>.epl file since it
is the first procedure block executed. Other procedure blocks are tied to button
definitions, pigeon hole definitions and qproc definitions, all of which will be
discussed later.
4.3.2.2 Assignment of analogs and modrows: mydevices.hpl
With EPICenter and EPICUSB, the concept of “connectors” and “devices” was
introduced. This section is aimed at explaining how to use connectors and devices
in your EPL project. A “device” is a collection of switches, buttons, displays,
rotaries, analogs, etc. My Threat Warning Prime panel is an example of a device. It
has both buttons and lights defined for Threat Handoff; Missile Launch Warning;
Primary Mode; Unknown Threat; Naval Threat; and Target Separation functions.
device(Threat_Warn_Prime)//---Threat Warning Prime---
{
connector(Mod1);
button(4,6,Handoff);
button(4,5,Msl_Launch);
button(4,4,Pri_Mode_Open);
button(4,3,U_Unk);
button(4,2,Naval);
button(4,1,Tgt_Sep);
28
output(Leds1,0,1)
{
Handoff_Led = 0b00000001;
Msl_Launch_Led = 0b00000010;
Pri_Mode_Open_Led = 0b00000100;
U_Unk_Led = 0b00001000;
Naval_Led = 0b00010000;
Tgt_Sep_Led = 0b00100000;
};
};
4.3.2.3 A device is defined using 1 connector that the device would “plug” into.
MOD1 is the connector for the Threat Warning Prime device above. The connector
does not have to be a physical plug connection, and in reality may be just the wires
going to various analogs, and modrows. Devices can be used to pass events to
Direct Input (which show up in Gaming Options); to pass events to programs
communicating with EPICIO.DLL; or internally to execute procedures when a button
changes state (on to off or off to on). If a button is not attached to an internal
procedure, it will generate an automatic event. An automatic event can go to Direct
Input, the DLL, or both based on keywords “SEND_BUTTON_DLL”,
“SEND_ANALOG_DLL”, “SEND_POV_DLL” (EPROM V5.2 and above) in the
device definition.
#pragma hid_snd_rpt xx where xx is the number of devices to send to HID, controls
which devices will send automatic events to Direct Input. (EPROM V5.1 and
above).
The EPIC developer recommends ordering devices as follows:
Devices to send to Direct Input and alternately to EPICIO.DLL
Device to send to EPICIO.DLL
Devices with physical switches to be used to execute EPIC procedures.
Displays, outputs, etc.
Mousedevice
4.3.2.4 Connectors are a collection of analogs and modules and rows to be
scanned (checked by EPIC for changes). In EPIC USB, there are physical and
EPIC USB internal connections that we must keep straight in order for our
simulators to work as we plan. Physical connections are the module, row, bits
where our switches are physically connected:
button(1,6,Handoff)//on module 1
button(2,3,Handon)//on module 2
4.3.2.4.1 In EPIC USB however, we then connect this physical mod, row, bit to a an
internal connector called "connector" which is tied to the internal EPIC USB mod,
row, bit. Below is the internal EPIC USB connector ,"Mod1", definition.
connector(Mod1) //Internal EPIC connector
29
{
analog(0);
modrow(0,1);// EPIC module 0, Row 1, Bits 0 - 7
}
4.3.2.4.2 We must tie our physical switch definitions to the EPIC USB internal
connectors before our hardware can communicate with EPIC. We tie our physical
switches to a connector by assigning our hardware to a device and then assigning
the device to a connector. These will be relative assignments, which mean the
assignment order will determine the module, row, and bit values for each button,
etc.. Below is the device "first" which is assigned to connector Mod1 and has button
"Handoff" assigned to it.
device(first)//
{
connector(Mod1);
button(1,6,Handoff);//assigned to Mod1 modrow (0,1)
}
The result of this code is that the button "Handoff" is now assigned to EPIC USB's
internal Module 0, Row 1, Bit 0 since it is the first button assigned. The next
assignment would be Module 0, Row 1, Bit 2, and so on. In reality, you don't need
to worry about this since EPIC will keep track of it for you, just remember you have
to use connectors and devices correctly and you can only assign 8 devices to a
modrow.
4.3.2.4.3 If you want, you can make life easy by assigning your physical devices to
 
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:航空资料18(8)