[−][src]Struct enocean::enocean::ESP3
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 Clone for ESP3
[src]
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 ?
impl<'_> From<&'_ ESP3> for Vec<u8>
[src]
Function to transform an ESP3 packet to an u8 vector.
impl PartialEq<ESP3> for ESP3
[src]
impl StructuralPartialEq for ESP3
[src]
Auto Trait Implementations
impl RefUnwindSafe for ESP3
impl Send for ESP3
impl Sync for ESP3
impl Unpin for ESP3
impl UnwindSafe for ESP3
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,