Advertisement
Guest User

Untitled

a guest
May 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. # Structured log commands
  2.  
  3. ## Introduce template
  4.  
  5. |01|log level|logger id|TplId|Tpl body|
  6. |-|-|-|-|-|
  7. ## Introduce date
  8.  
  9. |02|date|
  10. |-|-|
  11.  
  12. date = Year-Month-day
  13.  
  14. ## Introduce time
  15.  
  16. |03|time|
  17. |-|-|
  18.  
  19. time = Hour:Minute
  20.  
  21. ## Row
  22.  
  23. |04|Seconds + millis|tpl id| Params |
  24. |-|-|-|-|
  25.  
  26. ## Introduce logger
  27.  
  28. |05|loggerid | logger name|
  29. |-|-|-|
  30.  
  31. ## Introduce string
  32.  
  33. |06|encoding|string id|string|0x00|
  34. |-|-|-|-|-|
  35.  
  36. ## Introduce CRC32
  37.  
  38. |07|CRC32|
  39. |-|-|
  40.  
  41. ## Introduce param
  42.  
  43. |08|Paramid|Param name|
  44. |-|-|-|
  45.  
  46. # Data values
  47.  
  48. ## Half byte
  49.  
  50. Data range: -63 .. 64
  51.  
  52. ```
  53. flag = 1
  54. ```
  55.  
  56. |7|6|5|4|3|2|1|0|
  57. |-|-|-|-|-|-|-|-|
  58. |0|Sign|d5|d4|d3|d2|d2|d0|
  59.  
  60. ## Special flags
  61.  
  62. ```
  63. flag = 10
  64. ```
  65.  
  66. |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
  67. |-|-|-|-|-|-|-|-|
  68. |1|0|F5|F4|F3|F2|F1|F0|
  69.  
  70. |F5|F4|F3|F2|F1|F0|Description|
  71. |-|-|-|-|-|-|-|
  72. |0|0|0|0|0|0|Null|
  73.  
  74. ## Lengthed int
  75.  
  76. Data range = Length + 1 byted integer
  77.  
  78. ```
  79. flag = 110
  80. length = 5 bit
  81. ```
  82.  
  83. |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
  84. |-|-|-|-|-|-|-|-|
  85. |1|1|0|l4|l3|l2|l1|l0|
  86. |..|..|..|..|..|..|..|..|
  87. |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
  88. |d7|d6|d5|d4|d3|d2|d2|d0|
  89.  
  90. ## Floating point value
  91.  
  92. ```
  93. flag = 1110
  94. ```
  95.  
  96. |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
  97. |-|-|-|-|-|-|-|-|
  98. |1|1|1|0|-|-|-|-|
  99. |..|..|..|..|..|..|..|..|
  100. |d7|d6|d5|d4|d3|d2|d2|d0|
  101.  
  102. ## Datetime + UUID
  103.  
  104. ```
  105. flag = 11110
  106. ```
  107.  
  108. |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
  109. |-|-|-|-|-|-|-|-|
  110. |1|1|1|1|0|F2|F1|F0|
  111. |..|..|..|..|..|..|..|..|
  112.  
  113. |F2|F1|F0|Type|
  114. |-|-|-|-|
  115. |0|0|0|UUID|
  116. |0|0|1|Date|
  117. |0|1|0|Time|
  118. |0|1|1|Date + Time|
  119. |1|..|..|Reserved|
  120. ##
  121.  
  122. ```
  123. flag = 111110
  124. ```
  125.  
  126. |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
  127. |-|-|-|-|-|-|-|-|
  128. |1|1|1|1|1|0|-|-|
  129. |..|..|..|..|..|..|..|..|
  130.  
  131. ## String
  132.  
  133. ```
  134. flag = 111111
  135. encoding = 0 - utf-8 / 1 - latin-1
  136. in place = 0 - use string id / 1 - in place string
  137. ```
  138.  
  139. |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
  140. |-|-|-|-|-|-|-|-|
  141. |1|1|1|1|1|1|encoding|in place|
  142. |..|..|..|..|..|..|..|..|
  143. |d7|d6|d5|d4|d3|d2|d2|d0|
  144. |0|0|0|0|0|0|0|0|
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement