#include <LATdatagram.h>
Collaboration diagram for LATdatagram:

Public Types | |
| ID | |
| enum | { ID } |
Public Member Functions | |
| LATdatagram () | |
| Constructor setting up identity and length defaults. | |
| LATdatagram (unsigned length) | |
| Constructor setting up identity and length defaults. | |
| LATtypeId | identity () const |
| Return the datagram's identity. | |
| unsigned | length () const |
| Return the datagram's size in units of bytes. | |
| LATdatagram * | next () const |
| Return the next datagram in the list of LATdatagrams. | |
| unsigned | payloadSize () const |
| Return the size of the datagram's payload in units of bytes. | |
| LATcontribution * | payload () const |
| Return a pointer to the start of the datagram's payload. | |
| EBFevent * | event () const |
| Return a pointer to the datagram's payload cast as an EBFevent. | |
| unsigned char * | alloc (unsigned size) |
| Method for allocating additional space in a datagram. | |
| void * | operator new (size_t) |
| Allocate a default LATdatagram off the memory heap. | |
| void * | operator new (size_t, unsigned length) |
| Allocate a LATdatagram with space for a payload off the memory heap. | |
| void * | operator new (size_t, const LATdatagram &) |
| Copy a LATdatagram to a new one. | |
| void * | operator new (size_t, void *, unsigned supplemental, bool swap=!DFC_BIG_ENDIAN) |
| This operator new allows one to place a datagram at a given location. | |
| void | operator delete (void *, void *, unsigned, bool) |
| Delete operator used to delete a datagram. | |
| void | operator delete (void *) |
| Delete operator used to delete a datagram. | |
| unsigned char * | string (bool swap=!DFC_BIG_ENDIAN) |
Return a pointer to a LATdatagram as a uchar buffer. | |
Static Public Member Functions | |
| static LATdatagram * | create (unsigned char *buffer, unsigned size, bool swap=!DFC_BIG_ENDIAN) |
Create a LATdatagram from a uchar buffer. | |
Copyright: Copyright 2004 by The Board of Trustees of the Leland Stanford Junior University. All rights reserved.
| LATdatagram::LATdatagram | ( | unsigned | length | ) | [inline] |
Constructor setting up identity and length defaults.
| length | Additional length to include in units of bytes |
| unsigned char * LATdatagram::alloc | ( | unsigned | size | ) | [inline] |
Method for allocating additional space in a datagram.
This method is used to include additional space at the end of a LATdatagram as part of that LATdatagram. It assumes that the memory for that space has been properly allocated.
| LATdatagram * LATdatagram::create | ( | unsigned char * | buffer, | |
| unsigned | size, | |||
| bool | swap = !DFC_BIG_ENDIAN | |||
| ) | [inline, static] |
Create a LATdatagram from a uchar buffer.
This method primarily exists for the Python interface.
The buffer can optionally be byte swapped by longwords in place. By default, if the endianness of the machine this code is running on is not big endian, then the buffer is byte swapped.
| buffer | A pointer to a buffer containing LATdatagram data | |
| size | Additional size to include into the LATdatagram | |
| swap | Optionally byte swap the buffer in place |
| EBFevent * LATdatagram::event | ( | ) | const [inline] |
Return a pointer to the datagram's payload cast as an EBFevent.
This is an obsolete method (I think) since one can't make the assumption that a particular LATdatagram payload is an EBFevent.
| void LATdatagram::operator delete | ( | void * | location | ) | [inline] |
Delete operator used to delete a datagram.
This method is used to avoid SIP constructor MemberCode.
| void LATdatagram::operator delete | ( | void * | , | |
| void * | , | |||
| unsigned | , | |||
| bool | ||||
| ) | [inline] |
Delete operator used to delete a datagram.
This method is used to avoid SIP constructor MemberCode.
| void * LATdatagram::operator new | ( | size_t | size, | |
| void * | location, | |||
| unsigned | supplemental, | |||
| bool | swap = !DFC_BIG_ENDIAN | |||
| ) | [inline] |
This operator new allows one to place a datagram at a given location.
This method is used to effectively label a piece of memory containing datagram data a LATdatagram. It is similar to casting a pointer to a LAT datagram pointer.
In the process or placing the datagram, the raw data occupying the space can optionally be byte swapped. By default, if the endianness of the machine this code is running on is not big endian, then the buffer is byte swapped.
| size | An ignored parameter | |
| location | A pointer to the location where to place the datagram | |
| supplemental | Additional space to include in the datagram | |
| swap | Optionally byte swap the buffer in place |
| void * LATdatagram::operator new | ( | size_t | size, | |
| const LATdatagram & | datagram | |||
| ) | [inline] |
Copy a LATdatagram to a new one.
This method is used to avoid SIP constructor MemberCode.
| size | An ignored parameter | |
| datagram | A reference to the datagram to be copied |
| void * LATdatagram::operator new | ( | size_t | size, | |
| unsigned | length | |||
| ) | [inline] |
Allocate a LATdatagram with space for a payload off the memory heap.
This method is used to avoid SIP constructor MemberCode.
| size | An ignored parameter | |
| length | The additional amount of space to allocate in units of bytes |
| void * LATdatagram::operator new | ( | size_t | size | ) | [inline] |
Allocate a default LATdatagram off the memory heap.
This method is used to avoid SIP constructor MemberCode.
| size | An ignored parameter |
| LATcontribution * LATdatagram::payload | ( | ) | const [inline] |
Return a pointer to the start of the datagram's payload.
The payload is the data portion of the datagram and does not include its mangement members identity and length.
| unsigned LATdatagram::payloadSize | ( | ) | const [inline] |
Return the size of the datagram's payload in units of bytes.
The payload is the data portion of the datagram and does not include its mangement members identity and length.
| unsigned char * LATdatagram::string | ( | bool | swap = !DFC_BIG_ENDIAN |
) | [inline] |
Return a pointer to a LATdatagram as a uchar buffer.
This method primarily exists for the Python interface.
The buffer can optionally be byte swapped by longwords in place. By default, if the endianness of the machine this code is running on is not big endian, then the buffer is byte swapped. Be sure to supply FALSE for the swap argument if the buffer has already been swapped by a previous call.
| swap | Optionally byte swap the buffer in place |
1.4.7