dmx-rdm-rs
Rust library for communicating DMX512 (ANSI E1.11) and DMX-RDM (ANSI E1.20) over a RS485 bus by using interchangeable drivers. This library features no-std as well as no-alloc support (no heap allocation) to target embedded as well as os platforms.
Please refer to the official specifications published by the ESTA.
This library is wip, it has not yet received extensive testing and the api might not be final.
Usage
These examples show the basic usage using the dmx-rdm-ftdi driver. These examples work together.
Controller
use ;
use ;
use run_full_discovery;
use ;
Responder
use ;
use RdmRequestData;
use ;
use UniqueIdentifier;
use ;
const PID_IDENTIFY_DEVICE: u16 = 0x1000;
Drawbacks/Issues
If you have any ideas on how to improve on the current state, please contribute.
- The controller currently blocks until the response to a request is received
- maybe this should be separable in the future
- Discovery has to be implemented by people themselves for now
- I am currently considering a polling system on the Controller
- No sub device / proxy device support yet
- SUPPORTED_PARAMETERS are hard to evaluate.
- Lacking unit test coverage
- polling, lots of blocking functionality
- AckTimer is hard to handle
- If an Enttec DMX Pro is used as a slave this has to be supported
- ola solved this by using callbacks, this is not an option because we can't use threading
- maybe will attempt a similiar approach, but instead of threading we will use polling
- this could make the library considerable harder to use
- Lots of memory copying because of the heavy use of heapless::Vec
- weird heapless datatypes (in order to support no-alloc)
- end-to-end testing is hard to and has not been done for the most part
- as of now there is no proper standard verification
- there are two types of devices, those that need the computer to repeat the dmx packages as
often as required (rp2040, ftdi) and those that have this functionality built in (enttec dmx pro)
- this is not handled at all, instead the send_dmx functions do something different depending on the driver
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in dmx-rdm-rs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.