File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -14,18 +14,19 @@ A library that gives you the possibility to create an EmBER+ consumer.
14
14
{
15
15
// Create TCP connection
16
16
var tcpClient = new TcpClient ();
17
- await tcpClient .ConnectAsync (" localhost" , " 9001" );
17
+ await tcpClient .ConnectAsync (" localhost" , 9001 );
18
18
19
19
// Establish S101 protocol
20
20
// S101 provides message packaging, CRC integrity checks and a keep-alive mechanism.
21
21
var stream = tcpClient .GetStream ();
22
22
var s101Client = new S101Client (tcpClient , stream .ReadAsync , stream .WriteAsync );
23
23
24
24
// Create consumer
25
- var consumer = await Consumer <MyRoot >.CreateAsync (s101Client ));
25
+ var consumer = await Consumer <MyRoot >.CreateAsync (s101Client );
26
+ await consumer .SendAsync ();
26
27
27
28
// Navigate down tree until IParameter is reached or desired INode
28
- var mixer = (INode )root .Children .First (c => c .Identifier == " MixerEmberIdentifier" );
29
+ var mixer = (consumer . Root as INode ).Children .First (c => c .Identifier == " MixerEmberIdentifier" );
29
30
var mute = (IParameter )mixer .Children .First (c => c .Identifier == " Mute" );
30
31
31
32
mute .Value = true ;
You can’t perform that action at this time.
0 commit comments