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.
Sets the clock (year 1900-2099).
PocketError set_time(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint8_t weekday, unsigned port = 0)Sets the clock (year 1900-2099).
| Parameter | Type | Meaning |
|---|---|---|
year | uint16_t | Not documented; consult the linked header. |
month | uint8_t | Not documented; consult the linked header. |
day | uint8_t | Not documented; consult the linked header. |
hour | uint8_t | Not documented; consult the linked header. |
minute | uint8_t | Not documented; consult the linked header. |
second | uint8_t | Not documented; consult the linked header. |
weekday | uint8_t | Not documented; consult the linked header. |
port | unsigned int | Not documented; consult the linked header. |
Returns: PocketError. Consult the linked header for its meaning.
#include "pocketstation.hpp"
// Assume these named values have been initialized with valid data:
// uint16_t year
// uint8_t month
// uint8_t day
// uint8_t hour
// uint8_t minute
// uint8_t second
// uint8_t weekday
// unsigned int port
epok::PocketStationService& object = /* obtain a valid instance */;
auto result = object.set_time(year, month, day, hour, minute, second, weekday, port);Consult the linked header for this operation’s ownership, lifetime and failure behavior.
Declared in runtime/pocketstation.hpp:378
callCalls link function `function` of the running program.MethodconnectedPerforms `connected` as part of the pocketstation module.MethodfindFinds a file by name; `*block` receives its first block.MethodinstallCopies an embedded program to the card (replacing an older copy) and returns its first block.Methodinstall_and_launchInstalls (if needed) and starts an embedded program.MethodlaunchStarts the program whose first block is `block` (0 = start-up screen).MethodprobeTrue when a PocketStation (not a plain memory card) is in the slot.Methodread_directoryReads the 16 directory frames (block 0) in one batch.Methodread_memoryKernel memory access (RAM, I/O, flash), up to 128 bytes.Methodread_sectorReads sector as part of the pocketstation module.MethodreceivePocket Lua link: the message published with `link.send(n)`; size 0 when none.MethodsendPocket Lua link: a message for `link.received()` / `link.byte(i)`.Method