Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Structured log commands
- ## Introduce template
- |01|log level|logger id|TplId|Tpl body|
- |-|-|-|-|-|
- ## Introduce date
- |02|date|
- |-|-|
- date = Year-Month-day
- ## Introduce time
- |03|time|
- |-|-|
- time = Hour:Minute
- ## Row
- |04|Seconds + millis|tpl id| Params |
- |-|-|-|-|
- ## Introduce logger
- |05|loggerid | logger name|
- |-|-|-|
- ## Introduce string
- |06|encoding|string id|string|0x00|
- |-|-|-|-|-|
- ## Introduce CRC32
- |07|CRC32|
- |-|-|
- ## Introduce param
- |08|Paramid|Param name|
- |-|-|-|
- # Data values
- ## Half byte
- Data range: -63 .. 64
- ```
- flag = 1
- ```
- |7|6|5|4|3|2|1|0|
- |-|-|-|-|-|-|-|-|
- |0|Sign|d5|d4|d3|d2|d2|d0|
- ## Special flags
- ```
- flag = 10
- ```
- |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
- |-|-|-|-|-|-|-|-|
- |1|0|F5|F4|F3|F2|F1|F0|
- |F5|F4|F3|F2|F1|F0|Description|
- |-|-|-|-|-|-|-|
- |0|0|0|0|0|0|Null|
- ## Lengthed int
- Data range = Length + 1 byted integer
- ```
- flag = 110
- length = 5 bit
- ```
- |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
- |-|-|-|-|-|-|-|-|
- |1|1|0|l4|l3|l2|l1|l0|
- |..|..|..|..|..|..|..|..|
- |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
- |d7|d6|d5|d4|d3|d2|d2|d0|
- ## Floating point value
- ```
- flag = 1110
- ```
- |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
- |-|-|-|-|-|-|-|-|
- |1|1|1|0|-|-|-|-|
- |..|..|..|..|..|..|..|..|
- |d7|d6|d5|d4|d3|d2|d2|d0|
- ## Datetime + UUID
- ```
- flag = 11110
- ```
- |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
- |-|-|-|-|-|-|-|-|
- |1|1|1|1|0|F2|F1|F0|
- |..|..|..|..|..|..|..|..|
- |F2|F1|F0|Type|
- |-|-|-|-|
- |0|0|0|UUID|
- |0|0|1|Date|
- |0|1|0|Time|
- |0|1|1|Date + Time|
- |1|..|..|Reserved|
- ##
- ```
- flag = 111110
- ```
- |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
- |-|-|-|-|-|-|-|-|
- |1|1|1|1|1|0|-|-|
- |..|..|..|..|..|..|..|..|
- ## String
- ```
- flag = 111111
- encoding = 0 - utf-8 / 1 - latin-1
- in place = 0 - use string id / 1 - in place string
- ```
- |**7**|**6**|**5**|**4**|**3**|**2**|**1**|**0**|
- |-|-|-|-|-|-|-|-|
- |1|1|1|1|1|1|encoding|in place|
- |..|..|..|..|..|..|..|..|
- |d7|d6|d5|d4|d3|d2|d2|d0|
- |0|0|0|0|0|0|0|0|
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement