JBus
JoyBus communication server
jbus Namespace Reference

Namespaces

 net
 

Classes

class  Endpoint
 
class  Listener
 
class  ThreadLocalEndpoint
 

Typedefs

using s8 = int8_t
 
using u8 = uint8_t
 
using s16 = int16_t
 
using u16 = uint16_t
 
using s32 = int32_t
 
using u32 = uint32_t
 
using s64 = int64_t
 
using u64 = uint64_t
 
using FGBACallback = std::function< void(ThreadLocalEndpoint &endpoint, EJoyReturn status)>
 Standard callback for asynchronous jbus::Endpoint APIs. More...
 

Enumerations

enum  EJStatFlags {
  GBA_JSTAT_MASK = 0x3a, GBA_JSTAT_FLAGS_SHIFT = 4, GBA_JSTAT_FLAGS_MASK = 0x30, GBA_JSTAT_PSF1 = 0x20,
  GBA_JSTAT_PSF0 = 0x10, GBA_JSTAT_SEND = 0x08, GBA_JSTAT_RECV = 0x02
}
 
enum  EJoyReturn {
  GBA_READY = 0, GBA_NOT_READY = 1, GBA_BUSY = 2, GBA_JOYBOOT_UNKNOWN_STATE = 3,
  GBA_JOYBOOT_ERR_INVALID = 4
}
 

Functions

u64 GetGCTicks ()
 Get host system's timebase scaled into Dolphin ticks. More...
 
void WaitGCTicks (u64 ticks)
 Wait an approximate Dolphin tick duration (avoid using, it's rather inaccurate). More...
 
void Initialize ()
 Initialize platform specifics of JBus library. More...
 

Typedef Documentation

using jbus::FGBACallback = typedef std::function<void(ThreadLocalEndpoint& endpoint, EJoyReturn status)>

Standard callback for asynchronous jbus::Endpoint APIs.

Parameters
endpointThread-local Endpoint interface for optionally issuing next command in sequence.
statusGBA_READY if connection is still open, GBA_NOT_READY if connection lost.
using jbus::s16 = typedef int16_t
using jbus::s32 = typedef int32_t
using jbus::s64 = typedef int64_t
using jbus::s8 = typedef int8_t
using jbus::u16 = typedef uint16_t
using jbus::u32 = typedef uint32_t
using jbus::u64 = typedef uint64_t
using jbus::u8 = typedef uint8_t

Enumeration Type Documentation

Enumerator
GBA_READY 
GBA_NOT_READY 
GBA_BUSY 
GBA_JOYBOOT_UNKNOWN_STATE 
GBA_JOYBOOT_ERR_INVALID 
Enumerator
GBA_JSTAT_MASK 
GBA_JSTAT_FLAGS_SHIFT 
GBA_JSTAT_FLAGS_MASK 
GBA_JSTAT_PSF1 
GBA_JSTAT_PSF0 
GBA_JSTAT_SEND 
GBA_JSTAT_RECV 

Function Documentation

u64 jbus::GetGCTicks ( )

Get host system's timebase scaled into Dolphin ticks.

Returns
Scaled ticks from host timebase.
void jbus::Initialize ( )

Initialize platform specifics of JBus library.

void jbus::WaitGCTicks ( u64  ticks)

Wait an approximate Dolphin tick duration (avoid using, it's rather inaccurate).

Parameters
ticksCPU ticks to wait.