New ot API to set a message to use direct tx (#1245)

- New OpenThread API `otMessageSetDirectTransmission()` to force
  a message to forwarded using direct transmission even if the
  destination is a sleepy-node.

- The new API is used from `NcpBase` from set handler of insecure
  network stream spinel `STREAM_NET_INSECURE` property.
This commit is contained in:
Abtin Keshavarzian
2017-02-02 13:51:54 -08:00
committed by Jonathan Hui
parent e8b53a3804
commit 93f29a5fea
4 changed files with 30 additions and 1 deletions
+11
View File
@@ -177,6 +177,17 @@ ThreadError otSetMessageOffset(otMessage aMessage, uint16_t aOffset);
*/
bool otIsMessageLinkSecurityEnabled(otMessage aMessage);
/**
* This function sets/forces the message to be forwarded using direct transmission.
* Default setting for a new message is `false`.
*
* @param[in] aMessage A pointer to a message buffer.
* @param[in] aEnabled If `true` message will be forced to use direct transmission. If `false` message will
* follow the normal procedure.
*
*/
void otMessageSetDirectTransmission(otMessage aMessage, bool aEnabled);
/**
* Append bytes to a message.
*