Browse Source

timestamp changes in tc_tm_protocol dissector

priyadharsan 3 months ago
parent
commit
4b28a911b5
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Dissector/tc_tm_protocols.lua

+ 6 - 1
Dissector/tc_tm_protocols.lua

@@ -367,7 +367,12 @@ function TM_dissector(buffer, pinfo, tree)  -- OBC to GS
     subtree:add(f_sof1, buffer(4, 1):uint())  -- SOF1 in HEX
     subtree:add(f_sof2, buffer(5, 1):uint())  -- SOF2 in HEX
     subtree:add(f_tm_ctrl, buffer(6, 1):le_uint())  -- TM Ctrl in HEX
-    subtree:add(f_timestamp, buffer(7, 4):le_uint())
+
+    -- Dissect timestamp
+    local timestamp = buffer(7, 4):le_uint()
+    local utc_time = os.date("!%Y-%m-%d %H:%M:%S", timestamp)
+    subtree:add(f_timestamp, timestamp.." ".."("..utc_time..")" )
+    
    
     subtree:add(f_sequence_no, buffer(11, 2):le_uint())  -- Sequence No in HEX