stefandreyer / CODESYS-MQTT

MQTT client library for CODESYS, supporting all QoS
MIT License
113 stars 26 forks source link

Configure mqtt broker in testfunction #21

Closed sanderobdeijn closed 5 years ago

sanderobdeijn commented 5 years ago

Since http://test.mosquitto.org doesn't seem to work anymore I want to test my setup with a different broker. Is there a way to configure the broker in the test function. Or is it better to go directly to the normal functions and the real-life examples?

stefandreyer commented 5 years ago

Hi Sander,

on some Test functions you can give the broker as a input. There you can Change the broker within the call like:

testHighRecivePayload(broker:= 'broker.hivemq.com:1883', Count:= 9999, repeatTime:= T#2S);

In the GreatExamplesOfAdvanteges you can change the broker in the MQTT_STUFF FB.

In the TestOutOfTheBox Projects you can Change the broker within the call too.

The test functions are not so nice like the TestMQTTGihub… Projects, because I use them just for implementation testing.

Actually I fixed a typo in the Projects, take a look to them to get a feeling, especially into the

GreatExampleOfAdvantages project.

broker.hivemq.com:1883 seems to work actually. Dashboard: https://www.hivemq.com/public-mqtt-broker/ BR Stefan