Skip to content

V1.3.0 - Adding important features like Send and Receive and WaitAny along a full DotMatrix example

Latest
Compare
Choose a tag to compare
@solariun solariun released this 09 Mar 09:52
· 1 commit to main since this release

Version 1.3.0

  • NOW, I am thrilled to announce that AtomicX have send and receive functions that enables data transferring between two or more threads, allowing real client / server application strategy inside embedded and non-embedded application, this way, small MCUs can be used to easily transport stack data (which is protected in this thread system) to other thread.

  • Ported and enhanced the DotMatrix project, it implements a full Dot Led Matrix scrolling text system with

    • Serial terminal
    • Telnet Terminal
    • UDP Trap (You can send a UDP message to IP/2221 and it will display, Ideal for trapping messages)
    • An amazing general log API based on iostream, capable of adding "Specialized Loggers", and add using logger.AddLogger:
          logger << LOG::ERROR << "Failed to start WiFi." << std::endl;
    • based on ESP8266 and 8 or 4 Dot Matrix leds array
    • Just connect the Led Matrix (Dot Matrix Modul 8x8 Display Matrix Max7219 Led Lcd with 8 or 4 8x8 display)
        Designed for NodeMCU ESP8266
        ################# DISPLAY CONNECTIONS ################
        LED Matrix Pin -> ESP8266 Pin
        Vcc            -> 3v  (3V on NodeMCU 3V3 on WEMOS)
        Gnd            -> Gnd (G on NodeMCU)
        DIN            -> D7  (Same Pin for WEMOS)
        CS             -> D4  (Same Pin for WEMOS)
        CLK            -> D5  (Same Pin for WEMOS)
    
  • Added WaiTAny, that extends the Wait/Notify functionality, since it will also receive, and return by reference, ANY TAG. giving the developer ability to easily create a full Client / Service infra structure.

  • Dropping BROKER functionality, and welcoming Broadcasting functionality, it will enable a thread to receive all broadcasts asynchronously sent by other threads, only by enabling it and implementing the handler :

        virtual void BroadcastHandler (const size_t& messageReference, const Message& message) 

    and enabling it using the code:

        SetReceiveBroadcast (true);

    The handler will deliver tree parameters:

    • size_t MessageReference that works like a reference of what is the message about;
    • size_t Message.message which is the message payload (could be even an pointer);
    • size_t Message.tag that can be used as a meaning for the message:

    Example:

    • messageReference=BROADCAST_IRCAMERA
    • Message.message=CAMERA_DONE
    • Message.tag=CAMERA_READINGS

    On this simple example using 'mnemonics', that could have been enum class or directives, a single message was able to inform asynchronously that a IR CAMERA just read something, but could have informed ERROR or even that it was READING...., the approach allows a powerful controller, since you can apply layers on your code making processing really fast and precise and less messages will travel across the systems.

  • mutex and smartMutex now have timeout, by using lock(<timeout time>) and sharedLock(<timeout time>), if no timeout is given: lock() or sharedLock() wait indefinitely (fully back compatible with existing code)