{"id":23149042,"url":"https://github.com/gastonmorixe/lib-artnet-4-cpp","last_synced_at":"2025-10-29T14:34:25.924Z","repository":{"id":268159279,"uuid":"903500314","full_name":"gastonmorixe/lib-artnet-4-cpp","owner":"gastonmorixe","description":"ArtNet 4 Library in C++ - Modern Lighting DMX Protocol","archived":false,"fork":false,"pushed_at":"2024-12-30T20:29:57.000Z","size":99,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T23:42:11.952Z","etag":null,"topics":["artnet","cpp","dmx","lighting"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gastonmorixe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-14T18:56:10.000Z","updated_at":"2025-01-24T19:44:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"70a6d082-e024-426b-980f-3417974d38a4","html_url":"https://github.com/gastonmorixe/lib-artnet-4-cpp","commit_stats":null,"previous_names":["gastonmorixe/lib-artnet-4-cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gastonmorixe%2Flib-artnet-4-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gastonmorixe%2Flib-artnet-4-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gastonmorixe%2Flib-artnet-4-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gastonmorixe%2Flib-artnet-4-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gastonmorixe","download_url":"https://codeload.github.com/gastonmorixe/lib-artnet-4-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190253,"owners_count":20898702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artnet","cpp","dmx","lighting"],"created_at":"2024-12-17T17:15:06.430Z","updated_at":"2025-10-29T14:34:25.836Z","avatar_url":"https://github.com/gastonmorixe.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lib-artnet-4-cpp\n\nA modern C++ implementation of the Art-Net 4 protocol. This library provides a robust and efficient way to communicate using the Art-Net protocol, commonly used in lighting control and DMX over Ethernet applications.\n\n\u003cimg width=\"1397\" alt=\"image\" src=\"https://github.com/user-attachments/assets/89a7acab-3a7d-4c11-bcc6-deb9de07a78c\" /\u003e\n\n## Features\n\n- [ ] Full Art-Net 4 protocol support (WIP)\n- Cross-platform compatibility (Linux and BSD/macOS)\n- Modern C++ (C++17) implementation\n- Thread-safe DMX data handling\n- Support for multiple universes\n- Configurable network parameters\n- Simple and intuitive API\n\n## Requirements\n\n- C++17 compatible compiler\n- CMake 3.31.2 or higher\n- Network connectivity\n\n## Building\n\nThe library uses CMake as its build system. Here's how to build it:\n\n```bash\n# Create a build directory\nmkdir build\ncd build\n\n# Configure the project\ncmake ..\n\n# Build\nmake\n```\n\nYou can also use the provided Makefile shortcuts:\n\n```bash\n# Debug build\nmake build_artnet_example_debug\n\n# Release build\nmake build_artnet_example_release\n```\n\n## Usage Example\n\nHere's a basic example of how to use the library to send DMX data:\n\n```cpp\n#include \"../ArtNetController.h\"\n#include \u003cvector\u003e\n#include \u003ciostream\u003e\n\nint main() {\n    ArtNet::ArtNetController controller;\n    \n    // Configure the controller\n    // Parameters: bind address, port, net, subnet, universe, broadcast address\n    if (!controller.configure(\"0.0.0.0\", ArtNet::ARTNET_PORT, 0, 0, 0, \"192.168.0.255\")) {\n        std::cerr \u003c\u003c \"Failed to configure Art-Net controller\" \u003c\u003c std::endl;\n        return 1;\n    }\n\n    // Start the controller\n    if (!controller.start()) {\n        std::cerr \u003c\u003c \"Failed to start Art-Net controller\" \u003c\u003c std::endl;\n        return 1;\n    }\n\n    // Prepare DMX data (512 channels)\n    std::vector\u003cuint8_t\u003e dmxData(512);\n    \n    // Set some DMX values\n    for (size_t i = 0; i \u003c dmxData.size(); i++) {\n        dmxData[i] = static_cast\u003cuint8_t\u003e(i % 255);\n    }\n\n    // Send DMX data\n    controller.setDmxData(0, dmxData);\n    controller.sendDmx();\n\n    return 0;\n}\n```\n\n## API Reference\n\n### ArtNetController Class\n\nThe main class for Art-Net operations.\n\n#### Constructor\n```cpp\nArtNetController();\n```\n\n#### Configuration\n```cpp\nbool configure(const std::string \u0026bindAddress, \n              int port,\n              uint8_t net,\n              uint8_t subnet,\n              uint8_t universe,\n              const std::string \u0026broadcastAddress = \"255.255.255.255\");\n```\n\n#### Network Control\n```cpp\nbool start();\nvoid stop();\nbool isRunning() const;\n```\n\n#### DMX Operations\n```cpp\nbool setDmxData(uint16_t universe, const std::vector\u003cuint8_t\u003e \u0026data);\nbool setDmxData(uint16_t universe, const uint8_t *data, size_t length);\nstd::vector\u003cuint8_t\u003e getDmxData(uint16_t universe);\nbool sendDmx();\n```\n\n### Network Interface Classes\n\nThe library provides platform-specific network implementations:\n- `NetworkInterfaceLinux` for Linux systems\n- `NetworkInterfaceBSD` for BSD-based systems (including macOS)\n\n## Thread Safety\n\nThe library implements thread-safe operations for DMX data handling using mutex locks. Multiple threads can safely call methods on the same `ArtNetController` instance.\n\n## Art-Net Protocol Support\n\nThe library supports the following Art-Net 4 features:\n- DMX512 transmission\n- Multiple universe support\n- Network configuration\n- Sequence numbering\n- Art-Net packet formatting according to specification\n\n## Known Limitations\n\n- Currently focuses on DMX transmission (ArtDmx packets)\n- Does not implement RDM functionality\n- Limited to UDP broadcast/unicast (no TCP support)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nThis project is licensed under the GPL-3.0 License - see the LICENSE file for details.\n\n## Author\n\nGaston Morixe (gaston@gastonmorixe.com)\n\nCopyright © 2024\n\n## Acknowledgments\n\n- Based on the official [Art-Net 4 Protocol Specification](https://artisticlicence.com/WebSiteMaster/User%20Guides/art-net.pdf)\n- Thanks to Artistic Licence for creating and maintaining the Art-Net protocol\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgastonmorixe%2Flib-artnet-4-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgastonmorixe%2Flib-artnet-4-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgastonmorixe%2Flib-artnet-4-cpp/lists"}