oadrRegisterReport.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233
  1. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  2. <oadr:oadrRegisterReport ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  3. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">{{ request_id }}</requestID>
  4. {% for report in reports %}
  5. <oadr:oadrReport xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:strm="urn:ietf:params:xml:ns:icalendar-2.0:stream">
  6. {% if report.dtstart is defined and report.dtstart is not none %}
  7. <xcal:dtstart>
  8. <xcal:date-time>{{ report.duration|timedeltaformat }}</xcal:date-time>
  9. </xcal:dtstart>
  10. {% endif %}
  11. {% if report.duration is defined and report.duration is not none %}
  12. <xcal:duration>
  13. <xcal:duration>{{ report.duration|timedeltaformat }}</xcal:duration>
  14. </xcal:duration>
  15. {% endif %}
  16. <ei:eiReportID>{{ report.report_id }}</ei:eiReportID>
  17. {% for r_id, report_description in report.report_descriptions.items() %}
  18. {% include 'parts/oadrReportDescription.xml' %}
  19. {% endfor %}
  20. <ei:reportRequestID>{{ report.report_request_id }}</ei:reportRequestID>
  21. <ei:reportSpecifierID>{{ report.report_specifier_id }}</ei:reportSpecifierID>
  22. <ei:reportName>{{ report.report_name }}</ei:reportName>
  23. <ei:createdDateTime>{{ report.created_date_time|datetimeformat }}</ei:createdDateTime>
  24. </oadr:oadrReport>
  25. {% endfor %}
  26. {% if ven_id is defined and ven_id is not none %}
  27. <ei:venID>{{ ven_id }}</ei:venID>
  28. {% endif %}
  29. {% if report_request_id is defined and report_request_id is not none %}
  30. <ei:reportRequestID>{{ report_request_id }}</ei:reportRequestID>
  31. {% endif %}
  32. </oadr:oadrRegisterReport>
  33. </oadr:oadrSignedObject>