nantum-responses.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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_time: '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_time: '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_time: '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. dis: 'Test VEN 1',
  94. oadr_utility_ven_registrationId: '123123123123123123129999',
  95. company: 'cyberdyne',
  96. created_at: new Date(),
  97. };
  98. const sampleVenRegistration1 = {
  99. _id: '123123123123123123129999',
  100. company: 'cyberdyne',
  101. created_at: new Date(),
  102. dis: 'Test VEN Registration 1',
  103. ns: 'cyberdyne_studios',
  104. profile_name: '2.0b',
  105. is_report_only: false,
  106. supports_xml_sig: false,
  107. transport_name: 'simpleHttp',
  108. uses_http_pull: true,
  109. client_certificate_common_name: 'aabbccddeeff',
  110. client_certificate_fingerprint: 'D8:1D:4B:20:5A:65:4C:50:32:FA',
  111. };
  112. const sampleReport1 = [
  113. {
  114. report_request_ids: ['uuid0'],
  115. report_specifier_id: 'TELEMETRY_STATUS',
  116. descriptions: [
  117. {
  118. report_id: 'TelemetryStatusReport',
  119. report_type: 'x-resourceStatus',
  120. reading_type: 'x-notApplicable',
  121. sampling_rate: {
  122. min_period: 'PT1M',
  123. max_period: 'PT1H',
  124. on_change: false,
  125. },
  126. },
  127. ],
  128. last_received_register: '2020-04-26T01:00:00.000Z',
  129. },
  130. {
  131. report_request_ids: ['uuid1'],
  132. report_specifier_id: 'TELEMETRY_USAGE',
  133. descriptions: [
  134. {
  135. report_id: 'rep1',
  136. report_type: 'usage',
  137. reading_type: 'Direct Read',
  138. sampling_rate: {
  139. min_period: 'PT1M',
  140. max_period: 'PT1H',
  141. on_change: false,
  142. },
  143. },
  144. {
  145. report_id: 'rep2',
  146. report_type: 'usage',
  147. reading_type: 'Direct Read',
  148. sampling_rate: {
  149. min_period: 'PT1M',
  150. max_period: 'PT1H',
  151. on_change: false,
  152. },
  153. },
  154. ],
  155. last_received_register: '2020-04-26T01:00:00.000Z',
  156. },
  157. ];
  158. module.exports = {
  159. sampleEvent1,
  160. sampleReport1,
  161. sampleVen1,
  162. sampleVenRegistration1,
  163. };