1 | /* |
---|
2 | Copyright 2009 Virginia Polytechnic Institute and State University |
---|
3 | |
---|
4 | Licensed under the Apache License, Version 2.0 (the "License"); |
---|
5 | you may not use this file except in compliance with the License. |
---|
6 | You may obtain a copy of the License at |
---|
7 | |
---|
8 | http://www.apache.org/licenses/LICENSE-2.0 |
---|
9 | |
---|
10 | Unless required by applicable law or agreed to in writing, software |
---|
11 | distributed under the License is distributed on an "AS IS" BASIS, |
---|
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
13 | See the License for the specific language governing permissions and |
---|
14 | limitations under the License. |
---|
15 | */ |
---|
16 | |
---|
17 | /*! This file describes the interface to libsocketcomm, which is the internal |
---|
18 | * socket communication library that CROSS radios use to communicate between |
---|
19 | * components. |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef SOCKET_COMM_H |
---|
23 | #define SOCKET_COMM_H |
---|
24 | |
---|
25 | #include <stdint.h> |
---|
26 | |
---|
27 | #include "containers.h" |
---|
28 | |
---|
29 | |
---|
30 | /*! TODO |
---|
31 | */ |
---|
32 | int32_t ReadMessage(int32_t socketFD, char *msgBuffer); |
---|
33 | |
---|
34 | /*! TODO |
---|
35 | */ |
---|
36 | int32_t SendMessage(int32_t socketFD, const char *message) ; |
---|
37 | |
---|
38 | /*! TODO |
---|
39 | */ |
---|
40 | int32_t GetParameter(int32_t socketFD, struct Parameter pList[], \ |
---|
41 | struct Radio_Info *radio_info); |
---|
42 | |
---|
43 | /*! TODO |
---|
44 | */ |
---|
45 | int32_t GetRequest(int32_t socketFD, struct Parameter pList[], \ |
---|
46 | struct Radio_Info *radio_info); |
---|
47 | |
---|
48 | /*! This is the original function that does what the above function is supposed |
---|
49 | * to do. |
---|
50 | */ |
---|
51 | int32_t ClientSocket(const char *serverName, const char *portNumber); |
---|
52 | |
---|
53 | /*! TODO |
---|
54 | */ |
---|
55 | int32_t AcceptTCPConnection(int32_t servSock); |
---|
56 | |
---|
57 | /*! TODO |
---|
58 | */ |
---|
59 | int32_t CreateTCPServerSocket(uint16_t port); |
---|
60 | |
---|
61 | /*! TODO |
---|
62 | */ |
---|
63 | int32_t InitializeTCPServerPort(int32_t servSock); |
---|
64 | |
---|
65 | #endif |
---|