Cellular operates in three modes:
The AT mode is used for communication setup and modem configuration.
The CMUX setup is an intermidiate state starting a CMUX communication:
For more details, see channel implementation.

A single command sequence starts with a call from the Service and can end in one of three ways:
Currently, there are two types of structs used to pass data between contexts.
DMA result struct is used to directly store data from DMA engine as well as pass these through MessageBuffer to Worker. This struct has static data buffer maximum size.

Cellular Result is used to pass complete frames serialized in vector together with result code. This struct has variable size.


Currently there are different errors/results codes for different layers.
CellularResultCode This code is used to pass information from bsp layer up to channel. It can be either used to handle flow control messages from DMA or to pass failures to upper layer (transmission/receiving not starter, cmux frame error).
Uninitialized,
ReceivedAndIdle,
ReceivedAndFull,
ReceivedAfterFull,
ReceivedNoData,
ReceivingNotStarted,
TransmittingNotStarted,
CMUXFrameError,
AtResult This result code is passed to service layer.
OK, /// at OK
ERROR, /// at ERROR For compatibility also for CME_ERROR and CMS_ERROR (details in errorCode)
CME_ERROR, /// In case CME error see errorCode
CMS_ERROR, /// In case CMS error see errorCode
TIMEOUT, /// at Timeout
TOKENS, /// at numbers of tokens needed met
NONE, /// no code
UNDEFINED, /// undefined result - usage of Undefined result, define and pin result to use it
PARSING_ERROR, /// parser error
FULL_MSG_BUFFER, /// at not enough space left in message buffer for new message
TRANSMISSION_NOT_STARTED, /// at dma not starting transmission
RECEIVING_NOT_STARTED, /// at dma not starting requested receiving
DATA_NOT_USED, /// at received data not being used
CMUX_FRAME_ERROR, /// at cmux deserialize error