chenlh
2025-09-18 8445c54f01777513912d4c6d36c28e92a0ff33a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 * messageproc.h
 *
 *  Created on: 2021Äê11ÔÂ1ÈÕ
 *      Author: graydon
 */
 
#ifndef MESSAGEPROC_H_
#define MESSAGEPROC_H_
 
#include <stdint.h>
#include <heapnew>
#include "protocol.h"
#include "typedefs.h"
#include "queue.h"
#include "dsp_report.h"
#include "../drv/memory.h"
 
class Message{
private:
    Queue<MSG>* txQueue;
 
    ReportStatus dsp_status_q;
    s16* Levels;
 
    s32 PresetProcess(MSG* pmsg);
 
    s32 ParamCtrl(MSG* pmsg);
 
    s32 HandshakeMessageProcess(MSG* pmsg);
 
    s32 RxMessageHandler(MSG* pmsg);
 
    void param_init(ptag_device_config pDevCfg);
 
public:
    Message(u32 num)
    {
        txQueue = new Queue<MSG>(num);
<<<<<<< HEAD
        Levels = new s16[1000];
=======
        Levels = new s16[868];
>>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430
    }
    ~Message()
    {
        delete []txQueue;
    }
 
    inline uvoid DspStatusPush(DSPStatusID ID , s16* value, s32 num)
    {
        dsp_status_q.device_status_push(ID, value, num);
    }
 
    s32 Send(MSG* pmsg );
    s32 Send(MsgType msg_type, uvoidptr buffer, u32 len);
 
    uvoid Proc();
 
    uvoid ReportDspStatus(MSG* pmsg);
    uvoid ReportLevel(MSG* pmsg);
};
 
#endif /* MESSAGEPROC_H_ */