wavelength 1.0.0
Loading...
Searching...
No Matches
MCNetConfigTask Class Reference

Task that requests the network configurations of the memory cards from the network layer. More...

#include <mcnetconfigtask.h>

Inheritance diagram for MCNetConfigTask:
Collaboration diagram for MCNetConfigTask:

Public Member Functions

 ~MCNetConfigTask () override=default
 Destroy the object.
 MCNetConfigTask ()=default
 Construct the task.
void Set (int nPort)
 Prepare the task.
bool DispatchPriv (Message *pMsg) override
 Pass the result of the request to OnConfigsResult().
std::list< InetConfig > & GetConfigs ()
const std::list< InetConfig > & GetConfigs () const
Public Member Functions inherited from MemcardTask
 ~MemcardTask () override=default
 Destroy the object.
 MemcardTask ()
 Construct an idle task for the first slot.
void SetPort (int nPort)
 Select the slot the command addresses.
Public Member Functions inherited from Task
 Task ()
 Construct an idle task.
virtual ~Task ()
 Release the task.
int Poll ()
 Report the state after giving a running task one poll.
void Start ()
 Enter the running state and call OnStart(), unless the task is already running.
void Stop ()
 Call OnStop() when the task is running, and return to the idle state.
void Finish (bool bSucceeded)
 End the task from outside its poll, and call OnStop() when it was running.
int GetState () const
 Report mState.
Public Member Functions inherited from MemcardCBHandler
virtual ~MemcardCBHandler ()
 Release the handler.
virtual void OnGetInfo (int nResult)
 Receive the result of MemcardGetInfo().
virtual void OnGetEntSpace (int nResult)
 Receive the free entries of a directory.
virtual void OnOpen (int nResult)
 Receive the result of MemcardOpen().
virtual void OnClose (int nResult)
 Receive the result of MemcardClose().
virtual void OnRead (int nResult)
 Receive the result of MemcardRead().
virtual void OnWrite (int nResult)
 Receive the result of MemcardWrite().
virtual void OnSeek (int nResult)
 Receive the result of MemcardSeek().
virtual void OnMkdir (int nResult)
 Receive the result of MemcardMkdir().
virtual void OnRename (int nResult)
 Receive the result of a rename.
virtual void OnDelete (int nResult)
 Receive the result of MemcardDelete().
virtual void OnFormat (int nResult)
 Receive the result of MemcardFormat().
virtual void OnUnformat (int nResult)
 Receive the result of MemcardUnformat().
virtual void OnGetDir (int nResult, MemcardDirEntry *pEntries)
 Receive the result of MemcardGetDir().
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the pool heaps under the tag "MsgSink".
void operator delete (void *pBlock)
 Return a sink to the pool heaps.
virtual ~MsgSink ()
virtual bool Dispatch (Message *pMsg)
 Accept a message.
void * operator new (size_t size)
 Allocate from the main heap under the name MsgSink.
void operator delete (void *mem)
 Return memory to its heap.
virtual ~MsgSink ()
 Destroy the sink.
virtual bool Dispatch (Message *msg)
 Handle a message.

Protected Member Functions

void OnStart () override
 Clear mConfigs and send the request.
Protected Member Functions inherited from MemcardTask
void OnPoll () override
 Advance the memory card command in flight.
Protected Member Functions inherited from Task
virtual void OnStop ()
 Abandon the work.

Additional Inherited Members

Public Types inherited from MemcardTask
enum  Status {
  kStatusOk = 0 , kStatusNoCard = 1 , kStatusFull = 2 , kStatusUnformatted = 3 ,
  kStatusChangedCard = 4 , kStatusExists = 5 , kStatusLimit = 6 , kStatusFormatted = 7 ,
  kStatusNotFound = 8 , kStatusConfigsBad = 9 , kStatusConfigsError = 10
}
 Values of sStatus, the outcome every memory card task and user reports. More...
Public Types inherited from Task
enum  State { kStateIdle = 0 , kStateRunning = 1 , kStateDone = 2 , kStateFailed = 3 }
 Values of mState. More...
Static Public Member Functions inherited from MemcardTask
static void SetStatus (int nResult)
 Record a library result in sResult, and translate the result into sStatus.
Static Public Attributes inherited from MemcardTask
static int sFd
 The file descriptor the last open reported.
static int sResult
 The library result SetStatus() last translated.
static int sStatus
 The outcome of the last command, one of Status.
static MemcardDirEntry * sDirEntries
 The entries the last directory listing reported.
static int sDirCount
 The number of entries the last directory listing reported.
Protected Attributes inherited from MemcardTask
int mPort

Detailed Description

Task that requests the network configurations of the memory cards from the network layer.

The RTTI records the class as deriving from MemcardTask and from MsgSink at +0x10. The object is 0x1c bytes. The task finishes once its sink receives the InetConfigsResultMsg, and succeeds when the message lists a configuration.

Constructor & Destructor Documentation

◆ ~MCNetConfigTask()

MCNetConfigTask::~MCNetConfigTask ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x003539a8
Ghidra address:
PAL: 0x003c0cb0

◆ MCNetConfigTask()

MCNetConfigTask::MCNetConfigTask ( )
default

Construct the task.

Ghidra address:
NTSC-U/C: 0x00353a60
Ghidra address:
PAL: 0x003c0d68

Member Function Documentation

◆ Set()

void MCNetConfigTask::Set ( int nPort)

Prepare the task.

The task ignores the slot.

Parameters
nPortThe memory card slot.
Ghidra address:
NTSC-U/C: 0x001623f0
Ghidra address:
PAL: 0x00165110

◆ DispatchPriv()

bool MCNetConfigTask::DispatchPriv ( Message * pMsg)
overridevirtual

Pass the result of the request to OnConfigsResult().

Parameters
pMsgThe message.
Returns
Whether the message was the result.
Ghidra address:
NTSC-U/C: 0x00162518
Ghidra address:
PAL: 0x00165238

Implements MsgSink.

◆ GetConfigs() [1/2]

std::list< InetConfig > & MCNetConfigTask::GetConfigs ( )
inline
Returns
The configurations found.

◆ GetConfigs() [2/2]

const std::list< InetConfig > & MCNetConfigTask::GetConfigs ( ) const
inline
Returns
The configurations found.

◆ OnStart()

void MCNetConfigTask::OnStart ( )
overrideprotectedvirtual

Clear mConfigs and send the request.

Ghidra address:
NTSC-U/C: 0x001624d0
Ghidra address:
PAL: 0x001651f0

Reimplemented from Task.


The documentation for this class was generated from the following file: