Skip to content

Commit 5b06ae6

Browse files
committed
Update Device classes to new schema
1 parent 0fbef6a commit 5b06ae6

File tree

2 files changed

+149
-149
lines changed

2 files changed

+149
-149
lines changed

Interface/Harp.AnalogInput/AsyncDevice.Generated.cs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -45,39 +45,39 @@ internal AsyncDevice(string portName)
4545
}
4646

4747
/// <summary>
48-
/// Asynchronously reads the contents of the StartAcquisition register.
48+
/// Asynchronously reads the contents of the AcquisitionState register.
4949
/// </summary>
5050
/// <returns>
5151
/// A task that represents the asynchronous read operation. The <see cref="Task{TResult}.Result"/>
5252
/// property contains the register payload.
5353
/// </returns>
54-
public async Task<EnableFlag> ReadStartAcquisitionAsync()
54+
public async Task<EnableFlag> ReadAcquisitionStateAsync()
5555
{
56-
var reply = await CommandAsync(HarpCommand.ReadByte(StartAcquisition.Address));
57-
return StartAcquisition.GetPayload(reply);
56+
var reply = await CommandAsync(HarpCommand.ReadByte(AcquisitionState.Address));
57+
return AcquisitionState.GetPayload(reply);
5858
}
5959

6060
/// <summary>
61-
/// Asynchronously reads the timestamped contents of the StartAcquisition register.
61+
/// Asynchronously reads the timestamped contents of the AcquisitionState register.
6262
/// </summary>
6363
/// <returns>
6464
/// A task that represents the asynchronous read operation. The <see cref="Task{TResult}.Result"/>
6565
/// property contains the timestamped register payload.
6666
/// </returns>
67-
public async Task<Timestamped<EnableFlag>> ReadTimestampedStartAcquisitionAsync()
67+
public async Task<Timestamped<EnableFlag>> ReadTimestampedAcquisitionStateAsync()
6868
{
69-
var reply = await CommandAsync(HarpCommand.ReadByte(StartAcquisition.Address));
70-
return StartAcquisition.GetTimestampedPayload(reply);
69+
var reply = await CommandAsync(HarpCommand.ReadByte(AcquisitionState.Address));
70+
return AcquisitionState.GetTimestampedPayload(reply);
7171
}
7272

7373
/// <summary>
74-
/// Asynchronously writes a value to the StartAcquisition register.
74+
/// Asynchronously writes a value to the AcquisitionState register.
7575
/// </summary>
7676
/// <param name="value">The value to be stored in the register.</param>
7777
/// <returns>The task object representing the asynchronous write operation.</returns>
78-
public async Task WriteStartAcquisitionAsync(EnableFlag value)
78+
public async Task WriteAcquisitionStateAsync(EnableFlag value)
7979
{
80-
var request = StartAcquisition.FromPayload(MessageType.Write, value);
80+
var request = AcquisitionState.FromPayload(MessageType.Write, value);
8181
await CommandAsync(request);
8282
}
8383

@@ -171,39 +171,39 @@ public async Task WriteRangeAndFilterAsync(RangeAndFilterConfig value)
171171
}
172172

173173
/// <summary>
174-
/// Asynchronously reads the contents of the SamplingFrequency register.
174+
/// Asynchronously reads the contents of the SamplingRate register.
175175
/// </summary>
176176
/// <returns>
177177
/// A task that represents the asynchronous read operation. The <see cref="Task{TResult}.Result"/>
178178
/// property contains the register payload.
179179
/// </returns>
180-
public async Task<SamplingFrequencyConfig> ReadSamplingFrequencyAsync()
180+
public async Task<SamplingRateConfig> ReadSamplingRateAsync()
181181
{
182-
var reply = await CommandAsync(HarpCommand.ReadByte(SamplingFrequency.Address));
183-
return SamplingFrequency.GetPayload(reply);
182+
var reply = await CommandAsync(HarpCommand.ReadByte(SamplingRate.Address));
183+
return SamplingRate.GetPayload(reply);
184184
}
185185

186186
/// <summary>
187-
/// Asynchronously reads the timestamped contents of the SamplingFrequency register.
187+
/// Asynchronously reads the timestamped contents of the SamplingRate register.
188188
/// </summary>
189189
/// <returns>
190190
/// A task that represents the asynchronous read operation. The <see cref="Task{TResult}.Result"/>
191191
/// property contains the timestamped register payload.
192192
/// </returns>
193-
public async Task<Timestamped<SamplingFrequencyConfig>> ReadTimestampedSamplingFrequencyAsync()
193+
public async Task<Timestamped<SamplingRateConfig>> ReadTimestampedSamplingRateAsync()
194194
{
195-
var reply = await CommandAsync(HarpCommand.ReadByte(SamplingFrequency.Address));
196-
return SamplingFrequency.GetTimestampedPayload(reply);
195+
var reply = await CommandAsync(HarpCommand.ReadByte(SamplingRate.Address));
196+
return SamplingRate.GetTimestampedPayload(reply);
197197
}
198198

199199
/// <summary>
200-
/// Asynchronously writes a value to the SamplingFrequency register.
200+
/// Asynchronously writes a value to the SamplingRate register.
201201
/// </summary>
202202
/// <param name="value">The value to be stored in the register.</param>
203203
/// <returns>The task object representing the asynchronous write operation.</returns>
204-
public async Task WriteSamplingFrequencyAsync(SamplingFrequencyConfig value)
204+
public async Task WriteSamplingRateAsync(SamplingRateConfig value)
205205
{
206-
var request = SamplingFrequency.FromPayload(MessageType.Write, value);
206+
var request = SamplingRate.FromPayload(MessageType.Write, value);
207207
await CommandAsync(request);
208208
}
209209

@@ -467,39 +467,39 @@ public async Task WriteDigitalOutputStateAsync(DigitalOutputs value)
467467
}
468468

469469
/// <summary>
470-
/// Asynchronously reads the contents of the StartSyncOutput register.
470+
/// Asynchronously reads the contents of the SyncOutput register.
471471
/// </summary>
472472
/// <returns>
473473
/// A task that represents the asynchronous read operation. The <see cref="Task{TResult}.Result"/>
474474
/// property contains the register payload.
475475
/// </returns>
476-
public async Task<StartSyncOutputTargets> ReadStartSyncOutputAsync()
476+
public async Task<StartSyncOutputTarget> ReadSyncOutputAsync()
477477
{
478-
var reply = await CommandAsync(HarpCommand.ReadByte(StartSyncOutput.Address));
479-
return StartSyncOutput.GetPayload(reply);
478+
var reply = await CommandAsync(HarpCommand.ReadByte(SyncOutput.Address));
479+
return SyncOutput.GetPayload(reply);
480480
}
481481

482482
/// <summary>
483-
/// Asynchronously reads the timestamped contents of the StartSyncOutput register.
483+
/// Asynchronously reads the timestamped contents of the SyncOutput register.
484484
/// </summary>
485485
/// <returns>
486486
/// A task that represents the asynchronous read operation. The <see cref="Task{TResult}.Result"/>
487487
/// property contains the timestamped register payload.
488488
/// </returns>
489-
public async Task<Timestamped<StartSyncOutputTargets>> ReadTimestampedStartSyncOutputAsync()
489+
public async Task<Timestamped<StartSyncOutputTarget>> ReadTimestampedSyncOutputAsync()
490490
{
491-
var reply = await CommandAsync(HarpCommand.ReadByte(StartSyncOutput.Address));
492-
return StartSyncOutput.GetTimestampedPayload(reply);
491+
var reply = await CommandAsync(HarpCommand.ReadByte(SyncOutput.Address));
492+
return SyncOutput.GetTimestampedPayload(reply);
493493
}
494494

495495
/// <summary>
496-
/// Asynchronously writes a value to the StartSyncOutput register.
496+
/// Asynchronously writes a value to the SyncOutput register.
497497
/// </summary>
498498
/// <param name="value">The value to be stored in the register.</param>
499499
/// <returns>The task object representing the asynchronous write operation.</returns>
500-
public async Task WriteStartSyncOutputAsync(StartSyncOutputTargets value)
500+
public async Task WriteSyncOutputAsync(StartSyncOutputTarget value)
501501
{
502-
var request = StartSyncOutput.FromPayload(MessageType.Write, value);
502+
var request = SyncOutput.FromPayload(MessageType.Write, value);
503503
await CommandAsync(request);
504504
}
505505
}

0 commit comments

Comments
 (0)