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

Queue of the inetctl events. More...

#include <ineteventqueue.h>

Public Types

enum  InterfaceState { kInterfaceNone = -1 , kInterfaceUp = 1 , kInterfaceDown = 4 , kInterfaceLost = 0x100 }
 Interface states MapEvent() reports. More...

Static Public Member Functions

static int GetEvent (int *interfaceId, int *event)
 Take the oldest event, waiting up to five times 0.3 seconds for the first one.
static int MapEvent (int interfaceId, int event)
 Turn an event into an InterfaceState, recording a started interface.
static void EventHandler (int interfaceId, int event)
 Event handler.

Static Public Attributes

static constexpr int kInterfaceCount = 2
 Number of recorded interfaces.
static constexpr int kQueueSize = 16
 Capacity of the queue.
static int sInterfaceIds [kInterfaceCount]
 Recorded interfaces.
static int sLockSema
 Semaphore that guards the queue.
static int sCountSema
 Semaphore that counts the queued events.
static int sReadIndex
 Index of the oldest event.
static int sWriteIndex
 Index the next event goes to.
static unsigned int sFlags
 Flag bits.
static sceInetCtlEventHandler sHandler
 Registration of EventHandler().

Detailed Description

Queue of the inetctl events.

An event handler fills it and the EE drains it through RPC functions. It also records the interfaces that started.

The module was built without RTTI. The name is inferred from the module's routines.

Member Enumeration Documentation

◆ InterfaceState

Interface states MapEvent() reports.

Enumerator
kInterfaceNone 

The event changes nothing the EE waits for.

kInterfaceUp 

The primary interface came up.

kInterfaceDown 

An interface went down.

kInterfaceLost 

The primary interface went away.

Member Function Documentation

◆ GetEvent()

int InetEventQueue::GetEvent ( int * interfaceId,
int * event )
static

Take the oldest event, waiting up to five times 0.3 seconds for the first one.

Parameters
interfaceIdReceives the interface identifier, -1 after a queue overflow.
eventReceives the event.
Returns
Zero, kLibnetErrorNoEvent, or kLibnetErrorSemaphore.
Ghidra address:
NTSC-U/C: 0x000001ec
Ghidra address:
PAL: 0x000001ec

◆ MapEvent()

int InetEventQueue::MapEvent ( int interfaceId,
int event )
static

Turn an event into an InterfaceState, recording a started interface.

Parameters
interfaceIdInterface identifier.
eventEvent.
Returns
An InterfaceState.
Ghidra address:
NTSC-U/C: 0x00000358
Ghidra address:
PAL: 0x00000358

◆ EventHandler()

void InetEventQueue::EventHandler ( int interfaceId,
int event )
static

Event handler.

Append an event to the queue.

Parameters
interfaceIdInterface identifier.
eventEvent.
Ghidra address:
NTSC-U/C: 0x00000000
Ghidra address:
PAL: 0x00000000

Member Data Documentation

◆ kInterfaceCount

int InetEventQueue::kInterfaceCount = 2
staticconstexpr

Number of recorded interfaces.

◆ kQueueSize

int InetEventQueue::kQueueSize = 16
staticconstexpr

Capacity of the queue.

◆ sInterfaceIds

int InetEventQueue::sInterfaceIds[kInterfaceCount]
static

Recorded interfaces.

The first is the one the module waits for.

◆ sLockSema

int InetEventQueue::sLockSema
static

Semaphore that guards the queue.

◆ sCountSema

int InetEventQueue::sCountSema
static

Semaphore that counts the queued events.

◆ sReadIndex

int InetEventQueue::sReadIndex
static

Index of the oldest event.

◆ sWriteIndex

int InetEventQueue::sWriteIndex
static

Index the next event goes to.

◆ sFlags

unsigned int InetEventQueue::sFlags
static

Flag bits.

◆ sHandler

sceInetCtlEventHandler InetEventQueue::sHandler
static

Registration of EventHandler().


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