Trade-offs and warnings
Consult the linked header for this operation’s ownership, lifetime and failure behavior.
EPOK RUNTIME
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.
Sampling accumulates edges until a simulation tick consumes them.
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.
| Parameter | Type | Meaning |
|---|---|---|
port | unsigned int | Not documented; consult the linked header. |
connected | bool | Not documented; consult the linked header. |
held | uint16_t | Not documented; consult the linked header. |
analog | bool | Not documented; consult the linked header. |
left_x | uint8_t | Not documented; consult the linked header. |
left_y | uint8_t | Not documented; consult the linked header. |
right_x | uint8_t | Not documented; consult the linked header. |
right_y | uint8_t | Not documented; consult the linked header. |
Returns: Nothing (void).
#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);Consult the linked header for this operation’s ownership, lifetime and failure behavior.
Declared in runtime/input.hpp:29
analogPerforms `analog` as part of controller sampling and simulation-tick input edges.Methodaxis_rawPerforms `axis raw` as part of controller sampling and simulation-tick input edges.Methodbegin_tickBegins tick as part of controller sampling and simulation-tick input edges.MethodconnectedPerforms `connected` as part of controller sampling and simulation-tick input edges.Methoddiscard_edgesPerforms `discard edges` as part of controller sampling and simulation-tick input edges.Methodend_tickEnds tick as part of controller sampling and simulation-tick input edges.Methodframe_pressedPerforms `frame pressed` as part of controller sampling and simulation-tick input edges.Methodframe_releasedPerforms `frame released` as part of controller sampling and simulation-tick input edges.MethodheldPerforms `held` as part of controller sampling and simulation-tick input edges.MethodpollPolls poll as part of controller sampling and simulation-tick input edges.Function templatepoll_multitapAdvancedPad indexes the four sockets of a multitap on the first physical port as 0..3 (the second physical port begins at 4).Function templatepressedPerforms `pressed` as part of controller sampling and simulation-tick input edges.Method