Skip to content

Commit da0dc74

Browse files
Merge pull request #83 from virizar/set_qos_correctly_from_config
Replaced instances of QoS with Qos
2 parents b819809 + 8cf926d commit da0dc74

22 files changed

Lines changed: 44 additions & 44 deletions

adapter/Modules/MTConnect.NET-AdapterModule-MQTT/Module.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public override bool AddObservations(IEnumerable<IObservationInput> observations
162162
{
163163
var messageBuilder = new MqttApplicationMessageBuilder();
164164
messageBuilder.WithTopic($"{_configuration.Topic}/observations");
165-
messageBuilder.WithQualityOfServiceLevel((MQTTnet.Protocol.MqttQualityOfServiceLevel)_configuration.QoS);
165+
messageBuilder.WithQualityOfServiceLevel((MQTTnet.Protocol.MqttQualityOfServiceLevel)_configuration.Qos);
166166
messageBuilder.WithPayload(formatResult.Content);
167167
messageBuilder.WithRetainFlag(true);
168168

@@ -185,7 +185,7 @@ public override bool AddAssets(IEnumerable<IAssetInput> assets)
185185
{
186186
var messageBuilder = new MqttApplicationMessageBuilder();
187187
messageBuilder.WithTopic($"{_configuration.Topic}/assets");
188-
messageBuilder.WithQualityOfServiceLevel((MQTTnet.Protocol.MqttQualityOfServiceLevel)_configuration.QoS);
188+
messageBuilder.WithQualityOfServiceLevel((MQTTnet.Protocol.MqttQualityOfServiceLevel)_configuration.Qos);
189189
messageBuilder.WithPayload(formatResult.Content);
190190
messageBuilder.WithRetainFlag(true);
191191

@@ -210,7 +210,7 @@ public override bool AddDevices(IEnumerable<IDeviceInput> devices)
210210
{
211211
var messageBuilder = new MqttApplicationMessageBuilder();
212212
messageBuilder.WithTopic($"{_configuration.Topic}/device");
213-
messageBuilder.WithQualityOfServiceLevel((MQTTnet.Protocol.MqttQualityOfServiceLevel)_configuration.QoS);
213+
messageBuilder.WithQualityOfServiceLevel((MQTTnet.Protocol.MqttQualityOfServiceLevel)_configuration.Qos);
214214
messageBuilder.WithPayload(formatResult.Content);
215215
messageBuilder.WithRetainFlag(true);
216216

adapter/Modules/MTConnect.NET-AdapterModule-MQTT/ModuleConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ModuleConfiguration
1515

1616
public string ClientId { get; set; }
1717

18-
public int QoS { get; set; }
18+
public int Qos { get; set; }
1919

2020

2121
public string CertificateAuthority { get; set; }

agent/Modules/MTConnect.NET-AgentModule-MqttAdapter/Module.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ private async Task Worker()
149149

150150
if (!string.IsNullOrEmpty(_configuration.TopicPrefix))
151151
{
152-
// Set QoS
152+
// Set Qos
153153
MqttQualityOfServiceLevel qos;
154-
switch (_configuration.QoS)
154+
switch (_configuration.Qos)
155155
{
156156
case 1: qos = MqttQualityOfServiceLevel.AtLeastOnce; break;
157157
case 2: qos = MqttQualityOfServiceLevel.ExactlyOnce; break;
@@ -161,7 +161,7 @@ private async Task Worker()
161161
// Subscribe to Topic
162162
await _mqttClient.SubscribeAsync($"{_configuration.TopicPrefix}/#", qos);
163163

164-
Log(MTConnectLogLevel.Information, $"MQTT Adapter Subscribed to ({_configuration.TopicPrefix} @ QoS = {qos})");
164+
Log(MTConnectLogLevel.Information, $"MQTT Adapter Subscribed to ({_configuration.TopicPrefix} @ Qos = {qos})");
165165
}
166166
else
167167
{

agent/Modules/MTConnect.NET-AgentModule-MqttAdapter/MqttAdapterModuleConfiguration.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public class MqttAdapterModuleConfiguration
4747
public bool CleanSession { get; set; }
4848

4949
/// <summary>
50-
/// Sets the Quality Of Service (QoS) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
50+
/// Sets the Quality Of Service (Qos) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
5151
/// </summary>
52-
public int QoS { get; set; }
52+
public int Qos { get; set; }
5353

5454

5555
/// <summary>
@@ -98,7 +98,7 @@ public MqttAdapterModuleConfiguration()
9898
{
9999
Server = "localhost";
100100
Port = 1883;
101-
QoS = 1;
101+
Qos = 1;
102102
CleanSession = true;
103103
Timeout = 5000;
104104
ReconnectInterval = 10000;

agent/Modules/MTConnect.NET-AgentModule-MqttAdapter/README-Nuget.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ modules:
3131

3232
* `cleanSession` - Sets the CleanSession flag (true or false)
3333

34-
* `qos` - Sets the Quality Of Service (QoS) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
34+
* `qos` - Sets the Quality Of Service (Qos) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
3535

3636
* `certificateAuthority` - The path to the Certificate Authority file
3737

agent/Modules/MTConnect.NET-AgentModule-MqttAdapter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ modules:
4949

5050
* `cleanSession` - Sets the CleanSession flag (true or false)
5151

52-
* `qos` - Sets the Quality Of Service (QoS) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
52+
* `qos` - Sets the Quality Of Service (Qos) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
5353

5454
* `certificateAuthority` - The path to the Certificate Authority file
5555

agent/Modules/MTConnect.NET-AgentModule-MqttBroker/Module.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Module(IMTConnectAgentBroker mtconnectAgent, object configuration) : base
5656

5757
case MqttTopicStructure.Entity:
5858

59-
_entityServer = new MTConnectMqttEntityServer(_configuration.TopicPrefix, _configuration.DocumentFormat, _configuration.QoS);
59+
_entityServer = new MTConnectMqttEntityServer(_configuration.TopicPrefix, _configuration.DocumentFormat, _configuration.Qos);
6060
Agent.DeviceAdded += AgentDeviceAdded;
6161
Agent.ObservationAdded += AgentObservationAdded;
6262
Agent.AssetAdded += AgentAssetAdded;

agent/Modules/MTConnect.NET-AgentModule-MqttBroker/MqttBrokerModuleConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ public class MqttBrokerModuleConfiguration : IMTConnectMqttDocumentServerConfigu
4040
public int RestartInterval { get; set; }
4141

4242
/// <summary>
43-
/// Sets the Quality Of Service (QoS) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
43+
/// Sets the Quality Of Service (Qos) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
4444
/// </summary>
45-
public int QoS { get; set; }
45+
public int Qos { get; set; }
4646

4747

4848
/// <summary>

agent/Modules/MTConnect.NET-AgentModule-MqttBroker/README-Nuget.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ modules:
1818

1919
* `timeout` - The timeout (in milliseconds) to use for connection and read/write
2020

21-
* `qos` - Sets the Quality Of Service (QoS) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
21+
* `qos` - Sets the Quality Of Service (Qos) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
2222

2323
* `initialDelay` - The time (in milliseconds) to delay after initial Module start (to allow for TCP binding)
2424

agent/Modules/MTConnect.NET-AgentModule-MqttBroker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ modules:
3636

3737
* `timeout` - The timeout (in milliseconds) to use for connection and read/write
3838

39-
* `qos` - Sets the Quality Of Service (QoS) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
39+
* `qos` - Sets the Quality Of Service (Qos) to use. 0 = At Most Once, 1 = At least Once, 2 = Exactly Once
4040

4141
* `initialDelay` - The time (in milliseconds) to delay after initial Module start (to allow for TCP binding)
4242

0 commit comments

Comments
 (0)