mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-06 01:48:13 +00:00
Add unit tests for MQTT (#5724)
* Add unit tests for MQTT * Test received fields
This commit is contained in:
@@ -142,7 +142,7 @@ class MeshService
|
||||
void sendToPhone(meshtastic_MeshPacket *p);
|
||||
|
||||
/// Send an MQTT message to the phone for client proxying
|
||||
void sendMqttMessageToClientProxy(meshtastic_MqttClientProxyMessage *m);
|
||||
virtual void sendMqttMessageToClientProxy(meshtastic_MqttClientProxyMessage *m);
|
||||
|
||||
/// Send a ClientNotification to the phone
|
||||
void sendClientNotification(meshtastic_ClientNotification *cn);
|
||||
|
||||
@@ -145,7 +145,7 @@ class NodeDB
|
||||
return &meshNodes->at(x);
|
||||
}
|
||||
|
||||
meshtastic_NodeInfoLite *getMeshNode(NodeNum n);
|
||||
virtual meshtastic_NodeInfoLite *getMeshNode(NodeNum n);
|
||||
size_t getNumMeshNodes() { return numMeshNodes; }
|
||||
|
||||
// returns true if the maximum number of nodes is reached or we are running low on memory
|
||||
|
||||
@@ -431,6 +431,7 @@ void RadioLibInterface::handleReceiveInterrupt()
|
||||
// nodes.
|
||||
meshtastic_MeshPacket *mp = packetPool.allocZeroed();
|
||||
|
||||
// Keep the assigned fields in sync with src/mqtt/MQTT.cpp:onReceiveProto
|
||||
mp->from = radioBuffer.header.from;
|
||||
mp->to = radioBuffer.header.to;
|
||||
mp->id = radioBuffer.header.id;
|
||||
|
||||
@@ -71,7 +71,7 @@ class Router : protected concurrency::OSThread
|
||||
* RadioInterface calls this to queue up packets that have been received from the radio. The router is now responsible for
|
||||
* freeing the packet
|
||||
*/
|
||||
void enqueueReceivedMessage(meshtastic_MeshPacket *p);
|
||||
virtual void enqueueReceivedMessage(meshtastic_MeshPacket *p);
|
||||
|
||||
/**
|
||||
* Send a packet on a suitable interface. This routine will
|
||||
|
||||
Reference in New Issue
Block a user