blob: 5daf60244819698e444a200ed2ca96e71ba9a881 (
plain)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
File: OCTVC1_MSG.h
Copyright (c) 2018 Octasic Inc. All rights reserved.
Description:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Release: OCTSDR Software Development Kit OCTSDR_GSM-02.10.00-B1837 (2018/02/21)
$Revision: $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#ifndef __OCTVC1_MSG_H__
#define __OCTVC1_MSG_H__
/***************************** INCLUDE FILES *******************************/
#include "../octdev_types.h"
#include "octvocnet_pkt.h"
/************************ COMMON DEFINITIONS *******************************/
/*-------------------------------------------------------------------------------------
Message Types
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_TYPE_COMMAND 0
#define cOCTVC1_MSG_TYPE_RESPONSE 1
#define cOCTVC1_MSG_TYPE_NOTIFICATION 2
#define cOCTVC1_MSG_TYPE_SUPERVISORY 7
#define cOCTVC1_MSG_TYPE_BIT_OFFSET 29
#define cOCTVC1_MSG_TYPE_BIT_MASK 0x7
/*-------------------------------------------------------------------------------------
Message Resynch
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_RESYNCH_BIT_OFFSET 28
#define cOCTVC1_MSG_RESYNCH_BIT_MASK 0x1
/*-------------------------------------------------------------------------------------
Message identifier
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_ID_BIT_OFFSET 0
#define cOCTVC1_MSG_ID_BIT_MASK 0x0FFFFFFF
/*-------------------------------------------------------------------------------------
Message identifier - Method ID
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_METHOD_ID_BIT_OFFSET 0
#define cOCTVC1_MSG_METHOD_BIT_MASK 0x00000FFF
/*-------------------------------------------------------------------------------------
Message identifier - Module ID
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_MODULE_ID_BIT_OFFSET 16
#define cOCTVC1_MSG_MODULE_BIT_MASK 0x0000001F
/*-------------------------------------------------------------------------------------
Message identifier - SUB Module ID
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_SUB_MODULE_ID_BIT_OFFSET 21
#define cOCTVC1_MSG_SUB_MODULE_BIT_MASK 0x00000007
/*-------------------------------------------------------------------------------------
Message identifier - Module and MethodID
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_MODULE_AND_METHOD_BIT_MASK ((cOCTVC1_MSG_SUB_MODULE_BIT_MASK<<cOCTVC1_MSG_SUB_MODULE_ID_BIT_OFFSET)|(cOCTVC1_MSG_MODULE_BIT_MASK<<cOCTVC1_MSG_MODULE_ID_BIT_OFFSET)|(cOCTVC1_MSG_METHOD_BIT_MASK<<cOCTVC1_MSG_METHOD_ID_BIT_OFFSET))
/*-------------------------------------------------------------------------------------
Message data length
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_LENGTH_BIT_OFFSET 0
#define cOCTVC1_MSG_LENGTH_BIT_MASK 0x00003FFF
/*-------------------------------------------------------------------------------------
Message format
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_FORMAT_BIT_OFFSET 24
#define cOCTVC1_MSG_FORMAT_BIT_MASK 0x000000FF
/*-------------------------------------------------------------------------------------
Message flags
-------------------------------------------------------------------------------------*/
#define cOCTVC1_MSG_FLAGS_BIT_OFFSET 12
#define cOCTVC1_MSG_FLAGS_BIT_MASK 0xF
/*-------------------------------------------------------------------------------------
tOCTVC1_MSG_FLAGS_MASK :
-------------------------------------------------------------------------------------*/
#define tOCTVC1_MSG_FLAGS_MASK tOCT_UINT32
#define cOCTVC1_MSG_FLAGS_MASK_RETRANSMIT 0x2
#define cOCTVC1_MSG_FLAGS_MASK_NO_RESPONSE 0x4
#define cOCTVC1_MSG_FLAGS_MASK_LONG_PROCESSING 0x8
#define cOCTVC1_MSG_NO_RESPONSE_FLAG ((cOCTVC1_MSG_FLAGS_MASK_NO_RESPONSE&cOCTVC1_MSG_FLAGS_BIT_MASK)<<cOCTVC1_MSG_FLAGS_BIT_OFFSET)
#define cOCTVC1_MSG_LONG_PROCESSING_FLAG ((cOCTVC1_MSG_FLAGS_MASK_LONG_PROCESSING&cOCTVC1_MSG_FLAGS_BIT_MASK)<<cOCTVC1_MSG_FLAGS_BIT_OFFSET)
#define cOCTVC1_MSG_RETRANSMIT_FLAG ((cOCTVC1_MSG_FLAGS_MASK_RETRANSMIT&cOCTVC1_MSG_FLAGS_BIT_MASK)<<cOCTVC1_MSG_FLAGS_BIT_OFFSET)
#define cOCTVC1_MSG_MAX_SESSIONS 8
#define cOCTVC1_SUPERVISORY_MSG_MODULE_REJECT_CID 0x00100001
/*-------------------------------------------------------------------------------------
tOCTVC1_MSG_HEADER
Members:
ulLength
API Message Length (in bytes)
ulTransactionId
Transaction ID.
ul_Type_R_CmdId
bits[31:29] = Message type. bits[28] = API Session Resynch. bits[27:0] = API
Command ID.
ulSessionId
API Session ID.
ulReturnCode
Return code.
ulUserInfo
User information.
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCT_UINT32 ulLength;
tOCT_UINT32 ulTransactionId;
tOCT_UINT32 ul_Type_R_CmdId;
tOCT_UINT32 ulSessionId;
tOCT_UINT32 ulReturnCode;
tOCT_UINT32 ulUserInfo;/* NOSWAPMAC */
} tOCTVC1_MSG_HEADER;
/*-------------------------------------------------------------------------------------
tOCTVC1_EVENT_HEADER
Vocallo API Common Event Message Header
Members:
ulLength
ulEventId
ulUserEventId
-------------------------------------------------------------------------------------*/
typedef struct
{
tOCT_UINT32 ulLength;
tOCT_UINT32 ulEventId;
tOCT_UINT32 ulUserEventId;
} tOCTVC1_EVENT_HEADER;
#endif /* __OCTVC1_MSG_H__ */
|