<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wowcube.com/index.php?action=history&amp;feed=atom&amp;title=SDK_6.3%2FC%2B%2B%2FCore</id>
	<title>SDK 6.3/C++/Core - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wowcube.com/index.php?action=history&amp;feed=atom&amp;title=SDK_6.3%2FC%2B%2B%2FCore"/>
	<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Core&amp;action=history"/>
	<updated>2026-07-26T22:47:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Core&amp;diff=16963&amp;oldid=prev</id>
		<title>WowBot: Split C++ Native API into per-module pages with minimal examples (WowBot)</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Core&amp;diff=16963&amp;oldid=prev"/>
		<updated>2026-07-26T09:47:43Z</updated>

		<summary type="html">&lt;p&gt;Split C++ Native API into per-module pages with minimal examples (WowBot)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/C++/Native API|C++ Native API]] / Core''&lt;br /&gt;
&lt;br /&gt;
Application-level services: time, RNG, inter-module packets, BLE data, persistent state, user info, versioning and logging.&lt;br /&gt;
&lt;br /&gt;
Shared types, enums and constants are listed on the [[SDK 6.3/C++/Native API#Types and data structures|Native API overview]].&lt;br /&gt;
&lt;br /&gt;
== Minimal example ==&lt;br /&gt;
&lt;br /&gt;
Typical service calls:&lt;br /&gt;
&lt;br /&gt;
 uint32_t now = getTime();          // ms since app start&lt;br /&gt;
 i32_t r = random(0, 100);          // engine RNG&lt;br /&gt;
 saveState(&amp;amp;state, sizeof(state));  // persist between runs&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
===sendPacket===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t sendPacket(u32_t type, uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Send a packet to another module. Use &amp;lt;code&amp;gt;NET_BROADCAST&amp;lt;/code&amp;gt; (0xFF) as the destination to reach all modules. Low-level counterpart of the PAWN &amp;lt;code&amp;gt;broadcastPacket()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===recvPacket===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t recvPacket(u32_t size, uint32_t* type, uint8_t* pkt)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read a pending inter-module packet into a buffer. Normally consumed by the &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; event loop, which dispatches it to &amp;lt;code&amp;gt;Application::on_Message()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===getTime===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getTime()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get time in milliseconds since the module start.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Time in milliseconds since the module start.&lt;br /&gt;
&lt;br /&gt;
===getUserName===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getUserName(uint8_t* buffer, u32_t bufSize)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the name of a user who is logined on the cube.&lt;br /&gt;
: Get the user name configured in the WOWCube mobile application to save&lt;br /&gt;
: results for.&lt;br /&gt;
&lt;br /&gt;
===toggleDebugInfo===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t toggleDebugInfo()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Toggle overlay with debug information. TBD - move to GFX&lt;br /&gt;
&lt;br /&gt;
===saveState===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t saveState(void* data, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Request to save an application data&lt;br /&gt;
: Save user settings and/or progress on the flash to restore next time. Each&lt;br /&gt;
: save data has an incremental ID.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if save was successful.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - fixed a bug in which only part of a data saved on the flash&lt;br /&gt;
&lt;br /&gt;
===loadState===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t loadState(u32_t* id, void* data, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Request to load an application save data from the flash.&lt;br /&gt;
: Trigger state load event. It is asynchronous so access to flash memory will&lt;br /&gt;
: not affect an application performance.&lt;br /&gt;
&lt;br /&gt;
===random===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t random(u32_t min, u32_t max)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Generate random number in half-open range.&lt;br /&gt;
: Random number generator is initialized before each application start. Seed&lt;br /&gt;
: for initialization is generated by TRNG (True Random Number Generator).&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Pseudo random value from requested range.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - fixed a bug in which random does not generate numbers in a given&lt;br /&gt;
: range.&lt;br /&gt;
&lt;br /&gt;
===getAppVersion===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getAppVersion(Cubios::AppVersion_t *version)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get application version.&lt;br /&gt;
: WOWCube applications follow semantic versioning scheme (see&lt;br /&gt;
: https://semver.org). This interface allows to get version parts stored in&lt;br /&gt;
: the cube application descriptor.&lt;br /&gt;
: Outputs&lt;br /&gt;
:* version - structure describing application version&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===LOG===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t LOG(uint8_t level, const char* text)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Write a log line with the given level. Prefer the &amp;lt;code&amp;gt;LOG_a/e/w/i/d/v&amp;lt;/code&amp;gt; printf-style macros (see &amp;lt;code&amp;gt;LogLevel_t&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===getTap===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getTap()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the pending tap event, if any. Normally consumed by the &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; event loop (&amp;lt;code&amp;gt;Application::on_Tap()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_Pat()&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===sendBleData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t sendBleData(u32_t type, uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Send external data over BLE to the connected companion (WOWCube Connect) application.&lt;br /&gt;
&lt;br /&gt;
===recvBleData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t recvBleData(uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Receive pending external BLE data; dispatched by &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Application::on_ExternalMessage()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===EVENT_getList===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t EVENT_getList()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the pending event mask for this module (see &amp;lt;code&amp;gt;eventMask_t&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
</feed>