Cosa: An Object-Oriented Platform for Arduino programming

Some news on the latest improvements:

  1. Extended Virtual Wire Interface
    The Cosa Virtual Wire Interface (VWI) has been updated with support for node addresses, address match and message types. In extended mode a header is added to the payload. The header contains the Transmitter node address, message sequence number and message type. The receiver(s) will match the address by masking and comparing with its own node address. The full message with header and message is returned to the receiver for further dispatch. The interface change is backward compatible. Please see the example sketches CosaVWItempsensor.ino, https://github.com/mikaelpatel/Cosa/blob/master/examples/VWI/CosaVWItempsensor/CosaVWItempsensor.ino, and CosaVWItempmonitor.ino, https://github.com/mikaelpatel/Cosa/blob/master/examples/VWI/CosaVWItempmonitor/CosaVWItempmonitor.ino.

  2. NEXA/Homeeasy Wireless Remote command receiver.
    Support for interrupt driven or polled wireless remote command receiving. See NEXA.hh, https://github.com/mikaelpatel/Cosa/blob/master/Cosa/Driver/NEXA.hh, and the example sketch CosaNEXAreceiver.ino, https://github.com/mikaelpatel/Cosa/blob/master/examples/Sandbox/CosaNEXAreceiver/CosaNEXAreceiver.ino.

  3. IO-vector support
    The type iovec_t (see Cosa/Types.h) is a struct with buffer/size pair. A null terminated vector of iovect_t is a convenient method of allowing scattered buffer elements that are gathered for instance on send.
    a. New VWI::send(vec) member function to allow additional buffers on send. Allows additional headers without code change.
    b. New IOStream::Device::writev(vec) member function.

  4. Template classes
    The Cosa Queue and IOBuffer classes have been refactored to template classes. This allows additional performance and improved memory allocation. An example of ripple effect; The Cosa FSM benchmark measurement of sending messages between finite-state machines was improved by 50% (20 us per message dropped to 10 us).

Cheers!