-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathURC.h
More file actions
108 lines (88 loc) · 1.89 KB
/
URC.h
File metadata and controls
108 lines (88 loc) · 1.89 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#ifndef URC_h
#define URC_h
#include <stddef.h>
#define FALSE 0
#define TRUE 1
struct CallReady
{
unsigned char updated;
};
struct EnterPin
{
unsigned char updated;
char code[11];
};
struct HttpAction
{
unsigned char updated;
unsigned char method;
unsigned int statusCode;
unsigned int dataLength;
};
struct Psuttz
{
unsigned char updated;
unsigned int year;
unsigned char month;
unsigned char day;
unsigned char hour;
unsigned char minute;
unsigned char second;
unsigned char timezone;
unsigned char dst;
};
struct NewMessageIndication
{
unsigned char updated;
char mem[3];
unsigned char index;
};
struct Message
{
unsigned char index;
unsigned char status;
char address[16];
unsigned char typeOfAddress;
char timestamp[21];
unsigned char firstOctet;
unsigned int pid;
unsigned int dataCodingScheme;
char serviceCenterAddress[16];
unsigned char typeOfSeviceCenterAddress;
unsigned char length;
char data[163];
};
struct NewMessage
{
unsigned char updated;
struct Message *message;
unsigned char waiting;
};
struct ServiceDataIndication
{
unsigned char updated;
unsigned char n;
char str[200];
unsigned char dcs;
};
typedef struct URC
{
/** Get Local Timestamp Unsolicited Result Code */
struct Psuttz psuttz;
/** Call Ready Unsolicited Result Code */
struct CallReady callReady;
/** +CPIN Unsolicited Result Code */
struct EnterPin enterPin;
/** +HTTPACTION Unsolicited Result Code */
struct HttpAction httpAction;
/** +CMTI Unsolicited Result Code */
struct NewMessageIndication newMessageIndication;
/** +CMT Unsolicited Result Code */
struct NewMessage newMessage;
/** +CUSD Unsolicited Result Code */
struct ServiceDataIndication serviceDataIndication;
} URC;
unsigned char URC_unsolicitedResultCode(URC *this, const char urcResponse[]);
void URC_resetUnsolicitedResultCode(URC *this);
extern URC Urc;
#endif