#include "PlatformSW.h"
Go to the source code of this file.
Classes | |
struct | NQ_TIMEVAL |
struct | NQ_STATISTICS |
Structure containing statistical data. More... | |
struct | NQ_WAITFORRESPONSE |
required for synchronous call support More... | |
Defines | |
#define | NQ_MAX_PACKET_SIZE 1472 |
Maximal UDP Packet Size that is possible to send. | |
#define | NQ_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) |
CNQMessage 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 | NQ_PACKET_SPECIAL_BITS_VALID_MASK 0xFFFC |
#define | NQ_PACKET_SPECIAL_BITS_DEFAULT_VALUE 0x0000 |
#define | NQ_PACKET_BIT_WANT_ACK 0x0002 |
#define | NQ_PACKET_BIT_IS_ACKPACKET 0x0001 |
#define | NQ_MIN_VARTYPE 1 |
#define | NQ_MAX_VARTYPE (NQ_VARTYPE_TEXT) |
#define | NQ_MAX_PACKETPAYLOAD_SIZE (NQ_MAX_PACKET_SIZE-NQ_SIZE_MESSAGE_FILL_STUFF-NQ_SIZE_PACKET_FILL_STUFF) |
#define | NQ_MIN_SIZE_DATA (16) |
min_size_data (inside linked list): | |
#define | NQ_MIN_SIZE_DATA_NET (12) |
one data block on the net (minimum size) | |
#define | NQ_MAX_NUM_ENTRIES (NQ_MAX_PACKETPAYLOAD_SIZE / NQ_MIN_SIZE_DATA_NET) |
#define | NQ_SIZE_ADD_LINKEDLIST (4*NQ_MAX_NUM_ENTRIES) |
size to add for in-CNQMessage workbuffer wor max_packetpayload_size (includes linked list costs) | |
#define | NQ_SENDQUEUE_SIZE 10 |
#define | NQ_RECVQUEUE_SIZE 10 |
#define | NQ_ACKQUEUE_SIZE 10 |
#define | NQ_NUM_CNQMESSAGEBUFFERS 40 |
#define | NQ_SEND_SEMAPHORE_TIMEOUT_MS 500 |
#define | NQ_SEND_SELECT_TIMEOUT_MS 200 |
#define | NQ_RECV_SELECT_TIMEOUT_MS 100 |
#define | NQ_SEND_THREAD_PRIORITY SW_THREAD_PRIORITY_BELOW_NORMAL |
#define | NQ_RECV_THREAD_PRIORITY SW_THREAD_PRIORITY_NORMAL |
#define | NQ_SIZE_MESSAGE_FILL_STUFF 16 |
#define | NQ_SIZE_PACKET_FILL_STUFF 10 |
#define | NQ_PACKET_MAGIC_TOP 0xA51C |
#define | NQ_PACKET_MAGIC_TAIL 0xC15A |
#define | NQ_PACKET_VERSIONS_SUPPORTED 0x0001 |
#define | NQ_NO_SEMAPHORE NULL |
#define | NQ_RESPONSEWAITQUEUE_MAX_SIZE 10 |
#define | NQ_PEERLIST_MAX_SIZE 10 |
Error Codes of CNQPeerList | |
#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 CNQPacketQueue | |
#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 CNQResponseWaitQueue | |
#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 | NQ_VARTYPE_BINARY (NQ_MIN_VARTYPE) |
Variable type constant to identify binary data. | |
#define | NQ_VARTYPE_FLOAT (NQ_MIN_VARTYPE+1) |
Variable type constant to identify float data. | |
#define | NQ_VARTYPE_DOUBLE (NQ_MIN_VARTYPE+2) |
Variable type constant to identify double data. | |
#define | NQ_VARTYPE_INT8 (NQ_MIN_VARTYPE+3) |
Variable type constant to identify signed 8bit data. | |
#define | NQ_VARTYPE_UINT8 (NQ_MIN_VARTYPE+4) |
Variable type constant to identify unsigned 8bit data. | |
#define | NQ_VARTYPE_INT16 (NQ_MIN_VARTYPE+5) |
Variable type constant to identify signed 16bit data. | |
#define | NQ_VARTYPE_UINT16 (NQ_MIN_VARTYPE+6) |
Variable type constant to identify unsigned 16bit data. | |
#define | NQ_VARTYPE_INT32 (NQ_MIN_VARTYPE+7) |
Variable type constant to identify signed 32bit data. | |
#define | NQ_VARTYPE_UINT32 (NQ_MIN_VARTYPE+8) |
Variable type constant to identify unsigned 32bit data. | |
#define | NQ_VARTYPE_TEXT (NQ_MIN_VARTYPE+9) |
Variable type constant to identify textual data. |
#define NQ_DEFAULT_PACKETQUEUE_SIZE 10 |
Default size of packet queue.
Definition at line 12 of file NQDeclarations.h.
Referenced by CNQPacketQueue::CNQPacketQueue().
#define NQ_MAX_PACKET_SIZE 1472 |
Maximal UDP Packet Size that is possible to send.
Definition at line 9 of file NQDeclarations.h.
Referenced by CNQMessage::clear(), CNetworkQueue::ReceiveProcessTask(), and CNetworkQueue::SendProcessTask().