CPN
Computational Process Networks
Classes | Namespaces | Enumerations | Functions
PacketHeader.h File Reference

Declarations of a generic binary packet format. More...

#include "common_priv.h"
#include <stdint.h>
#include <cstring>
+ Include dependency graph for PacketHeader.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CPN::PacketHeader
 
class  CPN::Packet
 
class  CPN::PacketHandler
 

Namespaces

 CPN
 

Enumerations

enum  { CPN::PACKET_SYNCWORD = 0xF1F0C0DE, CPN::PACKET_REVERSE_SYNCWORD = 0xDEC0F0F1, CPN::PACKET_HEADERLENGTH = 64 }
 some packet header constants. More...
 
enum  CPN::PacketType_t {
  CPN::PACKET_ENQUEUE, CPN::PACKET_DEQUEUE, CPN::PACKET_READBLOCK, CPN::PACKET_WRITEBLOCK,
  CPN::PACKET_ENDOFWRITE, CPN::PACKET_ENDOFREAD, CPN::PACKET_GROW, CPN::PACKET_D4RTAG,
  CPN::PACKET_FLUSH, CPN::PACKET_RESET, CPN::PACKET_ID_READER, CPN::PACKET_ID_WRITER
}
 

Functions

bool CPN::ValidPacket (const PacketHeader *ph) CPN_LOCAL
 
void CPN::InitPacket (PacketHeader *ph, uint32_t datalen, PacketType_t type) CPN_LOCAL
 

Detailed Description

Declarations of a generic binary packet format.

Note that the order of the fields in these structs is deliberate in most cases. They are ordered mostly to ensure that the compiler will pack the data correctly into the 64 byte header.

Author
John Bridgman

Definition in file PacketHeader.h.