[][src]Struct enocean::enocean::ESP3

pub struct ESP3 {
    pub data: DataType,
    // some fields omitted
}

Main structure that represent an EnOcean Serial Packet according to ESP3 :

| Size (Byte) | 1 | 2 | 1 | 1 | 1 | u16 DataLen + u8 OptionLen | 1 |
|-------------|--------|------------------|---------------|-----------|-----------|----------------------------|-------------|
| Content | 0x55 | u16DataLen | u8OptionLen | u8Type | CRC8H | DATA + OPT DATA * | CRC8D |

Optionnal Data and Data layout/content depend on the Packet Type Identifier (4th byte)

Possible packet types :

Packet_type 0x01 - ERP1 : enocean serial packet representing a radio message.

The Enocean Radio Packet v1 (ERP1) define more informations about the layout of the ESP3 packet :

  • Data :

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

Data Payload length and content depend on the Enocean Equipment Profile of the device.

  • Optionnal data :

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

Packet_type 0x02 - Response :

ToDo : parse Response from TCM, eg. after trying to send a message as mentionned in the ESP3 :

When receiving a telegram, no RESPONSE has to be sent.
When sending a telegram, a RESPOND has to be expected. In this case, the following RESPONSE message gives the return codes:
OO RET_OK
O2 RET_NOT_SUPPORTED
03 RET_WRONG_PARAM
05 RET_LOCK_SET

Other packet types :

May be implemented later :
[ ] radio_sub_tel : 0x03
[ ] event : 0x04
[ ] common_command : 0x05
[ ] smart_ack_command : 0x06
[ ] remote_man_command : 0x07
[ ] radio_message : 0x09
[ ] radio_advanced : 0x0a
ESP3 struct is the representation of an Enocean Serial Packet.
See ESP3 protocol for more informations

Fields

data: DataType

Trait Implementations

impl<'_> From<&'_ ESP3> for Vec<u8>[src]

Function to transform an ESP3 packet to an u8 vector.

impl PartialEq<ESP3> for ESP3[src]

impl Clone for ESP3[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for ESP3[src]

impl Display for ESP3[src]

Util function to display packet information. Maybe we have to impl display for ESP3 instead ?

Auto Trait Implementations

impl Send for ESP3

impl Sync for ESP3

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]