From 933c26684dfb1f7a3e9e322c46db8bacb90db3d6 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 19 Sep 2024 06:31:45 +0200 Subject: Updated TLV encoder --- zig-tlv-encoding/main.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zig-tlv-encoding/main.zig') 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(); } } -- cgit v1.2.3