@smartdcc/duis-templates 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ ![GitHub banner](https://user-images.githubusercontent.com/527411/192760138-a1f61694-f705-4358-b419-e5eeb78c2ea0.png)
2
+
1
3
  # DUIS Templates
2
4
 
3
5
  [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
@@ -177,6 +179,31 @@ The structure of the result set is described in the Fuse.js documentation. Of
177
179
  interest, the `matches` item shows which key in the Template was matched and the
178
180
  position in the string too.
179
181
 
182
+ ## Lookup GBCS usecase details
183
+
184
+ It is possible to map a use case code to a textual names directly without the
185
+ service request. This is exposed as:
186
+
187
+ ```ts
188
+ import { lookupGBCS } from '@smartdcc/duis-templates'
189
+
190
+ console.log(lookupGBCS('ECS17b'))
191
+ ```
192
+
193
+ Which might return:
194
+
195
+ ```js
196
+ {
197
+ 'Use Case Name': 'Read Import Energy / Consumption Registers',
198
+ 'Use Case Title': 'ECS17b Read ESME Energy Registers (Import Energy)',
199
+ 'Message Type': 'SME.C.NC',
200
+ 'Use Case Description': 'This Use Case is for reading the ESME import energy registers / GSME consumption registers.',
201
+ 'Remote Party or HAN Message': 'Remote Party',
202
+ 'Service Reference': '4.1',
203
+ Code: 'ECS17b'
204
+ }
205
+ ```
206
+
180
207
  ## Contributing
181
208
 
182
209
  Contributions are welcome!
@@ -203,4 +230,4 @@ Copyright 2022, Smart DCC Limited, All rights reserved. Project is licensed unde
203
230
  [duis]: https://smartenergycodecompany.co.uk/the-smart-energy-code-2/ "Smart Energy Code"
204
231
  [duis-parser]: https://github.com/SmartDCCInnovation/duis-parser "DUIS Parser"
205
232
  [boxed]: https://www.smartdcc.co.uk/our-smart-network/network-products-services/dcc-boxed/ "DCC Boxed"
206
- [fusejs]: https://fusejs.io/ "Fuse.js"
233
+ [fusejs]: https://fusejs.io/ "Fuse.js"