~aleteoryx/muditaos

ref: cb729513eb04ee41f005cbaac8d82775d1a7bc5e muditaos/module-cellular/Modem/TS0710/TS0710_SERVNEG.h -rw-r--r-- 1.2 KiB
cb729513 — Kuba [EGD-4862] Add CLIP, CLIR etc responses parser 5 years ago
                                                                                
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
66
67
68
69
70
/**
 * Project Untitled
 */

#ifndef _TS0710_SERVNEG_H
#define _TS0710_SERVNEG_H

#include "TS0710_types.h"

// control channel - Service Negotiation Command (SNC)

class TS0710_SERVNEG
{
  public:
    enum Service_e
    {
        data,
        voice,
        reserved1,
        reserved2
    };
    enum VoiceCodec_e
    {
        GSM0621,
        PCM64k,
        ADPCM32k,
        CodedHalfRate,
        PCM128k,
        reserved
    };
    struct ServiceParameters_t
    {
        Service_e Service;
        VoiceCodec_e VoiceCodec;
    };

    TS0710_SERVNEG()
    {}
    ~TS0710_SERVNEG()
    {}

  private:
    /**
     * @param DLC
     * @param Service_parameters
     */
    void request(DLCI_t DLC, ServiceParameters_t Service_parameters);

    /**
     * @param DLC
     * @param Service_parameters
     */
    void indication(DLCI_t DLC, ServiceParameters_t Service_parameters);

    /**
     * @param DLC
     * @param Service_parameters
     * @param accept
     */
    void response(DLCI_t DLC, ServiceParameters_t Service_parameters, bool accept);

    /**
     * @param DLC
     * @param Service_parameters
     * @param accept
     */
    void confirm(DLCI_t DLC, ServiceParameters_t Service_parameters, bool accept);
};

#endif //_TS0710_SERVNEG_H