#include "Platform.h"
Go to the source code of this file.
Classes | |
struct | PI_TIMEVAL |
struct | STATISTICS |
Structure containing statistical data. More... | |
struct | WAITFORRESPONSE |
required for synchronous call support More... | |
Defines | |
#define | _DEBUG_(a) a; |
#define | MAX_PACKET_SIZE 1472 |
Maximal UDP Packet Size that is possible to send. | |
#define | DEFAULT_PACKETQUEUE_SIZE 10 |
Default size of packet queue. | |
#define | ERR_NQ_BASE 0 |
#define | ERR_NQ_NUMERRORS 28 |
#define | ERR_NQ_NONE (ERR_NQ_BASE+0) |
No error. | |
#define | ERR_NQ_ALREADY (ERR_NQ_BASE+1) |
Queue is already connected. | |
#define | ERR_NQ_BADPOOL (ERR_NQ_BASE+2) |
CMessage pool buffers could not be properly initialized. | |
#define | ERR_NQ_BADIP (ERR_NQ_BASE+3) |
Malformed string IP passed. | |
#define | ERR_NQ_SOCREATE (ERR_NQ_BASE+4) |
UDP socket could not be created properly. | |
#define | ERR_NQ_SOBIND (ERR_NQ_BASE+5) |
UDP socket bind unsuccessful. | |
#define | ERR_NQ_ADDPEER (ERR_NQ_BASE+6) |
initial peer could not be added at init time | |
#define | ERR_NQ_SONONBLOCK (ERR_NQ_BASE+7) |
error setting socket to nonblocking | |
#define | ERR_NQ_SEMCREATESEND (ERR_NQ_BASE+8) |
send semaphore create error | |
#define | ERR_NQ_SEMCREATERECV (ERR_NQ_BASE+9) |
receive semaphore create error | |
#define | ERR_NQ_THRDCREATESEND (ERR_NQ_BASE+10) |
could not start send thread | |
#define | ERR_NQ_THRDCREATERECV (ERR_NQ_BASE+11) |
could not start receive thread | |
#define | ERR_NQ_THRDCLEANUP (ERR_NQ_BASE+12) |
thread cleanup failed | |
#define | ERR_NQ_SOCLOSE (ERR_NQ_BASE+13) |
socket cleanup failed | |
#define | ERR_NQ_SEMCLEANUP (ERR_NQ_BASE+14) |
semaphore cleanup | |
#define | ERR_NQ_MSGINVALID (ERR_NQ_BASE+15) |
invalid message | |
#define | ERR_NQ_SENDQUEUEFULL (ERR_NQ_BASE+16) |
internal send queue stuffed | |
#define | ERR_NQ_SENDQUEUE (ERR_NQ_BASE+17) |
internal send queue error | |
#define | ERR_NQ_SEMNOTIFY (ERR_NQ_BASE+18) |
semaphore notification failed | |
#define | ERR_NQ_EMPTY (ERR_NQ_BASE+19) |
empty queue, no element returned | |
#define | ERR_NQ_RECVQUEUE (ERR_NQ_BASE+20) |
internal Receive Queue error | |
#define | ERR_NQ_TIMEOUT (ERR_NQ_BASE+21) |
timeout waiting for response / ack | |
#define | ERR_NQ_SEMCREATE (ERR_NQ_BASE+22) |
temporary semaphore could not be created | |
#define | ERR_NQ_RESPTROUBLE (ERR_NQ_BASE+23) |
response could not be found in special queue | |
#define | ERR_NQ_SEMDELETE (ERR_NQ_BASE+24) |
temporary semaphore could not be deleted | |
#define | ERR_NQ_INVALIDPEER (ERR_NQ_BASE+25) |
invalid, unknown peer passed | |
#define | ERR_NQ_ACKQUEUE (ERR_NQ_BASE+26) |
internal error in ack packet waiting queue | |
#define | ERR_NQ_RESPWAITQUEUE (ERR_NQ_BASE+27) |
internal error in responsewait queue | |
#define | PACKET_SPECIAL_BITS_VALID_MASK 0xFFFC |
#define | PACKET_SPECIAL_BITS_DEFAULT_VALUE 0x0000 |
#define | PACKET_BIT_WANT_ACK 0x0002 |
#define | PACKET_BIT_IS_ACKPACKET 0x0001 |
#define | MIN_VARTYPE 1 |
#define | MAX_VARTYPE (VARTYPE_TEXT) |
#define | MAX_PACKETPAYLOAD_SIZE (MAX_PACKET_SIZE-SIZE_MESSAGE_FILL_STUFF-SIZE_PACKET_FILL_STUFF) |
#define | MIN_SIZE_DATA (16) |
min_size_data (inside linked list): | |
#define | MIN_SIZE_DATA_NET (12) |
one data block on the net (minimum size) | |
#define | MAX_NUM_ENTRIES (MAX_PACKETPAYLOAD_SIZE / MIN_SIZE_DATA_NET) |
#define | SIZE_ADD_LINKEDLIST (4*MAX_NUM_ENTRIES) |
size to add for in-CMessage workbuffer wor max_packetpayload_size (includes linked list costs) | |
#define | SENDQUEUE_SIZE 10 |
#define | RECVQUEUE_SIZE 10 |
#define | ACKQUEUE_SIZE 10 |
#define | NUM_CMESSAGEBUFFERS 40 |
#define | SEND_SEMAPHORE_TIMEOUT_MS 500 |
#define | SEND_SELECT_TIMEOUT_MS 200 |
#define | RECV_SELECT_TIMEOUT_MS 100 |
#define | SEND_THREAD_PRIORITY SW_THREAD_PRIORITY_BELOW_NORMAL |
#define | RECV_THREAD_PRIORITY SW_THREAD_PRIORITY_NORMAL |
#define | SIZE_MESSAGE_FILL_STUFF 16 |
#define | SIZE_PACKET_FILL_STUFF 10 |
#define | PACKET_MAGIC_TOP 0xA51C |
#define | PACKET_MAGIC_TAIL 0xC15A |
#define | PACKET_VERSIONS_SUPPORTED 0x0001 |
#define | NO_SEMAPHORE NULL |
#define | RESPONSEWAITQUEUE_MAX_SIZE 10 |
#define | PEERLIST_MAX_SIZE 10 |
Error Codes of CPeerList | |
#define | ERR_PL_NONE 0 |
No error. | |
#define | ERR_PL_LOCK 1 |
Mutal lock of a critical section failed. | |
#define | ERR_PL_FULL 2 |
Data storage buffer is full. | |
#define | ERR_PL_NOTFOUND 3 |
Element not found in buffer. | |
#define | ERR_PL_INDEXNOTSET 4 |
Receive packet index is not (yet) set. | |
Error Codes for CPacketQueue | |
#define | ERR_PQ_NONE 0 |
No error. | |
#define | ERR_PQ_LOCK 1 |
Mutal lock of a critical section failed. | |
#define | ERR_PQ_FULL 2 |
Data storage buffer is full. | |
#define | ERR_PQ_NOTFOUND 3 |
Element not found in buffer. | |
#define | ERR_PQ_BADPARAM 4 |
Bad parameter passed. | |
Error Codes for CResponseWaitQueue | |
#define | ERR_RWQ_NONE 0 |
no error | |
#define | ERR_RWQ_LOCK 1 |
Mutal Lock of a critical section failed. | |
#define | ERR_RWQ_FULL 2 |
Data storage buffer is full. | |
#define | ERR_RWQ_NOTFOUND 3 |
Element not found in buffer. | |
Physical Type | |
#define | NQ_PT_NONE 0x00 |
#define | NQ_PT_REQUEST 0x01 |
#define | NQ_PT_RESPONSE 0x02 |
#define | NQ_PT_TELEGRAM 0x03 |
Logical Type | |
| |
#define | NQ_LT_NONE 0x00 |
#define | NQ_LT_GET 0x01 |
Logical 'get' paket (request data from peer). | |
#define | NQ_LT_PUT 0x02 |
Logical 'put' paket (write data to peer). | |
#define | NQ_LT_CALL 0x03 |
Logical 'call' paket (call a remote function on peer). | |
#define | NQ_LT_TRAP 0x04 |
Logical 'trap' paket (signal something to peer). | |
#define | NQ_LT_UPDATE 0x05 |
Logical 'update' paket (a self inducted paket, that was send to update data at remote peer). | |
Variable Types | |
| |
#define | VARTYPE_BINARY (MIN_VARTYPE) |
Variable type constant to identify binary data. | |
#define | VARTYPE_FLOAT (MIN_VARTYPE+1) |
Variable type constant to identify float data. | |
#define | VARTYPE_DOUBLE (MIN_VARTYPE+2) |
Variable type constant to identify double data. | |
#define | VARTYPE_INT8 (MIN_VARTYPE+3) |
Variable type constant to identify signed 8bit data. | |
#define | VARTYPE_UINT8 (MIN_VARTYPE+4) |
Variable type constant to identify unsigned 8bit data. | |
#define | VARTYPE_INT16 (MIN_VARTYPE+5) |
Variable type constant to identify signed 16bit data. | |
#define | VARTYPE_UINT16 (MIN_VARTYPE+6) |
Variable type constant to identify unsigned 16bit data. | |
#define | VARTYPE_INT32 (MIN_VARTYPE+7) |
Variable type constant to identify signed 32bit data. | |
#define | VARTYPE_UINT32 (MIN_VARTYPE+8) |
Variable type constant to identify unsigned 32bit data. | |
#define | VARTYPE_TEXT (MIN_VARTYPE+9) |
Variable type constant to identify textual data. |
#define _DEBUG_ | ( | a | ) | a; |
Definition at line 8 of file Declarations.h.
Referenced by CNetworkQueue::close(), CNetworkQueue::create(), CMessagePool::Deinitialize(), CMessage::ExportMessageToPacketBuffer(), CLockMechanism::lock(), CNetworkQueue::ReceiveProcessTask(), CNetworkQueue::recvMsg(), CNetworkQueue::sendMsgTo(), CNetworkQueue::sendMsgToInternal(), CNetworkQueue::SendProcessTask(), CNetworkQueue::sendRecvMsg(), and CLockMechanism::unlock().
#define DEFAULT_PACKETQUEUE_SIZE 10 |
Default size of packet queue.
Definition at line 22 of file Declarations.h.
Referenced by CPacketQueue::CPacketQueue().
#define MAX_PACKET_SIZE 1472 |
Maximal UDP Packet Size that is possible to send.
Definition at line 19 of file Declarations.h.
Referenced by CMessage::clear(), CNetworkQueue::ReceiveProcessTask(), and CNetworkQueue::SendProcessTask().