About the MWX library
The MWX library is designed to make the programming of TWELITE modules easier and more extensible. Based on the TWENET C library that has been used in the MWSDK, the MWX library has been developed as a library for the application development layer.
The name of the MWX library is Mono Wireless C++ Library for TWELITE, where MW comes from MonoWireless, and C++ -> CXX -> double X -> WX, where MW and WX are combined to form MWX.
The code written using this library is called "ACT".
Notation, etc.
This section describes the notation used in this explanation.
auto&&
This is called a universal reference, and is often used in standard libraries. In our library, auto&& is used in most cases
about namespace
The namespace
, inline namespace
, and using
are used to redefine names and so on. Some of them are abbreviated in the explanation.
Restrictions (TWENET)
The MWX library has not been developed to support all the functions of the underlying libraries and functions (functions in the TWNET C library, microcontroller peripheral functions provided by semiconductor vendors, and IEEE802.15.4 functions).
Restrictions (Using C++)
The MWX library is written in the C++ language, and the act description is also written in C++. However, not all functions are available even in the C++ language. Please pay particular attention to the following points.
You can allocate memory with the
new
andnew[]
operators, but you cannot destroy the allocated memory, and most C++ libraries that allocate memory dynamically are virtually unusable.The constructor of the global object is not called. Note: If necessary, initialization can be done including a call to the constructor by initializing it as in the initialization function ((
void*)&obj_global) class_foo();
).exception
cannot be used.Unable to use
virtual
functions.Due to the above limitations, only some of the C++ standard libraries such as STL can be used.
※ This is a description of what we know.
We have not conducted a comprehensive verification of the standard library as to whether it can be used or not, nor what might be available. If you find any inconvenience in operation, please try to implement it in another way.
about the library source code
The source code can be found at the followings:
{MWSDK install dir}/TWENET/current/src/mwx
最終更新