nantum-responses.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. 'use strict';
  2. const sampleEvent1 = {
  3. _id: '5f076b8e4d122ec1152361ec',
  4. active_period: {
  5. duration_seconds: 1800,
  6. notification_duration_seconds: 86400,
  7. ramp_up_duration_seconds: 3600,
  8. start_tolerance_duration_seconds: 0,
  9. start_date: '2020-07-10T00:00:00Z',
  10. },
  11. cancelled: false,
  12. company: 'cyberdyne',
  13. created_at: '2020-07-09T19:10:06.332Z',
  14. dis: 'Test Event 1',
  15. market_context: 'http://emix',
  16. modification_number: 0,
  17. priority: 0,
  18. response_required: true,
  19. signals: {
  20. event: [
  21. {
  22. signal_id: 'id1',
  23. signal_name: 'BID_LOAD',
  24. signal_type: 'setpoint',
  25. current_value: 45.5,
  26. duration_seconds: 1800,
  27. start_date: '2020-07-10T00:00:00.000Z',
  28. intervals: [
  29. {
  30. duration_seconds: 1740,
  31. signal_payloads: [50],
  32. uid: '0',
  33. },
  34. {
  35. duration_seconds: 60,
  36. signal_payloads: [51],
  37. uid: '1',
  38. },
  39. ],
  40. item_base: {
  41. type: 'power-real',
  42. dis: 'RealPower',
  43. units: 'W',
  44. si_scale_code: 'none',
  45. power_attributes: {
  46. hertz: 60,
  47. voltage: 120,
  48. ac: true,
  49. },
  50. },
  51. },
  52. ],
  53. baseline: {
  54. baseline_id: 'id2',
  55. baseline_name: 'bname',
  56. duration_seconds: 1800,
  57. intervals: [
  58. {
  59. duration_seconds: 1740,
  60. signal_payloads: [50],
  61. uid: '0',
  62. },
  63. {
  64. duration_seconds: 60,
  65. signal_payloads: [51],
  66. uid: '1',
  67. },
  68. ],
  69. item_base: {
  70. type: 'power-real',
  71. dis: 'RealPower',
  72. units: 'W',
  73. si_scale_code: 'none',
  74. power_attributes: {
  75. hertz: 60,
  76. voltage: 120,
  77. ac: true,
  78. },
  79. },
  80. start_date: '2020-07-10T00:00:00Z',
  81. },
  82. },
  83. targets: [
  84. {
  85. dis: 'ven target',
  86. target_type: 'ven',
  87. value: 'D8:1D:4B:20:5A:65:4C:50:32:FA',
  88. },
  89. ],
  90. test_event: false,
  91. };
  92. const sampleVen1 = {
  93. _id: '123123123123123123129999',
  94. company: 'cyberdyne',
  95. created_at: new Date(),
  96. dis: 'Test VEN 1',
  97. ns: 'cyberdyne_studios',
  98. profile_name: '2.0b',
  99. is_report_only: false,
  100. supports_xml_sig: false,
  101. transport_name: 'simpleHttp',
  102. uses_http_pull: true,
  103. client_certificate_common_name: 'aabbccddeeff',
  104. client_certificate_fingerprint: 'D8:1D:4B:20:5A:65:4C:50:32:FA',
  105. };
  106. const sampleReport1 = [
  107. {
  108. report_request_ids: ['uuid0'],
  109. report_specifier_id: 'TELEMETRY_STATUS',
  110. descriptions: [
  111. {
  112. report_id: 'TelemetryStatusReport',
  113. report_type: 'x-resourceStatus',
  114. reading_type: 'x-notApplicable',
  115. sampling_rate: {
  116. min_period: 'PT1M',
  117. max_period: 'PT1H',
  118. on_change: false,
  119. },
  120. },
  121. ],
  122. last_received_register: '2020-04-26T01:00:00.000Z',
  123. },
  124. {
  125. report_request_ids: ['uuid1'],
  126. report_specifier_id: 'TELEMETRY_USAGE',
  127. descriptions: [
  128. {
  129. report_id: 'rep1',
  130. report_type: 'usage',
  131. reading_type: 'Direct Read',
  132. sampling_rate: {
  133. min_period: 'PT1M',
  134. max_period: 'PT1H',
  135. on_change: false,
  136. },
  137. },
  138. {
  139. report_id: 'rep2',
  140. report_type: 'usage',
  141. reading_type: 'Direct Read',
  142. sampling_rate: {
  143. min_period: 'PT1M',
  144. max_period: 'PT1H',
  145. on_change: false,
  146. },
  147. },
  148. ],
  149. last_received_register: '2020-04-26T01:00:00.000Z',
  150. },
  151. ];
  152. module.exports = {
  153. sampleEvent1,
  154. sampleReport1,
  155. sampleVen1,
  156. };