-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(settings): serializable settings for MQTT broker configuration
Added a class to store MQTT broker settings.
- Loading branch information
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Xml.Serialization; | ||
using UnityEngine; | ||
|
||
namespace M2MqttUnity | ||
{ | ||
/// <summary> | ||
/// Serializable settings for MQTT broker configuration. | ||
/// </summary> | ||
[Serializable] | ||
[XmlType(TypeName = "broker-settings")] | ||
public class BrokerSettings | ||
{ | ||
[Tooltip("Address of the host running the broker")] | ||
public string host = "localhost"; | ||
|
||
[Tooltip("Port used to access the broker")] | ||
public int port = 1883; | ||
|
||
[Tooltip("Encrypted access to the broker")] | ||
public bool encrypted = false; | ||
|
||
[Tooltip("Optional alternate addresses, used if the previous host is not accessible")] | ||
public string[] alternateAddress; | ||
} | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.