# OpenLCP

A collection of C++ libraries for Lighting Control Protocols, focusing on ESTA 
sponsored ANSI standards.

<img alt="ESTA Protocols Block Diagram" 
     src="https://git.company235.com/official/OpenLCP/raw/branch/master/docs/establockdiagram.png"
     width="80%">

## Object Architecture

The library encompases both the structured data being communicated between 
controllable components, and the control objects that expose the data in 
meaningful ways, without needing to know or understand the underlying protocols.

### Objects

Control objects are structured thusly;

<img alt="Architecture Flowchart" 
     src="https://git.company235.com/official/OpenLCP/raw/branch/master/docs/classdiagram.png"
     width="100%">

### Data

Serveral of the ESTA protocols use the E1.17 Protocol Data Unit to transfer 
data. The `PDU` are a series of nested hierarchical data structures. `PDU` may 
encapsulate one or more `PDU` of an embedded protocol, or be a data endpoint 
for that protocol.  The following slide describes the relational hierocracy of 
the `PDU` within `ACN`, `sACN`, `RDMnet`, and `OTP`.  While similiar in 
structure and concept, the `PDU` in `RDMnet` do not inherit directly from the 
`PDU` in `ACN`, and the `PDU` in `OTP` are notably simpler, as data segments 
may not be inherited from sibling `PDU` in the data.  

<img alt="PDU Hierarch Flowchart" 
     src="https://git.company235.com/official/OpenLCP/raw/branch/master/docs/pduflowchart.png"
     width="90%">
     

## Supported Standards

| Protocol Name | Standard | Implementation Status |
| :- | :-: | :-: |
| 0 to 10 V Analog Control | E1.3 | |
| USITT DMX512-A | E1.11 | Data Abstraction |
| ACN Root Layer Protocol (RLP) | E1.17 | ✓ |
| ACN Session Data Transport Protocol (SDT) | E1.17 | i/o |
| ACN Device Management Protocol (DMP) | E1.17 | Limited |
| ACN Device Description Language (DDL) | E1.17 | |
| EPI 10 - Autogeneration of Multicast Address on IPv4 Networks | E1.17 | |
| EPI 11 - Retrieval of Device Descriptions from DMP Devices on IPv4 Networks | E1.17 | |
| EPI 12 - ACN on Homogeneous Ethernet Networks | E1.17 | |
| EPI 13 - Allocation of Internet Protocol Version 4 Addresses to ACN Hosts | E1.17 | |
| EPI 15 - ACN Allocation of Multicast Addresses on IPv4 Networks | E1.17 | |
| EPI 16 - ESTA Registered Names and Identifiers | E1.17 | |
| EPI 17 - ACN Root Layer Protocol Operation on UDP | E1.17 | ✓ |
| EPI 18 - Operation of SDT on UDP Networks | E1.17 | |
| EPI 19 - ACN Discovery on IP Networks | E1.17 | Names |
| EPI 20 - MTU Size for ACN on IPv4 Networks | E1.17 | |
| EPI 22 - DDL Core Modules for ACN Devices | E1.17 | |
| Remote Device Management (RDM) | E1.20 | Responder |
| RDM Subdevice | E1.20 | ✓ |
| RDM Sensors | E1.20 | ✓ |
| RDM Discovery | E1.20 | ✓ |
| RDM Required PIDs | E1.20 | ✓ |
| RDM Status collection PIDs | E1.20 | ✓ |
| EPI 23 - Device Identification Subdevice | E1.30-1 | |
| EPI 25 - Time Reference in ACN Systems Using SNTP and NTP |	E1.30-3 | |
| EPI 26 - DDL Extensions for DMX and RDM Devices | E1.30-4 | |
| EPI 32 - Identification of Draft DDL Modules | E1.30-10 | |
| EPI 33 - ACN RLP Operation on TCP | E1.30-11 | ✓ |
| Streaming ACN (sACN) |	E1.31 | Data/Discovery |
| sACN Receiver  |	E1.31 | ✓ |
| sACN Source |	E1.31 | ✓ |
| sACN Data |	E1.31 | ✓ |
| sACN Sync |	E1.31 | Rx |
| sACN Discovery |	E1.31 | ✓ |
| sACN Preview |	E1.31 | - |
| RDMNet | E1.33 | i/o |
| RDM Dimmer Message Sets | E1.37-1 | Normative |
| RDM IPv4 & DNS Configuration Messages | E1.37-2 | Normative |
| RDM Gateway & Splitter Configuration Messages | E1.37-7 | Normative |

### Non-Standard Protocols
| Protocol | Designer | Version | Implementation Status |
| :- | :- | :-: | :-: |
| Art-Net | Artistic Licence Holdings Ltd. | Protocol 4 v1.4 | |

### Dependent Protocols
| Protocol Name | Standard | Referenced By | Implementation Status |
| :- | :-: |:-: | :-: |
|UUID Universally Unique Identifier | RFC 4122 | RLP, DDL | Partial |
|Service Location Protocol (SLP) |	RFC 2609 | EPI 19 | |
|Trivial File Transfer Protocol (TFTP) | RFC 1350 | EPI 25 | |


## License

Copyright &copy; 2020-2022 Kevin Matz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
