xml文档主要是负责 创建事件,创建可以进行数据的传递的介质。
DVID主要是用作 上抛,示例:
<DVID id="3066" valueType="Ascii" logicalName="ProcessingStateChanged" value="" description="ProcessingStateChanged" eventTrigger=" " />
DVID创建 临时变量,用在事件里
public void SendStateChangedEvent(string goodProcessingState)
{
lock (_svidlocker)
{
_gem.SetAttribute("ProcessingStateChanged", AttributeType.DV, goodProcessingState);
ini.IniWriteValue("状态", "值", goodProcessingState);
}
_lstEvent.Enqueue(new FAEventItem() { dvid = null, objDvid = null, EventName = "ProcessingStateChanged", IsAlarm = false });
}
CEID 创建事件,如下定义三个参数
<CEID id="14" logicalName="ProcessingStateChanged" description=" " enabled="true">
<RPTID xsi:type="RPTID" id="4" logicalName="HostDefinedReport_4">
<ReportVariable id="3" varType="StatusVariable" logicalName="Clock" />
<ReportVariable id="3066" varType="DataVariable" logicalName="ProcessingStateChanged" />
<ReportVariable id="3000" varType="StatusVar