-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmodel.xml
More file actions
93 lines (93 loc) · 4.62 KB
/
model.xml
File metadata and controls
93 lines (93 loc) · 4.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<project heartbeat-interval="1" luaroot="@ESP_PROJECT_OUTPUT@/luaroot" name="event_sorter" pubsub="auto" threads="1">
<metadata>
<meta id="layout">{"cq1":{"EventSort":{"x":50,"y":295},"ParseTime":{"x":50,"y":175},"ReadISSdata":{"x":50,"y":50}}}</meta>
<meta id="studioUploadedBy">anonymousUser</meta>
<meta id="studioUploaded">1746610145139</meta>
<meta id="studioModifiedBy">anonymousUser</meta>
<meta id="studioModified">1746610229176</meta>
<meta id="studioTags">Example</meta>
</metadata>
<contqueries>
<contquery name="cq1">
<windows>
<window-source autogen-key="true" index="pi_EMPTY" insert-only="true" name="ReadISSdata">
<description><![CDATA[Example project which highlights the eventsort custom window. ISS data is read into the source window in reverse order by time and sorted into correct chronological order using the EventSort custom window.]]></description>
<schema>
<fields>
<field key="true" name="key" type="int64"/>
<field name="dt" type="string"/>
<field name="long" type="double"/>
<field name="lat" type="double"/>
</fields>
</schema>
<connectors>
<connector class="fs" name="iss_input_unsorted_Connector">
<properties>
<property name="type"><![CDATA[pub]]></property>
<property name="dateformat"><![CDATA[ %m/%d/%Y:%H:%M:%S]]></property>
<property name="fsname"><![CDATA[@ESP_PROJECT_HOME@/files/iss_input_unsorted.csv]]></property>
<property name="fstype"><![CDATA[csv]]></property>
</properties>
</connector>
</connectors>
</window-source>
<window-lua events="create" index="pi_EMPTY" name="ParseTime">
<description><![CDATA[Lua window to convert the human readable time into Linux epoch time.]]></description>
<schema>
<fields>
<field key="true" name="key" type="int64"/>
<field name="epochtime" type="int64"/>
<field name="dt" type="string"/>
<field name="long" type="double"/>
<field name="lat" type="double"/>
</fields>
</schema>
<copy><![CDATA[key,dt,long,lat]]></copy>
<code><![CDATA[function create(data,context)
local event = {}
event.epochtime = esp_parseDate(data.dt,"%m/%d/%Y:%H:%M:%S") * 1000000
return(event)
end]]></code>
</window-lua>
<window-custom index="pi_EMPTY" type="EventSort" version="1" name="EventSort">
<description><![CDATA[Sort incoming events so that they are injected into stream in time order.]]></description>
<schema>
<fields>
<field key="true" name="key" type="int64"/>
<field name="epochtime" type="int64"/>
<field name="dt" type="string"/>
<field name="long" type="double"/>
<field name="lat" type="double"/>
</fields>
</schema>
<plugin code="@ESP_PROJECT_HOME@/custom_windows/EventSort/EventSort.lua">
<input-map>
<properties>
<property name="epochtime" description="linux epoch time in microseconds." required="true"><![CDATA[epochtime]]></property>
<property name="dt" description="readable data and time " required="true"><![CDATA[dt]]></property>
<property name="lat" description="latitude " required="true"><![CDATA[lat]]></property>
<property name="long" description="longitude " required="true"><![CDATA[long]]></property>
<property name="key" description="event key field " required="true"><![CDATA[key]]></property>
</properties>
</input-map>
<output-map>
<properties>
<property name="Out1" description="manitory but unused "><![CDATA[key]]></property>
</properties>
</output-map>
<initialization>
<properties>
<property name="config_sort_field" description="Name of schema entry which contains sort variable"><![CDATA[epochtime]]></property>
<property name="config_sort_delay" description="Number of microseconds to queue events for sorting "><![CDATA[1000000]]></property>
</properties>
</initialization>
</plugin>
</window-custom>
</windows>
<edges>
<edge source="ReadISSdata" target="ParseTime"/>
<edge source="ParseTime" target="EventSort"/>
</edges>
</contquery>
</contqueries>
</project>