Epok Engine

EPOK RUNTIME

epok::Input::sample

Method · 1 overload

Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.

Method

Sampling accumulates edges until a simulation tick consumes them.

Belongs to
epok::Input
Header
input.hpp
Overloads
1

Declaration

Declaration
void sample(unsigned port,bool connected,uint16_t held,bool analog=false, uint8_t left_x=128,uint8_t left_y=128,uint8_t right_x=128,uint8_t right_y=128)

Sampling accumulates edges until a simulation tick consumes them.

ParameterTypeMeaning
portunsigned intNot documented; consult the linked header.
connectedboolNot documented; consult the linked header.
helduint16_tNot documented; consult the linked header.
analogboolNot documented; consult the linked header.
left_xuint8_tNot documented; consult the linked header.
left_yuint8_tNot documented; consult the linked header.
right_xuint8_tNot documented; consult the linked header.
right_yuint8_tNot documented; consult the linked header.

Returns: Nothing (void).

Example sketch

C++ example
#include "input.hpp"

// Assume these named values have been initialized with valid data:
// unsigned int port
// bool connected
// uint16_t held
// bool analog
// uint8_t left_x
// uint8_t left_y
// uint8_t right_x
// uint8_t right_y

epok::Input& object = /* obtain a valid instance */;

object.sample(port, connected, held, analog, left_x, left_y, right_x, right_y);

Trade-offs and warnings

Consult the linked header for this operation’s ownership, lifetime and failure behavior.

Declared in runtime/input.hpp:29

Related members