const std = @import("std");

const protocol = @import("eink_feed_protocol");

pub const FrameUpdateMsg = @import("FrameUpdateMsg.zig");

// pub const ChannelFrame = struct {
//     timestamp: u64,
//     frame: []const u8,
// };

pub const Channel = struct {
    pub const Id = u32;
    pub const NameMaxLen = 16;

    id: Id,
    name: [NameMaxLen]u8,
    name_len: usize = 0,
    display: protocol.models.Display,

    pub fn nameSlice(self: *const Channel) []const u8 {
        return self.name[0..self.name_len];
    }
};

pub const DisplayClient = struct {
    pub const NameMaxLen: usize = 16;

    name: [NameMaxLen]u8,
    name_len: usize = 0,
    channel_id: Channel.Id,

    pub fn nameSlice(self: *const DisplayClient) []const u8 {
        return self.name[0..self.name_len];
    }
};
