Skip to content

Commit 9b91e1b

Browse files
authored
feat: added text message inbound type (#22)
1 parent 0298f28 commit 9b91e1b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
namespace Daqifi.Core.Communication.Messages;
2+
3+
/// <summary>
4+
/// Represents a message containing incoming data from the DAQiFi device,
5+
/// formatted as a string.
6+
/// Implements IInboundMessage.
7+
/// </summary>
8+
public class TextMessage : IInboundMessage<string>
9+
{
10+
/// <summary>
11+
/// Gets the data associated with the message, which is a string
12+
/// received from the device.
13+
/// </summary>
14+
public string Data { get; }
15+
16+
/// <summary>
17+
/// Initializes a new instance of the <see cref="TextMessage"/> class
18+
/// to wrap incoming device data.
19+
/// </summary>
20+
/// <param name="message">The string received from the device.</param>
21+
public TextMessage(string message)
22+
{
23+
Data = message;
24+
}
25+
}

0 commit comments

Comments
 (0)