[][src]Function enocean::enocean::esp3_of_enocean_message

pub fn esp3_of_enocean_message(em: Vec<u8>) -> Result<ESP3, ParseEspError>

Main function which convert an u8 vector of incoming byte into an ESP3 variable :

Size (Byte) 1 2 1 1 1 u16 DataLen + u8 OptionLen 1
Content 0x55 u16DataLen u8OptionLen u8Type CRC8H DATAS CRC8D

/// Optionnal data :

| Size (Byte) | 1 | 4 | 1 | 1 |
|-------------|-------------|------------------|----------|------------------|
| Content | Subtel nb | Destination ID | dBm | Security level |

Data (BS1 example) :

| Size (Byte) | 1 | 1 | 4 | 1 |
|-------------|---------------|------------------------|----------------|----------|
| Content | Rorg (0xD5) | Data payload as EEP* | Sender ID | Status |