Packet that delivers one block of the remix the host shares.
More...
#include <datablockpkt.h>
|
| | DataBlockPkt ()=default |
| | Construct a packet with every member left unset.
|
| | DataBlockPkt (const char *pData, short nBlock, short nSize, float fProgress) |
| | Construct a packet for every peer, ordered and guaranteed.
|
| void * | operator new (size_t nSize) |
| | Allocate a packet, billed to the class name.
|
| void | operator delete (void *pBlock) |
| | Release a packet.
|
| Message * | Clone () override |
| | Produce a heap copy of this packet.
|
| int | Type () override |
| | Report this packet's registered identity.
|
| const char * | GetName () const override |
| | Report this packet's class name.
|
| void | PrintExtra (PrnStream &stream) const override |
| | Write the sender, the receiver, the block, the size, and the progress.
|
| void | saveGuts (BinStream &stream) const override |
| | Write the block, the size, the progress, and mSize bytes from mData.
|
| void | restoreGuts (BinStream &stream) override |
| | Read what saveGuts() wrote, the bytes into mBuffer.
|
| short | GetBlock () const |
| float | GetProgress () const |
| short | GetSize () const |
| const char * | GetBuffer () const |
| int | Route () override |
| | Report that a received packet goes to the online session.
|
| void | PrintExtra (PrnStream &stream) const override |
| | Write the sender and the receiver that are set, as from: and to:.
|
| unsigned char | GetFlags () const |
| int | GetReceiver () const |
| int | GetSender () const |
| void | SetSender (int nSender) |
| virtual | ~Message () |
| | Vtable slot 1.
|
| virtual | ~Message () |
| virtual void | Unused1 () |
| | Not called by the control.
|
|
| static Message * | New () |
| | Produce a default-constructed packet on the heap.
|
| static Message * | NewMessage (int nType) |
| | Produce a message of the identified class through the factory list.
|
|
| static constexpr int | kMaxBlockSize = 256 |
| | The most bytes one block delivers.
|
| static constexpr int | kUnset = -2 |
| | Value of mSender and mReceiver that marks the member as unset.
|
| static constexpr int | kAllPeers = -1 |
| | Value of mReceiver that addresses every peer.
|
| static constexpr unsigned char | kFlagOrdered = 1 |
| | Bit of mFlags that LaunchpadRT::Send() turns into the second delivery bit of the session library.
|
| static constexpr unsigned char | kFlagGuaranteed = 2 |
| | Bit of mFlags that NetTransport::Send() turns into its guaranteed delivery bit.
|
Packet that delivers one block of the remix the host shares.
The RTTI records the class as deriving from InternalPacket. The members Clone(), Type(), and GetName() are inline. The member names are inferred.
◆ DataBlockPkt() [1/2]
| DataBlockPkt::DataBlockPkt |
( |
| ) |
|
|
default |
Construct a packet with every member left unset.
Inline. New() expands it.
◆ DataBlockPkt() [2/2]
| DataBlockPkt::DataBlockPkt |
( |
const char * | pData, |
|
|
short | nBlock, |
|
|
short | nSize, |
|
|
float | fProgress ) |
|
inline |
Construct a packet for every peer, ordered and guaranteed.
Inline. mBuffer is left unset.
- Parameters
-
| pData | The bytes saveGuts() sends. |
| nBlock | The index of the block. |
| nSize | The number of bytes of the block. |
| fProgress | The part of the remix delivered with the block, 0 to 1. |
◆ New()
Produce a default-constructed packet on the heap.
- Returns
- The packet.
- Ghidra address:
- NTSC-U/C: 0x002678b0
- Ghidra address:
- PAL: 0x00271588
◆ operator new()
| void * DataBlockPkt::operator new |
( |
size_t | nSize | ) |
|
|
inline |
Allocate a packet, billed to the class name.
- Parameters
-
| nSize | The object size the compiler supplies. |
- Returns
- The block.
◆ operator delete()
| void DataBlockPkt::operator delete |
( |
void * | pBlock | ) |
|
|
inline |
Release a packet.
- Parameters
-
◆ Clone()
Produce a heap copy of this packet.
- Returns
- The copy.
Implements Message.
◆ Type()
| int DataBlockPkt::Type |
( |
| ) |
|
|
inlineoverridevirtual |
Report this packet's registered identity.
- Returns
- g_nDataBlockPktType.
Implements Message.
◆ GetName()
| const char * DataBlockPkt::GetName |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ PrintExtra()
| void DataBlockPkt::PrintExtra |
( |
PrnStream & | stream | ) |
const |
|
overridevirtual |
Write the sender, the receiver, the block, the size, and the progress.
- Parameters
-
| stream | The stream to write to. |
- Ghidra address:
- NTSC-U/C: 0x00269af0
- Ghidra address:
- PAL: 0x00273690
Reimplemented from Message.
◆ saveGuts()
| void DataBlockPkt::saveGuts |
( |
BinStream & | stream | ) |
const |
|
overridevirtual |
Write the block, the size, the progress, and mSize bytes from mData.
- Parameters
-
| stream | The stream to write to. |
- Ghidra address:
- NTSC-U/C: 0x00269b88
- Ghidra address:
- PAL: 0x00273728
Reimplemented from Message.
◆ restoreGuts()
| void DataBlockPkt::restoreGuts |
( |
BinStream & | stream | ) |
|
|
overridevirtual |
Read what saveGuts() wrote, the bytes into mBuffer.
- Parameters
-
| stream | The stream to read from. |
- Ghidra address:
- NTSC-U/C: 0x00269c18
- Ghidra address:
- PAL: 0x002737b0
Reimplemented from Message.
◆ GetBlock()
| short DataBlockPkt::GetBlock |
( |
| ) |
const |
|
inline |
- Returns
- The index of the block.
◆ GetProgress()
| float DataBlockPkt::GetProgress |
( |
| ) |
const |
|
inline |
- Returns
- The part of the remix delivered with the block, 0 to 1.
◆ GetSize()
| short DataBlockPkt::GetSize |
( |
| ) |
const |
|
inline |
- Returns
- The number of bytes of the block.
◆ GetBuffer()
| const char * DataBlockPkt::GetBuffer |
( |
| ) |
const |
|
inline |
◆ kMaxBlockSize
| int DataBlockPkt::kMaxBlockSize = 256 |
|
staticconstexpr |
The most bytes one block delivers.
The documentation for this class was generated from the following file: