GuiLite (2): Assiant ducument

Background

        Just like QtAssiant, it's deserved to collection an user guide while learning GuiLite, so I prepare to follow the source code folder tree strcution to make an Assiant, and then name it GtAssiant.

Base on Tag V1.1

Core

        api.h

        audio.h

Detail---->Core--->api.h

       void log_out(const char* log) // save msg into log

        

Detail---->Core--->audio.h

        c_audio class: Create a thread and monitor variant, while the variant equal critical condition, play sound 'heart_beat.wav' . It's thread safe.

                enum AUDIO_TYPE
                {
                    AUDIO_HEART_BEAT,
                    AUDIO_ALARM,
                    AUDIO_MAX
                };    

static int play(AUDIO_TYPE type)save variant-type into memory

 

Detail---->Core--->msg.h              

    typedef struct
    {
        unsigned int dwMsgId;
        unsigned int dwParam1;
        unsigned int dwParam2;
    }MSG_INFO;

    int read_usr_msg(MSG_INFO* msg);
    int write_usr_msg(MSG_INFO* msg);       

c_fifo classIt's a circule link list, use to save unsigned char buffer.It's thread safe.
c_fifo(const char* name)
int read(void* buf, int len)Read specific length data from buffer
int write(void* buf, int len)Write specific length data into buffer, maximum save length is 1024
c_hid_pipe classIt's a circule link list, use to save unsigned char buffer.It's thread safe.
static int read_hid_msg()Read msg from memory by c_fifo class
static int write_hid_msg(MSG_INFO* msg, unsigned int display_id = 0)Write msg into memory by c_fifo class
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值