[411] | 1 | /* |
---|
| 2 | Copyright 2009 Virginia Polytechnic Institute and State University |
---|
[161] | 3 | |
---|
[411] | 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 | |
---|
[518] | 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. |
---|
[161] | 20 | */ |
---|
| 21 | |
---|
| 22 | #ifndef SOCKET_COMM_H |
---|
| 23 | #define SOCKET_COMM_H |
---|
| 24 | |
---|
| 25 | #include <stdint.h> |
---|
| 26 | |
---|
[255] | 27 | #include "containers.h" |
---|
[161] | 28 | |
---|
[184] | 29 | |
---|
[518] | 30 | /*! TODO |
---|
[170] | 31 | */ |
---|
[389] | 32 | int32_t ReadMessage(int32_t socketFD, char *msgBuffer); |
---|
[170] | 33 | |
---|
[518] | 34 | /*! TODO |
---|
[170] | 35 | */ |
---|
[231] | 36 | int32_t SendMessage(int32_t socketFD, const char *message) ; |
---|
[170] | 37 | |
---|
[518] | 38 | /*! TODO |
---|
[170] | 39 | */ |
---|
[161] | 40 | int32_t GetParameter(int32_t socketFD, struct Parameter pList[], \ |
---|
[195] | 41 | struct Radio_Info *radio_info); |
---|
[170] | 42 | |
---|
[518] | 43 | /*! TODO |
---|
[170] | 44 | */ |
---|
[161] | 45 | int32_t GetRequest(int32_t socketFD, struct Parameter pList[], \ |
---|
[195] | 46 | struct Radio_Info *radio_info); |
---|
[161] | 47 | |
---|
[518] | 48 | /*! This is the original function that does what the above function is supposed |
---|
[184] | 49 | * to do. |
---|
| 50 | */ |
---|
[231] | 51 | int32_t ClientSocket(const char *serverName, const char *portNumber); |
---|
[184] | 52 | |
---|
[518] | 53 | /*! TODO |
---|
[184] | 54 | */ |
---|
[176] | 55 | int32_t AcceptTCPConnection(int32_t servSock); |
---|
| 56 | |
---|
[518] | 57 | /*! TODO |
---|
[176] | 58 | */ |
---|
[177] | 59 | int32_t CreateTCPServerSocket(uint16_t port); |
---|
[176] | 60 | |
---|
[518] | 61 | /*! TODO |
---|
[176] | 62 | */ |
---|
[207] | 63 | int32_t InitializeTCPServerPort(int32_t servSock); |
---|
| 64 | |
---|
[161] | 65 | #endif |
---|