Enabled topic_unadvertised

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2017-01-09 15:41:54 -08:00
committed by Lorenz Meier
parent 9834155d09
commit b08e70b65a
4 changed files with 24 additions and 25 deletions
@@ -76,8 +76,6 @@ int16_t uORB::KraitFastRpcChannel::topic_advertised(const char *messageName)
return rc;
}
/*
//TODO: verify if needed
int16_t uORB::KraitFastRpcChannel::topic_unadvertised(const char *messageName)
{
int16_t rc = 0;
@@ -86,7 +84,6 @@ int16_t uORB::KraitFastRpcChannel::topic_unadvertised(const char *messageName)
PX4_DEBUG("Response for TopicUnadvertised for [%s], rc[%d]\n", messageName, rc);
return rc;
}
*/
int16_t uORB::KraitFastRpcChannel::add_subscription(const char *messageName, int32_t msgRateInHz)
{
@@ -280,8 +277,11 @@ void uORB::KraitFastRpcChannel::fastrpc_recv_thread()
_RxHandler->process_received_message(messageName,
header->_DataLen, topic_data);
} else if (header->_MsgType == _CONTROL_MSG_TYPE_ADVERTISE) {
PX4_DEBUG( "Received topic for control message for: [%s] len[%d]\n", messageName, data_length );
PX4_DEBUG( "Received topic advertise message for: [%s] len[%d]\n", messageName, data_length );
_RxHandler->process_remote_topic(messageName, true);
} else if (header->_MsgType == _CONTROL_MSG_TYPE_UNADVERTISE) {
PX4_DEBUG( "Received topic unadvertise message for: [%s] len[%d]\n", messageName, data_length );
_RxHandler->process_remote_topic(messageName, false);
}
}
@@ -95,7 +95,7 @@ public:
* Note: This does not mean that the receiver as received it.
* otherwise = failure.
*/
//virtual int16_t topic_unadvertised(const char *messageName);
virtual int16_t topic_unadvertised(const char *messageName);
/**
* @brief Interface to notify the remote entity of interest of a
@@ -168,6 +168,7 @@ private: // data members
static const int32_t _CONTROL_MSG_TYPE_REMOVE_SUBSCRIBER = 2;
static const int32_t _DATA_MSG_TYPE = 3;
static const int32_t _CONTROL_MSG_TYPE_ADVERTISE = 4;
static const int32_t _CONTROL_MSG_TYPE_UNADVERTISE = 5;
struct BulkTransferHeader {
uint16_t _MsgType;