EnOcean Common Commands class, enables an easy interface for the most common commands.
More...
#include <eoSerialCommand.h>
|
| eoSerialCommand (eoGateway *gateway) |
|
eoReturn | GetFrequencyInfo (CO_RD_FREQUENY_RESPONSE &response) |
|
eoReturn | GetStepCode (CO_RD_STEPCODE_RESPONSE &response) |
|
eoReturn | Sleep (const uint32_t sleepPeriod) |
|
eoReturn | Reset () |
|
eoReturn | ReadVersion (CO_RD_VERSION_RESPONSE &version) |
|
eoReturn | ReadMemory (CO_RD_MEMORY const &readMemory, CO_RD_MEMORY_RESPONSE &response) |
|
eoReturn | WriteMemory (CO_WR_MEMORY const &writeMemory) |
|
eoReturn | BIST () |
|
eoReturn | WriteIDBase (const uint32_t baseID) |
|
eoReturn | ReadIDBase (CO_RD_IDBASE_RESPONSE &response) |
|
eoReturn | WriteRepeater (bool repEnable, const uint8_t repLevel) |
|
eoReturn | ReadRepeater (CO_RD_REPEATER_RESPONSE &response) |
|
eoReturn | AddFilter (const FILTER_TYPE filterType, const uint32_t filterValue, const FILTER_KIND filterKind) |
|
eoReturn | DeleteFilter (const FILTER_TYPE filterType, const uint32_t filterValue) |
|
eoReturn | DeleteAllFilter () |
|
eoReturn | EnableFilter (const bool filterEnabled, const FILTER_OPERATOR filterOperator) |
|
eoReturn | ReadFilter (CO_RD_FILTER_RESPONSE *filter, uint8_t *filterCount, uint8_t maxFilterCount) |
|
eoReturn | WaitMaturity (const bool waitMaturity) |
|
eoReturn | SmartAckConfirmLearn (uint16_t responseTime, SA_CONFIRM_CODE confirmCode) |
|
eoReturn | SmartAckLearnAck (SA_LEARN_ACK_RESPONSE &response) |
|
eoReturn | Ready (CO_READY_RESPONSE &response) |
|
eoReturn | SmartAckWriteLearnMode (bool enable, SA_EXTENDED_LEARNMODE extended, uint32_t timeout) |
|
eoReturn | SmartAckReadLearnMode (SA_RD_LEARNMODE_RESPONSE &response) |
|
eoReturn | SmartAckLearnConfirm (uint16_t responseTime, SMARTACK_CONFIRM_CODE confirmCode, uint32_t postmasterID, uint32_t clientID) |
|
eoReturn | SmartAckSendLearnRequest (uint16_t manufacturerID, uint32_t EEP) |
|
eoReturn | SmartAckReset (uint32_t clientID) |
|
eoReturn | SmartAckLearnedClients (SA_RD_LEARNEDCLIENTS_RESPONSE *clients, uint8_t *learnedCount, uint8_t maxLearnedCount) |
|
eoReturn | SmartAckSetReclaimTries (uint8_t reclaimCount) |
|
eoReturn | SmartAckSetPostmaster (uint8_t mailboxCount) |
|
eoReturn | EventSmartAckConfirmLearn (SA_CONFIRM_LEARN_REQUEST &request) |
|
eoReturn | WriteMode (WR_MODE_CODE mode) |
|
eoReturn | DutyCycleReadLimit (CO_RD_DUTYCYCLE_RESPONSE &response) |
|
eoReturn | EventDutyCycleLimit (CO_DUTYCYCLE_LIMIT &request) |
|
eoReturn | DutyCycleLimit (CO_DUTYCYCLE_LIMIT limit) |
|
eoReturn | WriteStartupDelay (uint8_t delay) |
|
eoReturn | WriteRemanRepeating (bool enabled) |
|
eoReturn | ReadRemanRepeating (bool &isEnabled) |
|
eoReturn | SetNoiseTreshold (uint8_t rssiLevel) |
|
eoReturn | GetNoiseTreshold (uint8_t &rssiLevel) |
|
eoReturn | WriteRssiTestMode (bool enable, uint16_t timeOut) |
|
eoReturn | ReadRssiTestMode (bool &isEnabled) |
|
eoReturn | WriteTransparentMode (bool enable) |
|
eoReturn | ReadTransparentMode (bool &isEnabled) |
|
eoReturn | WriteTXOnlyMode (CO_TX_ONLY_MODE txOnlyMode) |
|
eoReturn | ReadTXOnlyMode (CO_TX_ONLY_MODE &txOnlyMode) |
|
eoPacket | GetSerialPacket () |
|
EnOcean Common Commands class, enables an easy interface for the most common commands.
The eoCommonCommand class, allows you to easily integrate the most common ESP commands into your program.
- Examples:
- commands_example.cpp, Security_example.cpp, tutorial5.cpp, and tutorial6.cpp.
◆ eoSerialCommand()
eoSerialCommand::eoSerialCommand |
( |
eoGateway * |
gateway | ) |
|
Contructor
- Parameters
-
gateway | Gateway to be used for serial command. |
◆ AddFilter()
Add filter to filter list.
- Parameters
-
filterType | Type of filter |
filterValue | Value of filter function compare |
filterKind | Blocking/Applying filter |
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM or memory error
- Examples:
- commands_example.cpp, and tutorial5.cpp.
◆ BIST()
◆ DeleteAllFilter()
eoReturn eoSerialCommand::DeleteAllFilter |
( |
| ) |
|
◆ DeleteFilter()
eoReturn eoSerialCommand::DeleteFilter |
( |
const FILTER_TYPE |
filterType, |
|
|
const uint32_t |
filterValue |
|
) |
| |
Delete filter from filter list.
- Parameters
-
filterType | Type of filter |
filterValue | Value of filter function compare |
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM or memory error
- Examples:
- commands_example.cpp, and tutorial5.cpp.
◆ DutyCycleLimit()
eoReturn eoSerialCommand::DutyCycleLimit |
( |
CO_DUTYCYCLE_LIMIT |
limit | ) |
|
Send Duty Cycle Limit telegram.
- Parameters
-
limit | ::CO_DUTYCYCLE_LIMIT |
◆ DutyCycleReadLimit()
Reads the actual duty cycle limit values.
- Parameters
-
[out] | response | Pointer to the duty cycle read limit response structure |
- Returns
- EO_OK or NOT_SUPPORTED
◆ EnableFilter()
Enable/Disable all supplied filters.
- Parameters
-
filterEnabled | Filter enable |
filterOperator | Filter operator (AND or OR) |
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM
- Examples:
- commands_example.cpp, and tutorial5.cpp.
◆ EventDutyCycleLimit()
eoReturn eoSerialCommand::EventDutyCycleLimit |
( |
CO_DUTYCYCLE_LIMIT & |
request | ) |
|
Parse the Duty Cycle Limit event into enum
- Parameters
-
request | ::CO_DUTYCYCLE_LIMIT |
◆ EventSmartAckConfirmLearn()
Parse the SmartACK confirm learn event packet into structure
- Parameters
-
◆ GetFrequencyInfo()
eoReturn eoSerialCommand::GetFrequencyInfo |
( |
CO_RD_FREQUENY_RESPONSE & |
response | ) |
|
Queries the frequency info of the device
- Parameters
-
response | Respons of the serial command |
- Returns
- EO_OK or error code
◆ GetNoiseTreshold()
eoReturn eoSerialCommand::GetNoiseTreshold |
( |
uint8_t & |
rssiLevel | ) |
|
Gets the RSSI noise rejection threshold level for telegram reception. Received Signals below this threshold will be filtered out.
- Parameters
-
Minimum | RSSI Level for data telegrams (positive offset from the theoretical noise minimum of-146 dBm) |
◆ GetSerialPacket()
eoPacket eoSerialCommand::GetSerialPacket |
( |
| ) |
|
Get a copy of the last generated SerialPacket, mainly for debugging issues
- Returns
◆ GetStepCode()
eoReturn eoSerialCommand::GetStepCode |
( |
CO_RD_STEPCODE_RESPONSE & |
response | ) |
|
Gets the stepcode of the device
- Parameters
-
response | Response of the serial device |
- Returns
- EO_OK or error code
◆ ReadFilter()
◆ ReadIDBase()
◆ ReadMemory()
Read x bytes of the Flash, RAM0, DATA, IDATA, XDATA.
- Parameters
-
- Returns
- EO_OK or NOT_SUPPORTED
◆ ReadRemanRepeating()
eoReturn eoSerialCommand::ReadRemanRepeating |
( |
bool & |
isEnabled | ) |
|
Select if REMAN telegrams originating from this transceiver can be repeated
- Parameters
-
enabled,true | for enabled ; false for disabled |
◆ ReadRepeater()
◆ ReadRssiTestMode()
eoReturn eoSerialCommand::ReadRssiTestMode |
( |
bool & |
isEnabled | ) |
|
Gets if the RSSI testmode is enabled for this device
- Note
- this command is supported since TCM515 V1.3.0.0 is readRssiTestMode
◆ ReadTransparentMode()
eoReturn eoSerialCommand::ReadTransparentMode |
( |
bool & |
isEnabled | ) |
|
Reads if the Transparent Mode of the TCM515 is enabled
- Parameters
-
is | the transparent mode enabled |
- Note
- this command is supported since TCM515 V1.3.0.0
◆ ReadTXOnlyMode()
eoReturn eoSerialCommand::ReadTXOnlyMode |
( |
CO_TX_ONLY_MODE & |
txOnlyMode | ) |
|
Reads if the tx only mode.
- Parameters
-
is | the transparent mode enabled |
- Note
- this command is supported since TCM515 V1.3.0.0
◆ ReadVersion()
◆ Ready()
Parse the last received gateway.packet into ready response structure.
- Parameters
-
- Returns
- EO_OK or NOT_SUPPORTED
◆ Reset()
Order to reset the Device
- Returns
- EO_OK or NOT_SUPPORTED
◆ SetNoiseTreshold()
eoReturn eoSerialCommand::SetNoiseTreshold |
( |
uint8_t |
rssiLevel | ) |
|
Sets the RSSI noise rejection threshold level for telegram reception. Received Signals below this threshold will be filtered out.
- Parameters
-
Minimum | RSSI Level for data telegrams (positive offset from the theoretical noise minimum of-146 dBm) |
◆ Sleep()
eoReturn eoSerialCommand::Sleep |
( |
const uint32_t |
sleepPeriod | ) |
|
Order to enter the energy saving mode.
- Parameters
-
sleepPeriod | The value of deep sleep period in 10 ms units |
- Returns
- EO_OK or NOT_SUPPORTED
◆ SmartAckConfirmLearn()
eoReturn eoSerialCommand::SmartAckConfirmLearn |
( |
uint16_t |
responseTime, |
|
|
SA_CONFIRM_CODE |
confirmCode |
|
) |
| |
Response from backbone controller how to handle the received learn request.
- Parameters
-
[in] | responseTime | Response time for client in ms |
[in] | confirmCode | Confirmation code |
- Returns
- EO_OK or NOT_SUPPORTED
◆ SmartAckLearnAck()
Parse the last received gateway.packet into LearnAck response structure
- Parameters
-
- Returns
- EO_OK or NOT_SUPPORTED
◆ SmartAckLearnConfirm()
eoReturn eoSerialCommand::SmartAckLearnConfirm |
( |
uint16_t |
responseTime, |
|
|
SMARTACK_CONFIRM_CODE |
confirmCode, |
|
|
uint32_t |
postmasterID, |
|
|
uint32_t |
clientID |
|
) |
| |
Send smart ack learn answer to modify mailbox at postmaster.
- Parameters
-
responseTime | Response time for sensor in ms |
confirmCode | Learn IN/OUT |
postmasterID | Device ID of the used Post master |
clientID | Device ID of the learned IN/OUT client |
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM
◆ SmartAckLearnedClients()
Read mailbox information at the Post Master device, about all learned Smart Ack clients.
- Parameters
-
[out] | *clients | Pointer to the Learned clients response structure |
[out] | *learnedCount | Number of Learned clients |
[in] | maxLearnedCount | The size of the Learned clients response array |
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM
◆ SmartAckReadLearnMode()
Reads the learnmode state of Smart Ack Controller.
- Parameters
-
[out] | response | Pointer to the learnmode response structure |
- Returns
- EO_OK or NOT_SUPPORTED
◆ SmartAckReset()
eoReturn eoSerialCommand::SmartAckReset |
( |
uint32_t |
clientID | ) |
|
Send reset command to a Smart Ack Client.
- Parameters
-
clientID | Device ID of the client |
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM
◆ SmartAckSendLearnRequest()
eoReturn eoSerialCommand::SmartAckSendLearnRequest |
( |
uint16_t |
manufacturerID, |
|
|
uint32_t |
EEP |
|
) |
| |
Sends Smart Ack Learn Request telegram to Smart Ack Controller. This function will only be used in a Smart Ack Client.
- Parameters
-
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM
◆ SmartAckSetPostmaster()
eoReturn eoSerialCommand::SmartAckSetPostmaster |
( |
uint8_t |
mailboxCount | ) |
|
Set the amount of reclaim tries in Smart Ack Client.
- Parameters
-
mailboxCount | Amount of mailboxes available |
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM
◆ SmartAckSetReclaimTries()
eoReturn eoSerialCommand::SmartAckSetReclaimTries |
( |
uint8_t |
reclaimCount | ) |
|
Set the amount of reclaim tries in Smart Ack Client.
- Parameters
-
reclaimCount | Preseting for the number of required reclaim tries |
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM
◆ SmartAckWriteLearnMode()
Enables or disables learn mode of Smart Ack Controller.
- Parameters
-
enable | Start/End Learnmode |
extended | Simple/Advanced Learnmode |
timeout | Time-out of learnmode in ms |
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM
◆ WaitMaturity()
eoReturn eoSerialCommand::WaitMaturity |
( |
const bool |
waitMaturity | ) |
|
Waiting till end of maturity time before received radio telegrams will transmit.
- Parameters
-
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM
- Examples:
- commands_example.cpp, and tutorial5.cpp.
◆ WriteIDBase()
eoReturn eoSerialCommand::WriteIDBase |
( |
const uint32_t |
baseID | ) |
|
Write ID range base number.
- Parameters
-
- Returns
- EO_OK or NOT_SUPPORTED
◆ WriteMemory()
Write x bytes of the Flash, RAM0, DATA, IDATA, XDATA.
- Parameters
-
- Returns
- EO_OK,RET_NOT_SUPPORTED,RET_WRONG_PARAM , or RET_OPERATION_DENIED
◆ WriteMode()
Change the mode between Advanced and Compatible mode (default)
- Parameters
-
◆ WriteRemanRepeating()
eoReturn eoSerialCommand::WriteRemanRepeating |
( |
bool |
enabled | ) |
|
Select if REMAN telegrams originating from this transceiver can be repeated
- Parameters
-
enabled,true | for enabling ; false for disabling |
◆ WriteRepeater()
eoReturn eoSerialCommand::WriteRepeater |
( |
bool |
repEnable, |
|
|
const uint8_t |
repLevel |
|
) |
| |
Write Repeater Level OFF, 1, 2.
- Parameters
-
repEnable | Repeater Enable |
repLevel | Repeater Level |
- Returns
- EO_OK or NOT_SUPPORTED or WRONG_PARAM
- Examples:
- commands_example.cpp, and tutorial5.cpp.
◆ WriteRssiTestMode()
eoReturn eoSerialCommand::WriteRssiTestMode |
( |
bool |
enable, |
|
|
uint16_t |
timeOut |
|
) |
| |
The connected device will enter a state, where it sends an "RSSI" strength Signal for each received telegram
- Parameters
-
set | true to enable rssitestmode, false to disable it |
timeout | in seconds. After x seconds the rssi testmode will disable. 0 = no timeout |
- Note
- this command is supported since TCM515 V1.3.0.0
◆ WriteStartupDelay()
eoReturn eoSerialCommand::WriteStartupDelay |
( |
uint8_t |
delay | ) |
|
Sets the Start up Delay
- Parameters
-
delay | as multiple of 10 ms |
◆ WriteTransparentMode()
eoReturn eoSerialCommand::WriteTransparentMode |
( |
bool |
enable | ) |
|
Enables or disables the Transparent Mode of the TCM515. It's recommended to enable the transparent mode with TCM515, as otherwise TCM515 will do chaining/dechaning of telegrams, or execute security functions. EoLink is able to handle more then one chain and is more powerful then the TCM515.
- Parameters
-
enable | =true enable transparent mode |
- Note
- this command is supported since TCM515 V1.3.0.0
◆ WriteTXOnlyMode()
eoReturn eoSerialCommand::WriteTXOnlyMode |
( |
CO_TX_ONLY_MODE |
txOnlyMode | ) |
|
Enables or disables the TX Only Mode of the TCM515.
- Parameters
-
enable | =true enable transparent mode |
- Note
- this command is supported since TCM515 V1.3.0.0