ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
packetRoutines.C File Reference
#include "malloc.h"
#include <stdlib.h>
#include "phenixOnline.h"
#include "packetPublic.h"
#include "Cpacket.h"
#include "dataBlock.h"
#include "packetRoutines.h"
+ Include dependency graph for packetRoutines.C:

Go to the source code of this file.

Functions

PTR_ret makeEmptyPacket (PACKET_ptr packet_ptr, UINT maxPacketLen, UINT packetId)
 
LOGIC_ret setPacketUnstructured (PACKET_ptr packet_ptr, UINT inWordSize, UINT inHitFormat)
 
PTR_ret makeUnstructPacket (PACKET_ptr packet_ptr, UINT maxPacketLength, UINT packetId, UINT inWordSize, UINT inHitFormat)
 
LOGIC_ret appendPacketError (PACKET_ptr packet_ptr, UINT maxPacketLength, ERRORENTRYV1_ptr errorEntry_ptr)
 
PTR_ret reservePacketDebugData (PACKET_ptr packet_ptr, UINT maxPacketLength, UINT numDwords)
 
PTR_ret startUnstructDataWrite (PACKET_ptr packet_ptr, UINT maxPacketLength, PHDWORD maxNumWords)
 
PTR_ret finishUnstructDataWrite (PACKET_ptr packet_ptr, UINT maxPacketLength, PHDWORD actualWords)
 
VALUE_ret storePacketHits (PACKET_ptr packet_ptr, UINT maxPacketLen, UINT *address_arr, BYTE *data_arr, UINT numHits, UINT maxNumHits)
 
VALUE_ret fetchPacketHits (PACKET_ptr packet_ptr, UINT **address_arr, BYTE **hits_arr, UINT *hitLength)
 

Function Documentation

LOGIC_ret appendPacketError ( PACKET_ptr  packet_ptr,
UINT  maxPacketLength,
ERRORENTRYV1_ptr  errorEntry_ptr 
)

Definition at line 120 of file packetRoutines.C.

View newest version in sPHENIX GitHub at line 120 of file packetRoutines.C

References dwordCopy, errorEntryV1Length, extendPacketErrorBlock(), findPacketErrorStart(), getPacketErrorLength(), logicFailure, logicSuccess, and valueFailure.

+ Here is the call graph for this function:

VALUE_ret fetchPacketHits ( PACKET_ptr  packet_ptr,
UINT **  address_arr,
BYTE **  hits_arr,
UINT hitLength 
)

Definition at line 320 of file packetRoutines.C.

View newest version in sPHENIX GitHub at line 320 of file packetRoutines.C

References byteCopy, findPacketDataStart(), getPacketStructure(), getUnstructPacketDataLengthWords(), getUnstructPacketWordSize(), Unstructured, validPacketHdr(), and valueFailure.

+ Here is the call graph for this function:

PTR_ret finishUnstructDataWrite ( PACKET_ptr  packet_ptr,
UINT  maxPacketLength,
PHDWORD  actualWords 
)

Definition at line 219 of file packetRoutines.C.

View newest version in sPHENIX GitHub at line 219 of file packetRoutines.C

References extendUnstructPacketDataBlock(), findPacketEnd(), getUnstructPacketDataLengthWords(), ptrFailure, and valueFailure.

+ Here is the call graph for this function:

PTR_ret makeEmptyPacket ( PACKET_ptr  packet_ptr,
UINT  maxPacketLen,
UINT  packetId 
)

Definition at line 51 of file packetRoutines.C.

View newest version in sPHENIX GitHub at line 51 of file packetRoutines.C

References findPacketEnd(), makePacketHdr(), ptrFailure, setPacketId(), and valueFailure.

Referenced by appendEmptyFramePacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PTR_ret makeUnstructPacket ( PACKET_ptr  packet_ptr,
UINT  maxPacketLength,
UINT  packetId,
UINT  inWordSize,
UINT  inHitFormat 
)

Definition at line 96 of file packetRoutines.C.

View newest version in sPHENIX GitHub at line 96 of file packetRoutines.C

References findPacketEnd(), makePacketHdr(), makeUnstructPacketDataDescr(), ptrFailure, setPacketId(), setPacketStructure(), Unstructured, and valueFailure.

Referenced by oEvent::addUnstructPacketData(), and fakeFrame().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PTR_ret reservePacketDebugData ( PACKET_ptr  packet_ptr,
UINT  maxPacketLength,
UINT  numDwords 
)

Definition at line 146 of file packetRoutines.C.

View newest version in sPHENIX GitHub at line 146 of file packetRoutines.C

References extendPacketDebugBlock(), findPacketDebugStart(), FORMAT_ERR_INVALID_APPEND, getPacketErrorLength(), ptrFailure, setPacketError(), and valueFailure.

+ Here is the call graph for this function:

LOGIC_ret setPacketUnstructured ( PACKET_ptr  packet_ptr,
UINT  inWordSize,
UINT  inHitFormat 
)

Definition at line 70 of file packetRoutines.C.

View newest version in sPHENIX GitHub at line 70 of file packetRoutines.C

References logicFailure, logicSuccess, makeUnstructPacketDataDescr(), setPacketStructure(), and Unstructured.

+ Here is the call graph for this function:

PTR_ret startUnstructDataWrite ( PACKET_ptr  packet_ptr,
UINT  maxPacketLength,
PHDWORD  maxNumWords 
)

Definition at line 173 of file packetRoutines.C.

View newest version in sPHENIX GitHub at line 173 of file packetRoutines.C

References emptyPacket(), extendPacketDataBlock(), extendUnstructPacketDataBlock(), findPacketDataStart(), FORMAT_ERR_INVALID_APPEND, FORMAT_ERR_WRONG_STRUCTURE, getPacketLength(), getPacketStructure(), ptrFailure, setUserError(), Unstructured, and valueFailure.

+ Here is the call graph for this function:

VALUE_ret storePacketHits ( PACKET_ptr  packet_ptr,
UINT  maxPacketLen,
UINT address_arr,
BYTE data_arr,
UINT  numHits,
UINT  maxNumHits 
)

Definition at line 258 of file packetRoutines.C.

View newest version in sPHENIX GitHub at line 258 of file packetRoutines.C

References byteClear, byteCopy, emptyPacket(), extendPacketDataBlock(), extendUnstructPacketDataBlock(), findPacketDataStart(), FORMAT_ERR_INVALID_HEADER, FORMAT_ERR_NONEMPTY_PACKET, FORMAT_ERR_WRONG_STRUCTURE, getPacketLength(), getPacketStructure(), getUnstructPacketDataPadding(), getUnstructPacketWordSize(), setPacketError(), Unstructured, validPacketHdr(), and valueFailure.

Referenced by oEvent::addUnstructPacketData(), and fakeFrame().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: