123456789101112131415161718192021222324252627282930313233343536373839 |
- <ei:eiEventSignal>
- <strm:intervals xmlns:strm="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0">
- {% for interval in event_signal.intervals %}
- <ei:interval>
- {% if interval.dtstart is defined and interval.dtstart is not none %}
- <xcal:dtstart>
- <xcal:date-time>{{ interval.dtstart|datetimeformat }}</xcal:date-time>
- </xcal:dtstart>
- {% endif %}
- {% if interval.duration is defined and interval.duration is not none %}
- <xcal:duration>
- <xcal:duration>{{ interval.duration|timedeltaformat }}</xcal:duration>
- </xcal:duration>
- {% endif %}
- <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
- <text>{{ loop.index0 }}</text>
- </uid>
- <ei:signalPayload>
- <ei:payloadFloat>
- <ei:value>{{ interval.signal_payload }}</ei:value>
- </ei:payloadFloat>
- </ei:signalPayload>
- </ei:interval>
- {% endfor %}
- </strm:intervals>
- <ei:signalName>{{ event_signal.signal_name }}</ei:signalName>
- <ei:signalType>{{ event_signal.signal_type }}</ei:signalType>
- <ei:signalID>{{ event_signal.signal_id }}</ei:signalID>
- {% if event_signal.measurement is defined and event_signal.measurement is not none %}
- {% include 'parts/eventSignalEmix.xml' %}
- {% endif %}
- {% if event_signal.current_value is defined and event_signal.current_value is not none %}
- <ei:currentValue>
- <ei:payloadFloat>
- <ei:value>{{ event_signal.current_value }}</ei:value>
- </ei:payloadFloat>
- </ei:currentValue>
- {% endif %}
- </ei:eiEventSignal>
|