diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-09-19 06:31:45 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-09-19 06:31:45 +0200 |
| commit | 933c26684dfb1f7a3e9e322c46db8bacb90db3d6 (patch) | |
| tree | 33b96ffc5af84cb58a35282dc6d0ba3565136eda /zig-tlv-encoding | |
| parent | 7ceb2589d901a13b8a65df134b5325ef4c6fd6a9 (diff) | |
| download | probe-933c26684dfb1f7a3e9e322c46db8bacb90db3d6.tar.gz | |
Updated TLV encoder
Diffstat (limited to 'zig-tlv-encoding')
| -rw-r--r-- | zig-tlv-encoding/main.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zig-tlv-encoding/main.zig b/zig-tlv-encoding/main.zig index d7e2809..b7b5599 100644 --- a/zig-tlv-encoding/main.zig +++ b/zig-tlv-encoding/main.zig @@ -31,7 +31,7 @@ const TLVPacket = struct { length: u8, value: std.ArrayList(u8), - pub fn printEncoded(self: *TLVPacket) void { + pub fn printHexEncoded(self: *TLVPacket) void { std.debug.print("\t", .{}); std.debug.print("{X:0>2}-", .{@intFromEnum(self.tag)}); std.debug.print("{X:0>2}-", .{self.length}); @@ -88,7 +88,7 @@ test "Create TLV payload manually" { for (payload.packets.items) |*packet| { std.debug.print("Tag: {}, Length: {d}\n", .{ packet.tag, packet.length }); - packet.printEncoded(); + packet.printHexEncoded(); } } |
