template.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0"?>
  2. <device>
  3. <developer>Developer_name</developer>
  4. <product>Product name or short description</product>
  5. <!-- pwrdownmode: power-down flag. If true, this device sleeps between transmissions.
  6. Otherwise, it continuously listens to the SWAP network -->
  7. <pwrdownmode>true/false</pwrdownmode>
  8. <!-- Configuration section -->
  9. <config>
  10. <!-- Configuration register. Register ID's start from 11 -->
  11. <reg name="Register name" id="reg_id">
  12. <!-- Configuration parameter -->
  13. <!-- Type of parameter: "bin": Binary, "num": Number, "str": String -->
  14. <param name="Parameter name" type="bin|num|str">
  15. <!-- position: byte.bit (format: B.b or B) position of the parameter within the register -->
  16. <position>B.b</position>
  17. <!-- size: size in bytes.bits (format: B.b or B) of the parameter within the register -->
  18. <size>B.b</size>
  19. <!-- default: default value -->
  20. <default>default value</default>
  21. </param>
  22. </reg>
  23. </config>
  24. <!-- Regular endpoint section. Here comes sensor readings, actuator states, etc. -->
  25. <regular>
  26. <!-- Regular register. Register ID's start from 11 -->
  27. <reg name="Register name" id="reg_id">
  28. <!-- Endpoint -->
  29. <!-- Type of endpoint: "bin": Binary, "num": Number, "str": String -->
  30. <!-- Direction: "inp": input, "out": output -->
  31. <endpoint name="Endpoint name" type="bin|num|str" dir="inp|out">
  32. <!-- position: byte.bit (format: B.b or B) position of the endpoint within the register -->
  33. <position>B.b</position>
  34. <!-- size: size in bytes.bits (format: B.b or B) of the endpoint within the register -->
  35. <size>B.b</size>
  36. <!-- units: list of units for this endpoint -->
  37. <units>
  38. <!-- unit. Value to be displayed = factor * (endpoint value) + offset name -->
  39. <unit name="name" factor="+-F.f" offset="+-O.o"/>
  40. </units>
  41. </endpoint>
  42. </reg>
  43. </regular>
  44. </device>